Tumbler Timer

From Wiki
Jump to navigationJump to search

Update

Well, it turns out this was a complete waste of time. A friend of mine found that UniqueTek sells an appliance timer with a count-down mode for $24.95. It's either made by Sper Scientific (model 810060) or Woods (model 59377). The Woods can be had for as little as $17.50 on Amazon. I was not aware that count-down timers existed in any of the timer modules. Since these can be had so cheap, there's no point in continuing to invest any energy in this project.

Overview

The problem with the Dillon brass tumblers is that they have a simple on/off switch, and no provision for a timer. While a regular appliance timer could be used to run the tumbler for some preset amount of time, it requires resetting the timer for each run, either by pushing buttons (if digital), or cranking the timer wheel around (analog timers).

I'm more interested in a solution where I can press a button, and at the the end of some interval, the tumbler will automatically switch off. Besides the ability to just start the tumbler, I'd like the ability to pause and resume it, in case I choose to remove the lid to add more polish, check the brass, etc. I don't particularly need the ability to set the amount of time it runs. Three hours seems to be a plenty of time to get even really nasty brass clean.

A relay is chosen instead of a triac since the load is a motor, and triacs tend to be less than ideal for inductive loads. In addition, additional circuitry is required for a zero-crossing detector, and a triac usually prefer to be attached to a heat-sink. So all around, a relay makes more sense. In addition, both the hot and neutral can be disconnected from the load.

The power supply is a neat little design, making 5 volts at 1 watt (200ma). It's a transformerless off-line switching power supply, using the UCC3888 from Texas Instruments. Fits the bill perfectly, and the complete switcher can be shoe-horned into slightly over 1 square inch.

User Interface

Terms

  • CAPF - Continue After Power Fail
  • SAPF - Stop After Power Fail
  • PFO - Power Failure Occurred


Timer mode

  • Run/pause button
  • If timer not previously started, closes relay and starts a new timing cycle
  • If timer is running, pauses timer and opens relay
  • If timer previously started, closes relay and resumes timing cycle
  • Stop button
  • Stops timer, opens relay, clears power fail indication (if any), resets timer to programmed time (default 3 hours)
  • If timer is stopped, pressing for more than 5 seconds enters programming mode (see below)
  • LED
  • Off - Stop button has been pressed or cycle has completed (relay is open)
  • Red - If PFO and SAPF, indicates power failed during a timing cycle (relay is open)
  • Yellow - In pause mode (relay is open)
  • Green - Timer is running (relay is closed)
  • Solid - More than 1 hour remains
  • 750ms on/250ms off - 45-30 minutes left
  • 500ms on/500ms off - 29-15 minutes left
  • 250ms on/750ms off - 14-0 minutes left


Programming Mode

  • Program cycle time
  • Run/pause button
  • Increments time by 15 minutes
  • Stop button
  • Switches to power fail mode programming
  • Pressing for more than 5 seconds will reset timer to 3 hours, continue on power fail, and exits programming mode
  • LED
  • Red - Each flash indicates one hour
  • Green - Each flash indicates 15 minutes
  • Yellow - Single flash indicates cycle time programming mode
  • Program power fail mode
  • Run/pause button
  • Toggles between SAPF and CAPF
  • Stop button
  • Exits power fail programming mode, return to timer mode
  • Pressing for more than 5 seconds will reset timer to 3 hours, continue on power fail, and exits programming mode
  • LED
  • Red - Indicates stop after power fail (SAPF)
  • Green - Indicates continue after power fail (CAPF)
  • Yellow - Double flash indicates power fail programming mode


Notes

  • LED indications when programming cycle timer
  • 1 hour, 30 minutes - one red flash, 2 green flashes, 1 yellow flash, repeats
  • 4 hours, 45 minutes - 4 red flashes, 3 green flashes, 1 yellow flash, repeats
  • 1 hour, 0 minutes - 1 red flash, 1 yellow flash, repeats
  • 0 hours, 30 minutes - 2 green flashes, 1 yellow flash, repeats
  • LED inicates when programming power fail mode
  • SAPF - red flash, 2 yellow flashes, repeats
  • CAPF - green flash, 2 yellow flahes, repeats
  • Behavior after power failure
  • If a timing cycle was in progress and SAPF, the red LED will be lit, and pressing 'run/pause' will resume the timing cycle
  • If a timing cycle was in progress and CAPF, the timing cycle resume as if nothing had occurred
  • Because timing cycles are only tracked to the minute, after a power failure, the timing cycle in progress may be up to one minute shorter.

