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

Electronics help optimizing a circuit (question updated 25/6/04)

Discussion in 'Modding' started by alianyn, 6 Jun 2004.

  1. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    welp some of may know this circuit from the project log forums.
    the 1st version of the circuit was totally controlled by the pic so i had no problems with it - but i`ve been asked to make a version of it that works with any mobo headers.

    it`s bsically a replacenment for all the leds...
    it will throb (frequency set by the pot) blue when power is off, turn on fully blue when power is on. and when ide goes on it the reds also light up...

    my 2 questions are :
    1. do you think the circuit could be optimized - i used 4 different tranny`s which is wasteful in my mind, but i have not slept in 3 days and am working off a major headache - so you can`t say i`m at my prime so i cuold be missing the real easy simple route here even though it`s right under me nose... :duh:

    2. i also want the ide activity to halt the blue led action and only the red leds to light up - how do u think i should go about that? use the red lighting to ground the blue one? (pull down?)

    here`s the schematic i`m using now - feel free 2 edit or play with and give your own version if you think i totally crapped it...

    [​IMG]

    i`ll explain a little...
    pin 1 is naturally ground...
    pin 2 is the power on signal pin - when it`s low it sets the pnp as a common emitter (collector follower - lol) which means that the schmitt trigger is getting the full 12V (pin 4) to the voltage divider which is then set to make the output 5V... when the power is on and signal pin high - it sets the npn transistor on as a common collector (emitter follower) which means it`s giving around 5V (not 2 sure about that - from measuring that`s about what my mobo gives, but i was a zombie when i measured and who knows what i marked...). infact now that i think about it again - it can`t b that high a voltage... n.m - i`ll fix it later - same principal still applies...
    and pin 3 is the ide activity, when it goes on (low) it sets the pnp on, again as a common collector (emitter follower) which gives juice to the 4 bright red leds...

    too many tranny`s if you guys ask me, that`s why i need your help (i`m beat and off to sleep now... - have another shift @ the hospital in 1.5 hrs...) omptimizing, and ofcourse proofing... not to mention any suggestions will be truelly appreciated... :thumb:
     
    Last edited: 25 Jun 2004
  2. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Where does pin#4 12V come from when the power is "Off"? :confused:

    One thing, if I understand you, Q2 & Q4 bases are either at 0V low or 5V high. If the PNP emitters are at +12V won't they always be on?

    And when you're using transistors as switches, a base resistor is generally needed.
     
  3. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    ROFL - you`re absolutely right mon capitan, welp i was SOOOOO past tired that i didn`t even notice that - man oh man! ofcourse i can`t have 12V when power is off - will have 2 use 5Vsb... which means lower voltage for the blue leds :( never did figure a way around that... any ideas?

    k - i`ve tried to update the circuit above - but it gives the wrong image for some reason - i`ll try and fix it again l8r... but notice that R2 should be 68K now, and ofcourse R8 should be 51ohm...
    using these values i should now have somewhere around the 3-3.2V output from the opamp (pin 1) which should be better for the leds (again feel free to correct my calcs. i`m way sleepy after 1.5hrs of sleep...).

    as for the pnp`s - i`m not sure i understand your question... as far as i know that`s the way to hook up a pnp - the emitter needs to be more "positive" than the collector (as opposite to the npn). since i`ve actually only used pnp`s twice to this date (and npn`s countless) i`m not 100% sure (especially taking in mind my condition :yawn: ) but pretty much so...

    and as for the bases :
    1. except for the opamp output i want all the transistors fully saturated when switching - so no real need for any current limitations here, and we are talking small currents on all inputs (supposed to light up normal leds...)
    2. the mobo has resistors on it limiting the current enough as it is - so i don`t really see the need to add some of my own...

    thanks for the input. would appreciate some more!
    do you think fewer tranny`s can be used or @ a different configuration?
    do you see a way of increasing voltage to the throbbing leds?

    (again, thanks for the time...)
     
  4. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    They do work "opposite" to NPN, but that means they start to come on when the base potential is 0.6V less than the emitter potential, and by a volt or so less they're saturated. So +5V on the base and +12V on the emitter is fully-on. Using 5VSB should be OK.
    (1) is putting all the voltage across a diode junction in the transistor, so without current limiting the transistor emits smoke. Current limiting by the load only works for emitter-follower config like Q1 or Q4.

    If (2) is always true, OK. :worried:

    You need 1 transistor to boost the triangle-wave signal, 1 for the HDDA signal, maybe 1 to show power is on. I'm not sure you can drive blues from a 5V supply triangle wave oscillator, the op-amp loses over 1.5V and the transistor 0.6V so only 2.9V max left for the led. A 555 astable would work, but be more tricky to get fades in & out. Or an expensive rail-to-rail opamp.

    I'd suggest using a simulator to get the right values for things & check it all works, Circuitmaker Student is free and easy to use. Keep in there. :thumb:
     
  5. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    lol - knew that if i`d just get my head cleared on this i`d crack it...
    i was just 2 much in2 med stuff this past few days, we had some accident victims come in just @ the end of my o.r shift and so for 3 days now (almost straight - no rest inbetween) we`ve been working on them - managed to save almost all functionality of ones face and most of the looks too...
    second is more porblematic, so while i was daydreaming inbetween i got the answer :idea:

    heh - i may not b much @ digital elec. but when it comes 2 analog i can pretty much ride with hulla! made it a common emitter with a voltage divider so VERY little voltage AND curent enters the base (bc547b has very small saturate V and I) and that controls the collector-emitter current/voltage inversely :thumb:
    works like a charm - if u wanna c a VERY bright (blinded me) blue led working off the 5V in an avi - check THIS out.

    also started redesigning the circuit - the throb (based on power on/off) should be working fine now using 5Vsb - forgot to add the resistor i was gonna name after you captain (`cause you were my inspiration and it`s in your honour ;) ) so i`ll be adding that later.

    [​IMG]

    but i`m holding off on the ide red leds for the moment because this is where i may agree with you - as i`m not quite certain as to how the ide actually regulates it`s voltage (gonna do a search here later - i know i`ve seen it written once) i`m not sure my design for it was correct - i did however use an optocoupler once to connect to it, so i may use that again...

    interested in your opinion of the design now...
    or anyone elses... i still am pretty beat after who knows how many hours in the o.r with a huge lack of sleep so i might not be clear again...
    just dropped off to the appartment to sleep some so i tried the circuit, and since it worked i`m posting and off to sleep for 4 hours...
    thanks for tuning in...
     
  6. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    <bump> new question...


    well, here`s the "almost" final version of the circuit
    [​IMG]

    As you can probably see i`ve made it so the whole circuit is powered by the 5Vsb, and there are 2 information pins :
    1) power on/off - when this pin is low, is sets on Q2 (pnp transistor) which in turn activates the throbbing circuit which throbbs the blue leds.
    when this pin is high, it sets on Q3 (npn transistor) which turns the blue leds on constantly - this way - when computer power is off i have throbbing blue leds and when the computer is on i have a constant blue.

    2) IDE activity - this is an open collector so it needs to be connected to a power pin via a resistor as done by r13.
    it then activates Q4 (pnp transistor) which in turn activates the red leds.

    now everything works fine (i`ve simulated it and after that have breadboarded it and even pcb`d this exact circuit for mockup purposes and since i had a spare one layer board around...), BUT the only thing i did not think of is that when power is on and ide activity occurs BOTH lights turn on - blue and red! and i get a purplish color which ofcourse i don`t like.
    i have some ideas as to how to go about this, but since i am VERY tired (getting to be the usual...) and when i`m THT tired i can`t say i`m @ my prime, i`ve decided to ask before i simulate anything...

    just so we`re clear i want the red leds to turn of the blues or more accurately when ide goes on - i want power leds to go off...
    (mainly i`ve thought of dioding the ide activity pin to the power pin of the leds since it`s active lo it should bring them to gnd... - i think i`ve seen this done in another thread - not sure...)

    ideas anyone? something perhaps simpler? less risky?


    *** [Edit]bahhhh - n.m - i`m such a bonehead sometimes - worked it out ofcourse...[/Edit]
    post the new one later on...

    *** k - finally got home and updated the schematic - i`m just too tired so i made 2 versions - now i know something is wrong with the first but my head is just exploding - what do you guys think?
    [​IMG]

    now the 2rd one should work fine - but there are just too many diodes if you ask me ...
    [​IMG]

    - so what i need you to tell me is which would you go with (both work fine in simulation) and if i`m right about the 1st one being not good, and why...
    - and which would be better in your opinion - 1n4004 or 1n4148?

    k- get some sleep now - perhaps things will be clearer when i wake...?
     
    Last edited: 25 Jun 2004
  7. c.cam108

    c.cam108 Minimodder

    Joined:
    14 Feb 2004
    Posts:
    907
    Likes Received:
    3
    pics in the last post dont work
     
  8. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    there we go - sorry - i saved them in .png - have no idea why on the server they show up as jpg :/ fixed it now...
     
  9. c.cam108

    c.cam108 Minimodder

    Joined:
    14 Feb 2004
    Posts:
    907
    Likes Received:
    3
    still nothing for the first 2, but the last one is fine.

    Great idea for a circuit BTW :thumb:
     
  10. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    sorry <Double_C> i triple checked this using my neighbour`s computer and the one @ the faculty, all 3 pictures show up fine :( i have no idea what could be causing it for you. does anyone else experience this?

    also thanks for the kind word about the circuit.
     
  11. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    That's a great idea, in fact I may steal it for a 4-channel fan control I've had in mind... :naughty:

    First circuit you've all the blue leds in parallel, and all the led resistors in parallel, will work fine in simulation but leds may vary in intensity in real life. :nono:
     
  12. Lynx

    Lynx What's a Dremel?

    Joined:
    24 Nov 2001
    Posts:
    864
    Likes Received:
    2
    How much current does your cuircuit draw from the 5VSB rail? I would check to make sure your PSU supplies enough current on it. (by this I mean what you need and alot more because you ahve to power the mobo of this as well)
     
  13. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    There's only 8 LED's in the circuit, so it's not going to draw more than 200mA with all LED's on, so there's nothing to worry about there. 2A on the 5VSB is pretty much standard these days.
     
  14. Lynx

    Lynx What's a Dremel?

    Joined:
    24 Nov 2001
    Posts:
    864
    Likes Received:
    2
    ok was just making sure because I remember when I got my mobo I had to get a new PSU because it drew too much on the 5VSB rail
     
  15. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    - enjoy :thumb:

    - K, now that i`m awake - that`s pretty clear from just a glance... don`t know what the HELL i was thinking...
    only shame is that it will take 4 diodes. i`d think 1n4004 would do better right?

    <Lynx> thanks for the kind warning, but as stated by <SteveyG> almost all psu`s today (including mine) give 2Amp`s on the 5Vsb - so i`m safe there. thanks for commenting on it though :thumb:

    so - i`ve breadboarded a version of itwith only 2 leds for each channel and it all works fine - BUT - for some weird reason the red (ide activity leds) don`t seem to power down, they light up constantly and on ide activity light up even brighter - anyone has an idea what`s the deal with that?

    [off topic]i hate circuit debugging[/off topic]
     
  16. c.cam108

    c.cam108 Minimodder

    Joined:
    14 Feb 2004
    Posts:
    907
    Likes Received:
    3
    Works now thanks. :thumb:

    Also, aren't the power and hdd led headers switching negative? (I don't know what it's called, but basically the LED is switched between the LED and ground.)

    Please correct me if I'm talking boll*cks.
     
  17. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    "Active low" in geekish. On the mobo hdd activity pins, one is a steady 5V, the other goes near 0V on drive activity. On one side or t'other there's current limiting for the led.

    From alianyn's circuits, looks like power switch is similar. Or from the results he's getting, mebbe not... :worried: ;)
     
  18. alianyn

    alianyn What's a Dremel?

    Joined:
    8 Nov 2003
    Posts:
    85
    Likes Received:
    0
    lol - the ide activity is just as u described it <cpemma> the power led is the exact opposite, one wire is gnd and the other is 5V when power on and gnd when power is off.

    i fixed it, it was a simple matter of resistors, seems that to get a good pull-up biasing the r18 needs to be @ least 3 times r13...
    otherwise there is no "easy" pass for electricity to flow in.
    so with values of r18=15K and r13=5K everything works fine again.

    knew that with some sleep i`d get the better of this...
     

Share This Page