It all started with a "itch". A thing that makes you want to do something. A long time ago I did a UV light box for producing a prototype boards for simple projects and ICs that do not fit typical universal boards. It was a simple thing driven by PIC16F676 with many LEDs that constantly bent during storage. Since I started programming with arduino some time ago, idea came to mind of using a NANO, and cheap I2C oled display available from chinese websites. I chose a 128x32 resolution, plenty for all text, still visible and cheap. Uses fraction of power as opposed to classic 16x2 alike LCD modules, and is small and easy to wire, with popular SSD1306 controller.
So after putting together few lines of code and testing everything on solderless breadboard, I put it on a universal PCB I had lying around (what an irony I am not using UV thing to make board for itself, but "it will do"), pair of buttons and some basic tools.
The codeCode is build around 3 inputs and one output. Inputs are
- pushbutton one = Set - sets a time value in seconds
- pushbutton two = Start / Reset - starts countdown or whille pressed, allows to resets value.
- pushbutton three = interlock for UV box (it turns on when box is closed, for as much protection against UV light)
Single output is controlling of a relay that switches power source for UV LEDs - a current power source.
NANO is checking a state of buttons Set and Start, after pressing Set a timer increments by one, after pressing start the Nano conducts a countdown. There are debouncing time delays that limits the sudden increment or waits until button is off again.
During a Set button pressed the Start option changes to Reset, so with pressing both buttons the counter goes to zero.
After presing Start the builtin LED goes ON and countdown goes to zero, while always checking for safety switch closed. If you open safety switch, it will stop and turn off the output. If you cut the cord, the output stops and turns off the output. While active a "SAFETY LOCK" message will appear on screen and built in LED on NANO will blink. I recommend setting it with microswitch and worm screw, so it can detect any little opening.
After getting to zero, a screen tells user it has finished and new setup can start. You need to set timer again but with a nano and no box for this, a simple reset will start with a custom value again.
Schematic is pretty simple, so I will not include it.
you connect OLED display to I2C pins -
VCC = pin 5V
GND = pin GND
SCL = pin A5
SDA = pin A4
START button = pin 8
SET button = pin 7
SAFETY interlock switch = pin 3
Output = Pin 10
For buttons, active is HIGH, it connects pin to VCC while lightly pulled down by a resistor, a 10k or similar will do.
Comments
Please log in or sign up to comment.