Detecting deceleration

I have converted a vehicle to a hydraulic drive system and will typically use the variable speed control for slowing and braking. I still have the hydraulic brakes, but do not expect to use them often. When I was exclusively using the hydraulic brakes I used a pressure switch to trigger the brake lights. Very simple and effective. However, now that I am using the variable speed hydraulic drive to control acceleration and deceleration I do not have a good way to trigger the brake lights. My first thought would be using an accelerometer. Something that would trigger an output when the deceleration rate exceeds a certain rate (being adjustable via a pot would be ideal). Anyone done anything like this? Seems like this could be a very straight forward, but effective solution.


If you use an accelerometer the brake lights won't come on until after the vehicles starts slowing. How do you control the variable drive? Almost every car out there uses a switch on the pedal. Can you do something similar?

Just curious, is this a road vehicle?

You could use a mercury switch to trigger a transister to operate a relay to power the lights. Or perhaps you could use a simple mechanical inertia switch, if hardware is more your style. Or you could take a sledge hammer to crack a nut, and use a microcontroller and accelerometer and output driver circuit and write a program to turn a lamp on when it senses deceleration.

Thanks for your responses! I have additional details on the vehicle in another post:,98632.0.html

There is a brake pedal for the hydraulic brake system with a switch. The issue is that you can slow down (and stop) very quickly using the speed control which does not activate the brakes lights. In fact, the hydraulic brakes are more for emergency or fast stops. I use the bar in parades and motorcycle rallies and have caught people off guard as I slow down.

After thinking about it I have come up with a solution that might work best. Accelerometers, tilt switches, and pendulums would all be affected by vibration. The bar does not have any suspension and although low speed, still jostles around a bit if you are on rough terrain. What I came up with is linking a potentiometer to the speed control and read the voltage change. If the voltage drops as I decrease the speed control I know I am slowing. I could control the brake light output one of two ways:

  1. Each time the voltage drops by a certain factor I can activate the brake lights for a certain time period.

  2. Each time the voltage drops I can measure the rate of voltage drop over time and activate the brake lights. I could also add another potentiometer to make the rate adjustable. This way a gradual slowing down does not activate the brake lights, but a faster rate of slowing down does turn on the brake lights.

Or I could program both methods and add a switch to select between them and see which seems to provide the best results.