Help with MOSFET PWM circuit

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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.
 

OBW0549

Joined Mar 2, 2015
3,566
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.
It would help if you'd post the circuit here so we can see it; a verbal description is almost useless.
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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?
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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)
 

Papabravo

Joined Feb 24, 2006
21,159
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.
 

Papabravo

Joined Feb 24, 2006
21,159
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:

ebeowulf17

Joined Aug 12, 2014
3,307
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!
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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.
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.

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!
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.
 

OBW0549

Joined Mar 2, 2015
3,566
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.
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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.
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,.
 

Papabravo

Joined Feb 24, 2006
21,159
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.
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.
 

Papabravo

Joined Feb 24, 2006
21,159
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.
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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.
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
 

Thread Starter

secondarychaos

Joined Apr 6, 2015
17
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
 
Top