tag:blogger.com,1999:blog-1323683415527527391.post3869457243897441297..comments2024-02-29T00:58:22.323-08:00Comments on Reefwing Robotics: Connecting the Duinotech 3 Axis Compass to an ArduinoDavid Suchhttp://www.blogger.com/profile/10502842288604398442noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-1323683415527527391.post-68127837823609202542022-10-16T00:04:36.430-07:002022-10-16T00:04:36.430-07:00Thank you david!Thank you david!Justinhttps://www.blogger.com/profile/07676165245319825316noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-6505774742774817062022-10-14T00:26:13.960-07:002022-10-14T00:26:13.960-07:00Ok I've worked it out! It looks like after 202...Ok I've worked it out! It looks like after 2021 the Duinotech 3-axis compass started using the Memsic MMC5883MA instead of the Honeywell HMC5883L. I've moved most of my writing to Medium these days, and I've done a full explanation there - https://reefwing.medium.com/connecting-the-duinotech-3-axis-compass-to-an-arduino-b13c28d7d936David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-56463008035901564132022-10-11T07:49:06.749-07:002022-10-11T07:49:06.749-07:00Awesome, im eager to see what you find.Awesome, im eager to see what you find.Justinhttps://www.blogger.com/profile/07676165245319825316noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-33237034279700023472022-10-10T00:04:41.715-07:002022-10-10T00:04:41.715-07:00I've worked out part of the problem - the new ...I've worked out part of the problem - the new module is very different to the one I bought back in 2015. Even though the Jaycar model number is unchanged, the new breakout board has different parts. I suspect it is using a clone of the Honeywell magnetometer chip which is why the I2C address is different. I'll see if I can get it working and then do a write up on it.David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-16272052080158389082022-10-09T15:48:46.995-07:002022-10-09T15:48:46.995-07:00I'll see if I can get one of the new boards my...I'll see if I can get one of the new boards myself today and work out what has changed. This is obviously a common problem.David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-52915683741282210042022-10-09T01:26:42.926-07:002022-10-09T01:26:42.926-07:00My chip reads 5883 601uMy chip reads 5883 601uJustinhttps://www.blogger.com/profile/07676165245319825316noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-9449243920725719062022-10-09T01:10:51.700-07:002022-10-09T01:10:51.700-07:00Hi @Justin - can you have a look on the board and ...Hi @Justin - can you have a look on the board and see if the sensor is still a HMC5883L? Its possible that they have changed the sensor type. The good news is that you can detect a device on the I2C bus.David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-70685722010217181062022-10-09T00:31:27.202-07:002022-10-09T00:31:27.202-07:00I am having the same issue where the address comes...I am having the same issue where the address comes up as 0x30 and sensor values do not change. I have tried what @David Such has suggested, changing the i2c address to 0x30 within the library (this library: https://www.arduino.cc/reference/en/libraries/grove-3-axis-digital-compass-hmc5883l/) but it has unfortunately made no difference. My module was also form Jaycar.Justinhttps://www.blogger.com/profile/07676165245319825316noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-28051326992321268892022-08-12T17:25:52.584-07:002022-08-12T17:25:52.584-07:00Hi @Hilary - VK2IUW,
The library I link to above ...Hi @Hilary - VK2IUW,<br /><br />The library I link to above doesn't look like its being maintained. Try this one - https://www.arduino.cc/reference/en/libraries/grove-3-axis-digital-compass-hmc5883l/<br /><br />You will need to change the I2C address of the sensor (HMC5883L_ADDRESS) to 0x30.David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-90511355620089235942022-08-12T04:29:17.126-07:002022-08-12T04:29:17.126-07:00I am having the same issue as Peter. Using i2scann...I am having the same issue as Peter. Using i2scanner my address is also 0x30. Any idea of how to fix this?Hilary - VK2IUWhttps://www.blogger.com/profile/02590714135068329636noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-11268663344529576642021-05-10T17:14:47.617-07:002021-05-10T17:14:47.617-07:00Happy to help if I can. Its good that you can see ...Happy to help if I can. Its good that you can see the device on the I2C bus. Pity the library doesn't work but it is getting a bit old, the API may have changed. The next thing I would try is getting some sort of response from the sensor. I would go back to first principles and try accessing the registers as per the data sheet. For example:<br /><br />Using the (power-on) initialization process for “single-measurement mode”:<br /><br />1. Write CRA (00) – send 0x3C 0x00 0x70 (8-average, 15 Hz default or any other rate, normal measurement)<br />2. Write CRB (01) – send 0x3C 0x01 0xA0 (Gain=5, or any other desired gain)<br />3. For each measurement query:<br />Write Mode (02) – send 0x3C 0x02 0x01 (Single-measurement mode)<br />Wait 6 ms or monitor status register or DRDY hardware interrupt pin<br />Send 0x3D 0x06 (Read all 6 bytes. If gain is changed then this data set is using previous gain)<br />Convert three 16-bit 2’s compliment hex values to decimal values and assign to X, Z, Y, respectively.David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-54443268459109925022021-05-10T03:42:25.364-07:002021-05-10T03:42:25.364-07:00Oh, and I also found this http://electronoobs.com/...Oh, and I also found this http://electronoobs.com/eng_arduino_tut77.php which did let me use my own address (in case it helps others), but it didn't help me.Peter Wallheadhttps://www.blogger.com/profile/00747677432962272161noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-75201017722824610802021-05-10T03:39:24.813-07:002021-05-10T03:39:24.813-07:00Thanks David. So the good news is that my Arduino ...Thanks David. So the good news is that my Arduino Uno can detect the sensor at address 0x30 by using that above scanner, but the bad news is that I haven't quite worked out how to use the address in the example code. I did try to shortcut it by using the value as the address value in HMC5883L.h, but that didn't seem to work. I appreciate your help and advice, but I don't expect it for free :)Peter Wallheadhttps://www.blogger.com/profile/00747677432962272161noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-86576164467545449662021-05-09T15:50:21.561-07:002021-05-09T15:50:21.561-07:00Hi Peter - thanks for the kind words. The first th...Hi Peter - thanks for the kind words. The first thing I would check is that the arduino can see an I2C device on the bus. You may be using the wrong address. Use something like i2cscanner (https://gist.github.com/tfeldmann/5411375).David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-57240895142111484832021-05-09T07:07:38.454-07:002021-05-09T07:07:38.454-07:00Despite both your and Korneliusz's excellent t...Despite both your and Korneliusz's excellent tutorials (and checking my wiring) my Arduino Uno still won't recognise this compass module :(<br /><br />"Could not find a valid HMC5883L sensor, check wiring!"<br /><br />Nothing you can do about this, David, I'm just sharing my pain of undocumented Jaycar products.Peter Wallheadhttps://www.blogger.com/profile/00747677432962272161noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-78402856276996998872019-04-06T15:38:23.187-07:002019-04-06T15:38:23.187-07:00Glad it was useful!Glad it was useful!David Suchhttps://www.blogger.com/profile/10502842288604398442noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-59357110066150932232019-04-06T04:25:10.100-07:002019-04-06T04:25:10.100-07:00Thanks mate!Thanks mate!thereforehttps://www.blogger.com/profile/10877347460167309008noreply@blogger.comtag:blogger.com,1999:blog-1323683415527527391.post-82501525012224426692016-12-23T20:22:38.381-08:002016-12-23T20:22:38.381-08:00Wow. Thank you for providing this great informatio...Wow. Thank you for providing this great information.<br />I will need to do some homework to understand all this.<br />Cheers!<br />Anonymoushttps://www.blogger.com/profile/06125042801569948846noreply@blogger.com