Introduction: Dire Bomb-like Timer (v2)
This is my second version bomb-like timer. I used Arduino UNO board, programmed it to be able to switch on, switch off any high voltage household appliance, It includes two sets of time you can play around with, Of course you can always alter it from your code to 3 or more . Other than its timer function, it can serve as a desktop clock that can amaze your friends alot with it bomb-like appearance. There is no fancy decoration , and cost is low, it is as simple as how it looks. Here are things you need to make this timer.
1. Plastic cardboard sheet.s
2. Bread board X2
3. Arduino Uno board.X1
4. Wireing Cables X N
5. Scotch Tape
6.Clock Module DS1302
7. Relay 5V to 220V
9 Sponge tape
10. 10k resistor x 5
11. 110v/220v cable
12. 7 segment display (8 digits) x 1
13. Plug (male and female) x 1
Step 1: Hardware Assembly
Wiring can be a painful job, but as long as having some patient and do it step by step, everything can be fine. Wiring up your Arduino UNO board with 1) Clock module 2) Relay 3) 7 segment display 4) tac switch as the picture shows. Each signal outpul/input has to correspond to the order as the graph shows since it has the sequence as the coding defines. Once you have done the wiring, connect 220/110v cable to the plug and femail plug head (don't know what it calls) as the drawing shows. careful with it to avoid any chance of short circuit. As you can see in the last pic the assembly, although it is a mess, but we still can do some arragement and ordering when we come to putting everything up with casing.
Step 2: Coding
In the begining of the coding, you have to include DS1302 (clock module) library, Bounce (for tac switch) library, and also EEPROM library (memory on the MCU to store time data as well as timer's data).
Below shows connecting port for each input/output to correspond to.
DS1302: CE pin -> Arduino Digital 2
I/O pin -> Arduino Digital 3
SCLK pin -> Arduino Digital 4
// define 7segment display pin
int DIO_Pin = 5; //pin 14 on the 75HC595
int RCK_Pin = 7; //pin 12 on the 75HC595
int SCK_Pin = 6; //pin 11 on the 75HC595
#define TOGGLE_PIN 8 //Menu
#define UP_PIN 9 //UP
#define DOWN_PIN 10 //DOWN
#define LEFT_PIN 11 //LEFT
#define RIGHT_PIN 12 //RIGHT
#define LED_PIN 13 //relay
I am not a good code writer, and the code is a mess, but the basic principal is, you get the time from the module, you convert the time into digits, save it to EEprom on the MCU, you set up two sets or more preset time, use that preset time to match the time saved to EEPROM, or course you have to save the preset time to EEPROM too, and calls it out when it comes to use it. If the preset time match the real time, then it makes the output to replay HIGH to be able to activate the relay, and therefore your appliance starts working. There are two attachment of my code and library if you want to use it.
Step 3: Casing
I started to image how big the box is going to be, and when the box is flatten out, does the size of my plastic cardboard sheet is enough to content that size. And after a while, I drew the dimension as the pic shows and cut the boardsheet accordingly. The boardsheet has about 2mm thickness so while cutting the board, please consider the thickness since it is going to impact your assembly. For the folding line, use your cutting device and cut the line slightly (Do not cut through), As long as it can be folded then it is fine.
Step 4: Where to Place Your Component
I placed the tac switches + breadboard to the top compartment since the cardboard is soft enough to trigger the switch, no need for any types of buttons. 1 breadboard at the left-btm of thecompartment, this breadboard is used for multiplying gnd and vcc ports for more devices since we only have 2 gnd and 2vcc ports from our UNO board. On the right-btm of the comparment is where we place our UNO board. For replay module, it is just right next to our tact switch+breadboard in the top compartment. Since the force upholding by wires from the lower compartment pushes up, there is no need to sticky tape the module as it is held in place by this force. For display module, and clock module, I sticky taped it to the back of the front cover. Once it is all done, Use scotch tape to tape everything up to make it a solid box.
Step 5: Final Touch
Finally we have reached to the last step where there are some cutting you need to do before you can actually use it. Cut holes for USB connector and hole for plug cable to go through as the pic shows, Then tapes the plug, and female plug head to the rear of the box. Draw come icons right next to the switches so you can quick recongnize where they are and what their function is when you want to adjust the time. And there you go, your personal bomb-like timer is done. I put my timer on my working table in office, and there always people asking is that a bomb or clock, and I have to explain it all over again. Amaze your friend if you can make one.