My neighbor Brian Hudson is the hardware guy for our project. I'm sure he would love to give you some advice on getting the Arduino to talk to the IMU board.
Hey Abhishek,
Have you loaded any of your own code onto the IMU? I don't think you'll have any luck hooking the Arduino directly to the IMU with the default firmware installed, as the IMU is set up to transmit at 115200 baud or something around there, and I don't think the Arduino can actually receive serial input at that speed.
I had modified the stock IMU code to transmit at a lower speed and in a different data format, but unfortunately I ended up corrupting the fuse bits of the ATMega microcontroller in the process.
Ultimately what I ended up doing was cutting the ATMega off of the IMU sensor board, and using prototype wire to connect the analog pins from each of the sensors to various pads on the XBee connector. Then I just patch those straight to the A/D inputs on the Arduino and sample from there. Note, if you have a 5V Arduino board, you'll have to connect the AREF pin of the Arduino to a 3.3V source and set up the Arduino code to use the AREF pin for the A/D converters.
Well I wouldn't encourage you to cut off your ATMega if that's what you implied you were going to do like me.
The ATMega on the IMU can be reprogrammed using the ISP connector on the board (a 2x3 set of holes which you'll need to solder header pins into). You can actually set up your Arduino to be an ATMega programmer, and I succesfully used mine to do this about 5 times. However, right after that, I encountered an error which rendered the ATMega on the IMU unusable.
I would recommend purchasing a programmer like the AVR ISP - http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3808. You can also make your own, but given your stated level of experience, it's likely easier and less risky to buy one. Then you use the AVR studio (linked on that page) to program.
The source code for the current IMU firmware can be found on sparkfun's site, and I think you should be able to use AVR Studio to build it.
Now that I think about this - there are a number of steps to modifying the code, and depending on your comfort level, it might not be the easiest thing for you to start with. One other option would be to do something similar to what I did - just use the IMU as a simple sensor board and ignore the processor - carefully solder a lead from the gyro you want to use to an unused pin on the XBee header and then plug that into one of the A/D ports on the Arduino. I'm not 100% sure about one thing though - the signal will still be hooked up to a pin on the IMU's processor doing A/D sampling - I don't think that should interfere with the signal enough for it to matter, but I don't know for certain.
If you don't know exactly where to solder the lead, let me know, and I'll let you know what I think is the best spot (you have to take into account the fact that there is a resistor and capacitor as part of the circuit which help to stabilize the signal appropriately).
I'm not sure what you are asking for. A derivation of the Kalman equations is given here. Implementing the actual Kalman equations is the easy part. The hard part is developing the equations for the system model. That exercise is left for you to do because there are many ways to model an IMU. I would recommend reading up on Bill Premerlani's method here.
If you have specific questions about how Kalman filtering works, I would love to help.
Season Two of theTrust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.
Abhishek Jain's Comments
Comment Wall (5 comments)
My neighbor Brian Hudson is the hardware guy for our project. I'm sure he would love to give you some advice on getting the Arduino to talk to the IMU board.
Tom
Have you loaded any of your own code onto the IMU? I don't think you'll have any luck hooking the Arduino directly to the IMU with the default firmware installed, as the IMU is set up to transmit at 115200 baud or something around there, and I don't think the Arduino can actually receive serial input at that speed.
I had modified the stock IMU code to transmit at a lower speed and in a different data format, but unfortunately I ended up corrupting the fuse bits of the ATMega microcontroller in the process.
Ultimately what I ended up doing was cutting the ATMega off of the IMU sensor board, and using prototype wire to connect the analog pins from each of the sensors to various pads on the XBee connector. Then I just patch those straight to the A/D inputs on the Arduino and sample from there. Note, if you have a 5V Arduino board, you'll have to connect the AREF pin of the Arduino to a 3.3V source and set up the Arduino code to use the AREF pin for the A/D converters.
Hope that helps.
Brian
The ATMega on the IMU can be reprogrammed using the ISP connector on the board (a 2x3 set of holes which you'll need to solder header pins into). You can actually set up your Arduino to be an ATMega programmer, and I succesfully used mine to do this about 5 times. However, right after that, I encountered an error which rendered the ATMega on the IMU unusable.
I would recommend purchasing a programmer like the AVR ISP - http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3808. You can also make your own, but given your stated level of experience, it's likely easier and less risky to buy one. Then you use the AVR studio (linked on that page) to program.
The source code for the current IMU firmware can be found on sparkfun's site, and I think you should be able to use AVR Studio to build it.
Now that I think about this - there are a number of steps to modifying the code, and depending on your comfort level, it might not be the easiest thing for you to start with. One other option would be to do something similar to what I did - just use the IMU as a simple sensor board and ignore the processor - carefully solder a lead from the gyro you want to use to an unused pin on the XBee header and then plug that into one of the A/D ports on the Arduino. I'm not 100% sure about one thing though - the signal will still be hooked up to a pin on the IMU's processor doing A/D sampling - I don't think that should interfere with the signal enough for it to matter, but I don't know for certain.
If you don't know exactly where to solder the lead, let me know, and I'll let you know what I think is the best spot (you have to take into account the fact that there is a resistor and capacitor as part of the circuit which help to stabilize the signal appropriately).
What are you studying in school?
Brian
I'm not sure what you are asking for. A derivation of the Kalman equations is given here. Implementing the actual Kalman equations is the easy part. The hard part is developing the equations for the system model. That exercise is left for you to do because there are many ways to model an IMU. I would recommend reading up on Bill Premerlani's method here.
If you have specific questions about how Kalman filtering works, I would love to help.
Tom
You will need to direct your wiring questions to Brian. He is the electronics guru.
Tom
You need to be a member of DIY Drones to add comments!
Join DIY Drones
Welcome to
DIY Drones
Sign Up
or Sign In
Or sign in with:
Social Networking
Top Content
APM 2.5 from hobbyking
Alt_hold and loiter acting crazy
Looking for best laptop screen to see in the sun
APM Copter 2.9.1.b has been released
B go Beyond Quadcopter/Car convertable
New micro-cameras emulate insects' compound eyes
Hobby King Ardupilot
ArduPlane 2.73 released
Thirty Days (#17): 12-rotor close up
Mapping Mission Ride Along
Contests
A list of all T3 contests is here.
Groups
Andropilot Users Group
183 members
ArduCopter User Group
1299 members
Moderators
24 members
Melbourne
48 members
Documentation Editors
51 members
Advertisement