camper leveler.

hi all

i am looking to start my next arduino project.

basicaly, it will at the push of a button, adjust 4 seperate motors based on the data received from an accelerometer to level my camper rather than me having to use bricks and jockey wheels etc...

i plan on using an accelerometer (duh) a arduino nano (small) and a hbridge/motor driver so that it can pulse the motors and also use them to wind down and up the adjusters, 4 caravan stabaliser legs and 4 motos (havent decided on what yet)

i think i would also need something like a rotary encoder so that the arduino knows when the legs are would up, and can tell the motors to stop. is that correct?

how does my project sound? i am new to the arduino platfoem, and enjoying learning. i would also probaly need some help with the code, but i might be able to get it to work with help.

cheers

Jason

Sounds possible.

You could indeed use encoders, Stepper motors would be possible as well, you can command those very accurately how many degrees the motorshaft has to turn. Instead of encoder, You'll need home and end-switch to detect beginning and end of the leveler legs though.

I'd test a project like this a zillion times before I'd actually drive with it on a road. It would be nice if it could detect whether the camper is actually standing still as extra safety option. That may be possible by only allowing it to function when campers motor is not running.

I don't know how much force/torque is needed to operate the legs, they may be a bit slower with gearboxes, but it will probably save you money in expensive motors/electronics if you use them.

In case something goes wrong, I'd also think about an option to operate the legs by hand. You don't want the legs to decide to stay longer on the same spot. :wink:

cheers mate. as its a camper trailer, there is no issue with it in reguards to saftey if that makes sense. and i was planing on using gearboxed motors for the torque,but just hoping that the rest of the parts that i have listed are correct. and that i am on the right track.

cheers

Jason

I would use the following algorithm

  • move 1 front leg until it touches the ground
    (if max position reached => error)

  • move second front leg until it touches the ground
    (if max position reached => error)

  • level front legs

  • move one rear leg until it touches the ground

  • move rear front leg until it touches the ground

  • level rear legs

if slope ascending adjust front legs to rear legs ( 2 simultaneously)
else adjust rear legs to front legs simultaneously

(add on)
If you add 4 ping sensors you can see how far the legs have to move approx .
Then you can calculate if it is possible at all before moving the motors. (might save some time)

my 2 cents.

as its a camper trailer, there is no issue with it in reguards to saftey if that makes sense

Not really, what if the legs extend while you are cruising down the highway?


Rob

Graynomad:

as its a camper trailer, there is no issue with it in reguards to saftey if that makes sense

Not really, what if the legs extend while you are cruising down the highway?


Rob

emergency break if all others fail?

The way i have the power setup and where i plan on putting the unit will require that i stop anyway as the power controls are hardwired and are always turned off unless camping. The unit will only get power when we have setup and while we are stationary.

Cheers.

Jason

The "old school" hardware interlock method dictates that the power to all of this is wired with something like a DPDT relay so that it can only be powered if the car is not moving (ie: engine off), or at least a removable fuse to disable it while the vehicle is in motion. I am just curious. I have never used one of the types of three axis acelerometers sold for arduinos these days but I have used industrial 3-axis acelerometers and all they were good for was measuring impact g's , so how do these new types allow you to sense level ? I know an inertial navigation system can do that but those are super expensive aerospace equipment . Do the cheap ones they sell at Sparkfun do that ?

Several special sensing functions are provided. Activity and inactivity sensing detect the presence or lack of motion and if the acceleration on any axis exceeds a user-set level. Tap sensing detects single and double taps. Free-fall sensing detects if the device is falling. These functions can be mapped to one of two interrupt output pins. An integrated, patent pending 32-level first in, first out (FIFO) buffer can be used to store data to minimize host processor intervention. Low power modes enable intelligent motion-based power management with threshold sensing and active acceleration measurement at extremely low power dissipation.

I don't see anything about sensing level here

raschemmel:
The "old school" hardware interlock method dictates that the power to all of this is wired with something like a DPDT relay so that it can only be powered if the car is not moving (ie: engine off), or at least a removable fuse to disable it while the vehicle is in motion. I am just curious. I have never used one of the types of three axis acelerometers sold for arduinos these days but I have used industrial 3-axis acelerometers and all they were good for was measuring impact g's , so how do these new types allow you to sense level ? I know an inertial navigation system can do that but those are super expensive aerospace equipment . Do the cheap ones they sell at Sparkfun do that ?

Several special sensing functions are provided. Activity and inactivity sensing detect the presence or lack of motion and if the acceleration on any axis exceeds a user-set level. Tap sensing detects single and double taps. Free-fall sensing detects if the device is falling. These functions can be mapped to one of two interrupt output pins. An integrated, patent pending 32-level first in, first out (FIFO) buffer can be used to store data to minimize host processor intervention. Low power modes enable intelligent motion-based power management with threshold sensing and active acceleration measurement at extremely low power dissipation.

I don't see anything about sensing level here

Thats what i was getting at. Would i use an accelerometer or a gyro?

Cheers

Jason

You would use an accelerometer.

Also, I suggest you fit a manual mechanical lock that prevents the legs from extending until you have released the lock - for example, a pin that mechanically holds the leg in its parked position.

You would use an accelerometer.

Why ?
Can you show some documentation that says it provides leveling ? (because I haven't seen it and if it exists , I would prefer to know that , than not.

raschemmel:

You would use an accelerometer.

Why ?
Can you show some documentation that says it provides leveling ? (because I haven't seen it and if it exists , I would prefer to know that , than not.

It is a standard use case for an accelerometer. An accelerometer with a sensing axis exactly horizontal will read zero but in this orientation it is highly sensitive to small deviations away from horizontal so it makes a very effective tilt sensor. This technique only works when the accelerometer is at rest (it is no use on a moving vehicle), but I would expect the camper to be at rest in this case.

Huh. ? The accelerometers I used with some very expensive data acquisition equipment (HBM) only yielded amplitude levels from
vibration or impact. I guess I never noticed what you are referring to because the install crew went to great lengths to level the
frame before they installed the test equipment we were collecting the data from.

You're right that the accelerometer needs to have enough sensitivity (sensors designed to measure impacts may not be suitable) and the sensor also needs to be oriented correctly to be effective in this mode.

The cute "bubble level app" for smart phones uses the built-in accelerometer in just this way: https://play.google.com/store/apps/details?id=net.androgames.level