Close
0%
0%

AC Safety timer

Turns your soldering iron off after a half hour

Similar projects worth following
My Hakko soldering iron has a feature I've come to value - if you leave it turned on for a half hour, it will shut down. This is particularly valuable for a soldering iron - they don't make any noise in operation, and one left on is both dangerous and it's not so great on the tip.

I bought a Hakko desoldering gun and it doesn't have this feature. So far, I haven't been careless with it, but mistakes can happen, and it'd be nice if the iron had my back like my regular one does.

This project aims to build a box with an AC plug and socket and a single button. Push the button, and the power turns on. Push it again and it turns off. Leave it on for a half hour and it will turn itself off.

There are a lot of ways this could be done, but I decided to leverage the work I have done in other projects, so the design is an opto-isolated triac AC power switch controlled by an ATTiny45.

The ATTiny needs a 5 volt power supply, so that requires an isolated AC/DC power supply module - ironically the most expensive component of the entire build. The ATTiny45 is set up with one of its I/O lines connected to a button (other side of the button to ground), and a second as the opto-isolator driving line. There will be a pilot light hooked up to the output to act as a power indicator. If you're still working after a half hour, the light will go out and you can push the button to get another half hour. You can also always push the button twice to briefly turn it off and on and reset the half hour timer.

The triac circuit is one half of the Toast-R-Reflow power switching board. It uses a MOC-3020 opto-isolated triac driver and a BTA-20 triac. The board in this case is routed for a design maximum of 200W. At that sort of power, the BTA-20 will only be expected to dissipate about 2 watts of heat, which should be easy to sink through the enclosure.

As with all HV designs, care must be taken to insure the correct current capacity for the load-bearing traces and to pay heed to creepage and clearance distances. It's also a good idea to draw a solid divide between the HV and logic portions of the circuit, with only isolated components allowed to bridge the line.

For the chassis, there will be a panel-mounted IEC C14 inlet, plus an NEMA 5-15 outlet. The hot and neutral lines of each will go to dedicated connectors on the board. The pilot light will be wired separately to the outlet hot and neutral. The two grounds will be tied together and to a lug on the chassis. The button mounts at some distance away from the AC connections and ties to the logic part of the board.

AC Timer v1.1.pdf

PDF Schematic

Adobe Portable Document Format - 20.71 kB - 06/05/2018 at 17:16

Preview
Download

AC Timer v1.1.sch

EAGLE Schematic file

sch - 233.29 kB - 06/05/2018 at 17:16

See BOM
Download

AC Timer v1.1.brd

EAGLE board file

brd - 55.88 kB - 06/05/2018 at 17:16

