24 Timers!

24_timers

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.

 

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:

 

Whats Inside?

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.

24_Timers_Inside_View

The back of the panel houses the power switch, fuse and DC power connector.

24_Timers_Top_View

 

The Schematic

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.

24_Tiemrs_Schematic

 

The Code

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


Posted: 7 years 4 months ago by andyo #1895
andyo's Avatar
Nice project! The front panel looks great - how did you do the legend?
Posted: 7 years 4 months ago by Graham Mitchell #1898
Graham Mitchell's Avatar
Cheers Andy
how did you do the legend?
With a decal machine at work.

It's a new addition to our section, so you'll probably see more projects coming out with them
Posted: 7 years 3 months ago by Graham Mitchell #2381
Graham Mitchell's Avatar
I have spent the better part of the last three weekends trying to isolate the bug that was making the program hang for long periods at a time.

The symptom was simple: the program would stop and display the last timer/settings on the LCD. It would occur between 3 and 7 hours of operation. The start/stop/silence buttons were inoperable while the program was hanging.

My initial thoughts were that the program had completely stopped and was hanging somewhere. Trying different techniques and waiting 3-7 hours for a tell was utterly annoying.

An long story cut short: I was using the LCD_RW pin in an effort to reduce the time taken by screen updates (instead of connecting it to GND). The result was a program that appeared non-responsive and intermittent as hell to debug.

I tied LCD_RW to GND and removed about 30+ debugging lines of code and the program has been stable for two complete 7 hour intervals.
Posted: 2 years 5 months ago by frankko #17121
frankko's Avatar
hello Graham ,
the link is broken. Where downloads the code?
Posted: 2 years 5 months ago by Jon Chandler #17122
Jon Chandler's Avatar
Graham seems to be missing in action.

If links to a file are broken, go to Site Tools/DOCman/ in the menu bar and have a look there.

24 Timers is on this page.

Forum Activity

Member Access