Maker Pro
Maker Pro

Battery Powered Power Supply

gregfox

Mar 25, 2013
164
Joined
Mar 25, 2013
Messages
164
Hi, Well I tried just about everything, but this dog just wouldn’t hunt. It’s very unreliable to say the least, I’m working on a formula for a turn on/off of a cap in an R/C situation. Will report.
 

Attachments

  • 2013-05-23 17.26.01.jpg
    2013-05-23 17.26.01.jpg
    136.9 KB · Views: 154

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I can't be sure, but it looks like your connections to pins 3 and 5 of the 4013 are wrong. Pin 3 should connect to the 10k resistor from 0V and the pushbutton from +V, and pin 5 should connect to the 330k resistor from pin 2 and the capacitor to 0V. You can add an LED with a 1k current limiting resistor from pin 1 to 0V.
 

gregfox

Mar 25, 2013
164
Joined
Mar 25, 2013
Messages
164
Sorry the pix is not better, but your description is the way it's connected. I could get it to work better with a 2.2uF electrolytic and a 1M, but it would miss a press every now and then.
EDIT:
pins 3 and 5 of the 4013
Pin 3 is connect to the 10k resistor from 0V and the pushbutton from +V
pin 5 is connect to the 330k resistor from pin 2 and the capacitor to 0V
I recorded the scope output as a video, but it was too large to upload
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Are you sure? It looks pretty clear to me that the 10k resistor from 0V is connected to pin 5, not pin 3.
 

gregfox

Mar 25, 2013
164
Joined
Mar 25, 2013
Messages
164
Nope, I'm sure.

AHHH, let me try another 4013..
 

Attachments

  • 2013-05-23 18.07.52.jpg
    2013-05-23 18.07.52.jpg
    137.7 KB · Views: 148
Last edited by a moderator:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
that 0.1uF green cap you have stretched with its long legs right across the chip to a far away 0V that may be causing instability

connect it to the 0V rail that is on the same side as the pin7/row 20 +V feed

poor/incorrect decoupling methods can lead to noise that produces all sorts of weird faults with digital circuits

Dave
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, the layout in post #45 looks right. The decoupling looks OK. You could shorten the leads, but this is just 4000-series CMOS so it's not that critical. If that layout doesn't work, I don't understand why. I'll ask Steve to have a look at the design in case he can see something wrong with it.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Make sure you have:
CD4013 with V+ to pin 14 and 0V to pin 7, with a 0.1 uF decoupling capacitor across those pins
All inputs on both sides grounded to 0V, except D and CLK on one side
CLK connected through the pushbutton to V+ and through a 10k resistor to 0V
Q-bar connected through a 330k resistor to D, and a 0.1 uF capacitor from D to 0V
Monitor the Q or Q-bar output.
That definitely should work.

Firstly, I *think* that will work.

But if it doesn't...

Since you have two flip-flops there, you could use one of them to debounce the switch (generating a clean clock for the latter.)

In that case, you need a spdt push button switch. The common is connected to V+, and the NO and NC are connected to S and R (respectively) of one flipflop. There are 100k resistors to ground from these pins. The D and CLK inputs are tied low. When the button is pressed, you should get a clean transition, likewise when it is released you will get a clean transition. the Q output will be 1 with the button pressed, otherwise 0.

The Q output then goes to the CLK input of the second flipflop, with Q' tied directly to D (and all other inputs grounded) The Q output of the second flipflop will toggle each time the button is pressed.

This relies on the bounce of the SPDT switch firstly bouncing open the NC contact, then bouncing closed the NO contact when pressed. The reverse happens when released.

The total component count is the same, but I use both flipflops which may be an issue.

Kris's idea is a cunning one though...
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Thanks for the feedback Steve.

Using two flip-flops is no problem. The other one wasn't going to be used. The problem might be the SPCO momentary pushbutton. They're available but not common.

http://www.digikey.com/product-detail/en/700SP7B10M2QEH/EG2594-ND/502058 simple SPDT (SPCO) pushbutton
http://www.digikey.com/product-detail/en/KB15SKW01-5F-JF/360-1992-ND/1007049 illuminated SPDT (SPCO) pushbutton.

The resistor connected to the normally closed contact will draw a small amount of current from the battery at all times. At 14.8V a 100k resistor will draw 148 uA. Not significant if the battery is going to be recharged periodically.

How about connecting the NC contact to 0V, connecting the NO contact to V+ and connecting the changeover contact to the CLK input on the main flip-flop with a small capacitor to GND, and perhaps a very high resistance to GND as well. Probably not the best way to debounce a switch...

Finally, you can turn a flip-flop into a monostable. Connect a SPNO momentary pushbutton from +V to CLK, with a pulldown resistor. Connect D to +V. Connect an RC delay from Q to R so when Q has been high for a short time (e.g. 0.1~0.3 seconds) the flip-flop will reset. Use a diode across the resistor in the RC delay so that when Q returns low, R will be pulled low quickly. Take the output from Q to the clock input of the toggle flip-flop that controls the pass FET. This might be a good option. Requires a total of two resistors, one capacitor and one diode, as well as an SPST pushbutton and both halves of a 4013.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
At 14.8V a 100k resistor will draw 148 uA. Not significant if the battery is going to be recharged periodically.

You could probably go to 10M without any real problems. 1.5uA is still higher than zero, but it's a lot closer :)

