If you want to easily control the power in a circuit, you’ll probably reach for the classic toggle switch. While there’s certainly nothing wrong with that, physical toggles are a bit dated at this point. A soft power switch that turns your gadget on and off at the tap of a finger is far more 21st century. You might think this kind of modern trickery is too difficult to implement on a DIY project, but as [Sasa Karanovic] shows, it’s actually a lot easier than you might think.
Now to be fair, that wasn’t actually his goal. All [Sasa] was trying to do was come up with a slick way to control the LED lighting in his 3D printer enclosure. Which, as you can see in the video below, he accomplished. But the hacked together circuit he used to do it could easily be adapted for other electronic projects. If you’re using a LM2596 DC-DC converter module to power your gadget, you can add a touch sensitive soft switch for literally pennies.
The trick is utilizing the enable pin on the LM2596. The common buck converter modules tie this pin to ground so the regulator is always enabled, but if you lift the pin off the PCB and connect it to the output of a TTP223 capacitive touch sensor, you can simply tap the pad to control the regulator. Power for the touch sensor itself is pulled from the input side of the regulator, so even when the power is cut off downstream, the sensor is still awake and can kick the chip back into gear when you need it.
If you’re not interested in touch control, you could try connecting the enable pin on the regulator to an ESP8266 and making a cheap Internet-controlled DC power supply.
w
Neat circuit, but using that zener and a resistor isn’t exactly power conservation friendly. But of course it works.
There were a couple things that made me cringe about this, that was one of them. Saying he was controlling the brightness with voltage did too.
Regardless, I use this same trick to do soft power for entire projects from the MCU also. Hold a pin at ground to keep it on, float to turn off.
https://cdn.hackaday.io/images/5645671595341607931.jpg
“physical toggles are a bit dated”. No, they actually work consistently. Touch does not (for some of us).
And they have tactile and acoustic feedback. If the knob or lever is designed well, you can even get the switch’s status even without vision.
They’re still relevant for detecting human fingers, but I’d say they’re dated for just about everything else. Particularly anything involving constant pressure.
There’s high end switches, but at that point it’s not cheaper than optical.
But Capsense normally works very well with large pads, when done right. To be really awesome things like that need to be able to recalibrate over time and look for fast taps, and ignore slow changes because of some extra humidity or something.
“But Capsense normally works very well with large pads, when done right. To be really awesome things like that need to be able to recalibrate over time and look for fast taps, and ignore slow changes because of some extra humidity or something.”
Or, just, you know use a damned button or switch that requires no power supply to operate, works every time without recalibration, shows its current state passively, can be operated by feel, and is otherwise in every way simpler to implement and use.
I have a (very expensive) alarm clock for which I have to turn on the lights in the bedroom to find the little spot on the face to turn the alarm on or off. It’s also a two handed job because just “pushing” the touch spot is likely to make the stupid thing fall over.
Protip: Self-adhesive Velcro, hook or loop (your choice), makes a great tactile cue.
[“physical toggles are a bit dated”. No, they actually work consistently.]
Working consistently IS a bit dated where ya been?
But that’s the nice thing about building stuff yourself. Everything is a choice. We are all welcome to use touch switches or toggles as we please.
It may be that Tom didn’t mean “dated” in the sense that technical readers would understand it, but instead “dated” the fashion industry jargon term for “no longer stylish.”
Reminds me of https://www.eevblog.com/2012/03/30/eevblog-262-worlds-simplest-soft-latching-power-switch-circuit/
With simple modification, this can also double as low voltage disconnect for batteries.
Ive used that circuit a # of times.
Its not really the same (they’re both push-on/push-off, but this one requires a physical pb), but simpler.
So have I. An 1/8 w resistor fits nicely between the end two pins of that component to make a voltage divider.
You can directly control it from an MCU to do soft power off/latching power on. Tweeted about it.
” While there’s certainly nothing wrong with that, physical toggles are a bit dated at this point. A soft power switch that turns your gadget on and off at the tap of a finger is far more 21st century. ”
What an annoying line of thought. Since when does “fashion” matter in DIY? That’s cringy.
Soft buttons have good uses, but to be modern is laughable and annoying.
I never had old devices turn on/off or change mode accidentally. But with a modern smart phone I halve of the time can’t even hold the darn thing without triggering something and doing something unexpected and unwanted. Yep… technology has come a long way. These “soft switches/buttons” combined with bad or inconsistent user interfaces that have too many functions under the same button, give many users a hard time, how hard can it be?
But the HUGE advantage of a true switch (the one that actually breaks/makes the circuit) it that it truly breaks the circuit, all those soft power switch solutions have a standby current of some sort, no matter how small it’s never zero. A true switch gives you true feedback, you can feel or hear when you switch it. People kind of like this… a lot. Touchscreen and softswitches combined with a slow response of the device are horrible to operate… did I press it… oh… yes it does something now, did I do that? The fun starts when the system breaks down… is the problem in the switch? You don’t know, there is no feedback. Ohh.. wait, it didn’t see my finger properly. But too sensitive isn’t good either.
Progress can be cool, but looking at this project, did it really improve the system? Is this really so much better then a simple switch? There is no need for touch-systems if you don’t want a tumbler switch, use a simple push button on/off switch, you know the one granny has on the lamp near her bedside.
Though, I fully understand the tinkering factor here, so nice job on that one.
The standby current for that buck converter is 80uA. A coin cell can do that for 5 years. The voltage divider I use to hold the _enable pin high for an MCU draws more power. :)
This particular application really shines in battery-powered children’s devices. You can still have an on/off switch, but now it just momentarily grounds the _enable till the MCU takes over holding that line down. And when the device is idle the MCU can truely shut itself off with no additional actives. Just need two resistors and the buck converter you were probably already using.
“Soft buttons have good uses, but to be modern is laughable and annoying.”
Yeah, Modern would be the giant monolith with a dedicated toggle switch, deconstructing it and making it modular and its state transient is very post-modern.
me – neither capacitance or resistance screens are suitable for this ATE function. and the three mechanical switches were approved by the QA and manufacturing managers.
client – it does not look good. i want it to look more modern.
me – then it might be less reliable.
client – i want a modern appearance to all ATE in this area because this factory is where we bring customers.
me – ok, sign this extension to my statement of work and sign this release.
client – ok.
14 months later…
me – your honor, request summary judgement at this time.
client – his design failed and production lost and customer lost and reputation lost and whaa whaaa whaaaaa.
judge – dismissed with prejudice.
I am not a lawyer, but based purely on this narrative, reinstated on appeal. If you can’t make it work, you have to refuse the money, the existence of the additional waiver shows that the contract is based at least in part on delivering a product or service, it is not a pure time-based contract.
“….and sign this release.” usually makes it into “I submitted a design that I say will work and can be produced, but will do the demanded changes on the condition that subsequent costs, failure and consequences rest with the client ,and that they were advised of the potential harm, so it’s on them.”
That doesn’t mean you won’t wind up in court – plenty of blamestorming after the fact – but the biggest consequence is usually that the client, with a fresh self-inflicted bullet wound in the foot, will start bad-mouthing the consultant. Occasionally they’ll do a Microsoft and try to bleed you out in court costs which is pretty annoying.
I would have choose a much higher series resistor than the 330R for the Zener. The current values sucks about 26mA continuous regardless. You can probably get by with 3-4mA and 7uA if you remove the LED.
Huge thanks to Tom and Hackaday for sharing this “project”.
Also a big thank you Hackaday readers for valuable feedback.
As I mention in the video, the main motivation behind using a touch sensor is being able to hide it under a surface. I’m going to embed it inside a table so it’s not visible from the outside, but you still can activate it through top surface.
I really like that people are discussing how they like and dislike this solution, that was the whole point of the video. Showing
how something can be done. It’s not the best way, it’s not the worst way, but rather sharing an a idea an how something can be done and hopefully ignite that hacker/maker fuel in others to go and make something awesome. :)
I have used this for soft power control.
https://www.pololu.com/category/121/pololu-power-switches
I won’t use Pololu on principal, they will not show you a proper schematic of what you are buying. It’s both petty and infuriating at the same time.
Geez, now I will have to tell my lawyer, the plaintiff’s lawyer, and the judge that they were all wrong because of advice I read on the internet.
Always remember the catchphrase from the “Opening Arguments” legal podcast — “Don’t take legal advice from a podcast.”
I’m using this type of board with a short LED strip:
https://www.electroschematics.com/touch-led-pwm-module-whats-inside/
I had to modify a little, but turned into a neat little switch.