Help with MOSFET PWM circuit

Discussion in 'The Projects Forum' started by secondarychaos, Apr 6, 2015.

  1. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Hey guys,
    I'm building an alarm clock as a personal project.

    Basically, instead of making noise (which wakes my roommate before me), I am building a board that will drive a set of blue LEDs to simulate a sunrise in my otherwise dark bedroom.

    I have found these commercially, but they are very expensive (like, over $200 for the LED version)

    Plus, I like to build things.

    So, on to my problem.

    I've put together a quick board with a pair of 555 timers on it. The first is an Astable Multivibrator operating at ~750 hz. The output of this goes to a monostable 555 with a Resistor/capacitor circuit to slowly raise the divider voltage. The output of the Monostable 555 goes to the gate of my MOSFET to drive the ~30W LED string.

    The goal of all of this is to slowly increase the light instead of just blasting me with light in the morning. The second goal is to learn more about the 555 timer as it seems ubiquitous.

    I have a good squarewave coming out of the Monostable 555, and power to the MOSFET's source, but when I put a scope looking at the Drain to ground voltage, I see a 12VDC flat line with spikes at the triggering frequency.

    When examined closer, the spikes are a single sinewave cycle, dropping first then climbing, then returning to 12VDC.

    Response time of the MOSFET is supposed to be ~20ns. (obsolete part NDP4060, had a few laying around)

    I have changed the MOSFET twice now. switching between viewing the Drain and the gate shows a clear discrepancy between what is being sent and what is being received.

    Any help would be great!
    Thanks,
    Dan
     
  2. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    And, As I clicked post I realized that I probably just need to bleed the energy from the gate with a resistor. I'll report back if that fixes it for future reference.
     
  3. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,301
    880
    It would help if you'd post the circuit here so we can see it; a verbal description is almost useless.
     
  4. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Is there a good website where I can produce a schematic?
     
  5. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Ok, I found Digikey's Schemelt, but that's going to take me more time than I have on my lunch break.

    The main question is, why would a MOSFET being fed a PWM square wave stay open all the time?
     
  6. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Here's the Astable diagram I used:
    http://upload.wikimedia.org/wikiped...Diagram.svg/275px-555_Astable_Diagram.svg.png

    and the Monostable diagram:
    http://upload.wikimedia.org/wikiped...5_Monostable.svg/275px-555_Monostable.svg.png

    Except on the Monostable, I have a voltage input on pin 5 to increase the pulse width over time.

    Output of Astable's pin 3 goes to the Monostable's pin 2 Trigger
    Width of the Monostable's pin 3 is dictated by the voltage at pin 5, as the comparator inside flips when it reaches that voltage, so by increasing it, I'm delaying the Pulse turning off.

    All of the above is working.

    Then pin 3 (output) of the Monostable goes to the gate of a MOSFET which is essentially staying on and pulsing on top of 12 VDC (source voltage, which is also what the 555's are running on)
     
  7. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,987
    3,731
    Just draw a schematic on paper and take a picture of it.
     
  8. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    Because the gate is like a big capacitor and it takes more time than you think to charge and discharge. Where is the schematic of the MOSFET, that's the critical piece.
     
  9. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Ha ha that just makes to much sense.

    Give me just a few to do that
     
  10. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
  11. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Here's the diagram 1428363136108-679428313.jpg
     
  12. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    A couple of things to note from the datasheet:
    Vgs(th) is 3V with a min of 2V and a max of 4V. At this point the MOSFET is barely on, note the small drain current (250 μA).
    Vgs must be 10V to turn the device on fully. Notice the substantial drain current (7.5 Amperes). More than 4 orders of magnitude different
    Ciss, the input capacitance is listed as 370 pf (Typ) and 450 pf. (Max). This is where the rest of the circuit comes in. There can also be additional delays where the voltage waveform on the gate reaches a plateau and stays there for a while before continuing on.

    So the basic RC circuit on the gate looks like 120 Ω and 370 pf. Looks like 44 nanosec. for one time constant. So charge and discharge time should not be a problem.

    I see the problem. You're using an N-channel FET as a high side switch. This means the SOURCE node is floating somewhere above GND at whatever the forward drop of the LEDs might be. I think you need to put the FET on the low side of the diodes. That should work better.
     
    Last edited: Apr 6, 2015
  13. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    So you've got LEDs on at full power the whole time the circuit is powered?

    Do you have the LEDs hooked up when you're testing this, or are you scoping things as you build the circuit in stages?

    On an unrelated note, any chance you've got drain and source wired backwards? Don't some MOSFETs pass reverse voltage freely?

    Honestly, I'm out of my depth here and just brainstorming publicly, so feel free to ignore me if I'm way off base!
     
  14. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    It's essentially staying on- I'm seeing the full 12VDC at the Drain.

    I put in a current-limiting resistor between the output of the second 555 and the gate- but this probably wasn't necessary.

    1: The LED's require a certain voltage to operate (I got one of those strings that are groups of 3 led's in parallel, with current limiting resistors pre-installed). I'm trying to dim them at first with a PWM control
    2: presently, I'm testing with a scope in parallel with a 50 ohm load to make sure I'm loading the mosfet some.
    3: I'm fairly sure I don't have it backwards, but that sure would produce the symptoms shown, I'll switch them and check.
    Brainstorming publicly is usually productive for me ha ha

    Edit: the resistor from gate to ground to drain the gate voltage did not help.
     
  15. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,301
    880
    Gate of the MOSFET driven by pin 3 of the 555, Drain connected to +12V, and Source connected to your LEDs (whose other end is connected, I assume, to ground)?

    That configuration is called a "source follower" and it's not going to give you very good results. Instead, connect the Source terminal to ground and the Drain terminal to the negative side of your LEDs, and the positive side of your LEDs to +12V.

    Or do you have the source connected to +12V and the drain connected to your LEDs? If so, you've hooked it up backwards. The LEDs will never turn off because they are being powered through the substrate diode of the MOSFET.
     
  16. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Yes, sorry the arrangement I had was connecting the Source to the +12V, drain to the LED positive (or the scope+load right now), and gate to pin 3.

    It sounds like I may have wired the MOSFET backwards.

    I'll wire it to switch the ground instead of the +12V now, and report back.

    Am I reading right that I incorrectly wired my MOSFET? that is, I wired the Drain to my load and the Source to +12V,.
     
  17. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    Wait a minute you said there was +12V at the DRAIN. Maybe you hooked the device up backward. If the SOURCE is connected to the supply then all bets are off.
     
  18. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    In the TO-220 package laying flat on the table with the tab pointing away from you
    1. Gate is on the left
    2. Drain is in the middle, and also the TAB
    3. Source is on the right
    You are feeding the LEDs through the body diode. Note the little zener diode symbol in the picture in the datasheet.

    JFETs are bidierectional and do not have a body diode. MOSFETs are not bidirectional as the TS/OP has discovered.
     
  19. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    Yeah, sounds like I mixed up the pins.

    When typing here, I was relating that all I was seeing on the drain (which I thought was the output) was 12v.

    Silly little mistake, it would seem. I'll report back after I switch those two
     
  20. secondarychaos

    Thread Starter New Member

    Apr 6, 2015
    17
    0
    It's amazing how well things work when you wire them correctly.

    Thanks for the help guys, I'll update this thread with a picture when it's all done
     
Loading...