Shop OBEX P1 Docs P2 Docs Learn Events
Accelerometer - deceleration — Parallax Forums

Accelerometer - deceleration

ammayiammayi Posts: 3
edited 2010-10-03 11:18 in Accessories
Hi, I am developing a device for bicycles that detects the deceleration of the bicycle and depending on this, a set of LEDS will be flashing and when the brake is hit, the lights go solid.

I have chosen atmega8 micro-chip, a memsic 2125 accelerometer to start with for the device. Problem is the memsic 2125 accelerometer is a dual-axis and i am a bit confused with the connections (especially the x-axis and y-axis. i m not sure where they go from the wheel/wherever)

Thanks a lot...Please help...!!

Comments

  • ammayiammayi Posts: 3
    edited 2010-09-17 23:37
    Sorry, my bad. I found out just now that the memsic 2125 is out of my budget. It is not worth for this simple device. Any suggestions on a cheaper accelerometer?
  • FranklinFranklin Posts: 4,747
    edited 2010-09-18 13:28
    I'd go with a purely mechanical solution for this if cost is an issue.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-18 13:54
    One problem with using an accelerometer in an app like this, is that it will be dependent on the slope of the road. IOW, it will be more sensitive when the bike is going downhill than when it's going up. It may be better (and cheaper) to use a magnetic pickup on the wheel, like those CatEye gadgets do, and measure the change in the rate of wheel rotation. At low speeds, though, there will be a delayed reaction unless you can detect more than one pulse per rotation.

    -Phil
  • ercoerco Posts: 20,255
    edited 2010-09-18 22:34
    A mechanical switch on the brake lever will be far cheaper and more reliable.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-18 23:35
    erco,

    I've been thinking the same thing. But it has also occurred to me that the OP's overall objective might be to eliminate any external wiring which, on a bike, can present it's own reliability issues. The idea of a completely self-contained brake light mounted on the rear of the bike does have its attractions.

    -Phil
  • ammayiammayi Posts: 3
    edited 2010-09-19 02:11
    Yes exactly, the objective is to eliminate external wiring. @Phil - what exactly do u mean by self contained brake??can you please elaborate...?

    I have considered ADXL202 and MEMSIC2125 accelerometers but both are very expensive. I am stuck on this one bit.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-19 07:46
    Self-contained brake light. You might take a look at the MMA6331L. It's a 2-axis +/-4g accelerometer that DigiKey has for about a buck (100). Mounted vertically, it would detect both normal and longitudinal acceleration. That way, you might have a chance of subtracting out the gravitational effects of slope. But there will still be plenty of dynamic effects that will require extensive filtering.

    -Phil
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2010-10-01 14:59
    Cool idea, as a cyclist, I think it would be incredibly handy.
    If you watch the rate of change of the G forces on an accelerometer you'd probably find that braking lives somewhere in the realm between bumps in the road which would be very fast short lived changes and tilt of hills which would be slow and long lived changes.
    I guess that would be the "derivative of acceleration".
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-10-01 21:36
    ... ..there will be a delayed reaction unless you can detect more than one pulse per rotation....

    Any chance he could aim something like a bright IR diode at the rear tire and "read" the recurring pattern of light pulse fluctuations reflecting from the tire tread, store said fluctuations as a bit pattern or whatever, monitor them continuously, then flash the freak out lights when the pattern gets suddenly shifted in a manner suggestive of a braking scenario?

    Just thinking out loud.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-01 22:00
    If the tread pattern is regular, something like that might work.

    Or how about a Piezo Vibra Tab sensor in the spokes, which will also make that cool motorcycle sound! :)

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-10-02 06:46

    Or how about a Piezo Vibra Tab sensor in the spokes...

    I'd be a little concerned about mechanical fatigue shredding the thing after a few days (hours?).
  • ercoerco Posts: 20,255
    edited 2010-10-03 09:11
    Surely an accelerometer is up to the task. Better yet, three accelerometers for cross-check like a NASA launch, go with two of three in agreement. A simple GPS receiver can process elevation data in an attempt to correct for the uphill/downhill pitch variance of the bicycle. Quadrature encoders on both wheels can determine the velocity profile of the subject vehicle (it shall be tacitly assumed that there is negligible wheel slippage). A Propeller using 7 cogs can scan and process all the data and run it all through a Kaufman filter or two while downloading the latest Java aplet and codec then finally let the AI coprocessor heuristically determine which PID algorithm best suits the current situation (with humidity, wind, velocity and magnetic variance correction factors applied) in an attempt to decide whether or not to close the switch and light the LED. Based on laboratory simulations, accuracies up to 77% may be achieved.








    Or, use a switch. :)
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-10-03 11:18
    erco wrote: »
    ...Based on laboratory simulations, accuracies up to 77% may be achieved....

    In the instant before I caught sight of your punch line, I actually pitied you for having tried all of that and achieved your 77%.

    Very funny!
Sign In or Register to comment.