Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1 2 3 
Send Topic Print
i2c compass (Read 27259 times)
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #15 - 11/30/09 at 12:33pm
 
Do you have HMC5843 or HMC6352 ?
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
andrew.kirillov
YaBB Newbies
*




Posts: 33
Re: i2c compass
Reply #16 - 11/30/09 at 1:48pm
 
Sorry for skipping this detail. I have HMC6352.
Back to top
 
 
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #17 - 11/30/09 at 1:56pm
 
With the HMC6352 attached to I2C and the OV7725 camera removed, use SRV1Test.  Set the commands to hex mode and send
 
     695721770044
 
That's essentially an I2C write command ("iW") to address 21, register 77 00, setting the new I2C address to 22 (44).
 
Note that this probably won't work if you have the OV7725 camera installed, as it is located at I2C address 0x21 as well, so there will be a conflict.  But you can run SRV1Test without a camera installed and you'll just get a green or black screen.
Back to top
 
« Last Edit: 11/30/09 at 1:57pm by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
andrew.kirillov
YaBB Newbies
*




Posts: 33
Re: i2c compass
Reply #18 - 11/30/09 at 3:03pm
 
Just would like to clarify a bit ...
 
I have SVS and the label on both cameras says:
COMedia LTD
OV9655AA
0735
 
Is it the same as OV7725 camera? Should I just detach left camera’s module and proceed with I2C address changing?
Back to top
 
 
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #19 - 11/30/09 at 3:15pm
 
You have the OV9655, not the OV7725 camera, so there is no address conflict and you don't need to remove the camera to change the compass I2C address.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
andrew.kirillov
YaBB Newbies
*




Posts: 33
Re: i2c compass
Reply #20 - 12/01/09 at 2:20am
 
OK, sound good.
 
So, this means that I need to change address to 0x22 (44) in the case if I want to use '$C' command or I may keep default 0x21 (42) if I am fine using 'iRab' command. Am I right? What is the difference between these two approaches? Is '$C' command is just a shortcut for the 'iRab' command with correctly set device ID and register? Any difference in output?
Back to top
 
 
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #21 - 12/01/09 at 6:40am
 
Correct - $C is just a shortcut, though the format of the output is different.
Back to top
 
« Last Edit: 12/01/09 at 6:42am by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
andrew.kirillov
YaBB Newbies
*




Posts: 33
Re: i2c compass
Reply #22 - 12/01/09 at 3:30pm
 
Quote from admin on 12/01/09 at 6:40am:
..., though the format of the output is different.

The '$C' seems to provide output in degrees. But 'iR ..' will gives "the value in tenths of degrees from zero to 3599" as it  is said in HMC6352 data. So it looks like '$C' just divides output from sensor by 10.
 
Unfortunately so far was unable to get nice results with the sensor. Rotating it by 90 degrees gives little change in many cases. And vice versa - sometimes small change is done, but output differs a lot. Will need to struggle a bit more with it ...
Back to top
 
 
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #23 - 12/01/09 at 3:35pm
 
You need to move the compass as far from the motors as you possibly can.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
andrew.kirillov
YaBB Newbies
*




Posts: 33
Re: i2c compass
Reply #24 - 12/02/09 at 2:10am
 
My last tests were done when motors are not connected at all. I even removed them away from SVS board.
 
But, it is clear that it is close to impossible to build a robot with such constraints. Most robots look like wheeled cars (or with tracks), bipeds, quadrupeds or hexapods – they are full of motors and servos. Even if we have only 2 motors for moving base, we may also have pan/tilt setup for camera. And there is no sense in creating very big moving base just with single purpose – put motors on one end and compass on another end, so there is enough space between.
 
Not really sure if shielding will help – did not try it yet. But anyway, if the robots has not only motors, but also servos for pant/tilt plus something else, then what to do? Shield everything?
 
With best regards
Andrew
Back to top
 
 
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #25 - 12/02/09 at 6:46am
 
It is the permanent magnets of the motors which cause most of the problem.  And yes - you likely have to shield everything.  Even with the very small motors, you may need more than 12" of separation to remove most of the effect of the motor magnets.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
andrew.kirillov
YaBB Newbies
*




Posts: 33
Re: i2c compass
Reply #26 - 12/07/09 at 4:45am
 
Quote from admin on 03/04/08 at 9:49am:
The default device address is 0x42, which is actually sent as 0x21 (i2c can be a bit confusing).

 
Why is it so? Why 0x42 should be converted to ox21? And what is the conversion rule?
 
With best regards
Andrew
Back to top
 
« Last Edit: 12/07/09 at 4:45am by andrew.kirillov »  
WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #27 - 12/07/09 at 8:27am
 
This can be quite confusing.  I don't know how this came to be, but there are two different I2C addressing conventions for the same actual I2C device.  An I2C address is 7-bits, with an 8th (low) bit to indicate read or write.  We refer only to the 7 bits, but some documents use the 8-bit version, e.g.
 
8-bit convention - 0x44 is I2C read address, 0x45 is I2C write address
 
7-bit convention - 0x22 is the I2C address (read/write are implied)
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
libassdude
YaBB Newbies
*




Posts: 16
Re: i2c compass
Reply #28 - 02/23/10 at 4:14pm
 
Question about the i2c HMC6352 compass...
 
Earlier this month I was working with the compass and it was working beautifully. Now when I connect the compass and turn on the blackfin, all three LEDs come on, like it is booting, but they LED1 never turns off. I can connect to it through Tera Term and press 'V' and nothing happens. But while the blackfin is still on, I disconnect the compass and #f [Version info] displays and the output from the boot sequence is displayed and everything works. But when i reconnect the compass, everything stops working again...
 
Any ideas would be greatly appreciated.
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c compass
Reply #29 - 02/23/10 at 4:55pm
 
That doesn't sound so good.  Are you using the OV7725 camera ?  If you remove the camera board from the Blackfin but have the compass connected, do you still get 3 LED's ?
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Pages: 1 2 3 
Send Topic Print