Asked — Edited

Compass Compatibility With ARC

Hi , I have been shopping for sensors and reading about 2d mapping using.radar.extra.and I also read on some random sites that a good electronic compass is a good addition to get your robot correct orientation if it deviated from a original path avoiding a object or if the little guy.just.just drive perfectly straight. are these compass modules useful.to.tell your.robot which.direction to.go.or slightly correct.itself? I apologize for all the random periods because I just bought a new Samsung galaxy note and IM still getting use to it. The auto correct is changing words to what it thinks I should have said I guess lol


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

United Kingdom
#25  

@budeI0

Sounds interesting keep us posted hope you get the compass working ))

Netherlands
#26  

@winstn60 No succes with the 100 ohm resistors...

Any other ideas?

#27  

what pull up resestor do you have on each line,should be 10 k.it seems if you dont have any when the signal or data line with stay low.its only needed if using one if more are hook up to I2C port still only need the 2 10 k resistors,one is SCL other is CLK ,then you have GND and V+ make shore all the wire are connected correctly

sorry another edit here is info on the resistors needed The value of the resistors is not critical. I have seen anything from 1k8 (1800 ohms) to 47k (47000 ohms) used. 1k8, 4k7 and 10k are common values, but anything in this range should work OK. I recommend 1k8 as this gives you the best performance. If the resistors are missing, the SCL and SDA lines will always be low - nearly 0 volts - and the I2C bus will not work

WINSTN60 you sad this The device I like is SparkFun Compass Module - HMC6352 Product Code: SEN-07915 which has I2C and all the documentation perhaps someone on here has already added it to EZB or has another opinion

a lot better choice thats used in robotics a lot is CMPS10 HIGHER ACCURACY .1 DEGREE compare to SPARKFUN compass at .5 degree and at the same cost $34.95 from dfrobots both have I2C interface and replaced the very popular CMPS03 compass used in robotics alot ,whats added is tilt compensated CMPS10 COMPASS

i have CMPS03 compass and one from china ,HOPE SOON to do some testing and make a I2C code for it,should work with the CMPS10 witch i am going to have on order too

JOSH that compass from SHURE electronics that DJ is using has very bad accuracy Accuracy1 2 to 5 deg compare to .5 deg on sparkfun and .1 deg on CMPS10 ITS LITTLE MORE PRICE FOR THEM but worth the extra cost for better navigation

here is some great info on using the I2C buss i found awhile back I2C BUSS tutorial

United Kingdom
#28  

Hi budeI0

Thats frustrating hopefully I will have the same compass module as you delivered in a few days and I do have a scope. Also worth trying pull up resistors as robotmaker states

Read this from DJ in I2C help on this site

" i2c Wire Length and Pull Up Resistors

If you modify or extend the wire on the i2c device, keep the individual wires (GND, +5, SDA, SCL) from being twisted together. You will notice i2c cables are flat, much like an older IDE Hard Drive Cable. Building your own i2c extension cable is not easy with regular wire. You can try different pull-up resistors, which decreases the sensitivity of your communication, but also removes noise. Ideally you should be using a special i2c cable.

Pull-Up resistors are connected between +5 to SDA and +5 to SCL. They are required for i2c device communication. The EZ-B has 2 pull-up resistors on board for the i2c. If a long thick wire is used (specifically if twisted), you may need to add 2 more resistors. The pull-ups range from 1k ohm to 10k ohm. You may need to expirement with a variety of resistors to find your ideal value"

#29  

@BUDEI0 i would read the IC2 page i put a link too it tell you all info on using I2C buss ,from clock pluses to how to write a code for it

#30  

another update on compass boards testing,i got a free gauss meter (magnetic field meter) from work ,since i am in the design and test lab at work where i build high precision test equipment for the tester we make so will be able to do tests on the magnetic compasses fairly soon,as soon as i get the CMPS10 from china,can test all 3 of them,accuracy i cant check but specs tell you the accuracy mostly only checking how far from magnetic fields it needs to be away and I2C distance problem

#31  

Hey RobotMaker,

I enjoy your well thought out posts.

Have you received your compass yet? When you do please post your i2c code here on your procedure for reading from it. I'm trying to read the I2C port of an IMU 6050 but I'm not understanding the EZ script code for that yet. The specs say it's address is 0x69 or 0x68 but with some sample code from someone reading another device would enable me to change it to this device.

I am using 4.7K pull up resisters and under 3 inch untwisted wires with the EZ-B 3.3 volts.

Here's one thing I've tried but not sure how far off I am: I2CStart() I2CRestart()

I2CPoll() I2CWrite( 0x68, 0, 1)

I2CRead( auto,11)

I2CStop()

The output of my script is: Start I2C Poll Response: False I2C Response: 255 255 255 255 255 255 255 255 255 255 255 Done

Thanks,

Bill

#32  

its on backorder,and i may not get before i leave on a 3 week vacation trip leaving in 2 weeks