Auto Level Off-Road buggy , First Arduino project

As i stated this is my first Arduino project and i am wanting to auto level a buggy in off camber and up/down hill situations . My general idea is to use an Arduino Mega 2560 and a accelerometer or a gyroscope to run air suspension with 8 solenoids (1 up and 1 down for each air bag). The first thing i need help deciding is accelerometer or gyro or both ? any help would be greatly appreciated

You want a gyro.

Thanks , could you explain why gyro over anything else and do you have one you would suggest ?

An accelerometer measures G force, so by shaking it in any direction will produce a reading. Three axis accelerometers can also be used as leveling devices but any sudden movement will increase or damper the reading at that particular angle.

Gyros on the other hand only change when tilted, so as long as the angle is fixed, bouncing will not effect it.

I don't own a gyro but I do have a 3 axis accelerometer. However the most common one I have seen is a MCU-6050 3 axis accel + gyro.

I really appreciate your help I will get a gyro and get started on my test rig , The wiring shouldn't be too much of a headache

I am going to pick up a gyro from RadioShack today the parallax l3g4200d , , I have the arduino and a few LEDs to show the state of my outputs a couple of push buttons and resisters . is there any other major components I should need?

Other than your solenoids and maybe relays, do you have a bread board?

Yes I have a breadboard I was going to get it working on small scale using LEDs to simulate the solenoids then use switching transistors to drive my solenoids in the full scale

You might could just male a gravity controlled gimbal for your bot for the parts that need to be level with gravity. The below links might have some info.

https://www.google.com/search?num=100&lr=&as_qdr=all&q=diy+gimbal&oq=gimble+diy&gs_l=serp.1.2.0i10l2j0i22i10i30l3.8644.11176.0.16297.4.4.0.0.0.0.134.391.3j1.4.0....0...1c.1.35.serp..0.4.387.XUU-ZwJ3qq0

Wouldn't the gimbal have the same problem as a accelerometer with the bouncing around , also this will no be a bot it is a full sized off-road vehicle

Wkoffroad: Wouldn't the gimbal have the same problem as a accelerometer with the bouncing around , also this will no be a bot it is a full sized off-road vehicle

Sounds like you are seeking gyroscopic stabilization, which you should be able to find a lot of info about.

https://www.google.com/search?num=100&lr=&as_qdr=all&q=gyroscopic+stabilizer&oq=gyroscopic+&gs_l=serp.1.5.0l10.6052565.6057332.0.6064455.11.8.0.3.3.0.336.1000.6j1j0j1.8.0....0...1c.1.35.serp..0.11.1092.wl7274_fSbw

Yea I don't know

I am about to start on my test rig for this and would like some input, I am planing on using 8 LEDs connected to digital pins 1 led for up 1 for down for each bag and putting the 9-DOF board in the middle and as I tilt the board light up the LEDs accordingly , any input or suggestions ?