Electronics Flip-Flop for Bulgin switch

Discussion in 'Modding' started by Willie92, 17 Dec 2004.

  1. Willie92

    Willie92 What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    16
    Likes Received:
    0
    OK, I know that cpemma has got a great design and instructions for building a flip-flop switch (Link). I'm one of those nogs that bought the cool looking Bulgin anti-vandal switches before I understood what a momentary switch was. So now I've got four of 'em in my case. The momentary switch actually works out well for one because I'm using it for the Thermaltake LED-ram "coolers" (Link) (not very functional I know, but I think it looks cool). The switch that comes with that is actually a momentary switch that changes the LED effects (the "heartbeat" is my personal favorite)

    Here's my dilemma. One of the switches I want to use to turn on/off the acrylic LED feet (Link) for my case, this normally connects to the 5V part of the molex. The other switch I want to turn on/off my cold cathod lights (Link), which normally connect to the 12V part of molex. Complicating all of this, of course, is the need to also supply no more than 3V to light up the LED on the Bulgin switch.

    So here's the question:
    • Can this circuit be modified to supply both the voltage needed to light the Bulgin switch LED AND power what that switch is supposed to turn on (meaning either the LED feet or the CCFL lights)?
    • Can it be modified to accept 5V on one side of the circuit and 12V on the other?
    • If yes to either, what needs to be changed?

    I'm a complete n00b to this building circuits stuff and can barely solder the way it is (but always eager to learn), so any and all help will be greatly appreciated.

    Thanks!
     
  2. whypick1

    whypick1 The über-Pick

    Joined:
    17 Oct 2002
    Posts:
    2,014
    Likes Received:
    2
    1. The Bulgins have seperate leads for the LED and the switch. There should be no issue here. Simply pick a supply voltage (+5v or +12v) and the appropriate resistor to run the LED off of that voltage. Granted, things are easier if the LED and the switch are at the same voltage, but it's not a necessity.

    2. Yes you can do that. The important thing is that the voltage going through the switch's contacts and the supply voltage for the flip-flop be the same. If the switch was +12v and the flip-flop +5v, you'd damage the flip-flop. If the switch was +5v and the flip-flop +12v, then presses wouldn't register (the input of the flip-flop would be +5v, which is less than half of the supply voltage, so it'd be a logic LOW).
     
  3. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    The momentary switch is in the middle of things so not directly connected to any supply voltage, so you do need one with the illumination terminals isolated from the switch terminals. The Bulgins sound OK. :thumb:

    There's a transistor switch Q1 that will act as a level-shift,

    [​IMG]

    so if you break the supply line between C3 and the load, there's no problem running the flipflop and everything except Q1 on 5V, and the load & Q1 on a 12V supply, with a common ground.

    The MOSFET may not work well on a 5V gate voltage, but there are 'logic level' types around or a bipolar NPN can be used.

    But it simplifies things to just run everything on 12V, with a higher value resistor on the leds.
     
  4. Willie92

    Willie92 What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    16
    Likes Received:
    0
    Ummm, "one" what? (Sorry, but I'm going to show my arse here :worried: ) Does that mean I have to build a circuit to illuminate the switch LED and another circuit to power what the switch turns on (either the feet or CCFL)?

    You're right it would be simpler to just supply the circuit with 12V, but how do I make sure I don't blow out the LEDs for either the feet or switches? The Bulgin spec sheet says the switches I have (blue illumiated ring) have a forward voltage of 3V. First, what's forward voltage? And I don't think I can run 12V through the switch itself right?

    And since the acrylic feet use 5V, I'm thinking that the 4 LEDs are essentially contected in series and therefore can handle 5V without blowing. So I'd need to downstep the output of the circuit to 5V right? Ummm, how do I do that???

    Thanks much for your help in this!
     
  5. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    'Forward voltage' is the voltage the led carries at a specified current. Any extra voltage from the supply is discarded across a series resistor.

    Actually the spec shows the blue one has a forward voltage of 3.4V at 20mA (0.02A). So with a 5V supply an 82 ohm series resistor uses up the extra 1.6V using the Ohms Law formula R=[5V-3.4V]/0.02A and then finding the nearest stock value resistor.

    With a 12V supply a 430 ohm resistor will use up the spare 8.6V.
    The feet will have a built-in resistor to run on 5V. If they're blue leds on a single supply lead, it's likely they're wired in parallel, with 4 using about 0.08A, so an extra 91 ohm resistor in series with the supply will let you run them on 12V. It will need to be 0.6W-1W rated.
     
  6. Willie92

    Willie92 What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    16
    Likes Received:
    0
    Thanks much cpemma! :rock:

    So will I need to build two of your circuits if I want the LED in the switch to turn on when I turn on the circuit and then turn off when I turn the circuit off? Or is it possible to modify a single circuit to supply power to both the switch LEDs and the applications.

    I know it'd be easier to just light them up when the computer is on (that's what I'm doing with the switch that I have hooked up to the memory LEDs--it's getting power from the motherboard connection that's used for the power LED (since the Wavemaster case doesn't have a power LED per se)). But the cool factor would be so much greater if they turned on and off!
     
  7. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    A single flip-flop switch will do both. The switch's led & resistor are wired in parallel with the load, when the load's on, the led's on too. Provided the switch has seperate led & contact pins (4 connection points in all) there's no problem.
     
  8. Willie92

    Willie92 What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    16
    Likes Received:
    0
    OK, I'm resurrecting this thread after a couple of months to make sure that I've got things right. I've spent a little more time learning about electronics and messing around with some circuit design software.

    So the big question, is this an accurate representation of what a circuit should look like that utilizes a double flipflop (like the 4013B)? It will use 12V, but power both a 5V LEDs and 12V CCFL (as described above) as well as the LEDs in the Bulgin switches.

    [​IMG]
     
  9. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    That looks OK, the 91R resistor R11 will drop about 7V at 76mA, 19mA for each of the four foot leds.

    The other way I was on about above is like this
    [​IMG]
    V2 can be a different voltage to V1, the 12V used to run the flipflop side. The diode is only needed with inductive loads. Load goes across the + & - terminals.

    You could still use the mosfet, it's just a bit OTT for a few leds. A 2N3904 or 2N2222A would be OK.
     
  10. Willie92

    Willie92 What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    16
    Likes Received:
    0
    OK, how about this:

    [​IMG]

    I made this use Eagle 4.13 circuit design software. The X-series of pins are terminal blocks like this:

    [​IMG]

    There's seven of them. One for the power, one for each load (one 5v, one 12V), one each for the Bulgin switch itself, and one for the LED in the Bulgin. I'd like to make a PCB prototype out of this (I know, I know cpemma will probably tell me that it'd be easier to make a stripboard, but I suck at soldering!!!!)

    So my question is, does this look right? I know the X-1-1 and X-1-2 pins (for the power terminal block) look messed up, but that's because I'm not sure how to utilize the symbology to indicate that those pins will be acting as power and ground. The X-1-2 pin also looks messed up because I'm not sure how to show that it's supplying power to the flipflop IC.

    The X-4 and X-7 pins will connect to the Bulgins for the switch action, the X-3 and X-6 are for the Bulgin LEDs, and the X-2 and X-5 are for the loads.

    I can also provide a link for the Eagle schematic file if that'll help...

    Thanks again!
     
  11. Willie92

    Willie92 What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    16
    Likes Received:
    0
    OK,

    I've updated the schematic a little. Mainly I moved the point where the Bulgin LEDs ground to (don't know that it really makes that big a difference...). The only other thing to note is that the left flipflop is inverted from the right (I was using PCB Wizard and couldn't get it to do a mirror image, so I had to rotate it instead). Do I need to include some diodes? I know they're needed for inductive loads, but since I'm only powering CCFL and LEDs I don't think I need diodes (since those loads aren't inductive--right?).

    [​IMG]

    Does this look right for what I'm trying to do?

    Thanks!
     
  12. my58vw

    my58vw Plexi Expert

    Joined:
    22 Sep 2003
    Posts:
    1,082
    Likes Received:
    1
    To bring this thread back from the dead...

    I am building this circuit and was curious why we needed a 1M ohm resistor on the 12 DCV input into the D-type flip flop. Is it to limit current to the flip flop? I am having trouble making this thing work but I need to maybe grab some LEDs or something to try it. Question is, should I be able to measure a current if nothing is attached to the output or is the output voltage required to run the transistor?

    EDIT...

    Well I found the answer... but I can not find a data sheet for the 4013B I am using. Most say max current for the clock is 10 mA, my calculations show 12 mA for a 1M resistor (12V/1000k) = 12mA which is high. At 18V which for some reason my PS is reading is 18mA... that is way to high, and is even high for some of the higher mA rated ic's. I guess I should try a higher value resistor 1.2M maybe and see if it works...

    Any other sugestions?
     
    Last edited: 26 Jul 2005
  13. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Yeah, check your maths. 12V/1M = 12 microamps, uA not mA.

    Actually, the main reason for R1=1M is so the potential divider made with the 1k R2 gives a 'low' voltage at the clock pin if you hold the button down, so only a single short 'high' pulse from the capacitor discharge gets through.
     

Share This Page