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

Electronics Fan-bus using momentary switches.. please read for explination

Discussion in 'Modding' started by MarkDixon, 5 Jan 2003.

  1. MarkDixon

    MarkDixon What's a Dremel?

    Joined:
    4 Jan 2003
    Posts:
    26
    Likes Received:
    0
    Hi, Im new to the forums, I hope I dont offend anyone on here with my ramblings, like I seem do have done over on the overclockers.com forum..!

    I dont know if some of the words I use here are correct, I dont have much electronics knowledge apart from some lessons when I went to the amature radio club near here (man I wish I'd have kept going now).

    I want to make a fanbus, but instead of making it using the old normal switches, I want to use momentary PTM switches. I have found a curcuit using one of those old electronics kits everyone had as a kid and it uses a NAND flip-flop.. (Remember this is for kids)..

    I can draw the curcuit and post it if anyone needs to see it.

    I want to be able to switch the fans between off-5v-12v, just like a normal fanbus control. Plus maybe switch the cathodes off and on. I would like to use three LED's for the status, red - off, amber - 5v and green - 12v.

    I dont mind getting my hands dirty, and burnt, but I do need a point in the right direction. I may also imcorporate the HD activity meter as shown on the bit-tech.net pages using red, amber and green LEDs for the ammount of usuage.

    If any of this doesnt make sense please ask and Ill try and explain.
     
  2. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Well, if you want 3 states with a little push button to switch between them (which is what I think you do), then a rather ugly but very valid way of doing it would be using some logic gates and a 2 bit binary counter. It'd be fine for 1 channel, maybe 2, but for more than that it's pretty bulky.

    As for just having 12V/0V or any other 2 states you would like this would be incredibly easy. Just a 1 bit binary counter (eg using a R/S flip-flop) to a relay/transistor/whatever you want.
     
  3. MarkDixon

    MarkDixon What's a Dremel?

    Joined:
    4 Jan 2003
    Posts:
    26
    Likes Received:
    0
    Would a 2bit counter let me have the two speeds plus an off setting?
    Also, something thats just occured to me, what about setting some sort of default? Obviously when I switch my PC on I would need some fans on and some off, and I'd like it to start up with the cathodes off so there isn't a sudden drain on the PSU.
    How would the curcuit set the volts for the fans? Would I need some resistors for the outputs and have the curcuit run at 12V or could I make it switch between the 12V and 5V of the molex (maybe using an opto-isolator, or is that a load of crap?).

    I am going to mount all of this in a box in a 3 1/2" or 5 1/4" bay with trailing wires for the buttons/power/LED's so the size of the board doesnt really matter.

    Thanks, Mark.
     
  4. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Yeah, a 2bit counter would allow up to 4 states:

    00
    01
    10
    11

    I mentioned using logic gates. You'd want to connect the 2 outputs of the counter to an AND gate, with the output of that going to the counter reset, giving you three states (when it hit 3, it would reset to 0).

    As for getting the output, you'd want some more logic gates all with their inputs connected to the binary counter's outputs. A NOR (NOT OR) whose output is connected to an opto for running at 12V. A NOR with a NOT at one input for 5V, and a NOR with a NOT at the other input for 0V.

    If you want me to make a little circuit diagram then just let me know. As I said, this is rather bulky since it uses a lot of logic gates, but it would work.
     
  5. musirPmeaT

    musirPmeaT What's a Dremel?

    Joined:
    22 Jun 2002
    Posts:
    137
    Likes Received:
    0
    JPG
    PNG

    R7, R9, R10, R11, & R12 are fans with R8 is chosen such that only 5 (or whatever) volts is across the fans.

    Pushing the button results in 12V -> 5V -> off -> 12V -> 5V -> off -> etc.
     
  6. MarkDixon

    MarkDixon What's a Dremel?

    Joined:
    4 Jan 2003
    Posts:
    26
    Likes Received:
    0
    Yes, I would love you to draw a diagram for one of the curcuits. That would help so much.. But I understand its late so whenever you have time.

    I think I might take a trip to the library and get some books on simple electronics. Or do you have any links to explain this??

    Thanks for the tips NiHiLiST.. They explain things..
     
  7. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Well, I thought I'd post an circuit diagram anyway to make it a little easier to understand for everyone. One thing to remember is that you could just use NOR gates. A NOT gate can be replaced by a NOR gate using both inputs. An AND gate function can also be replicated using NOR gates (although I can't remember how ATM). As I said, this is pretty bulky for what you want, but it's possible.

    [​IMG]

    If you can pickup basic programming quickly then you could always try a simple PIC program to do it all which would be a LOT easier. Would just need the switches connected to the inputs, then the outputs to some opto-isolators/transistors/relays or whatever to power the fans. The program would be very basic, but the principles of assembler code aren't, so not everyone would be able to do it (including me).
     
  8. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    musirPmeaT, that circuit may work, but I wouldn't advise using resistors to pull down the voltage for the fans since a powerful fan can draw in excess of 8 watts of power. At 5 volts that's a quite high amperage!
     
  9. MarkDixon

    MarkDixon What's a Dremel?

    Joined:
    4 Jan 2003
    Posts:
    26
    Likes Received:
    0
    Thanks for the diagram musirPmeaT.
    Is that the same as what you were thinking of NiHiLiST?
    So I would need as many of these curcuits as the ammount of devices I want to control? Thats what you meant by it getting a little messy..?? :)
    Would wiring them in a slightly different way give me the default on/off states I need when I power up?
     
  10. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Yeah, they're basically the same kind of circuit. Mine would give 0V/5V/12V/0V/5V/12V etc.

    Yeah, one of those circuits for each channel. But remember, it would get more messy, since there would be a chip for the binary counter (you could use a 4bit counter if you can't get a 2bit one and just use the first 2 outputs, though I think you can get chips containing two 2bit counters), and a series of chips each containing 4 NOR gates. So that's say, 10 or 12 chips for a 4 channel fanbus, plus all the gubbins for powering the fans. If you were to use optoisolators then you'd have yet more ICs.

    This is why a PIC (Programmable Integrated Cicrucit if you didn't know) would be a better option, using umm, 1 IC for pretty much however many channels you want. With some resistor network trickery and the right IC you could probably get about 16 channels working on one chip :D

    That'd be 16+ fans/cathodes/devices connected, allowing for a total of 43046721 (3^16) combinations of power. Imagine finding optimal cooling settings with THAT!
     
  11. musirPmeaT

    musirPmeaT What's a Dremel?

    Joined:
    22 Jun 2002
    Posts:
    137
    Likes Received:
    0
    That's a detail since the hard part is the control. Could easily flip things around and use pmos or use some diodes...

    No difficulty since I already had it done.

    Yup.

    What do you want? They're set to default to 12 volts.
     
  12. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Oh yeah, the defaults. Currently, with my circuit, the order is 0V,5V,12V, and it will default to the first one.

    But all you'd have to do would be to reorder the things connected to the outputs on the right of my diagram. For instance, it could go 5V,0V,12V if you wanted it to go down each button press and to start on 5V.

    Anyway, bed time for little old nih now :sigh:
     
  13. musirPmeaT

    musirPmeaT What's a Dremel?

    Joined:
    22 Jun 2002
    Posts:
    137
    Likes Received:
    0
    That's just a matter of switching which is which input on my circuit (swap what goes to T1 with T3) and you get off -> 5 -> 12.



    "resistor network trickery" ? Interesting. Care to elaborate?
     
  14. MarkDixon

    MarkDixon What's a Dremel?

    Joined:
    4 Jan 2003
    Posts:
    26
    Likes Received:
    0
    The defaults need to be different for the device the curcuit is driving. I want the cathodes to be off by default, easy enough.. And I want some of the fans to start at 5V and some off.
    Do you know where I can get some info on PIC.. I can do some programming, so I could take a look.
    If I used a PIC would I need some sort of PC connection to control it?? Sounds complicated, I might stick with the curcuit using logic gates and bit counters. It doesnt matter of the size, or even if it goest to two boards...

    That curcuit by musirPmeaT looks my best bet, I could look to see if I could find 2in1 bit counters to keep space down.
    How would you recommend I control the fans and keep them at the desired voltages?
     
  15. musirPmeaT

    musirPmeaT What's a Dremel?

    Joined:
    22 Jun 2002
    Posts:
    137
    Likes Received:
    0
    Yeah, that's the problem. Unless you've already got the stuff for programming pics then it's not really worth it just for this. However, if you want to learn, then this would be a simple project to start with.

    You need to buy the pics ($10 each average) and a programmer ($25-30) that connects to your parallel port.

    Control?

    As far as things like CCLs you can use just a simple 1-bit counter using a flip flop (HERE) so you get just on/off.
     
  16. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Well, if you use my circuit, then just connect the outputs on the right to optoisolators to power the fans. So the fan's ground is always connected to 0V, and then the positive is connected to the optoisolators for 5V and 12V which would allow either 5V or 12V to flow through. I'm not sure what's they're like for high wattage loads though.

    Maybe someone more in the know could tell us? ZapWizard, you out there? :p
     
  17. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Oh yeah, one thing that hasn't been mentioned yet that I think definately should be is the problem of bounce. You would need to either get de-bounce switches or use a flip-flop arrangement to de-bounce the switch.

    For those that don't know, bounce is when the switch physically bounces on it's contacts. It's not as much of a problem with push to make switches as toggle switches, but can still cause problems.

    With a counter for instance, if the switch makes contact, it will count up 1, then if it bounces just for a fraction of a second and back again it will register another touch.

    One interesting way to get around this is to hook up the switch's output to one input of a NAND gate, then to the other input through three NOT gates in series. This creates a time delay before the output switchs, so if the switch makes contact twice or more times quickly then it will only do it once.

    We're talking say, 15-25 nanoseconds here though.
     
  18. MarkDixon

    MarkDixon What's a Dremel?

    Joined:
    4 Jan 2003
    Posts:
    26
    Likes Received:
    0
    Wow Youve certainly given me a lot to look over. I sat and thought about it last night and it came clear to me.

    The bit counter will output 00, 01, 10 and 11. Using a series of logic gates it reads this output from the legs of the IC and decides which gates should have power and which shouldnt, and if we have 10 it resets the counter.

    I think I should be able to manage that, and Ill post pics on the site to show how I get on.

    Thanks a lot for the help. If theres anything Ive missed please let me know..

    Mark
    :clap:
     
  19. NiHiLiST

    NiHiLiST New-born car whore

    Joined:
    18 Aug 2001
    Posts:
    3,987
    Likes Received:
    6
    Yep, you got it. Just one thing though, you'll want it to reset on 11, not 10. The reason why is because it will reset when the counter hits 11, not after another count, so you'll get:

    00 - 12V
    01 - 5V
    10 - 0V
    11 - resets to 00, so 12V again
     
  20. acrimonious

    acrimonious Custom User Title:

    Joined:
    8 Nov 2002
    Posts:
    4,060
    Likes Received:
    3
    What about de-bouncing with the old series resistor, paralel capacitor, series 40106B Hex schmitt inverter trick?

    Schem soon if i can get my webspace to work!
     

Share This Page