Acelerometer usage

Thread Starter

cts_casemod

Joined May 14, 2013
35
Hiya,

Can anyone tell me how to use an accelerometer?
I want to activate an LED if the acceleration rate is higher than 2m/s

How shall I do this?

Thanks
 

kubeek

Joined Sep 20, 2005
5,795
Well it is simple only if you care about acceleration in a single axis. If you want to know the total acceleration, you need to compute sqrt(x^2 + y^2 + z^2) which is not very easy to do in analog domain. That is if you have an accelerometer with analog output. If it is digital then it is a completely different question and you will probably need a microcontroller anyway.
 

sq-aristo

Joined Jun 1, 2013
20
Single or 3 axis would help or even more. Pick an accelerometer and it will be easy to help. I'm not sure if it could output an anologue voltage if it could it should be easy. If not you will need a digital interpreter of some sort.
What is the overall purpose for the project?
 

Thread Starter

cts_casemod

Joined May 14, 2013
35
All valid comments, but my point is that that the deceleration force will only be accurate if the device is horizontal to the x axis. It will vary with the slop of the plane.

What about using a pulse count sensor? I have access to one of the phases of the stepper, so I could use this to have an average and detect if the pulse count was increasing or decreasing. I just have no experience whatsoever with micros, so I am not sure if someone could guide me into something I could use.

Regards
 

Thread Starter

cts_casemod

Joined May 14, 2013
35
Single or 3 axis would help or even more. Pick an accelerometer and it will be easy to help. I'm not sure if it could output an anologue voltage if it could it should be easy. If not you will need a digital interpreter of some sort.
What is the overall purpose for the project?
The purpose of the project is to simulate a brake light on a bike, without using wires. I have access to a stepper being used as a small generator for the lights, so I could install a RF module to get the frequency or I could use some kind of accelerometer.

The idea is to have everything self contained without any wires on the bike.
 

RichardO

Joined May 4, 2013
2,270
The purpose of the project is to simulate a brake light on a bike
Nice idea.

If I were doing it, I would use the single accelerometer and comparator as suggested by #12. Some analog filtering may be needed to reject vibrations from the signal.

I would put the accelerometer, red LED's and a battery in a single box. The LED's draw little power and only for a short amount of time and allows a battery to run the circuit for quite a number of hours. By keeping the power needs low and putting everything in one place, there is no need for a generator or RF link.

The only hitch in this plan is the amount of power needed to run the accelerometer. Some sort of real low power circuit may be needed to periodically power up the accelerometer, check for a braking condition and then power the accelerometer back down. The easiest way to do this is a microcontroller such as a PIC. Of course, a power switch is even simpler. :)

Another way of sensing acceleration would be to build a mechanical detector using a weight and a micro-switch. This may, however, be difficult to do in the environment of a bouncing bike.
 

sq-aristo

Joined Jun 1, 2013
20
3months ago I had never used one. I bought an arduino and have made a remote control lawn mower with a 3 axis compass and accel for autopilot. All it took was some reading you will find everything you need for an arduino they are easy
 
Top