Simple up/down inclinometer, any ideas?
Peter Jakacki
Posts: 10,193
One of my current Propeller (what else!) projects requires detecting whether a vehicle is going up or down an incline (immediately) and I thought I would throw this out on the forum for ideas. There are several possibilities but it should be simple and reliable, I don't need to know how much of an incline, just up or down or none. Accelerometers aren't really suitable unless it is reset to a known state but I could be mistaken here. One of my mechanical ideas is to have a simple ball bearing in a V shaped tube with a shallow angle. When the vehicle is level the ball sits in the groove of the V but moving up or down an incline it would move to either end and stay put. The ball could be detected with simple optos or even "RF absorption" sensing by pulsing a pcb contact in proximity with the ends and measuring the rise time through a resistor. This can be manufactured very easily as a simple unit.
There are various specialized ($$+$) and also hard-to-get devices out there but I want to keep it simple. Any ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
There are various specialized ($$+$) and also hard-to-get devices out there but I want to keep it simple. Any ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Comments
That was my first idea, and I used to have a car alarm I built that used a similar principle, but acceleration and deceleration will move the ball regardless of the incline of the vehicle.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Are you suggesting coconuts migrate?"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Are you suggesting coconuts migrate?"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I think this is what you are looking for http://www.adafruit.com/index.php?main_page=product_info&cPath=35&products_id=173
Cost about $2 USD.
Thanks for the link Larry, as this is a "component" that doesn't need any extra work other than the pcb and they are readily available I think I will definitely try this one out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
or this one http://store.fungizmos.com/index.php?main_page=product_info&cPath=66&products_id=215
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
The second on kicks in at +/- 30 degrees, still that's pretty steep incline.
I would imagine Peter is looking for something like +/- 5 degrees.
Jim
Jim
My first though was a pendulum also, but a little costly to construct.
Maybe a gyro? That would be set to zero when the vehicle is first started and would not have to be reset during it's run.
Jim
Maybe some people aren't aware, but 3-axis accelerometers always tell you which way is down when sitting still.
If you drop your iPhone off a roof, that's when it doesn't know which way is down....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
So would you have to monitor the Z axis to know that you are actually going up/down? If Z does not change than you are just going forward/backwords/left/right on on plane? Not up on an angle?
"If you drop your iPhone off a roof, that's when it doesn't know which way is down...."
But it knows it's on the way down. That what the "Free Fall" output pin is all about on some a 3-axis accelerometers. Shuts down and locks the hard drives. Used on may Laptops.
Jim
For example, in a certain orientation and with a non-moving accelerometer, X will read +1 G and Y will read 0 G when vertical. At 90 degrees, X will read 0 G and Y will read +1 G...
So, the square root of the sum of the squares of X, Y, and Z will always read 1 G when it's not moving. That's because it directly reads earth's gravity field...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Basically, it's just made from 3 paddles that bend by gravity (or actual acceleration).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
This might be okay for smooth surfaces but if your track is a bit bumpy, you might need to think about what the ball does during vibration. One possible solution (no pun intended), might be to have your V-shaped track immersed in a fluid that might help dampen vibration. Of course, you could punt the ball altogether and just go with a fluid, too, and have optical sensors give a signal when the fluid level (meniscus) passes across their lines of sight.
That's 0.002 cents worth, so remember: if you use that idea, you owe me, man.
I don't think I'd be worried about vibration too much as a bit of sensible and smart debouncing would say whether the signal was "on the level". If at least I keep this part of the design on a plug-in module then I can experiment with various solutions easily without redoing the whole pcb. Maybe I just need a sensor that says it's level to reset the calibration on the accelerometer assuming that this figure will remain relatively stable between operations.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
BTW, don't always assume 1g = earth either, because the local gravitational field strength will vary depending on your position, so just use the max and you'll be fine, especially if you're not moving very fast. (Remember, a fast movement with an acceleration greater than 9.8ms2 will confuse it, like Ray's example of dropping it.)
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Yes, but it will always show an acceleration force due to the natural gravitational tug of Earth. If you were in space, far far away from any other objects, then you will get to a point where they will read zero g's. (Or in a free fall condition, but that is really only theroetical.)
So, yes... and no. (Gravity is an acceleration force... 9.8ms^2, which is why it detects it.)
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
May the road rise to meet you; may the sun shine on your back.
May you create something useful, even if it's just a hack.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
May the road rise to meet you; may the sun shine on your back.
May you create something useful, even if it's just a hack.
Mercury in a tube seems better but also seems TOXIC.
Slightly saline water in a tube might work, and be non-toxic.
If I had to rig from scratch my inclination(lol) would be to
utilize some optical phenomena like hang something reflective
in a small container that when inclined would swing over an LED
that is both pulsing and sensing light, two of these in the container
would tell you the direction of the incline forward/backward
and 4 or perhaps 3 could tell you of tilt in any direction.