1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Changing led color with a vibration

Discussion in 'Modding' started by dan89, 11 Jul 2005.

  1. dan89

    dan89 What's a Dremel?

    Joined:
    11 Jul 2005
    Posts:
    6
    Likes Received:
    0
    Hi, heres a general question that doesn't really have to do with cases/pc's.
    I basically want to use 3 RGB leds hooked up in series to 12v, and with a small vibration...the color would change.
    So lets say i just wanted to change between green and blue. Green is on, vibration changes it to blue, vibration again back to green.
    My friend suggested a flip flop ic, or a pic. I just want it to be as simple as possible.
    Any help would be great, Thanks.
     
  2. chopsuwe

    chopsuwe What's a Dremel?

    Joined:
    9 Jul 2002
    Posts:
    135
    Likes Received:
    0
    You could use a 4017 counter do the R/G/B sequence. The vibration sensor can be a microphone with low gain and a low pass filter at about 10Hz.
     
  3. dan89

    dan89 What's a Dremel?

    Joined:
    11 Jul 2005
    Posts:
    6
    Likes Received:
    0
    Actually, how can i connect 3 RGB leds in series so that when i push the toggle in one direction its green, then other direction its orange (combination of the green and red leads). So the only colors being connected would be green and red.
     
  4. Starbuck3733T

    Starbuck3733T Look out sugar, here it comes

    Joined:
    16 Sep 2002
    Posts:
    920
    Likes Received:
    0
    Out of curiosity, what's causing the vibration you're responding to?
     
  5. dan89

    dan89 What's a Dremel?

    Joined:
    11 Jul 2005
    Posts:
    6
    Likes Received:
    0
    any kind of big movement or hard tap. Maybe something that has to do with a toy.
     
  6. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    RGB leds usually have 6 wires so you can treat each colour as an individual led and wire them in series or parallel strings (with appropriate resistors).

    Using a common vibration-actuated switch as clock, a flip-flop can operate 2 output states, or the 4017 method will do 2 or more and may be simpler/less parts.
     
  7. dan89

    dan89 What's a Dremel?

    Joined:
    11 Jul 2005
    Posts:
    6
    Likes Received:
    0
    hmm...i need the parts to be as small as possible.
    Has anyone seen a light up bouncy ball? They have a little spring inside and when the ball is bounced, the spring makes momentary contact with another contact to turn the leds on. I guess its kinda the same idea here...
    So which of the three would have less parts and is the smallest?
    flip-flop
    4017 ic
    microcontroller - using a simple code to control the leds when the vibration switch is triggered.
    Any advice?
     
    Last edited: 11 Jul 2005
  8. chopsuwe

    chopsuwe What's a Dremel?

    Joined:
    9 Jul 2002
    Posts:
    135
    Likes Received:
    0
    So you want to hit once and it goes green again and it goes green+red, then switch off or go back to red on the next hit?

    They are all going to be about the same size, both the flipflop and 4017 are dip14 or dip16. Microcontrollers do have an advantage of being reprogrammable so you can change the colour and sequence. Some also have a low power sleep mode so you don't need a power switch. They do come in an 8 pin package but the size saving will be taken up with the programming connector. If size is a major concern you can get all these in surface mount packages. You will probably be able to get the pcb down to about 25mm square with through hole or a bit smaller with smd.
     
  9. dan89

    dan89 What's a Dremel?

    Joined:
    11 Jul 2005
    Posts:
    6
    Likes Received:
    0
    Yea, but the only colors will be green, and green+red. Each hit will make it switch colors from green to green+red, vice versa.
    So if i go either flip flop or 4017, those would be the only parts i would need? (except for resistors).

    Thanks
     
  10. chopsuwe

    chopsuwe What's a Dremel?

    Joined:
    9 Jul 2002
    Posts:
    135
    Likes Received:
    0
    You will need some sort of motion sensor. Car alarms use a coil with a magnet suspended on a spring above it. Probably a transistor and few resistors and a 4013 flip-flop. Leave the green led on all the time and just switch the red led.
     
  11. TTmodder

    TTmodder Hammertime

    Joined:
    9 Apr 2005
    Posts:
    784
    Likes Received:
    0
    shake it baby :)
     
  12. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    You'll need a transistor switch to boost the current if you want a few bright leds, CMOS chips can only deliver a few mA.

    There are some accelerometer sensors that react to knocks, probably smaller than you could make from scratch.
     
  13. dan89

    dan89 What's a Dremel?

    Joined:
    11 Jul 2005
    Posts:
    6
    Likes Received:
    0
    those accelerometer sensors look liek they might do the trick. but they might need continuous force to keep the contact.
    So i guess it will have to be combined with the other parts right? not just accelerometer sensor and leds =/
     
  14. zerokool04

    zerokool04 What's a Dremel?

    Joined:
    5 Oct 2004
    Posts:
    97
    Likes Received:
    0
    All that sensor does is act as a push to make switch, as far as I can make out it is the same principle you described with a spring, except from in a sealed unit.
     

Share This Page