Parts

Description Ref Dsg Value Footprint Manufacturer Mfg Part # Product Page Vendor URL Datasheet (web) Datasheet (local)
Capacitor C1 2.2uF/450V Radial PTH Panasonic ECA-2WHG2R2 Panasonic Digikey PDF ?
Capacitor C2 0.15uF/150V 2220 Vishay VJ2220Y154KXEAT Vishay Digikey PDF ?
Capacitor C3 120pF/16V 0603 Panasonic ECJ-1VC1H121J Panasonic Digikey PDF ?
Capacitor C4 1uF/25V ? ? ? ? ? ? ?
Capacitor C5 22uF/16V ? ? ? ? ? ? ?
Capacitor C6 330nf/16V 0603 Murata GRM188R71C334KA01D Murata Digikey PDF ?
Diode D1 S1M/B SMB Diodes, Inc S1AB-13-F Diodes, Inc Digikey PDF ?
Diode D2 1N4937 SMA Diodes, Inc RS1J-13-F Diodes, Inc Digikey PDF ?
Diode D3 SS1H10 DO-214AC Vishay SS1H10-E3/61T Vishay Digikey PDF ?
Diode D4 1N4150 Mini MELF Micro Commercial DL4150-TP Micro Commercial Digikey PDF ?
Diode D5 1N4150 Mini MELF Micro Commercial DL4150-TP Micro Commercial Digikey PDF ?
Diode D6 1N4935 SMA Diodes, Inc RS1D-13-F Diodes, Inc Digikey PDF ?
Diode D7 1N4935 SMA Diodes, Inc RS1D-13-F Diodes, Inc Digikey PDF ?
LED D8 Bi-Color CC PTH Kingbright WP59EGW Kingbright Digikey PDF PDF Icon-pdf.gif (458 KB)
Outlet J? A/C Outlet PTH Qualtek 739W-X2/03 Qualtek Digikey PDF ?
Relay K1 DPDT PTH Omron G2RL-24 DC5 Omron Digikey PDF PDF Icon-pdf.gif (923 KB)
Inductor L1 2mH SMT Pulse Engineering P0752.105NLT Pulse Digikey Pulse ?
Inductor L2 10mH ? ? ? ? ? ? ?
Inductor L3 18uH ? ? ? ? ? ? ?
FET Q1 1N60 TO-252 Vishay IRFRC20TRPBF Vishay Digikey PDF ?
FET Q2 2N7002 SOT-323 OnSemi 2N7002WT1G OnSemi Digikey PDF ?
Resistor R1 110K/0.5W 1206 Rohm LTR18EZPF1103 Rohm Digikey PDF ?
Resistor R2 110K/0.5W 1206 Rohm LTR18EZPF1103 Rohm Digikey PDF ?
Resistor R3 110K/0.5W 1206 Rohm LTR18EZPF1103 Rohm Digikey PDF ?
Resistor R4 80K/0.25W 1206 Rohm MCR18EZPF8062 Rohm Digikey PDF ?
Resistor R5 1M 0603 Panasonic ERJ-3GEYJ105V Panasonic Digikey PDF ?
Resistor R6 10K 0603 Panasonic ERJ-3GEYJ103V Panasonic Digikey PDF ?
Resistor R7 10K 0603 Panasonic ERJ-3GEYJ103V Panasonic Digikey PDF ?
Resistor R8 10K 0603 Panasonic ERJ-3GEYJ103V Panasonic Digikey PDF ?
Resistor R9 330 0603 Panasonic ERJ-3GEYJ331V Panasonic Digikey PDF ?
Resistor R10 330 0603 Panasonic ERJ-3GEYJ331V Panasonic Digikey PDF ?
Switch S1 SPST/PB PTH C&K D6R90 F1 LFS C&K Digikey PDF PDF Icon-pdf.gif (222 KB)
Switch S2 SPST/PB PTH C&K D6R90 F1 LFS C&K Digikey PDF PDF Icon-pdf.gif (222 KB)
IC U1 UCC3888 SOIC/8 Texas Instruments UCC3888D Texas Instruments Digikey PDF PDF Icon-pdf.gif (385 KB)
IC U2 PIC18F13K30 SSOP/20 Microchip PIC18F13K50-I/SS Microchip Microchip PDF PDF Icon-pdf.gif (6.27 MB)

