Using an Arduino in series with a 3-axis acceleromter and 3-axis gyroscope.

Hey if anyone can help me out I am very new to arduino as well as coding in general,

I am tasked with a project to create a system that will offset the angle of a slope (for a hill) while traveling along it perpendicular to the slope. To do this I want to use a 3/3/3 or just a 3/3 ( 3-axis accelerometer, gyroscope, compass or the 3/3 which is the same without the compass). I have not completely chosen my sensor yet but that shouldn't effect my question two much.

Okay my question is this I need to take the data from the sensor (the measured angle) and transmit that linearly into a voltage reading so that the voltage may be sent to a compressor that will then inflate and deflate an airbag to the respected angle. Now to do this I know I will need some kind of data transmitter but I am not sure what is the best way to go about it I have done a lot of research and it has not helped me all that much. So would I need just an arduino board to transmit data or would I need a board as well as an Arduino uno to power the board while it is attached to the vehicle so that it could continuously transmit data so that the leveling devices could be active on varying slope angles.

I am aware that the arduino uno would need power as well correct? and if so could I just essentially wire that to the battery of the vehicle?

To measure tilt angles, you need only a 3 axis accelerometer. Here is a good tutorial.

Any electronics connected to an automotive electrical system needs serious protection from high voltage spikes and voltage reversals. Also, the voltage of a car battery is too high to directly connect to an Arduino, so you need a voltage regulator module to bring it down to the range of about 7-9 V.

Thank you very much for the response but I thought I had read during my research that the linear movement and accelerations of the vehicle could cause significant errors in the accelerometers measurements?

Also If that is the case should i just construct a much smaller power supply to place in thr vehical and run the arudino from that?

As well as do you know if it is necessary to run both the Arduino signal transmitter and the Arduino Uno or would it be possible to run just one or the other?

Thanks again,

Zach

I thought I had read during my research that the linear movement and accelerations of the vehicle could cause significant errors in the accelerometers measurements?

True. If you need to level the load dynamically, you are opening a 55 gallon drum of worms.

How large (physically) and massive is this load?

How fast will the vehicle be moving?

What is the range of slopes to be encountered?

What mechanism will be used to level the load and how is it powered and controlled?

How quickly must the system respond?

I see that your link (good examples by the way) says that it actual uses the linear acceleration of the "vehicle" to make its references.

Is this a new adaptation of accelerometers or what my research really just taking me in the wrong direction because until now I was reading that if I wanted to be traveling along the hill that the accelerations associated with the linear motion of the vehicle would cause the accelerometer to have errors?

Also would you suggest any specific models or accelerometers I have been looking at the following; ADXL3335, MXR7250VW, MXR7305, MXC6232XMP, AIS328DQTR, SCA3100-D04, as well as looking at the combination models such as MPU-6050, Phidget Spatial 3/3/3, and ASC-IMU 7-LN.

The load being leveled would vary in size because it would essentially be a human on a seat because the application is for mowing on an incline and having a pneumatic system level the seat as you travel along the slope. The mechanism would be a compressor inflating and deflating airbags that would be located under the seat. This being said the system would have to respond essentially in real time to keep the person level but the speed of the vehicle would never exceed that of a typical riding mower.

The method I linked assumes that the accelerometer is stationary, or is not being accelerated by a force other than gravity.

It measures the angles that gravity, or "down", makes with the accelerometer axes, and calculates pitch and roll angles from those angles.

If the mower is traveling at a steady rate in roughly a straight line, and is not being bounced around, the method linked should work well. A gyro would add considerable complications and won't help for this project.

Okay thank you for the input!!

If i am not able to maintain angle and speed do you have a suggestion on how to go about this the internet has been not been helpful in solving this other than this page.

You are not going to find a "canned" solution to your project on the web.

You are making a custom mechanism. Careful thought and good engineering combined with experimentation will be required.

Put the accelerometer on the seat so it moves with the seat. Try to keep it level by observing the horizontal acceleration.

This will also allow the seat to lean into turns like an airplane or motorcycle.

I like the ADXL345 but the MPU6050 or MPU9050 are also good.

Okay thank you very much but did you mean MPU 9150 instead of 9050

The LSM303D is better than the MPUxxxx products, and includes a magnetometer and level shifters for either 3.3V or 5V operation.

Thank you,

The suggestion of the LSM303D led to research from there page and that helped me learn more about this system.