I am currently working on a personal project and was wondering if there was any way to wire an accelerometer to an LED light to illuminate the light when a set g-force is achieved. I am not too advanced in programming a board to analyze the data and transmit it. Any help would be very much appreciated

  • \$\begingroup\$ You need to specify which accelerometer and which light you plan on using. Also, the solution will depend on your definition of "straight". \$\endgroup\$ – Reinderien Aug 14 '17 at 1:03
  • \$\begingroup\$ Yes, if by straight you mean "via a comparator and LED driver" and by accelerometer you mean an analog accelerometer. \$\endgroup\$ – uint128_t Aug 14 '17 at 1:15
  • \$\begingroup\$ Yes, but, in truth, since many accelerometers have serial port interfaces (likely I2C or SPI) & since many embedded processor have PWM outputs, it would be much simpler to use an embedded processor. To give this perspective, you could probably do this with one chip (the embedded processor) for less then several dollars ... if that much. \$\endgroup\$ – st2000 Aug 14 '17 at 1:40
  • \$\begingroup\$ @st2000 There are MEMS accelerometers with analog outputs available. It's not difficult to get them. \$\endgroup\$ – Nick Alexeev Aug 14 '17 at 2:12

Unless your accelerometer has an output pin that it lights up when triggered, no, you cannot directly control the led without some sort of middleman microcontroller.

If it does, then you can use a comparator as mentioned in the comments, and a mosfet or transistor as a switch.

Considering how cheap and easy it is to get a microcontroller to do this, it would be quicker to use one then shifting through datasheets to find an accelerometer that does what you want directly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.