Download

  • WARN light update

    Nick Sayer06/05/2018 at 17:24 0 comments

    One potential downside of the project as designed was there was no way for the power to remain on longer than a half hour. For a soldering iron, a momentary interruption isn't a big deal, but I could envision other equipment you'd want to remain continuously powered while it's attended.

    So the project now has a "warning" light in addition to the power light (which is just connected to the AC output power). The warning light is under software control only, and it turns on during the last 5 minutes of the half hour. If you push the button during the "warning" phase, then the timer is reset and the warning light turned out. As before, if the warning light is out and the button is pushed, the power is turned off.

    This does raise a slight ambiguity in the user interface. The power button is no longer a simple push-on/push-off paradigm. The only way to preserve this paradigm would be to add the concept of a "long push" versus "short push." You'd push and hold the button for a quarter second or so to just reset the timer. A short push would turn the power on and off. The problem with this is that you then have to be cognizant of how long you push the button, and I think for this application that's a worse user experience.

    Still, the behavior is simply defined by firmware. You can change the rules pretty easily.

    The board design has been updated as well to use a smaller power supply module (unfortunately, it's not a whole lot cheaper), and incorporates the bleed resistor on the triac output and much thicker traces for the high current path.

    I haven't built a new one, simply because the first one still works just fine. I will, however, retrofit it for the new "warn" light firmware and add a warning light.

  • Safety notes

    Nick Sayer02/13/2018 at 16:06 0 comments

    If you’re going to build one of these, for the love of God, don’t apply power to it unless the case is all buttoned up.

    This, in particular, means don’t program the controller with power applied. 

    Not only is it a pretty dumb idea to be messing with the board while 120V is hooked up, but in addition the programming lines are shared, and one of them drives the LED in the opto-isolator. If power was applied, it would flick the triac on and off, which would be bad for any load connected and for the snubber components probably.

    For the same reason, don’t push the button while programming, as that would mess things up.

    If programming doesn’t work, it’s possible that your programmer can’t overcome the impedance imposed by the LED. If this happens, just temporarily remove the 150Ω series resistor (or get a better programmer).

  • Fixed the pilot light

    Nick Sayer02/03/2018 at 22:05 0 comments

    As I reported last time, with no load, the pilot light stays on at about half brightness because of leakage from the triac. I was able to measure something like 60 volts with no load.

    Well, the way to fix that is to add a parallel load to lower the voltage.

    Today I grabbed some hefty resistors to try and figure out the highest resistance that would reliably turn the pilot off (after all, the lower the resistance, the more power is wasted when the circuit is turned on, and that power winds up being dissipated as heat). I had on hand 50kΩ, 91kΩ, 150kΩ and 300kΩ resistors from my work with the Hydra and OpenEVSE II designs - all of those rated for 1W and flameproof. The 91kΩ one worked and the 150kΩ didn't, so the 91kΩ one was selected. I just trimmed the leads a little shorter and jammed them into the output screw terminals on the board along with the output lead and pilot light wires.

    It's worth mentioning that once you've picked a load resistance, you need to calculate the power to insure you use a resistor beefy enough. P=E^2/R, of course, so in this case this will dissipate just under 160 mW (for AC, you can use the RMS voltage for such calculations, and the result will be RMS power, but that's what's significant for measuring resistor dissipation).

    It's probably not a great idea to put 3 wires into a single screw terminal, but there isn't going to be an unnatural amount of current flowing through this thing (not like an EVSE that switches 30 amps), so I have some confidence that it will be ok. Soldering it across the pilot lamp's terminals would have also been an option (perhaps a marginally better one).

    But I'm happy now that the pilot lamp turns all the way off with nothing plugged into the socket.

    P.s. The lesson EVERYONE should take away from this is that just because a non-mechanically switched circuit is ostensibly turned "off" that doesn't mean that there isn't a significant voltage available to give you a nasty surprise.

  • Final build report

    Nick Sayer02/02/2018 at 05:52 0 comments

    I completed the build and uploaded some pictures of the result. 

    It works just fine as it is. There are a couple of things I would do over again if I were to make another one of these. 

    Firstly, if I had made the board traces wider, I could have supported a current spec more like 8 amps than 2. I might have also stuck a fuse in somewhere if I were doing it for a wider audience. 

    I chose a box much larger than I could have just so I could insure that all the parts stayed sufficiently separated from each other (given that there’s AC line voltage involved). I specifically chose a metal box and grounded it to insure that if anything came loose it would create a ground fault and blow my local GFI (or a circuit breaker). I also chose a nice, big red button for it, but the downside of that was having to grind the hole large enough for it to fit. Grinding the IEC and NEMA outlet holes was a pain too. Of all the parts of a project like this, that’s my least favorite. 

    The last little quirk is that when there’s no load at all, the power light glows faintly. When you connect any sort of load this stops, but it indicates some level of leakage in the triac circuit. I probably need to revisit the biasing. But it is “off” enough to keep my desoldering iron cold, so I will call it a “win.”

    Lastly, I picked the power supply module I did out of pure laziness. It’s capable of 3W if output, though the 5 volt powered portion of the circuit undoubtedly draws less than 50 mA in practice. I could have bought a smaller one and maybe saved a couple of bucks, at the cost of designing a new EAGLE library entry for it. 

  • I18N

    Nick Sayer01/15/2018 at 03:40 0 comments

    For those following along outside of North America, it turns out that there’s nothing about the circuit that needs to change to switch 230VAC. The CUI power supply works on 90-240VAC 50/60 Hz, and the triac will work just as well at 230V as 120V.

    With a higher voltage, you can increase the design power to 400W without changing anything about the circuit or board (except, of course, the outlet).

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates