Auto level off-road buggy, First Arduino project

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

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

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Auto level off-road buggy, First Arduino project

Post by adafruit_support_bill »

You really need both, since a gyro doesn't know which end is up to start with and the accelerometer can't tell the difference between forces due to gravity, rotation or linear acceleration. Typically these are combined into an IMU (Inertial Measurement Unit). You might want to check out the tutorials associated with these:
http://www.adafruit.com/index.php?main_ ... &q=DOF+IMU

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

Great I will order up one of those later today and start building a test setup, thanks for the fast response I am looking to have this project completed in the next few months

User avatar
jcgoodman
 
Posts: 107
Joined: Thu Jan 23, 2014 6:03 pm

Re: Auto level off-road buggy, First Arduino project

Post by jcgoodman »

I'd definitely get the 10-DOF or 9-DOF, but you might want to start with software that uses just the accelerometer. It'll work OK if your buggy is moving slowly, especially if you run its output through a software low-pass filter so it's less sensitive to vibration.

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

That is what I was thinking , I can get the 9-DOF and know that I have something that will work then try to make it work with just one or the other first , the next big thing is the programing all of the samples just print out data to the serial and don't really help me to know what to do with that data , but I will see what I can do when I get my test setup ready

waltr
 
Posts: 306
Joined: Wed Jun 12, 2013 5:01 pm

Re: Auto level off-road buggy, First Arduino project

Post by waltr »

Do some searches and reading on controllers for Quad copters. They use gryos and accelerometers to maintain level hover which is very similar to your requirements. Check to MultiWii open source code for Ardiuno's to learn how this is done.

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

I just looked at the multiwii code and it has 20 tabs with who knows how many lines of code I couldn't make any sense of any of it , I will try to find the most basic quad copter code a look at it

User avatar
jcgoodman
 
Posts: 107
Joined: Thu Jan 23, 2014 6:03 pm

Re: Auto level off-road buggy, First Arduino project

Post by jcgoodman »

Eight solenoids and a rat's nest of pneumatic tubing is a lot of things to go wrong. You might be able to reduce the mechanical complexity by using three linear actuators in a tripod construction, or two servos which pivot simplified rocker bogies or operate a gimbal.

http://www.ibexeng.com/advancedmotioncontrol/20
http://en.wikipedia.org/wiki/Rocker-bogie
http://en.wikipedia.org/wiki/Gimbal

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

Ok 8 solenoids is the way my air bags are operated as for a rats nest of tube there is only 4 tubes one per bag , and this buggy is a full sized vehicle that I will be driving

User avatar
jcgoodman
 
Posts: 107
Joined: Thu Jan 23, 2014 6:03 pm

Re: Auto level off-road buggy, First Arduino project

Post by jcgoodman »

Wkoffroad wrote:full sized vehicle
Oh. Yeah that's kind of a different scale than I was imagining.

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

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 ?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Auto level off-road buggy, First Arduino project

Post by adafruit_support_bill »

That sounds like a good start. It will verify that the IMU is operating as expected. Once you have that part working, you can start working on using the IMU output to actually control the valves. Solenoids for valve control doesn't give you any control over the inflation/deflation rate. That will make it difficult to get smooth control. Although I expect that 'smooth' is not the prime consideration in an off-road vehicle.

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

No smooth is not a real concern , but I will be addressed at a later date with sizing of tubing or flow control of some sort , there is a number of add-ons that will be implemented as I gain
Knowledge I want to be sure this main function will work before I put too much money into it

Wkoffroad
 
Posts: 22
Joined: Fri Feb 14, 2014 11:52 am

Re: Auto level off-road buggy, First Arduino project

Post by Wkoffroad »

OK , i received my parts and have built my test setup . Using the test code from this site i have my 9-dof spiting out roll pitch and heading i removed the code having to do with heading and have sit here and tilted this thing for about 20 min watching the readout and giggling to myself. now i am trying to get the tilting to light up my LEDs representing my bags up and down , and i have hit a roadblock i have read at least 10 " tutorials " on imu's and am no closer to how to implement the data i am receiving from my 9-dof. a push in the right direction would be much appreciated.

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: Auto level off-road buggy, First Arduino project

Post by Franklin97355 »

a push in the right direction would be much appreciated.
Nothing to push against, could we see the code you are using and how you have things connected together?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”