Also vibration from the motor and roadway may affect the PING's performance (not saying it will be a problem, only that it's a possibility).
What about doing it mechanically? Use a free swing gimble mount and gyroscope to maintain camera orientation. I know this would work for weelies, not sure about corners though, the roll would be accounted for, but I dont know if the camera would lead, it seems more likely it would lag, trying to maintain it's original orientation. Perhaps·resticting the DOF would overcome this.
How about taking a trick from the sailors of old? You can find your rotation by measuring the position of the sun (or moon, or stars) and comparing that to what the expected position is (for being in that longitude, latitude, and time). The celestial clock is never wrong, and you can relive history! No vibration to worry about, acceleration is now a laughing matter, and you can even make it so that the camera points away from the sun.
Of course, you'll need to find (or make) astronomical tables for years to come and input all that data into the uC...
Sun? You obviously don't live anywhere near Seattle!
Seriously, this is not a bad idea, given an unobstructed view of the sky. The astro tables are unnecessary, though, for short-term stability. Just mount the light sensor on the camera mount, take a reference reading with it level, then seek to that readinga reading that equates to the same altitude value with the bike in motion.
-Phil
Edit: 'Forgot to account for variable direction of travel. Corrected.
Post Edited (Phil Pilgrim (PhiPi)) : 11/12/2008 6:38:05 AM GMT
It has a analog out and its linear and it would work with adc like 381·I belive parallax has them.· Write some code that rotates a pan/tilit platform with the camera.
I included a crude picture.·
Paul
Edit:· The picture is a little off.· If you know the distance the sensor is away from the bike center and the result the sensor is returning you can figure the angle out.· Flip the two legs of the triangle and leave the hypotenuse.· But I hope this explains alittle better.
Post Edited (QuantumRI) : 11/12/2008 7:41:58 AM GMT
It would probably be easier to dynamically calculate astronomical tables with the uController [noparse]:)[/noparse]
Didn't think about interference for the ping sensors... there are a lot of odd whistles and noises that might get the sensors confused. Rattle & shake isn't a problem, though, because it should affect both sensors equally. It still is trig, though.
I thought of an IR sensor, but different road surfaces will absorb different amounts of IR. And the great outdoors is flooded with IR, so I suspect it wouldn't be that reliable.
I think most of the questions been achieved. A company is about to launch a data logger that can calculate and record lean angles.
Take a look at www.flextion.co.uk They don't say much, but it is interesting
It's been a while since this thread was active, but EatSleepRIDE has recently developed an iOS App for motorcyclists that help riders calculate their lean angle, and get other riding data like speed, elevation, and duration the ride. We used internal sensors in the iPhone (accelerometer, gyroscope and GPS technology), so no external hardware is required. http://app.eatsleepride.com/
You can also record your route, discover routes in your area, connect with riders on the road and gives riders access to motorcycle crash detection that detects a crash and notifies your pre-set contacts with your geo-location.
Although this is an old thread, I feel that a weighted race bearing that operates an encoder or a pot would work, with the weight at bottom centre the pot could be fitted to read 50% of it's value any deviation left or right of centre and the reading could be taken and an angle worked out from that, likewise the encoder could be read for movement from centre.
The device could allow for any centrifugal effect by using a strain gauge sensor that is calibrated for the weight, any deviation in weight as it gets heavier due to centrifugal forces can be calculated out of the equation.
Although this is an old thread, I feel that a weighted race bearing that operates an encoder or a pot would work, with the weight at bottom centre the pot could be fitted to read 50% of it's value any deviation left or right of centre and the reading could be taken and an angle worked out from that, likewise the encoder could be read for movement from centre.
A weighted bearing would have the same issues as using an accelerometer by itself. It couldn't tell the difference between an acceleration from a lean vs a turn. In a coordinated turn (an aviation term) all the g force experienced by the pilot from the turn is directed downward in relationship to the sitting pilot. A motocycle probably has most of the centrifugal force directed down in line with the wheels of the motorcycle. So if the motorcycle it turning in a coordinated fashion, the bearing will always be near the bottom of the race even if the motorcycle is experiencing substantial lean.
As has been suggested, I think being able to sense the magnitude along with the direction of the acceleration would aid in computing if the cycle is leaning or not (though I'm not sure it would be enough).
As others have mentioned, a gyro would make this type of calculation a lot easier. I assume the app uses the iPhones accelerometer and gyro to compute the lean angle.
Sorry Duane I was thinking about CF and was editing the post when you must have posted, see above
What about a bar horizontal to the ground with a circular weight on it, as the fixed bar tilts the weight moves left or right the axes would be fixed by the bar and the amount of movement along the bar gives the angle through a strain guage this may be less susceptible to CF?
I should give posts time to "settle" before replying. I know my posts often get edited several times within their first few minutes of life.
Sorry to mess you around , I think i've done it again as I edited my reply.
Another idea, instead of the bar how about a plastic tube with windings on the outside at either end,
inside would be a metal slug and the tube would be filled with viscous liquid to dampen the speed of the slug, the inductance of the windings would change as the slug moved within the windings
ok that may not work as at a certain angle the weighted slug would still move down, perhaps the original idea of suspending the slug inside by a strain guage, the more tilt the heavier it becomes to the guage?
Another idea is to have a tilting plate with holes drilled in it, a light source and a sensor either side of the plate in an enclosure to stop any other light entering and as the plate tilts the light is slowly cut off from the sensor
Just curious: could you derive lean angle from the GPS by itself? If you derive position, speed and velocity from the GPS, and the app determines you have gone in an arc, wouldn't your lean angle be a function of the centrifugal effects you would likely see given those GPS measurements? Might even accelerations be derived from the GPS, for both changes in altitude and slope of the road?
Tracking 100% with you, Rich. Nice idea. Once you calibrate it and make a lookup table for speed & bank angle, you're all set. Typically, bikes slow down for very sharp turns. For dynamic lean only, you might even get by with a single vertical accelerometer.
1.0000 g= vertical, and anything over 1.0000 g is an angle which could be calibrated.
I think that two axis would be required. There's no way to know which way you are leaning with one axis, and dips and rises would give false readings. With two axis at 90 deg to each other you should be able to filter that out.
Lean angle is the same whether on horizontal ground or on a slope.
Maybe so, but... uh, wasn't I just agreeing with you about the dips and such? For erco's idea of using a single accelerometer, wouldn't a sudden rise look like a lean? Or am I confused?
In a proper turn would you even get an acceleration component that isn't normal to the seat? The whole point of leaning into the turn is to keep side forces to a minimum, right?
Correct. In a coordinated turn, the only force ts "down" relative to the airframe. I suspect the same is somewhat true with a motorcycle, with tire friction compensating for any residual side forces.
I can test this all with my RC autopilot's logging abilities. I'll take it for a ride on my bike and post the graphs. I need to pull it from the model plane and put it on the bike so it might be a couple days. It's also going to be impossible to mount the sensors at the bike's CG, so hopefully that doesn't throw it too far off.
In a proper turn would you even get an acceleration component that isn't normal to the seat? The whole point of leaning into the turn is to keep side forces to a minimum, right?
...
-Phil
On a bike you need to grip it with lower body to keep any pressure off the hand grips and accelerate into the corner to keep the bike's weight even on both tires or... well hopefully you have insurance lol. Since that lower body grip increases with the lean angle I'm guessing a sensor (or two like W9GFO said) may actually be able to sense the lean angle. I have a feeling the road surface grade will dictate what the sensor shows and accelerometers may only be reliable on a flat surface or need some kind of dynamic tuning where the road surface is taken into consideration.
I think it's true that two accelerometers at 90 degrees could give you useable information under static conditions. However, if we assume that the lean is essentially the result of summing the gravity (weight) force vectors with the centrifugal effect under dynamic conditions, then I think two accelerometers affixed to the motorcycle 90 degrees to each other under this sort of dynamic condition would not provide you with anymore information: instead, each accelerometer would be reading only its particular component of the vector that is normal to the driver's seat.
As Phil pointed out, the whole purpose of leaning the motorcycle when moving is to kinda make the side-wise vectors disappear. I think the accelerometers would then have no way of detecting any other forces in their motorcycle frame of reference.
Maybe I'm wrong about this, and I hope somebody will point out the error in my thinking, but this might be why a gyro of some kind might be useful for this app - you need a frame of reference that is outside the motorcycle because the act of leaning is making any other vectors sorta evaporate. The frame of reference in the case of the gyro would be the gyro's inertia, which is happily independent of the motorcycle.
I think it's true that two accelerometers at 90 degrees could give you useable information under static conditions. However, if we assume that the lean is essentially the result of summing the gravity (weight) force vectors with the centrifugal effect under dynamic conditions, then I think two accelerometers affixed to the motorcycle 90 degrees to each other under this sort of dynamic condition would not provide you with anymore information: instead, each accelerometer would be reading only its particular component of the vector that is normal to the driver's seat.
If the motorcycle were traveling at high speed, with a lean angle of 45 degrees then one accelerometer axis would be vertical, reading one gee. The other would be horizontal, reading whatever amount of acceleration was due to traveling in an arc. No matter what the vehicle is doing there will always be at least one gee present. Since it is constrained to a two dimensional surface you should be able to solve what that vector is. Good filtering would be necessary of course to remove the effects of road imperfections and dips and rises.
Rich, I think I see what you're getting at. On a flat track, and because the motorcycle is earthbound, there will always be one G normal to the track's surface. Any additional accelerations will be due to centripetal factors encountered during turns.
But how to filter those out? I would contend that the net acceleration vector will always be normal to the seat when the motorcycle is in motion. Because it's a two-wheeled vehicle, the rider constantly has to correct to neutralize any side components; otherwise he will either be flung outward in a curve if he's too upright or fall inward if he banks too much.
Also, whether the accelerometer axes are at 45/45 degrees, 0/90 degrees, or 30/60 degrees is irrelevant. Since the measurement vectors are orthogonal, it will be possible to transform the measurement from any sensor orientation to a rotational frame with the Y axis normal to the seat.
Comments
What about doing it mechanically? Use a free swing gimble mount and gyroscope to maintain camera orientation. I know this would work for weelies, not sure about corners though, the roll would be accounted for, but I dont know if the camera would lead, it seems more likely it would lag, trying to maintain it's original orientation. Perhaps·resticting the DOF would overcome this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 11/12/2008 3:17:19 AM GMT
Of course, you'll need to find (or make) astronomical tables for years to come and input all that data into the uC...
Sun? You obviously don't live anywhere near Seattle!
Seriously, this is not a bad idea, given an unobstructed view of the sky. The astro tables are unnecessary, though, for short-term stability. Just mount the light sensor on the camera mount, take a reference reading with it level, then seek to that reading a reading that equates to the same altitude value with the bike in motion.
-Phil
Edit: 'Forgot to account for variable direction of travel. Corrected.
Post Edited (Phil Pilgrim (PhiPi)) : 11/12/2008 6:38:05 AM GMT
http://www.sparkfun.com/commerce/product_info.php?products_id=8958
It has a analog out and its linear and it would work with adc like 381·I belive parallax has them.· Write some code that rotates a pan/tilit platform with the camera.
I included a crude picture.·
Paul
Edit:· The picture is a little off.· If you know the distance the sensor is away from the bike center and the result the sensor is returning you can figure the angle out.· Flip the two legs of the triangle and leave the hypotenuse.· But I hope this explains alittle better.
Post Edited (QuantumRI) : 11/12/2008 7:41:58 AM GMT
Didn't think about interference for the ping sensors... there are a lot of odd whistles and noises that might get the sensors confused. Rattle & shake isn't a problem, though, because it should affect both sensors equally. It still is trig, though.
I thought of an IR sensor, but different road surfaces will absorb different amounts of IR. And the great outdoors is flooded with IR, so I suspect it wouldn't be that reliable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
Take a look at www.flextion.co.uk They don't say much, but it is interesting
http://www.msgroup.org/forums/mtt/topic.asp?TOPIC_ID=312
Apparently, you also have to do the math for the width of the tire.
It's been a while since this thread was active, but EatSleepRIDE has recently developed an iOS App for motorcyclists that help riders calculate their lean angle, and get other riding data like speed, elevation, and duration the ride. We used internal sensors in the iPhone (accelerometer, gyroscope and GPS technology), so no external hardware is required. http://app.eatsleepride.com/
You can also record your route, discover routes in your area, connect with riders on the road and gives riders access to motorcycle crash detection that detects a crash and notifies your pre-set contacts with your geo-location.
Would anyone use an App like this?
Interesting project. I'm just curious: how did you go about verifying your application gives the proper lean angle?
The device could allow for any centrifugal effect by using a strain gauge sensor that is calibrated for the weight, any deviation in weight as it gets heavier due to centrifugal forces can be calculated out of the equation.
Or for simplicity damping springs?
A weighted bearing would have the same issues as using an accelerometer by itself. It couldn't tell the difference between an acceleration from a lean vs a turn. In a coordinated turn (an aviation term) all the g force experienced by the pilot from the turn is directed downward in relationship to the sitting pilot. A motocycle probably has most of the centrifugal force directed down in line with the wheels of the motorcycle. So if the motorcycle it turning in a coordinated fashion, the bearing will always be near the bottom of the race even if the motorcycle is experiencing substantial lean.
As has been suggested, I think being able to sense the magnitude along with the direction of the acceleration would aid in computing if the cycle is leaning or not (though I'm not sure it would be enough).
As others have mentioned, a gyro would make this type of calculation a lot easier. I assume the app uses the iPhones accelerometer and gyro to compute the lean angle.
What about a bar horizontal to the ground with a circular weight on it, as the fixed bar tilts the weight moves left or right the axes would be fixed by the bar and the amount of movement along the bar gives the angle through a strain guage this may be less susceptible to CF?
I should give posts time to "settle" before replying. I know my posts often get edited several times within their first few minutes of life.
Another idea, instead of the bar how about a plastic tube with windings on the outside at either end,
inside would be a metal slug and the tube would be filled with viscous liquid to dampen the speed of the slug, the inductance of the windings would change as the slug moved within the windings
ok that may not work as at a certain angle the weighted slug would still move down, perhaps the original idea of suspending the slug inside by a strain guage, the more tilt the heavier it becomes to the guage?
Another idea is to have a tilting plate with holes drilled in it, a light source and a sensor either side of the plate in an enclosure to stop any other light entering and as the plate tilts the light is slowly cut off from the sensor
1.0000 g= vertical, and anything over 1.0000 g is an angle which could be calibrated.
True on a slope? EDIT: oops, I see the man in the shades beat me to it.
Maybe so, but... uh, wasn't I just agreeing with you about the dips and such? For erco's idea of using a single accelerometer, wouldn't a sudden rise look like a lean? Or am I confused?
Dips and rises would give false readings with a single accelerometer. I don't think you are confused. [noparse]:-)[/noparse]
Rich wins again. Confound you, W9GFO!
BTW, I guess now that orbital Kepler's out for the count, your bot's on deck. Any progress there?
Going around a corner on a bike you feel it a lot more in the lower body, in an airplane forget it.
Correct. In a coordinated turn, the only force ts "down" relative to the airframe. I suspect the same is somewhat true with a motorcycle, with tire friction compensating for any residual side forces.
-Phil
On a bike you need to grip it with lower body to keep any pressure off the hand grips and accelerate into the corner to keep the bike's weight even on both tires or... well hopefully you have insurance lol. Since that lower body grip increases with the lean angle I'm guessing a sensor (or two like W9GFO said) may actually be able to sense the lean angle. I have a feeling the road surface grade will dictate what the sensor shows and accelerometers may only be reliable on a flat surface or need some kind of dynamic tuning where the road surface is taken into consideration.
I think it's true that two accelerometers at 90 degrees could give you useable information under static conditions. However, if we assume that the lean is essentially the result of summing the gravity (weight) force vectors with the centrifugal effect under dynamic conditions, then I think two accelerometers affixed to the motorcycle 90 degrees to each other under this sort of dynamic condition would not provide you with anymore information: instead, each accelerometer would be reading only its particular component of the vector that is normal to the driver's seat.
As Phil pointed out, the whole purpose of leaning the motorcycle when moving is to kinda make the side-wise vectors disappear. I think the accelerometers would then have no way of detecting any other forces in their motorcycle frame of reference.
Maybe I'm wrong about this, and I hope somebody will point out the error in my thinking, but this might be why a gyro of some kind might be useful for this app - you need a frame of reference that is outside the motorcycle because the act of leaning is making any other vectors sorta evaporate. The frame of reference in the case of the gyro would be the gyro's inertia, which is happily independent of the motorcycle.
If the motorcycle were traveling at high speed, with a lean angle of 45 degrees then one accelerometer axis would be vertical, reading one gee. The other would be horizontal, reading whatever amount of acceleration was due to traveling in an arc. No matter what the vehicle is doing there will always be at least one gee present. Since it is constrained to a two dimensional surface you should be able to solve what that vector is. Good filtering would be necessary of course to remove the effects of road imperfections and dips and rises.
But how to filter those out? I would contend that the net acceleration vector will always be normal to the seat when the motorcycle is in motion. Because it's a two-wheeled vehicle, the rider constantly has to correct to neutralize any side components; otherwise he will either be flung outward in a curve if he's too upright or fall inward if he banks too much.
Also, whether the accelerometer axes are at 45/45 degrees, 0/90 degrees, or 30/60 degrees is irrelevant. Since the measurement vectors are orthogonal, it will be possible to transform the measurement from any sensor orientation to a rotational frame with the Y axis normal to the seat.
-Phil