Hi every one
I have high quality 3 axis compass need to connect to Arduino UNO
Here is its datasheet website:
http://www.rion-tech.us/uploadfile/20130110/20130110092946290.pdf
Can any one help me how to do that ?
Looking at the link you supplied shows the device uses 5V TTL level RS232 or RS485 to communicate. The serial protocol is 9600,8,N,1 so is slow enough to use software serial if needed. It also shows what the pinout is so connecting to arduino should be easy (famous last words).
What Arduino do you want to connect this to and how do you want to use the info from the device.
Will you just want to pass the values onto a PC using Serial.print or will the Arduino not be connected to a PC.
Hi, if you need help with your project you can edit the subject of this thread to;
"Help Arduino to 3 axis compass"
It will explain what help you are after and will probably get more forum members to read your thread.
At this stage you can still change the subject.
Tom..... ![]()
I planning to connect my compass to auto balancing system
At first I want to play the informations through PC monitor then I know how to complete
so can help me how to connect via i2c or digital analog and in the code please .
Thanks
so can help me how to connect via i2c
As Riva said, it's RS232
and in the code please
Looks like you need to send it a bunch of command words and for each it completes the transmission with a suitable return. Probably not trivial coding ahead...
sorry but I didn't understand I'm beginner to Arduino
Can I connect this compass to Arduino ? and how?
Looking at the data sheet, you need to know which sensor you have first.
The ordering info on page 3 of the data sheet shows several different versions. How it's mounted and whether it has a shell isn't important for your arduino, but whether it uses rs-232 signals, rs-485 signals or TTL is. You can use all 3 with an arduino. TTL would be easiest since the arduino already communicates at ttl-levels. If it is an rs232- or rs485- version, you'll need a few (cheap) components to make your arduino compatible though.
Next part would be getting some... data from the module.
Using an arduino with atmega328 you'll only have 1 serial port which is already used to talk to your PC. You'll need to create a Software serial port to connect your module if your arduino only has 1 serial port. (Using a controller with multiple serial ports, you can simply choose a free serial port.)
With a sketch, sending all data from your PC to your module and vice versa, it should be possible to test the module.
It may even be possible to test your module with the Rion-software at that point.
Looking at the command- and received Data structure in the data sheet, they're unfortunately not easy to enter/read/remember though, what may look as garbage could... be correct data.
You could turn Module+Arduino in a I2C-device if you configure your arduino as slave, but will need to create your own I2C-command-structure.
Arduino doesn't have an digital to analog converter, but you could of course add a few DACs to get an analog signal.
thank you for helping , but as I told you I am beginner
so
I have compass its name HCM505B rs232 type
its interface rs232 I have four terminals
No 1 from device to VCC 5volt in Arduino UNO
No 5 from device to GND in Arduino
No 2 from device to 4 digitalPin in Arduino
No 3 from device to 3 digitalPin in Arduino
and my code yet is:
[color=blue]
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 3);
void setup()
{
Serial.begin(57600);
mySerial.begin(9600);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.print((char)mySerial.read());
if (Serial.available())
mySerial.print((char)Serial.read());
}[/color]
and I don't know more than this so what next please ;
Kamal-15:
thank you for helping , but as I told you I am beginner
soI have compass its name HCM505B rs232 type
In that case, you'll need some extra hardware. RS-232 (like the serial port on a PC) uses voltages up to 25v, voltages on arduino connectors are at TTL levels (0/5v). If it would have been an HCM505B TTL (according to the data sheet), it should be possible to connect your module directly. Now you can't yet, and shouldn't, since it can ruin your arduino and/or module if they don't talk at the same levels.
With an MAX232-chip (or equivalent) and few capacitors, an arduino can communicate at rs-232 levels. You could use a module like this for that as well.
After that you could test your sketch, open a terminal and send the commands from the data-sheet to see what happens.
In this case arduino simply echoes characters from port to port, when testing using the Rion software (datasheet) I'd set both ports on your arduino to default speed of the module.
Since you have an RS-232 version you do not need an arduino to test it, it should be possible to connect a DB-9 connector and simply plug it in an PC with RS-232 port right now.