Arduino Hourglass Timer 3d model
Warning. This content is not moderated and could be offensive.
weapons
3dmdb logo
Thingiverse
Arduino Hourglass Timer

Arduino Hourglass Timer

by Thingiverse
Last crawled date: 4 years, 2 months ago
A while ago I brought one of those $3 Hourglass Shape Flashing LED DIY Kits from eBay. While it is a nice kit to build, it really has no practical purpose other than to show off its animation of an hour glass. It is not designed as a timer. I wanted to make mine into something useful yet keep the animation. I created a custom board that contains an Arduino, two mercury switches to detect the hourglass orientation, a rotary encoder to set the time from 1 to 99 minutes and a piezo electric speaker. I used the PCB that came in the kit to hold the LEDs. The STC15W201S microcontroller is replaced with a 16 pin ribbon cable that connects to my custom Arduino board.
See "Hourglass Shape Flashing LED DIY Kits"https://www.instructables.com/id/Hourglass-Shape-Flashing-LED-DIY-Kits/
Video
https://youtu.be/0LKmR9BtNaw
Parts
1x Hourglass Shape Flashing LED DIY Kit
1x ATMega328
1x 28pin IC Socket
1x 16pin IC Socket
2x 16pin IC Plugs
1x 50mm 16 way Ribbon Cable
5x 10K 1/8W resistors
5x 0.1uf Monolithic Ceramic Capacitors (5mm hole spacing)
2x 22pf Disc Ceramic Capacitors
1x 10uF 16V electrolytic capacitor
1x 8Mhz HC-49S Crystal
1x EC11 Rotary encoder with switch
2x Glass 5mm Mercury Switch Angle Tilt Switch
1x Universal Passive Buzzer AC / 2KHz 3V 5V 12V
2x M3x5+6mm Male-Female spacers
2x 6mm M3 screws
1x 3.7V 400mAh LIPO battery
1x Mini Rocker Switch app 10x15mm
1x JST XH 2.5-2 Pin Battery Connector Plug Female & Male
Programming
The ATMega328 runs a 8Mhz crystal on a 3.7V supply. I used my home-made Arduno UNO board to program the ATMega328 chip. This board has a ZIF socket for the ATMega328 and allows me to change the crystal, supply voltage and program the chip via a USBTinyISP board or a FTDI board.
Create a new entry in the Boards.txt file for a 8Mhz Arduino UNO. (%USERPROFILE%\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.1\boards.txt)
##############################################################
uno8.name=Arduino Uno (8Mhz)
uno8.vid.0=0x2341
uno8.pid.0=0x0043
uno8.vid.1=0x2341
uno8.pid.1=0x0001
uno8.vid.2=0x2A03
uno8.pid.2=0x0043
uno8.vid.3=0x2341
uno8.pid.3=0x0243
uno8.upload.tool=avrdude
uno8.upload.protocol=arduino
uno8.upload.maximum_size=32256
uno8.upload.maximum_data_size=2048
uno8.upload.speed=57600
uno8.bootloader.tool=avrdude
uno8.bootloader.low_fuses=0xFF
uno8.bootloader.high_fuses=0xDA
uno8.bootloader.extended_fuses=0xFE
uno8.bootloader.unlock_bits=0x3F
uno8.bootloader.lock_bits=0x0F
uno8.bootloader.file=optiboot/optiboot_atmega328.hex
uno8.build.mcu=atmega328p
uno8.build.f_cpu=8000000L
uno8.build.board=AVR_UNO_8
uno8.build.core=arduino
uno8.build.variant=standard
##############################################################
In the Arduino IDE
Select "Tools - Board - Arduino Uno (8Mhz)"
Select "Tools - Programmer - USBtinyISP"
Plug in your USBtinyISP to the ATMega328 (should be running a 8Mhz crystal)
Select "Tools - Burn bootloader"
Load up the sketch in the IDE
Select "Sketch - Upload using programmer"
Remove the ATMega328 from your development environment and place it on the PCB
I found that the EEPROM on the ATMega328 didn't read or write when running on 3V3 but was fine on 5V. If anyone finds a solution, please let me know.

Tags