- Published: Tuesday, 01 June 2010
- Written by Graham Mitchell
- Hits: 13799
The purpose of the project was to create a 'box' that could control 12-24 timers independently. Each timer required both visual and audible ques. It was a quick-and-easy fun project that threw some curve balls when it came to writing a program that could control 24 timers which could have different states at any point of time.
With a PIC microcontroller at the core, there was plenty of room for 24 timers. Once again, I've used potentiometers for selection control (there are some improvements in mode selection). Before getting to involved, lets start with something a little more interesting, operation.
There are three switches on the left - to control each timer. The two potentiometers allow easy selection of each timer, and the desired interval (pre-set intervals was a request by the end-user, so-be-it).
Below the LCD/Controls are 24 bi-color LEDs. Full operation is best described in the following video:
While it's nicety to use high quality plastic vinyl for the decal, a similar result could be achieved by using A4 sticker paper and a laser printer.
To reduce the wiring overhead, a separate PCB board for the LEDs was made (shown on the left below). Everything is very modular, if a switch fails someday - simply disconnect it and plug-in a new one.
The back of the panel houses the power switch, fuse and DC power connector.
The bi-color LEDs essentially meant there were 48 LEDs to control. This was achieved by the use of multiplexing. Timers were separated into banks of six, as shown in the below diagram.
The schematic still has simulation items (such as the LCD and POTs). While they are shown in the schematic, they were excluded from the PCB layout. The physical connectors for the LCD/POTs were of course part of the final PCB.
The program was written with Swordfish.
Controlling 24 independent timers all of which could have different states at any instance of time required some lateral thinking. TMR2 formed the backbone of the program. The program was split into two files, one for controlling the interface, and another for multiplexing the display. Download the following zipped archive to view the programs.
As always, feel free to leave comments below