I am busy building the following:
https://www.instructables.com/id/A-sunrise-and-sunset-lamp-with-LEDs/?ALLSTEPS.
I appear to have a problem driving the ULN2803A with the PWM controlled FET (IRF520)... or with the ULN2803A being driven by a PWM controlled FET...
I currently have 7 LEDs wired to the ULN2803 outputs, resistors wired to ULN output and cathodes soldered together and connected to the +20V.
The symptoms are: the LEDs that should be on light up at full brightness and don't get dimmer with each decrease in the PWM duty cycle, and the LEDs that should remain OFF slowly get brighter with each decrease in the PWM duty cycle.
If I remove the PICAXE pwmout and pwmduty commands, and set pin B.3 high (to switch the FET on) the LEDS that should be on are on, and the LEDs that should be off are off.
As far as I can tell the problem does not lie with the stripboard design, and neither does it lie with the PICAXE.
I'm wondering if the ULN2803 has a problem with its GND pin being controlled by a FET, whose gate is PWM controlled. I can think of no other reason why I get the ULN switching output pins that should remain off.
I have tried swapping the FET with an NPN transistor, swapping the ULN2803A for another, with the same results each time.
My next step will be to solder up an array of NPN transistors to replace the ULN2803...
Does anyone have any thoughts?
Thanks,
N.