Timer for Ultraviolet exposure with UV LEDs and PWM fine tuning

Timer for Ultraviolet exposure with UV LEDs and PWM fine tuning

Timer operation video

Timer measurement video

Previous timer projects had only on/off possibilities for the UV leds. Some projects need a finer tuning of the UV value, and I am not talking just about PCBs. Stamps and other things need ultraviolet curing, with setups that cannot be fulfilled using the basic, previous design.

Based on the same hardware as the Common Cathode timer available in this post, I have further developed the software in order to use the same hardware to achieve finer results.

This is how it works:

 1. Countdown timer setup mode

When powered, the display shows in minutes and seconds a predefined value of 5:00 (five minutes, zero seconds). The display is blinking and the second dot point is lit, showing that it is in countdown timer setup mode.

This value may be modified using the left and right keys (to decrease or to increase the timer). The steps are measured in seconds. The maximum value that can be programmed is 99 minutes and 59 seconds, just as much as the display can hold with just 4 digits.

The UV leds and the blue witness led are shut off.

Pressing the GO key will enter in countdown timer mode.

2. PWM setup mode

GO and RIGHT keys pressed simultaneously switch the countdown value to the PWM value, expressed in percents (from 0% to 100%).

The default value is 100 (%).

The display is blinking and the fourth dot point is lit, showing that it is in PWM value setup mode.

This value may be modified using the left and right keys (to decrease or to increase the PWM value). The steps are measured in percents. The maximum value that can be programmed is 100%.

The UV leds and the blue witness led are lit at the value defined by the PWM value.

To switch back to displaying the countdown timer, press GO and LEFT keys simultaneously.

Pressing the GO key will enter in countdown timer mode.

3. Countdown Timer mode

Pressing the GO key while in either setup mode (countdown timer, PWM) or in power save mode will enter in countdown timer mode.

The display is steady (does not blink), the second dot point is lit and it shows the minutes and seconds as they go down to zero. The display is reverted to minutes and seconds, no matter which was the mode when the GO key was pressed.

The UV leds and the witness blue led are lit at the defined PWM value;

At the end of the countdown, the UV lights are shut off, the device enters timer countdown setup mode and emits 10 beeps to let the user know it has terminated its timing job.

During Countdown timer mode, the power save mode is disabled and keys functions are also disabled. Upon reaching zero, keys functions are enabled again and power save mode enters automatically in effect after ~ 10 seconds.

4. Power save mode

To save power and to allow the 78L05 regulator to cool down after counting down, the display is shut off after 10 seconds and just the dot point remains blinking. Power save mode works no matter if you are in timer setup mode or in PWM setup mode.

5. Memorizing other values as default values

LEFT and RIGHT keys pressed simultaneously will write in EEPROM both the timer countdown value and the PWM value. set up by the user. At the next power-up, these will be the values used by default for countdown and PWM. After writing these values in EEPROM, the device emits 4 beeps.

6. Other considerations
I can assure you the 78L05 will function very well over time. However, if you feel any doubt, replace it with an 7805 and a small aluminum heat sink.

Any key will do exactly as intended and, if pressed, will disable the power down mode.

During power down, a beep is emitted every ~10 seconds to let the user know the device is waiting, asleep.

The code is written in C and compiles under AVR Studio 4.

The fuses for ATtiny2313 are set as follows:

SELFPREGEN - disabled
DWEN       - disabled
EESAVE     - disabled
SPIEN      - enabled
WDTON      - disabled
BODLEVEL   - brown-out detection disabled
RSTDISBL   - disabled
CKDIV8     - disabled
CKOUT      - disabled
SUT_CKSEL  - Internal RC Oscillator 8MHz; Start-up time: 14CK + 65 ms

 

Common Cathode Display Version: HEX and EEP compiled files enabling you to have a full featured timer, can be found here.

Common Anode Display Version: HEX and EEP compiled files enabling you to have a full featured timer, can be found here.

 

The complete source code for either CC version or CA version can be emailed to those interested in obtaining it. The cost is 10 EUR, payable by paypal, to Cristian Copcea, email copcea at yahoo dot com

Both (CC and CA versions) will be emailed for 15 EUR.

These funds will contribute to acquiring parts, equipment and all other necessary stuff (TIME being the most expensive) to create more interesting devices to be posted in this blog.

 

Make the transaction specifying “UV Timer with PWM source code”, send me an email about this and you will receive in return shortly an email from me with the desired source code(s) attached to the email in a .rar archive.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove you are human: *