I have a project where I am using 6 LED's wired common cathode that then goes to the emitter on a BC 546 transistor. Collector goes direct to ground and the base goes to a PWM pin from the arduino.
All works fine except there seems to be excessive current even when there is no output. eg when the arduino is in sleep mode. It draws about 50ma.
Is there a better transistor to use? Is there a better way to wire it( I tried adding a resistor to the base and it helped a little but as I increased the resistance the LED's dimmed.
Ideally I want less than 0.1ma of current when asleep. If I bypass the transistor I can get as low as 2ma (after removing the power LED from the minipro) and this is going to the hall effect switch.
Any suggestions of a better HE switch to use?
I have a project where I am using 6 LED's wired common cathode that then goes to the emitter on a BC 546 transistor. Collector goes direct to ground and the base goes to a PWM pin from the arduino.
Wait...you have an NPN transistor with the emitter connected to the cathode of an LED, and the collector to ground??? That is entirely backwards. And what is happening with the anodes of the LED's?
At the very least, turn the transistor around (first get a new one) so a) collector goes to LED's cathode, b) emitter goes to ground, c) base goes to PWM pin through a 220 ohm resistor.
--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected
Thanks. I tried that with 2 x 100omh resistors in series for the base to the PWM pin. Lowest I can get is 16ma of which just over 2ma is the rest of the components including the minipro
Wait - do you have the pinout correct on the BC546 C-B-E? It looks like your excess current is not the LED's staying on, but the Arduino outputs staying high during sleep mode and driving the transistors? First you need a base drive resistor a few kohms, never direct. Second you can drive the pins low, or pinMode them to inputs before you go to sleep, to save power.
I have checked the pin out of the transistor.
If I remove the transistor and bride the cathode to ground the current drops so I dont think the problem is the pins staying high.
So I have a suggestion of a 220ohm base drive resistor plus another going to ground and a couple of K Ohm base drive resistor.
Will try them both.
I used a 10K base driving resistor with another 10K going to ground.
I have now got the current down to 2.6ma. If I disconnect the hall effect switch it then drops to 0.8ma
Im not sure how much of this is the Minipro board and how much is the transistor ( if any) but its a huge decrease from before and approaching the required maximum.