I just got my mbed a few days ago and started looking through the guide,cookbook,etc. for related topics on the things I'm doing but I can't find the information I needed.
I intend to make a balancing robot. I'm going to use:
2x single axis accelerometer ADXL193 (arrow pointing upward and arrow pointing forward)
1x dual axis gyroscope LPY530AL (using 1 axis because only 1 degree of freedom, leaning forward and backward)
As I know, the output from those sensors are in analog. Which means it has to go through the ADC first.
After that, I want to fuse the data using Kalman Filter before feeding it to the PID and lastly generate PWM to control the stepper motor.
Is the sequence correct?
Questions:
From the handbook, AnalogIn are represented in 0.0 - 1.0 rather than 0V - 3.3V.
I've tested the accelerometer, the voltage in different positions are 1.637V +-0.006V
1.How do I convert the values to the floating point numbers 0.0-1.0?
2.How does this value use for further processing?(in my case, just plug into Kalman Filter?)
3.Do I use the same method to convert the gyroscope's value?
4.I've found a few "Filters" in the forum, they doesn't look like Kalman Filter, or are they?
IMU filter from Aaron Berk
http://mbed.org/users/aberk/libraries/IMUfilter/lebv20/docs/IMUfilter_8cpp_source.html
5.I have a sample of Kalman Filter programming written by Trammell Hudson for PIC in C programming, can I just use them?
http://www.rotomotion.com/downloads/tilt.c
http://www.rotomotion.com/downloads/tilt.h
From the Cookbook, there is sample programming on ADXL345(3 axis).
6.With some modification,can I use that to program my ADXL193(1 axis)?
Sorry for the long post with many and long questions.
I just got my mbed a few days ago and started looking through the guide,cookbook,etc. for related topics on the things I'm doing but I can't find the information I needed.
I intend to make a balancing robot. I'm going to use:
2x single axis accelerometer ADXL193 (arrow pointing upward and arrow pointing forward)
1x dual axis gyroscope LPY530AL (using 1 axis because only 1 degree of freedom, leaning forward and backward)
As I know, the output from those sensors are in analog. Which means it has to go through the ADC first. After that, I want to fuse the data using Kalman Filter before feeding it to the PID and lastly generate PWM to control the stepper motor. Is the sequence correct?
Questions:
From the handbook, AnalogIn are represented in 0.0 - 1.0 rather than 0V - 3.3V. I've tested the accelerometer, the voltage in different positions are 1.637V +-0.006V
1.How do I convert the values to the floating point numbers 0.0-1.0?
2.How does this value use for further processing?(in my case, just plug into Kalman Filter?)
3.Do I use the same method to convert the gyroscope's value?
4.I've found a few "Filters" in the forum, they doesn't look like Kalman Filter, or are they?
IMU filter from Aaron Berk
http://mbed.org/users/aberk/libraries/IMUfilter/lebv20/docs/IMUfilter_8cpp_source.html
5.I have a sample of Kalman Filter programming written by Trammell Hudson for PIC in C programming, can I just use them?
http://www.rotomotion.com/downloads/tilt.c
http://www.rotomotion.com/downloads/tilt.h
From the Cookbook, there is sample programming on ADXL345(3 axis).
6.With some modification,can I use that to program my ADXL193(1 axis)?
Sorry for the long post with many and long questions.