Can this work this way?
That will work to turn your PIC ON, and have the PIC switch OFF... D2 and R4 are then not required.
However, if you require a Button-OFF function, then you need to tell the PIC that the Button has been pressed. In that case D2 and R4 are required and in your circuit you will then have omitted to take a line from the D2/R4 junction back to an available PIC pin.
I do have difficulties to make this circuit switch-ON.
Problem description: if I switch-off my power-supply for about 2 to 3 minutes and switch it on back again, the soft-switch won't function and power the PIC. But once the PIC has been "successfully" powered, it works any time (as long as I don't switch-off the supply again).
For Q1, I implemented a 2N3906, then aBC307, then BC557; no way to make it work. Finally an old (metal case) 2n2905.
By "chance", I got it to work by making a false-contact between the 2n2905's (Collector is connected to case) and R1 (any pole) on the breadboard.
Once the contact has shortly happened and as long as the power-supply is not disconnected, the soft-switch will work perfectly (!?).
What shall I do to correct this?
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2705&stc=1&d=121475975 5">
NB: I didn't implement D2 + R3 since the program shuts-off the circuit by program (RA1 = 0).
Roger
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
Bookmarks