Shop OBEX P1 Docs P2 Docs Learn Events
Question from someone new to accelerometers (2125). LED Driver? — Parallax Forums

Question from someone new to accelerometers (2125). LED Driver?

sidewinder211sidewinder211 Posts: 4
edited 2011-09-05 05:58 in Accessories
Hey All,

I need to use the 2125 accelerometer to drive a circuit containing 3 LEDs in parallel. The LED circuit needs to run at ~3.5 V and 60 mA. How would I go about doing this with the 2125 accelerometer?

Thank you in advance for any help,
Steve

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2011-09-03 20:22
    sidewinder211,

    First of all welcome to the forum!

    Second, we need a little more information here... How exactly do you want the Accelerometer to effect the LED's? ... also, it's not good to parallel the LEDs, it's best to provide a current limiting resistor for each led, and then place them in parallel.
  • sidewinder211sidewinder211 Posts: 4
    edited 2011-09-03 20:48
    In a normal state, the LEDs will all be off. Then, I need the LEDs to light up simultaneously with a sufficient enough change in acceleration. It seems like it should be a fairly simple circuit but I cannot wrap my mind around it.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-03 21:09
    A comparator and transistor would do that, and a 555 might also work.
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2011-09-03 21:44
    sidewinder211,

    Your best bet would be to use a micro controller to read the 2125 and then send the appropriate signal to turn the LED's on if the 2125 was too far out of a set threshold.

    The second option would be ( since the output of the 2125 is essentially a 100Hz square wave) to have a 555 configured as an error detector... an error detector would be similar to a missing pulse detector. Actually two 555's configured as an even failure alarm; one looking at the HIGH side of the pulse, the other looking at the LOW side of the pulse. The idea is that while the input signal is LOW, a capacitor is allowed to charge, if the capacitor reaches a threshold before it is reset ( it is reset when the input signal goes HIGH) then the failure alarm indicates a problem. By inverting the signal and feeding that into a second 555 configured as an event failure alarm you could detect if the 2125 goes outside of a certain range.

    A comparator may work but it may not be able to differentiate the small fluctuations necessary to trigger a desirable response.
  • sidewinder211sidewinder211 Posts: 4
    edited 2011-09-03 21:58
    Do you have a particular micro-controller in mind?
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2011-09-03 22:40
    sidewinder211,

    Hmmm... The Basic StampII would do it, and there is plenty of example code to read the Memsic 2125.

    Basic StampII

    Basic Stamp II Example Code for the Memsic 2125 Accelerometer
  • sidewinder211sidewinder211 Posts: 4
    edited 2011-09-04 09:48
    PJ Allen wrote: »

    Hey All,

    Thanks for the speedy responses. I am very new to this kind of work, I am still in college and am working on a new project for my "snake arm" club. I need to only measure the gforce in one direction, then as said before, I need all three LEDs to flash simultaneously, and then return to an off state. I do not know how to program a micro-controller to do this. The Basic StampII is out of stock. Does anyone know where I could get one...does radioshack carry them?

    Thanks again,
    Steve
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-04 09:54
    BS2 - Out of Stock
    Never thought I'd see the day.
    Well, other variants are in stock and all Stamps are "on sale", $49.99 -- so treat yourself.

    PE - This is interesting, because I recall having seen within the last month a post with pictures of 2,000 (?) Stamps assembled, standing uncut in racks. Maybe they never made it to stock or they flew off the shelves.
    My error, it was 6,000 !
    I can't explain.
  • PublisonPublison Posts: 12,366
    edited 2011-09-04 10:21
    I was going to mention the 6000. Maybe they haven't made it out of QC yet. I'd pick up a BS2-24P at the same price. Bigger, better faster, and more instructions. And then there's the BS2-24PX at the $49.00 price. Even faster with a couple of more instructions supported.

    Interesting the BS2-P40 is on temporary hold. Problems?


    PJ Allen wrote: »
    BS2 - Out of Stock
    Never thought I'd see the day.
    Well, other variants are in stock and all Stamps are "on sale", $49.99 -- so treat yourself.

    PE - This is interesting, because I recall having seen within the last month a post with pictures of 2,000 (?) Stamps assembled, standing uncut in racks. Maybe they never made it to stock or they flew off the shelves.
    My error, it was 6,000 !
    I can't explain.
  • RS_JimRS_Jim Posts: 1,764
    edited 2011-09-05 05:58
    The only thing that Radio Shack Stocks is the "what is a micro controller" They also stock the 2125. Going that route would help you get started in the microcontroller world and give you a platform on which to built your project.
    Jim
Sign In or Register to comment.