Electronics-Related.com
Forums

Low Power High Voltage Flip Flop

Started by rhor...@gmail.com January 30, 2023
On Monday, January 30, 2023 at 7:15:05 AM UTC-6, Ricky wrote:
> On Monday, January 30, 2023 at 5:16:01 AM UTC-4, rhor. wrote: > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > There are a number of simple circuits using a pair of transistors, which will do what you need. They take advantage of charge being stored on a capacitor to change the state of the circuit with the same push button. A Google search turned up a number of possibilities. The FET based designs can be very low power when off, however, you will need to find FETs with gate to source voltage ratings to match your power source. I would look for at least 30V. > > https://www.google.com/search?client=firefox-b-1-d&q=push+button+on/off+circuit > > Here's a page with FET devices. The link is long, so you may need to patch it up from this post. > > http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/latching-toggle-power-switch > > Figure 3 has the basic circuit. Other variations add different features. Figure 9 works with higher power source voltages. If you don't have a low voltage regulator, you can use resistors to step down the output voltage. > > -- > > Rick C. > > - Get 1,000 miles of free Supercharging > - Tesla referral code - https://ts.la/richard11209
That is EXACTLY what I need. Thanks! My circuit already uses a FQP47P06 MOSFET to switch the power. All I need to do is add one resistor, one FET, one resistor, and one capacitor. Perfect. Indeed, it is better than perfect. The device is controlled by an Arduino. With this I can monitor the battery voltage and shut down the system when the batter gets dangerously low. I knew there had to be a simple answer.
On Monday, January 30, 2023 at 9:08:37 AM UTC-6, bitrex wrote:
> On 1/30/2023 4:15 AM, rhor... wrote: > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > Is a latching relay too simple a solution: > > <https://www.electronicdesign.com/technologies/analog/article/21806385/relaybased-onoff-flipflop-remembers-state-during-power-failure>
No, but my dislike for mechanical relays aside, the current carrying capacity of any mechanical relays small enough to fit in the space I have is probably too small. This needs to handle several amperes peak. They are also rather expensive. I would much rather have a solid state solution. Ricky's solution is simple, elegant, and very inexpensive. It only requires the addition of three 3mm long elements costing less than $0.30, total, to my existing design. The fact they are surface mount doesn't hurt, either. This is about as elegant as it gets.
On Monday, January 30, 2023 at 10:59:57 PM UTC-6, Ricky wrote:
> On Tuesday, January 31, 2023 at 12:43:59 AM UTC-4, rhor... wrote: > > On Monday, January 30, 2023 at 3:43:30 AM UTC-6, bill.... wrote: > > > On Monday, January 30, 2023 at 8:16:01 PM UTC+11, rhor.. wrote: > > > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > > > You should be able to build a J/K flip-flop with discrete transistors - there are N-channel and P-channel MOSFETs that can take that kind of voltage. > > > > > > The gate-oxide isn't that robust, so you might need level shifters to make the logic work. It won't have to be that fast, so the level shifters won't need a lot of current. > > > > > > Classic CMOS is good for logic rails up to about 18V, but if there a 25V version I haven't heard of it. > > > > > > -- > > > Bill Sloman, Sydney > > Yeah, that is my notion. I need some details. > What is your notion? 4000 series CMOS won't handle the battery voltages you are talking about. You would need to add two transistors and a voltage regulator to make a 4000 series part compatible with high side switching your 25V power rail. You can do the same job with just the two transistors, no regulator and no 4000 series CMOS. I provided links to some sample circuits. > > Maybe you could provide a bit more feedback of what you see here that you like and don't like, and why? Feedback would help a lot. > > -- > > Rick C. > > + Get 1,000 miles of free Supercharging > + Tesla referral code - https://ts.la/richard11209
No, your idea (figure 3) is perfect. Adding in control from the (existing) Arduino gives me: http://siliconventures.net/images/Flashlight%20Switch.PNG I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino.
On Tuesday, 31 January 2023 at 08:56:30 UTC, rhor...@gmail.com wrote:
> On Monday, January 30, 2023 at 10:59:57 PM UTC-6, Ricky wrote: > > On Tuesday, January 31, 2023 at 12:43:59 AM UTC-4, rhor... wrote: > > > On Monday, January 30, 2023 at 3:43:30 AM UTC-6, bill.... wrote: > > > > On Monday, January 30, 2023 at 8:16:01 PM UTC+11, rhor.. wrote: > > > > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > > > > You should be able to build a J/K flip-flop with discrete transistors - there are N-channel and P-channel MOSFETs that can take that kind of voltage. > > > > > > > > The gate-oxide isn't that robust, so you might need level shifters to make the logic work. It won't have to be that fast, so the level shifters won't need a lot of current. > > > > > > > > Classic CMOS is good for logic rails up to about 18V, but if there a 25V version I haven't heard of it. > > > > > > > > -- > > > > Bill Sloman, Sydney > > > Yeah, that is my notion. I need some details. > > What is your notion? 4000 series CMOS won't handle the battery voltages you are talking about. You would need to add two transistors and a voltage regulator to make a 4000 series part compatible with high side switching your 25V power rail. You can do the same job with just the two transistors, no regulator and no 4000 series CMOS. I provided links to some sample circuits. > > > > Maybe you could provide a bit more feedback of what you see here that you like and don't like, and why? Feedback would help a lot. > > > > -- > > > > Rick C. > > > > + Get 1,000 miles of free Supercharging > > + Tesla referral code - https://ts.la/richard11209 > No, your idea (figure 3) is perfect. Adding in control from the (existing) Arduino gives me: > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino.
Won't the phototransistor get unhappy with reverse bias? A better optocoupler would use a symmetric photofet. Something like the H11F1 would work, but there are others. John
On Tuesday, January 31, 2023 at 6:46:30 AM UTC-4, John Walliker wrote:
> On Tuesday, 31 January 2023 at 08:56:30 UTC, rhor...@gmail.com wrote: > > On Monday, January 30, 2023 at 10:59:57 PM UTC-6, Ricky wrote: > > > On Tuesday, January 31, 2023 at 12:43:59 AM UTC-4, rhor... wrote: > > > > On Monday, January 30, 2023 at 3:43:30 AM UTC-6, bill.... wrote: > > > > > On Monday, January 30, 2023 at 8:16:01 PM UTC+11, rhor.. wrote: > > > > > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > > > > > You should be able to build a J/K flip-flop with discrete transistors - there are N-channel and P-channel MOSFETs that can take that kind of voltage. > > > > > > > > > > The gate-oxide isn't that robust, so you might need level shifters to make the logic work. It won't have to be that fast, so the level shifters won't need a lot of current. > > > > > > > > > > Classic CMOS is good for logic rails up to about 18V, but if there a 25V version I haven't heard of it. > > > > > > > > > > -- > > > > > Bill Sloman, Sydney > > > > Yeah, that is my notion. I need some details. > > > What is your notion? 4000 series CMOS won't handle the battery voltages you are talking about. You would need to add two transistors and a voltage regulator to make a 4000 series part compatible with high side switching your 25V power rail. You can do the same job with just the two transistors, no regulator and no 4000 series CMOS. I provided links to some sample circuits. > > > > > > Maybe you could provide a bit more feedback of what you see here that you like and don't like, and why? Feedback would help a lot. > > > > > > -- > > > > > > Rick C. > > > > > > + Get 1,000 miles of free Supercharging > > > + Tesla referral code - https://ts.la/richard11209 > > No, your idea (figure 3) is perfect. Adding in control from the (existing) Arduino gives me: > > > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino. > Won't the phototransistor get unhappy with reverse bias? A better optocoupler would > use a symmetric photofet. Something like the H11F1 would work, but there are others.
If isolation is not required, and a common ground is used, there are analog switches which should handle 25V. But I would not say an opto is overkill. At least a transistor short won't fry the Arduino. -- Rick C. -+ Get 1,000 miles of free Supercharging -+ Tesla referral code - https://ts.la/richard11209
On Tuesday, January 31, 2023 at 2:46:30 AM UTC-8, John Walliker wrote:
> On Tuesday, 31 January 2023 at 08:56:30 UTC, rhor...@gmail.com wrote: > > On Monday, January 30, 2023 at 10:59:57 PM UTC-6, Ricky wrote: > > > On Tuesday, January 31, 2023 at 12:43:59 AM UTC-4, rhor... wrote: > > > > On Monday, January 30, 2023 at 3:43:30 AM UTC-6, bill.... wrote: > > > > > On Monday, January 30, 2023 at 8:16:01 PM UTC+11, rhor.. wrote: > > > > > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > > > > > You should be able to build a J/K flip-flop with discrete transistors - there are N-channel and P-channel MOSFETs that can take that kind of voltage. > > > > >
> > ...(figure 3) is perfect. Adding in control from the (existing) Arduino gives me: > > > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino.
> Won't the phototransistor get unhappy with reverse bias?
I'm not seeing any way C1 can pull down the phototransistor emitter; the DC bias doesn't work with the connections as shown.
On Wednesday, February 1, 2023 at 1:19:09 AM UTC-4, whit3rd wrote:
> On Tuesday, January 31, 2023 at 2:46:30 AM UTC-8, John Walliker wrote: > > On Tuesday, 31 January 2023 at 08:56:30 UTC, rhor...@gmail.com wrote: > > > On Monday, January 30, 2023 at 10:59:57 PM UTC-6, Ricky wrote: > > > > On Tuesday, January 31, 2023 at 12:43:59 AM UTC-4, rhor... wrote: > > > > > On Monday, January 30, 2023 at 3:43:30 AM UTC-6, bill.... wrote: > > > > > > On Monday, January 30, 2023 at 8:16:01 PM UTC+11, rhor.. wrote: > > > > > > > I have a situation where I need to change a momentary switch to an on / off switch. This is ordinarily very easy using a JK Flip Flop, but there is a twist. The device runs on a 6S Lithium battery, so the voltage will vary from about 18V to 25V or so. In addition, I need the power control circuit to use very little current - on the order of 100 uA - when off. It can use much more power when on - 20 mA or so is no problem. > > > > > > You should be able to build a J/K flip-flop with discrete transistors - there are N-channel and P-channel MOSFETs that can take that kind of voltage. > > > > > > > > > ...(figure 3) is perfect. Adding in control from the (existing) Arduino gives me: > > > > > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > > > > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino. > > > Won't the phototransistor get unhappy with reverse bias? > I'm not seeing any way C1 can pull down the phototransistor emitter; the DC bias doesn't work with > the connections as shown.
I don't follow. The only thing the phototransistor can do is pull down the gate of X2 when activated. That will let the Arduino turn off the power source. Because the phototransistor is bipolar, it won't be able to pull up on the X2 gate to turn on the power source. I'm not sure how C1 limits anything. It provides the current to drive the X2 gate (over driving R3 for a moment) until the circuit can switch. It also debounces the push button. -- Rick C. +- Get 1,000 miles of free Supercharging +- Tesla referral code - https://ts.la/richard11209
On Tuesday, January 31, 2023 at 11:29:28 PM UTC-8, Ricky wrote:
> On Wednesday, February 1, 2023 at 1:19:09 AM UTC-4, whit3rd wrote: > > On Tuesday, January 31, 2023 at 2:46:30 AM UTC-8, John Walliker wrote:
> > > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > > > > > > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino. > > > > > Won't the phototransistor get unhappy with reverse bias? > > I'm not seeing any way C1 can pull down the phototransistor emitter; the DC bias doesn't work with > > the connections as shown. > I don't follow. The only thing the phototransistor can do is pull down the gate of X2 when activated. That will let the Arduino turn off the power source. Because the phototransistor is bipolar, it won't be able to pull up on the X2 gate to turn on the power source. I'm not sure how C1 limits anything. It provides the current to drive the X2 gate (over driving R3 for a moment) until the circuit can switch. It also debounces the push button.
If the C1 capacitor starts at 25V bias, when does it ever drop to lower voltage? How much lower? Do you expect to pull down that emitter on the optoisolator through the load, with reverse-breakdown of the base-emitter?
On Wednesday, February 1, 2023 at 4:45:13 AM UTC-4, whit3rd wrote:
> On Tuesday, January 31, 2023 at 11:29:28 PM UTC-8, Ricky wrote: > > On Wednesday, February 1, 2023 at 1:19:09 AM UTC-4, whit3rd wrote: > > > On Tuesday, January 31, 2023 at 2:46:30 AM UTC-8, John Walliker wrote: > > > > > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > > > > > > > > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino. > > > > > > > Won't the phototransistor get unhappy with reverse bias? > > > I'm not seeing any way C1 can pull down the phototransistor emitter; the DC bias doesn't work with > > > the connections as shown. > > I don't follow. The only thing the phototransistor can do is pull down the gate of X2 when activated. That will let the Arduino turn off the power source. Because the phototransistor is bipolar, it won't be able to pull up on the X2 gate to turn on the power source. I'm not sure how C1 limits anything. It provides the current to drive the X2 gate (over driving R3 for a moment) until the circuit can switch. It also debounces the push button. > If the C1 capacitor starts at 25V bias, when does it ever drop to lower voltage? How much > lower? Do you expect to pull down that emitter on the optoisolator through the load, with reverse-breakdown > of the base-emitter?
When the power controller is off, the cap is charged to the incoming voltage. When the controller is on, the gate of X1 is pulled low by X2 and the cap is discharged to ground through X2. This is essentially the same circuit as one made with a pair of inverters in a loop, forming a bistable device. One inverter charges a cap, and the switch loops that back to that inverter's input, forcing the inverter to change state. Then the circuit is stable in the other state. No matter which state the circuit is in, the switch forces it to the opposite state, because it "transports" the state from the output of one inverter to the input of the same inverter. I think you are looking at R1 as if it controls the voltage on the battery. X2 controls that voltage. Keep in mind that X1, X2 and R3 form a bistable element. -- Rick C. ++ Get 1,000 miles of free Supercharging ++ Tesla referral code - https://ts.la/richard11209
On 31/01/2023 08:56, rhor...@gmail.com wrote:
> No, your idea (figure 3) is perfect. Adding in control from the (existing) Arduino gives me: > > http://siliconventures.net/images/Flashlight%20Switch.PNG > > I don't know if there is a better solution than the opto-coupler, but it is definitely a quick and easy solution to interface with the Arduino.
Those polarities look wrong? The opto coupler transistor will reverse zener so circuit will always switch on when supply is above circa 8-9V. One solution might be to add a diode in series with either emitter or collector. If the intention is for arduino to only switch off and only manual switch on allowed then you could return the opto coupler emitter to ground instead. If so and the arduino 0V is same as switch ground then you could even substitute the opto with an NPN or Nch mosfet. piglet