Software apps and online services
Hand tools and fabrication machines
I went for a shower one day, was getting late for office. Running tight on time, but I didn't want to come out of hot shower in cold morning. Without any clock in my bathroom I was saying to myself "Lets enjoy the shower for few more minutes, I might be over estimating the time". Result: I got really late to my office.
Solution: Put a clock in your bathroom.
Why would I put a clock in my bathroom when I can make a simple timer on my own. Well this project is just to build a waterproof 10 minute timer so you enjoy your hot bath and reach office on time.Step 1: Quick video
Here is a short 4 minute video that summarizes every thing.Step 2: Electronics components
We will use three 3mm LEDs to display time in binary i.e. 001 means one minute is past and 111 means 7 minutes are past; here 1 means LED is ON. Now that we are using only 3 LEDs, we can indicate only 8 states using them, so lets agree on lighting up first LED not at the end on 1 minute but after 3 minute and from there every minute we will increment the count. This decision was influenced by the use of small form factor CR2032 button cell as powering source of the circuit, which has capacity of 250mAh only. We will use three 2.2 kOhm resistors for current limiting through LEDs. A latching push button DPDT switch will work as ON/OFF switch. We will use Attiny85v as controller in this circuit as it can support operation up to 1.8v at 1MHz.
- Three 2.2 kOhm resistors
- Three 3mm LEDs
- Latching push button DPDT switch
- DIP-8 IC socket
- Attiny85v IC
- CR2032 button cell
- CR2032 button cell holder
We will use silicone sealant to make our timer water proof. Soldering iron and soldering wire for assembling circuit on general purpose circuit board. Some plastic bags and plastic cups can come handy to take out sealant.
- Silicone sealant,
- Soldering iron/soldering wire,
- General purpose circuit board and
- Some plastic polythene and plastic cups.
To keep size of the timer small, I decided to use a CR2032 button cell. CR2032 is rated at 3v and can go down to 2v when fully discharged. Attiny85 has minimum operating voltage of 2.7v, which will be waste of CR2032's capacity. On the other hand Attiny85v has minimum operating voltage of 1.8v which is below full discharge voltage of CR2032, resulting in full utilization of button cell. Frequency of operation at lower voltages is going to be low but our application does not demand high frequency operation. Attached image is a snap from Atmel's datasheet on Attiny microcontrollers.
Arduino IDE does not have support to program Attiny85v by default, you can add Attiny85 (which holds good for Attiny85v) as one of the board in Arduino IDE using THIS LINK.
Once you are done with that set
Tools > Programmer to "
Arduino as ISP", select "
attiny85" as board and set "
Internal 1Mhz" as frequency in Tools menu. After that make connections mentioned in above link and burn the boot loader. As a test you can modify Blinky code for pin number 0 and burn it in Attiny85 to see LED blink at physical pin number 5 of Attiny85v.
Circuit is quite simple. Attached image's left half shows a breadboard view of the circuit. Attiny85v is powered by a 3V coin cell CR2032, connected through a switch. Three 3mm LEDs are connected to physical pin 5, 6 and 7 of Attiny85v through a series resistor of 2.2 kOhm. Pins 5,6 and 7 map to GPIO pin 0, 1 and 2 of Arduino. Right half of attached image shows the schematic view of the circuit.
Code is also quite simple. We declare a count variable. Set three pins in output mode, set them low. Put delay of 2 minute in setup function as we plan to count 10 minutes using only 3 LEDs. In loop function we wait for every 1 minute, increment the count and then update the status of LEDs using
set_LEDs function. This function uses bit-wise AND to update the status of LEDs.
Once coding was finished I assembled the circuit on General purpose circuit board using soldering iron/wire.
We will take out some silicone sealant for water proofing in a plastic cup; remember to put a brand new coin cell in your circuit before sealing it. Now take out some sealant, mix it up. Get your timer and dip it in the sealant. Spread sealant all over the timer, make sure that you don't miss a spot. Use some plastic stylus to do this, don't touch the sealant with your finger as it can cause irritation. Take out dipped timer in a polythene and wrap it up, finally spread the sealant evenly on the timer using your finger.
I left my package as it is overnight. Removed plastic package in morning. Trimmed its edges using scissors and finally waterproof 10 minute timer was ready.
I tested the circuit by dipping it in a jar of water and it worked perfectly.
Thank you for your time.