I'm not sure, but I think your R1 has to tap directly to the base of Q1 and not below the resistor below that...
I'm not sure, but I think your R1 has to tap directly to the base of Q1 and not below the resistor below that...
Apart from the Resistor connection that Ski mentioned (which is there to keep Q1 switched OFF), it is the job of your PIC to drive RA1 high BEFORE the User removes his finger from the switch. If your software has delays or other things before it sets RA1 high, then the circuit will simply switch-off when the finger is taken off the switch.
It is a simple circuit - it can't fail. As long as the Base of Q1 is driven low (what is your value for R2 and what is the current draw via Q1?), it will conduct and supply power. Check your wiring and software and value for R2. Remember (simplistically) the gain (hfe) value for your chosen Transistor together with the current you're sucking out the Collector will determine the amount of cuurent you need to put into the Base. Your chosen R2 may be too high a value.
Yup, R1 is actually connected du Q1's base. Thanks for noticing, skimask.
My drawing only is incorrect, in fact, I built this circuit according to Melanie's plan in a previous post.
The values of the components are those stated in the same previous post.There is no delay in the program. In fact, I set RA1 high at the very beginning of the code.Originally Posted by Melanie
At startup, the circuit draws 4,5 mA. A few milliseconds later, the current peaks up to 600mA (I drive an IR led - it's a remote control).
I'm going to add another Tr to provide the "power" to the IR-led instead of using only Q1. This should solve the problem.
Roger
I checked an re-checked all over again; I even changed my breaboard.
Finally, I tested all components and surprise: R2 has infinite resistance (should be 12k!).
Everything is fine and the circuit works well now.
Thank you to All for your help.
I add the corrected shema - hope I didn't made a mistake this time.
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2707&stc=1&d=121484865 4">
Roger
If all you need is a push button to turn on the circuit and the PIC to turn it off then I have tested a simplified circuit that uses a MOSFET. Low part count = lower cost! I didn't have a P-MOSFET laying around, but I *think* that you could replace my Q1 with one and that would eliminate R2 in my circuit too.
Guy
Bookmarks