Go Down

Topic: Multiple LED PWM - LED on when it shouldn't be (PWM at 0) (Read 1 time) previous topic - next topic

Mike C

Hi Folks,

I've been searching high and low for an answer, and I'm at my wits end with this...

I'm using PWM to dim the LED lighting in my nano tank, with the hopes that I can set it and forget it on a schedule. The problem I'm having is that the tank's other LED strip (despite being set to a PWM of 0) is illuminating when the desired LED strip is set to a PWM output between approximately 5-250. With the desired LEDs are set to full (255 PWM), the other LEDs extinguish. The problem shows itself in the opposite direction as well. The problem LEDs output (although dimmer) roughly follows the LED that should be illuminated until the PWM is almost full or off, at which point the problem LEDs go out.

I've tried multiple sketches to confirm that it is not a programming error, which makes me think I've messed up the circuit itself. I've attached a schematic. Be warned - this is my first foray into using Eagle. The LEDs are powered by a 12V wall adapter, and have their own current limiting resistors installed. I omitted them from the schematic to save on space, but they are present. I've simply removed the switch from the tank and replaced it with this circuit. The LED power supply ground is tied to the Arduino's and MOSFET grounds.

I don't remember how it worked when I initially breadboarded it, but the current design on perfboard is giving me grief. I was planning to etch a PCB in the near future when I move the code to a dedicated ATMega, but don't want to find that this problem is still present after doing all of that work.

Is it possible that the current MOSFETs I'm using are causing the issue? I don't have the ones mentioned in the schematic, but RFP50N06 installed at the present. I can't even figure out how the current could be flowing through the second set of LEDs at this point...

Thanks for any help you can provide!

PaulRB

Did this wall adaptor power the leds in the tank (fish tank?) originally? Is it regulated?

Paul

Grumpy_Mike

Well those FETs are wrong for a start. They need 10V on the gate to fully turn them on and you only get 5V from the arduino.

However your description would suggest there is something else wrong as well. Perhaps it is not wired the same as the schematic. If it were the problem you should get is that the LEDs are not coming on fully.

Mike C


Did this wall adaptor power the leds in the tank (fish tank?) originally? Is it regulated?

Paul


The wall adaptor did power the leds originally. I pulled the wires off the switch that alternated between Off, bank 1 and bank 2 and ran them into the MOSFETs and ground. Its a simple wall wart that puts out 12VAC - it runs into the filter first and then into the lights. I checked for AC running into the leds and didn't see any indications on my meter, so there I'm guessing there's a rectifier in the base of the filter.


Well those FETs are wrong for a start. They need 10V on the gate to fully turn them on and you only get 5V from the arduino.

However your description would suggest there is something else wrong as well. Perhaps it is not wired the same as the schematic. If it were the problem you should get is that the LEDs are not coming on fully.


That's what I figured, but they get fairly bright when the PWM is fully on. I went over everything last night thinking I had hooked it up wrong, but maybe I missed something. I'm starting to think its time to pull everything off the perfboard and put it back onto the breadboard for testing.

I think I'm more looking to make sure I don't need diodes somewhere before I etch a PCB. I will be getting logic level MOSFETs for the next iteration - I figured the VGS(TH) 2V (min) and 4V(max) that I read on the datasheet would be sufficient. I keep thinking there's current leakage somewhere, but can't figure out what would be causing it.

Thanks guys!

Grumpy_Mike

Quote
I figured the VGS(TH) 2V (min) and 4V(max) that I read on the datasheet would be sufficient

No that is just when it starts to turn on. It might look bright enough but it is not fully on, and it also doesn't explain the results at low PWM.
In my experience odds are that there is something not quite right with the wiring. It won't be leakage though, it will be that thing that is obviously correct, it always is.  :)

jack wp

Look hard at the ground connections. Arduino ground must have a solid connection to the FETs.
Good luck, Jack

TomGeorge

Hi, I agree with Jack, it looks like you possibly have an gnd problem, the gnd of the arduino should be connected to the gnd of the LED supply.
Tom... :)
Everything runs on smoke, let the smoke out, it stops running......VK3DMK

Go Up