Afternoon guys,
So I went away from my 5940's which did not have the current capacity I needed and am currently using IRF510 mosfets to power my LEDs.
These are rated @ 5.6A and 100V.
I cannot seem to get PWM working through this setup while allowing full brightness of my LEDs. If I just digitalWrite them high and low they are full power, then when I try to analogWrite they will not pwm at all just stay on full with intermittent quick flash as if it went on/off extremely quickly.
I can only get the pwm to work when I put a resistor on the FET gate to common ground, but then the are only about 1/4 bright if not less. Have tried resistor values between 2.2k - 10k with no difference.
current setup:
Arduino > NPN Transistor gate (collector connected to external +12v, emitter connected to FET gate) > FET (mosfet source connected to common ground, Drain connected to LED negative side. LED positive side connected to external +12v.
very simple code just to make sure things work as they should.
Yes sir grumpy, I know they are not logic level thats why I'm running them off of the transistors. Yet even with the transistors switching +12v I can't get the full brightness with this setup and have PWM ability.
Magician:
If I put +12v to the transistor collector and then run the mosfet gate to the transistor collector wont it just get a solid +12v at the gate not allowing for pwm?
You are not using the transistors correctly. As you describe it you will only ever get +4.3V on the FETs gate.
Re read what Magician said again. You had an emitter follower circuit you need a common emitter circuit.
You fooled me by saying there was something going into the transistor's gate, as a transistor has a base and a FET has a gate, you had made a mistake. I guessed at the wrong one.
Yeas, check wiring again, is ground connected properly:
arduino gnd - emitter npn - source FET - -12V power supply all together?
Or post your schematics / hand drawn picture .
Well, I must be looking over something small thats messing me up cause I have checked the wiring multiple times and have found nothing wrong. Even had an EE friend take a look and he said it looks right.
Its funny cause without the resistor from the FET gate to ground it works full brightness but no pwm.
When I have a resistor from the FET gate to ground no matter what size pwm works but with no brightness.
Hopefully one day I will get a hang of these dang circuits. These are supposed to be easy too, Im just wiring up LEDs for gosh sakes.
Excuse the crappy schematic, my first time using Fritzing.
Hooked it up exactly like the schematic and how yall have said. Still no luck. Going to try a different breadboard, seems I have no luck with breadboards.
Thanks for the help guys. Not sure where I'm going wrong. this is very frustrating, still have not got that circuit going properly.
So I went out and got some logic level mosfets, using Fairchild FDP7030BL n-channel mosfets now.
I hooked up the circuit and was getting PWM yesterday but now today when I hook it up I get just constant full brightness no pwm.
Have a 2k2 across the gate and source on the mosftet then the gate of mosfet attached to pwm pin, source of mosfet attached to ground and drain to - side of LEDs with an external +12v to + side of leds. Grounds are together.