EEVblog Electronics Community Forum
EEVblog => EEVblog Specific => Topic started by: bruce273 on March 29, 2012, 10:57:52 pm
-
suggestion - Is a d flip flop not simpler. perhaps a schmitt trigger for debounce. all easy to get 74 series logic. or will it use more power?
-
An IC would likely be more expensive. It also wouldn't be very elegant.
-
The whole idea is using passive parts you will likely have elsewhere in your design.
And yes, a chip is likely more expensive, even if it is jellybean.
There is in fact an even simpler refinement to my circuit, and it's blindingly obvious with a bit more thought about how my circuit works, I don't know why it didn't occur to me yesterday while filming.
Let's see if someone can come up with it...
Dave.
-
A Thyristor in a Forced Commutation circuit?
-
Good idea to save money on the switch.
I think some users will have a problem with the oscillating when they keep pressing the button. Think elderly people or a device which does need some time to boot up. Most users will keep pressing until they see some reaction.
Do you have some links to circuits which don't do this, but otherwise are simple too?
-
Dave, you set a challenge for us to find something simpler. :) OK, here is my attempt. One transistor, one FET, one capacitor and four resistors.
(https://www.eevblog.com/forum/blog-specific/eev-blog-262/?action=dlattach;attach=22761)
I tested it is LTSpice, so that's the reason for the weird switch circuit.
I also added a load as there is one problem with this kind of switch. If the load has filter caps across the supply usually. Those capacitors take a time to discharge. If I increase the load capacitor from 10uF to 100uF, the circuit will not switch off, as at there is enough voltage from the load to turn the circuit back on. I think your circuit has the same problem.
So to make this work, you have to find the worse case decay time of the load, and adjust C1 to suit.
This circuit does not oscillate. If does not matter how long you press the button for.
Richard.
-
Dave, you set a challenge for us to find something simpler. :) OK, here is my attempt. One transistor, one FET, one capacitor and four resistors.
Nice try, but one component too many :P
Dave.
-
Dave, you set a challenge for us to find something simpler. :) OK, here is my attempt. One transistor, one FET, one capacitor and four resistors.
Nice try, but one component too many :P
Dave.
You didn't coun't the load by any chance? That is not part of the switch - that is just there to test with capacitance on the output. My circuit is less then yours by one component (a transistor). 8)
Edit: If you need to allow for a load with a DC resistance of over a few hundred K, then I do need one extra resistor to make sure it stays off if you hold your finger on the button too long while turning off.
-
You didn't coun't the load by any chance?
Nope.
That is not part of the switch - that is just there to test with capacitance on the output. My circuit is less then yours by one component (a transistor). 8)
I have a variation that uses one less component again :-P
I'm sure someone will get it, it was staring me in the face the whole time...
Dave.
-
You got me Dave. Every way I could think of with one less part has a flaw. I usually needed one extra resistor to slow the capacitor discharge to allow for the voltage decay time of the capacitance in the load.
See if anyone else can come up with the solution.
Richard.
-
It may not be smaller, but at least it does not oscillate, and it's cheaper ;)
(https://www.eevblog.com/forum/blog-specific/eev-blog-262/?action=dlattach;attach=22764)
-
toggi, i really like your version of the circuit ! Thumbs up
Here is a modeled online version of it. I changed the capacitor to a 47nF in this simulation, it works a little better.
Also it needs a load
http://goo.gl/Ua1Yi (http://goo.gl/Ua1Yi)
There is a small problem with it though : in "on" state, if you keep the push button pressed long enough it turns off at first, stays off as long as you have juice in the capacitor and then it turns on again. If you keep the button pressed just a little bit then it turns off and stays off
-
toggi, your version for turning on only, how bout turning off ?
-
It works, capacitor acts like a tank and supplies positive voltage to mosfet's gate.
-
Toggi, I did look at your solution, but I couldn't get it to work fully when you start adding capacitance to the load.
First you want to make R8 5 or more times the value of R4. Otherwise if you press to turn off but hold the finger on the button too long, it turns on again. I just had trouble find a value of C2 big enough to allow for the load to fully discharge without ending up with such a long recharge time for the R8/C2 time constant that you had to wait for 10 seconds or more before you can switch the supply again.
The version I posted has the same number of components, except it is easier to get time constants to work well with a load with a capacitive decay.
Dave reckons his answer of how to use seven parts including the switch was in front of his eyes, but I still cannot see it.
Dics, the capacitor has to be greatly increased, not reduced. Your capacitor only works with a resistive load. A real load has caps across the power rails that take time to decay to zero.
Richard.
-
I lowered the capacitor value for this particular type of simulator (which is like arcade versus real simulation), it is quite slow and because of this the 100nF capacitor was charging really slow
-
Toggi, I did look at your solution, but I couldn't get it to work fully when you start adding capacitance to the load.
Dave reckons his answer of how to use seven parts including the switch was in front of his eyes, but I still cannot see it.
Toggi had it essentially right, except it uses a MOSFET instead of the BJT, thus needing one less resistor.
But as it turns out, it seems it's not new, somebody tweeted the same thing on a Russian site:
http://www.uschema.com/safe_power_switch/ (http://www.uschema.com/safe_power_switch/)
It became really obvious on second thought, because I was obsessed with doing the turn on/off using the gate connected BJT. But when you think about the using the gate of the P MOSTFET itself, it's obvious the existing RC can be used and there is no need for the 2nd latch BJT
Dave.
-
amspire : now that i think about it and after i tested a little, you are right. If the load is capacitive and has a large capacitance then the functionality is quite weird.
If you match the capacitance of the load in the timing capacitor then you can kinda make it work but the timings are quite large.
I really have to start thinking laterally when trying to understand circuits
Later edit: This is what i mean http://goo.gl/RCZUI (http://goo.gl/RCZUI)
-
The mosfet instead of the transistor does work better then a NPN transistor, but it still does depend on the load dropping to below the MOSFET turn-on voltage before the switching cap discharges. With many loads that can happen. With loads like a microcontroller, they usually go into a very low current mode as the voltage drops, and so it is easy to get the load voltage decaying pretty slowly with modern microcontroller and micro perihperal IC circuits.
It is one of those switches that only works with a cooperative load.
Richards.
-
How about this? It would not depend on the load, as the transistor discharges the capacitor instantly.
(https://www.eevblog.com/forum/blog-specific/eev-blog-262/?action=dlattach;attach=22768;image)
-
I really liked my switch, but as amspire pointed out, it will not work on a capacitive load because the output has to fall to zero before the tank capacitor C2 empties :(
-
fmaimon : it works for turning on but if you try to turn in off, C2 in instantly discharged through T3 and is not modifying the voltage on T4's gate
-
Dave, as you mentioned towards the end of your video about using a micro, how would you do this for a circuit that has a regulator (4.5-15v in 3.3v out) with EN pin, and a micro in it (has lots of free IO and A-D pins to be used if needed).
I have a couple of designs in my head, but none of them are "elegant"
so far i have 3 resistors, 2 MCU pins (1 IO and 1 A-D) I'll draw it up later and post it if i get a chance.
-
I've got you all beat. $0.33 each.
(http://www.allelectronics.com/mas_assets/cache/image/2/5/9/1/9617.Jpg)
;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
-
I've got you all beat. $0.33 each.
yuk
:P
lol
-
I'm still trying to wrap my head around your comment concerning tapping the white board, Dave - people really complained about it? That baffles me.
-
I'm still trying to wrap my head around your comment concerning tapping the white board, Dave - people really complained about it? That baffles me.
Yep, they do.
For every nit-picking thing in my videos, you can be sure their will be someone who complains about it!
Dave.
-
your way to good at laughing at nitpickers :D
-
Hi Dave
Thanks for the inspirational videos (and fwiw no problems here with the whiteboard tapping either!).
Apologies for the newbie question. Have just started with electronics and want to take this to a breadboard for a play but don't have a P channel MOSFET in the supplies just yet. At one stage your diagram had IRF9110 marked on there. Is there anything special in the selection, or will any P-channel do for the sake of the exercise? From google-fu it looks like IRFD9110 is the breadboard-friendly one?
Thanks
Geoff
-
Personally, I found it annoying, but you know what? Why complain about some little pittily bullshit thing when I'm gaining so much great information. If it annoyed me that much I wouldn't watch the videos and I'd STFU!!! It's rather cliche, but if you don't have something nice to say, then STFU!!
Just my little ol' opinion! ;)
-
A patent applied for variation
http://www.faqs.org/patents/imgfull/20090237065_01 (http://www.faqs.org/patents/imgfull/20090237065_01)
I recently had the same requirement except one side of the push button is ground. I don't think there is a two transistor plus a few passives solution to that one.
To control a battery supply you should also have an automatic low battery turn off to prevent complete battery discharge. For the uSupply the processor monitors the battery so it would probably be better to use a processor pin which could do the automatic turn off and on/off latching.
-
I'm still trying to wrap my head around your comment concerning tapping the white board, Dave - people really complained about it? That baffles me.
Yep, they do.
For every nit-picking thing in my videos, you can be sure their will be someone who complains about it!
Dave.
You should have had the evil laugh going when you were tapping it :) MWhahahahahahahaha
Neil
-
I'm still trying to wrap my head around your comment concerning tapping the white board, Dave - people really complained about it? That baffles me.
Yep, they do.
For every nit-picking thing in my videos, you can be sure their will be someone who complains about it!
Dave.
Hmm. If you really want to send a message you could try a big sheet of paper and a felt tip/marker pen (see numberphile (https://www.youtube.com/user/numberphile)). All sorts of nice squeaky, scratchy noises available there to entertain people ;D
(And yes, half the YouTube comments are from people complaining about the squeaky pen noises. You are not alone with nitpickers...)
-
Whiteboard tapping highlights my audio sync issues :(
-
Hi Dave
Thanks for the inspirational videos (and fwiw no problems here with the whiteboard tapping either!).
Apologies for the newbie question. Have just started with electronics and want to take this to a breadboard for a play but don't have a P channel MOSFET in the supplies just yet. At one stage your diagram had IRF9110 marked on there. Is there anything special in the selection, or will any P-channel do for the sake of the exercise? From google-fu it looks like IRFD9110 is the breadboard-friendly one?
Thanks
Geoff
Geoff,
Use any. You got to check the datasheet and find its VGS. It has to be more negative than your GND to rail voltage. It also have to be rated high enough for the main voltages and currents which it will conduct.
Kind regards,
Marius
-
Dave, can you please use a blackboard and some chalk in your next few videos. i can't believe people actually complain about stuff like this. lol
-
I've got you all beat. $0.33 each.
[Pushbutton switch]
;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
That's my solution too. Cheap, reliable, small. Or use a rocker. Something like this is less prone to casual knocks. There is something reassuring about a click as contacts make or break. That feedback is part of what generates perceived product quality. Soft switches are a bit... vague.
-
But wheres the fun in that? Rocker switches are mmh, old school. Momentary push switches are hip and trendy :P
But in either case, I can't get this new and revised version working in my spice emulator. The old one with two transistors works, but this new one with either one transistor or two Mosfets, I just can't get to emulate. I'm wonder how sensitive the balance of the values or fet/transistors I used can affect the simulator.
(https://www.eevblog.com/forum/blog-specific/eev-blog-262/?action=dlattach;attach=22808)
Jfp
-
I would say - use an XOR gate driving the mosfet - and tie the output of the mosfet to on input pin - and other XOR to the switch with a cap.
Switch 0v - VccIn 0v - output 0v (stay off)
Switch 5v - VccIn 0v - output 5v (switch on)
Switch 0v - VccIn 5v - output 5v (stay on)
Switch 5v - VccIn 5v - output 0v (switch off)
Seems a bit simpler in component count. But I don't know about cost..
/kaz
-
I'm wonder how sensitive the balance of the values or fet/transistors I used can affect the simulator.
It is rather sensitive. And just putting 100k resistors everywhere won't cut it. You need to dimension each resistor and the cap appropriately. For example, R5 is likely too large to drive Q2 as switch. But on the other hand, it shouldn't be to low, otherwise it gets difficult to turn the transistor off. And add a capacitive load, since the load has influence on the behaviour, making the circuit even more sensitive.
In general, I don't see much advantage compared to a mechanical switch, especially because the soft switch is not controlled by the micro. If it would be controlled by the micro one could add some features like auto-turn-off when idle (no current drawn for x minutes -> turn off), which might be interesting for a battery powered device.
-
Only issue I have is humid environments. Leakage can do odd things then.
-
Toggi, I did look at your solution, but I couldn't get it to work fully when you start adding capacitance to the load.
Dave reckons his answer of how to use seven parts including the switch was in front of his eyes, but I still cannot see it.
Toggi had it essentially right, except it uses a MOSFET instead of the BJT, thus needing one less resistor.
But as it turns out, it seems it's not new, somebody tweeted the same thing on a Russian site:
http://www.uschema.com/safe_power_switch/ (http://www.uschema.com/safe_power_switch/)
It became really obvious on second thought, because I was obsessed with doing the turn on/off using the gate connected BJT. But when you think about the using the gate of the P MOSTFET itself, it's obvious the existing RC can be used and there is no need for the 2nd latch BJT
Dave.
;D
Truly there is nothing new, nice try anyway Lol.
-
amspire : now that i think about it and after i tested a little, you are right. If the load is capacitive and has a large capacitance then the functionality is quite weird.
If you match the capacitance of the load in the timing capacitor then you can kinda make it work but the timings are quite large.
I really have to start thinking laterally when trying to understand circuits
Later edit: This is what i mean http://goo.gl/RCZUI (http://goo.gl/RCZUI)
hey i like that falstad applet.why havent i seen this before ? ;D
-
Hello Every body,
I didn't see no comments on the fact that there could be RF present on the input and output
of this switch hi...
But I maybe should add a diode in series with the capacitor so the voltage will drop
to zero also if there is almost or no load.
There are many TFT TVs that switches on and off if I transmit close to it with my 2/0.70m 5 Watt handheld.
Very annoying hi...
-
Hi everyone,
I went on a crusade for several hours to find me a latching momentary switch, until I finally ended up here. Though I should have checked this blog first >_> since i've been watching the videos now and then, informative and fun! Thx by the way Dave.
Now, I really don't understand most of technical background stuff here and would like to get some help with the parts.
I would like to know if the schematic will work this these transistors, since I can't find the exact ones used in the video/schematics, but according to the data sheets i've looked up, they are pretty much the same.
I am using this schematic as a reference, since Dave said in a post here, that is pretty much the best solution and is the same he came up with too after making his video:
(http://www.uschema.com//wp-content/uploads/2012/01/120117_1_button_on_off_src.png)
Infineon BSS 123 N datasheet (http://www.produktinfo.conrad.com/datenblaetter/150000-174999/152902-da-01-en-Small_Signal_Transistor_BSS123.pdf)
IRLML6401 datasheet (http://www.produktinfo.conrad.com/datenblaetter/150000-174999/162832-da-01-en-IRLML_6401TR.pdf)
So can i use those 2?
Thanks in advance
-
That circuit was the best in terms of least components, but it does not work well if your load has capacitors across the supply rails. The one I did back on the first page of posts has one extra resistor, but it is the one that works best with a capacitive load. The circuit is from LTSpice, so there is extra junk in the diagram for the simulation.
To me the method in general is not a robust solution as it depends a so much on the way the load behaves. For example, a transient from the load circuit can turn the supply on, even if the switch is not touched. If your load was a linear regulator IC with a reverse diode across it, and you attach an external load to the regulator output which happens to have a charged supply cap, then this switch circuit will turn itself on
Richard.
-
i don't have anything fancy in the main circuit, just a 9v battery and 3 fans, thats it. But space is an issue, thus I am aiming for the one with the least parts, it should work just fine.
I just need to know, if it will work at all with those 2 transistors.
-
i don't have anything fancy in the main circuit, just a 9v battery and 3 fans, thats it. But space is an issue, thus I am aiming for the one with the least parts, it should work just fine.
I just need to know, if it will work at all with those 2 transistors.
Be careful of inductive spiking .
-
i don't have anything fancy in the main circuit, just a 9v battery and 3 fans, thats it. But space is an issue, thus I am aiming for the one with the least parts, it should work just fine.
I just need to know, if it will work at all with those 2 transistors.
You will have to check to see if the fans generate any voltage while they are slowing down. If they do, they will turn the switch back on just after you press the button to turn the switch off.
Richard.
-
I'm still trying to wrap my head around your comment concerning tapping the white board, Dave - people really complained about it? That baffles me.
Yep, they do.
For every nit-picking thing in my videos, you can be sure their will be someone who complains about it!
Dave.
Dave, you are using the wrong color marker on the whiteboard. Please stop it. ;) :P
-
@amspire @ Dave.S
Okay, I copied both circuits now and added my fans :P (hopefully I copied yours correctly amspire)
I did read up on inductive spiking too: As far as I understood a diode parallel to the fans will do the trick (and circle the overload back into the fans until it dissipates). Question is do I really need to care about this in either of the circuits, since the fans are quite small (15x15x3 milimeter, specs in image below)?
So, will either of the circuits work? If not, why and what needs to be changed?
Edit:
Oopps forgot circuits:
(http://img515.imageshack.us/img515/2034/maskg.jpg)
-
To me the method in general is not a robust solution as it depends a so much on the way the load behaves. For example, a transient from the load circuit can turn the supply on, even if the switch is not touched. If your load was a linear regulator IC with a reverse diode across it, and you attach an external load to the regulator output which happens to have a charged supply cap, then this switch circuit will turn itself on
That right there is what you call a feature ;D
Dave.
-
Dave, you are using the wrong color marker on the whiteboard. Please stop it. ;) :P
No, your monitor is just out of whack. Twiddle the colour knob until correct :P
Dave.
-
A patent applied for variation
http://www.faqs.org/patents/imgfull/20090237065_01 (http://www.faqs.org/patents/imgfull/20090237065_01)
By the way, this patented version is available at:
http://www.pololu.com/catalog/product/750 (http://www.pololu.com/catalog/product/750)
- Ben
-
Hello Every body,
I didn't see no comments on the fact that there could be RF present on the input and output
of this switch hi...
But I maybe should add a diode in series with the capacitor so the voltage will drop
to zero also if the is almost or no load.
There are many TFT TVs that switches on and off if I transmit close to it with my 2/0.70 5 Watt handheld.
Very annoying hi...
I think that this issue needs to be addressed. Is this circuit RF interference resistant to a reasonable degree?
-
Great video. I just happened to need a soft switching circuit similar to this, only I'm a 'noob' and I don't have 'mad skillz' yet.
I have a 12V source, three loads (LEDs), and a common return. I want to use a momentary micro switch to toggle between four states:
1. off
2. turn on load 1
3. turn on load 1 + 2
4. turn on load 1 + 2 +3
I have seen this type of behaviour in LED headlamps. Is it possible to create using common components like Daves?
Tap on Dave! 8)
-
Hi dave. Really good design but, how I do a normally ON latch switch? Like a multimeter.
Having just one pole rotary switch.
-
Issue I see with this circuit is that if your input is say 20V, you stand a decent chance of damaging the pmosfet due to exceeding VGS max. Anyone know a simple way around that while still using the pmos switch? (lowering the supply voltage doesn't count ;) )
-
Does anybody have one that works with smd components?
I am not that lucky I guess...
https://www.youtube.com/watch?v=K5xj4mTTNqE&feature=youtube_gdata_player (https://www.youtube.com/watch?v=K5xj4mTTNqE&feature=youtube_gdata_player)
-
Issue I see with this circuit is that if your input is say 20V, you stand a decent chance of damaging the pmosfet due to exceeding VGS max. Anyone know a simple way around that while still using the pmos switch? (lowering the supply voltage doesn't count ;) )
5V to 10V Zener across the gate-source might work?
I use a Zener across G-S when using a pfet for reverse polarity protection, works a treat up to VDS (usually 60V and above) while making sure VGS is still under 20V
-
This would be my solution if switch-on-ground and load-independent are required. This is actually a simplified and extended version of one I used for UT61E mod. In that sense, it works as a real circuit.
It works like this:short press of switch (<0.5s) does turn-on; long press of switch (>0.5s) does turn-off. The time constant can be changed by changing C1.
For resistive loads, M3Vto-2 is not needed and loads should be parallel to R4. M3Vto-2 is purely for separating power supply path from switch ctrl path.
-
This is driving me bonkers! I have been able to breadboard two different designs but when I go to make the pcb with smd components, it no longer works.
Can you all please tell me what I'm doing wrong?
Attached is my schematic.
The 5uF capacitor is actually a 4.7uF tant cap.
The diode is a STPS1L30A Schottky diode.
The P-channel is a IRLML2246TRPBF
the N-Channel is a IRFML8244TRPBF
What I'm seeing is the controlled device either just stays on or it will drop the voltage for a moment enough to reset.
When I breadboarded it, the circuit would start in the off state, push the button and it turns on, wait a few seconds and press it again to turn it off. Exactly what I need.
Pleeease help me... |O
-Jeremy
-
Hi everyone
A bit of a necro but maybe someone will point me in the right direction.
I was trying to base an on/off touch button on one of these designs, getting the touch functionality proved fairly easy with swapping out the tactile for an NPN, tying the base to a touchable pad, throwing in some small capacitors to adjust sensitivity. This worked fine on a breadboard with no real load attached.
But
When I attach my load (a string of parallel&serial bound LEDs with a bit of resistance in front) I get a huge voltage drop across the pMOSFET. So i returned to the initial designs, removed all my additions and ported to falstad to investigate.
What I found is the designs all works great with a load of a 100 Ohms or so, but my load should be pulling between 500-700mA.
As an added bonus I'm trying to power it off an old phone charger which when just loaded with the LEDs and some minor resistance (11Ohm) in series is happy to spit out 700mA at 7.7V which is ok for the load but exceeds the values my transistors are happy to take.. (the charger is rated at 1A so all good there)
If anyone has any insight or suggestions they are willing to share it would be much appreciated.
Though I always dabbled in tech, but I only started studying electronics in detail fairly recently and it feels like the answer is a year of books away...
-
Here is my take on the on/off latching button, only ran it in falstad so far, need to try breadboarding it.
There are probably several issues with it, I will be most grateful if anyone points them out, or maybe explains the math behind it so a better version can be made. This one is a little bit sensitive to how long you need to hold the tactile.
Also... the simulator is showing double the expected voltage on the capacitor when circuit is in on state, is that just a simulator artefact?
http://tinyurl.com/p2ysh4s (http://tinyurl.com/p2ysh4s)
p.s: 4 components - do I win?
-
@Ebis:
I tried your ciruit with LT Spice, it does waste a lot power in the N-Mos and did not switch off. ???
Did you / anyone tried this ciruit in real?
-
I built the one in this patent:
http://www.faqs.org/patents/imgfull/20090237065_01 (http://www.faqs.org/patents/imgfull/20090237065_01)
It works fine. I did not test it with any heavy duty loads, though.