How about connecting the NC contact to 0V, connecting the NO contact to V+ and connecting the changeover contact to the CLK input on the main flip-flop with a small capacitor to GND, and perhaps a very high resistance to GND as well. Probably not the best way to debounce a switch

That effectively puts you back where you were with a single flipflop. Although it's arguably a mid-point between the two designs.

Finally, you can turn a flip-flop into a monostable. Connect a SPNO momentary pushbutton from +V to CLK, with a pulldown resistor. Connect D to +V. Connect an RC delay from Q to R so when Q has been high for a short time (e.g. 0.1~0.3 seconds) the flip-flop will reset. Use a diode across the resistor in the RC delay so that when Q returns low, R will be pulled low quickly. Take the output from Q to the clock input of the toggle flip-flop that controls the pass FET. This might be a good option. Requires a total of two resistors, one capacitor and one diode, as well as an SPST pushbutton and both halves of a 4013.

Do they make flipflops with schmitt trigger inputs? It would make all of this so much easier :D
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I can't find anything apart from CD4013 that will work over that supply range. So I checked out a few different manufacturers to see whether any of them put Schmitt triggers on their clock inputs.

The NXP data sheet for their HEF4013B at http://www.nxp.com/documents/data_sheet/HEF4013B.pdf mentions a Schmitt trigger on the clock input in the introduction (section 1), and it's shown in the logic diagram (Fig. 2), but elsewhere in the data sheet there's no evidence of it! Logic levels mentioned are standard.

The Texas Instruments data sheet at http://www.ti.com/lit/ds/symlink/cd4013b.pdf looks like a bad scan of an old RCA data sheet! It doesn't mention any Schmitt triggers.

The STMicro data sheet at http://www.st.com/web/en/resource/technical/document/datasheet/CD00000362.pdf and the ON Semi data sheet at http://www.onsemi.com/pub_link/Collateral/MC14013B-D.PDF don't mention or show Schmitt triggers.

So it looks like the answer is no, with the possible exception of the NXP part. :-(
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Here's an alternative. It draws ~0 current while OFF but about 3.5 mA while enabled. (For comparison, the 4013-based design uses ~0 mA in both states.) It might be physically smaller than an IC-based design, especially if you use the FDV30x MOSFETs, but it will probably cost more and take longer to assemble. Just another option for you to consider.

attachment.php
 

Attachments

  • Var_psu.gif
    Var_psu.gif
    7.3 KB · Views: 203

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Thanks Steve. We already knew about this design. I think Greg used it as the basis for his original on/off circuit for his constant current load circuit (in another thread).

The discrete design in post #55 uses a similar idea (actually, closer to Greg's version of it). The main difference is that I kept the latch separate from the pass MOSFET and actually put a buffer (QN) in between them. This was meant to ensure that the circuit would latch OFF before the switched rail starts to drop, to prevent a problem that Greg's original design had, where the "kill" signal would disappear as the rail voltage dropped, causing it to oscillate. But I don't think that's a problem in this case; I'll see if I can simplify my design and use the switching MOSFET as part of the latch.

Thanks Steve :)
 

gregfox

Mar 25, 2013
164
Joined
Mar 25, 2013
Messages
164
The original plan I submitted had duel MOFETS, 3 resistors, and a cap. It drew no current when off, had a small footprint, and could be triggered off. I attached some pixs with a 4013 shown for size.
Take a look at the schematic attached, I used many of Kris’s ideas. Let me know where I’m going wrong.
 

Attachments

  • 2013-05-24 08.53.13.jpg
    2013-05-24 08.53.13.jpg
    128.5 KB · Views: 146
  • 2013-05-24 08.53.55.jpg
    2013-05-24 08.53.55.jpg
    138.7 KB · Views: 145
  • Org Circuit.png
    Org Circuit.png
    9.7 KB · Views: 159

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Greg, yes, I remember that design. As I remember, we had the problem in your constant-current load circuit where it oscillated because the kill signal disappeared as the switched voltage rail dropped. I don't think that will be a problem in this case, but it's worth prototyping it to make sure.

I have a few suggestions for component changes.
For R2 I would use a higher value, say 330k to prevent possible interference with the pass MOSFET's gate voltage as C1 charges up.
C1 can be reduced by a similar amount. Probably 0.1 uF is appropriate.
Assuming that C2 is the capacitor that delays the battery low switch-off, it should be connected at Q2's gate, not at its drain.
I think it would be a good idea to add a diode to discharge C2 when the circuit turns off. A 1N914 with its anode to Q2 gate, and cathode to the switched power rail, will do this.
Q2 is mislabelled as 2N2700; should be 2N7000 I think.
R6 can be a much higher value; I suggest 10K with C2 at 4.7 uF. This is just to reduce unnecessary battery drain.
R7 and R8 should also be higher, for the same reason. R8's wiper is not connected to anything. But the three-resistor connection I showed in post #55 is more reliable.
I personally find the big IRF7319 outline in your diagram looks very busy and makes the design harder to follow. Also I would use a P-channel device with lower ON-resistance like the two I suggested in post #55.

I'd be interested to hear the results of prototyping that design.
 

gregfox

Mar 25, 2013
164
Joined
Mar 25, 2013
Messages
164
Sounds like a plan, I'll put it together today and report later...
Thanks!
 
Top