I/O Pins

  • Run/pause switch
  • Stop switch
  • LED (red side)
  • LED (green side)
  • Relay control

Architectural Overview

The control process is written in rforth1, a Forth implementation for the PIC18Fxxx series, written by Samuel Tardieu.

The processor spends as much time as possible asleep to minimize current draw (for no other reason than 'green is good').

The two push buttons are on interrupt capable pins, either /INT0 and /INT1 or port B. The LED is a bi-color LED, with the red on one port pin and the green on the another. This allows indicating red, green, or yellow. The relay is controlled by a generic output pin, via a 2N7002 FET.

The user has the ability to define the behavior after a power failure. The factory default is to continue the timing cycle after a power failure (since tumbling isn't a time critical task, nor does it require special attention after a power failure). If a timing cycle was in progress prior to the power failure, the timing cycle will be resumed when power returns. If programmed to stop after a power failure, and a timing cycle was in progress, the power fail indication is signaled by lighting the red LED. At this point, either the 'stop' button may be pressed to clear the indication and reset the timer, or 'run/pause' may be pressed to continue the remainder of the timing cycle.

There are two basic modes the control process operates in; the first is when the timer is stopped, the second is when a timing cycle is in progress. Any time the relay is open (timer stopped or paused), the only enabled interrupt sources are the two buttons. When the relay is closed (timer running), a 100ms timer interrupt is enabled that handles decrementing the timer.

Upon pressing 'run/pause', the relay is closed and timing commences. The timer interrupt routine handles updating the status of the green LED (solid or flashing at a rate determined by the time remaining). While the timer is active, every 60 seconds a counter stored in NVRAM is updated to indicate the time remaining in the timing cycle. This is used to recover from power failures. Once the timer reaches zero, the relay is opened and the green LED is extinguished.

If 'run/pause' is pressed during a timing cycle, the control process switches to pause mode, the yellow LED is lit, and the timer is suspended until either 'run/pause' is pressed again, or 'stop' is pressed. If the timing cycle is continued by pressing 'run/pause' again, the yellow LED is extinguished, and the green LED goes back to indicating time remaining.

Any time 'stop' is pressed, the relay is opened, the LED is extinguished, and the timing cycle is reset to the programmed time (the default is 3 hours).

Pressing the 'stop' button for more than 5 seconds while no timing cycle is in progress enters programming mode. See the User Interface section for the program flow.

Construction

The PCB is housed in a plastic box. A standard NEMA 5-15P plug (example) on a 5' 16/3 cord enters the box. The box either has a snap-in NEMA 5-15R outlet on the opposite side, or a NEMA 5-15R outlet on a 6" 16/3 cord (example).

Ideally, the box is approximately 3.50" long, 1.50" wide and 1.00" tall. The 'stop' button is located 1" from the edge of the box with the NEMA 5-15R outlet. The 'run/pause' button is located in the center of the box, 1.75" from either side. The LED is located 1" from the edge of the box with the NEMA 5-15P cable. Switches and LED are position along the center-line of the width.

The height may be unrealistic, since the relay is 0.787" tall, the PCB is 0.0625", and the thickness of the plastic and such must be allowed for. In addition, one idea was to mount the LED and switches on the back of the PCB, which would eat additional space. It may be possible to find a lower height relay.

Toolchains

Documents & Images