Dimmable USB powered LED circuit

Discussion in 'The Projects Forum' started by marmil, Apr 27, 2010.

  1. marmil

    Thread Starter Member

    Oct 31, 2009
    18
    0
    A friend and I followed the information and suggestions in this thread:
    http://forum.allaboutcircuits.com/showthread.php?t=13426
    and successfully made a circuit (with a 12V power supply) to dim two LEDs. Woohoo, we were proud of our small success (both being amateurs). :p

    My question: How could a similar sort of dimming circuit be made to work with standard USB 5V as the power supply?

    I have two of these USB powered LED lights:
    http://www.siig.com/ViewProduct.aspx?pn=AC-LG0012-S1
    My goal is have a circuit that can dim these two LEDs simultaneously that I can plug into a USB port for power.

    Thanks
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    You would need to provide a PWM signal to the usb lamp.

    I dont know if you can do this in software on the PC side, a I haven't seen a way to turn the usb power on and off that fast.

    SO, you could use a 555 pwm circuit that plugs into the port, is adjusted by a POT, and switches the power on a usb jack you install on the circuit.
     
  3. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    The problem the OP is facing is 555 Hysteretic Oscillators don't work well so close to their limits. A CMOS 555 could do it, but it has drive problems.

    [​IMG]

    Replace the NPN transistor with a logic level nMOSFET, drop R2 down 100Ω, use a CMOS 555, reduce the LEDs to 1 LED per string and it should work as is.

    There are other ways to do this, but it will require more parts.
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    CMOS was my thought. And mosfet capable of 500ma also.
    But Bill, I knew we could count on you. ;)
     
    Last edited: Apr 27, 2010
  5. marmil

    Thread Starter Member

    Oct 31, 2009
    18
    0
    Retched and Bill, thank you for your posts.

    Yes, this is the way I would like to go--with two usb jacks on the circuit that I can just plug those little lights into.

    I plan to put the circuit board inside a little plastic box that can sit on a desk. I'll drill two holes in the box to snake the lights out of. The box can protect the circuit, provide a mounting point for the pot and a power switch, and also provide a weighted base to support the outreaching lights.

    When I get home tonight I'll make a new circuit diagram based on your suggestions and post it back here for review.
     
  6. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Ok. Ill be interested to see what you come up with.

    This should be of some help. The 555 and PWM information will help you build your circuit, and his cook-book will help with the 555 dimmer.

    http://forum.allaboutcircuits.com/blog.php?b=378
     
  7. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    If the total drain is only 1/4W, why not just use a 100 ohm pot and a 100 ohm resistor? , only adds another 1/8 W load.
     
  8. marmil

    Thread Starter Member

    Oct 31, 2009
    18
    0
    Hello guys. Here's my start at it. (Not sure how to properly draw the nMOSFET symbol there.)
    Bill, after reading your post again I'm not sure if your "drop R2 down 100Ω" meant from 1K to 900Ω, or down to 100Ω.
    Bernard, thank you for your suggestion too. I'm happy to hear all ideas and critique.
     
  9. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Well, your getting a hold of this pretty quickly. Im guessing this isn't your first project?

    And Bill meant to drop it TO 100 ohm.
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    MOSFETs have a high capacitance on the gate. If it wasn't for that they would take almost no current altogether.

    The gate resistor (which should be as close to the MOSFET as possible) is there to prevent ringing, where the inductance from the wires going to the MOSFET combine with the capacitance of the MOSFET to make the input ring like a bell, and incidentally turning the MOSFET on and off very quickly.
     
  11. marmil

    Thread Starter Member

    Oct 31, 2009
    18
    0
    I'm a computer artist in the animation business so I'm good at making nice looking images,
    even if I don't always fully understand them. ;) Thanks for the clarification on that resistor.

    Would this MOSFET work for this project?
    http://www.radioshack.com/product/index.jsp?productId=2062618
    If not, or if you'd suggest something else please redirect me.

    I guess the other thing is figuring out what ohm resistor is needed for R3 and R4. Any suggestions/what's a good way to figure that out?

    Guys, thank you for not only helping, but expounding on your info and even explaining what's happening. Very nice.
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Oops - you seem to have the USB connectors in the circuit between the MOSFET drain and the current limiting resistors.

    The LEDs need to be there instead. The USB port supplies the power to the circuit.

    Nope, the IRF510 won't work; as it is a standard level MOSFET requiring Vgs=10v to turn fully ON. Vgs = the voltage on the gate terminal, with respect to the source terminal.

    Very generally, International Rectifier MOSFETs that begin with IRF are standard level (requiring 10v to turn on) and IRL are the logic level MOSFETs.
     
  13. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    The usbs are the 2 LEDs. The 5v in is the USB from the computer.
     
  14. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    If you read what I wrote I refereed to a logic level MOSFET, which is a different animal indeed. They are designed for low voltages, unlike conventional MOSFETs.
     
  15. marmil

    Thread Starter Member

    Oct 31, 2009
    18
    0
    Thanks SgtWookie. Sorry for the confusion--I've updated the drawing a bit to better clarify my project.

    I removed the resistors that were next to the USB plugs since I figure the USB lights I'm plugging into them must have their own resistors in-line under the plastic molding somewhere, since they can just be plugged into a 5V plug and work. Does that make sense?

    Also, I added an additional resistor and LED leg on the right near the switch for the purpose of indicating when power is switched on. Does that look alright?
     
  16. marmil

    Thread Starter Member

    Oct 31, 2009
    18
    0
    I was going to try breadboarding this out today, but my friend with all the stuff was busy this weekend. However, I did try building it with a online Java based circuit simulator and it seemed to work as expected. Yay! :)
     
  17. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Good work. Yuo may want to consider downloading more advanced circuit simulation software.

    LTSpice is a software package that is very powerful and has a very active YahooGroup community with hundreds of models to choose from and many very knowledgeable members to help you out.

    http://www.linear.com/designtools/software/ltspice.jsp
     
  18. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    I have several projects out there for a 555. One that might work for your application is the CMOS 555 Long Duration LED Flyback Flasher. It will power a chain of LEDs off of a low voltage.

    I would build your existing design though, and if you want to play with it later you can.

    Are you familiar with protoboards? They are great to test electronics designs, the hands on alternative to simulators. If you don't blow the parts up you can reuse them. :rolleyes: :D
     
Loading...