yt_link
insta_link
fb_link
twitter_link
Blog#16 - Arduino watch


Last tutorial - Homemade cheap drone!
Check here my last tutorial. I hope that you will like it. Keep up you guys!

last tutorial


Arduino based watch
Help me by sharing this post

Go back ↞ See other blog→

Author: ELECTRONOOBS
20/08/2018

I always wanted to have my own geek watch. But a watch must be small and fit well on your arm so making it on prototiping PCBs is not a solution. But now, with low cost PCB manufacture, I was able to design and order my own digital but analog look watch. But, to achieve taht I had to solve a few problems. First of all, I didn't wanted a big 16MHz crystal on my PCB as the used ATMega328p-AU chip needs. Then I had to solve the battery problem. in order to last a few days, the board should work at low power. All the other parts were design decisions.

To order your boards, use JLCPCB.com and select your color.




So, I receive the boards and made a quick inspection. I first soldered the ATMega328p-AU chip, whic is the SMD version. Then the LEDs and resistors and battery socket on the back. In order to sue this board without a crystal clock, I had to butn the 8MHz internal clock bootloader to it using the SPI port on the back of the PCB. See more about that here in this tutorial. Then I could butn the code to it without external clock so the board will look cleaner.

The PCB has a button in the middle. When that is pressed, we start counting time in order to detect a normal press or a long press. Long press will change between modes which are show time, change hour and change minute.


Next problem was solving the power consumption. Normally, the board will draw around 8mA of current when no LED is ON and 12mA when displaying time. The battery is 250mAh so it won't last too much. For that I've used bits of code to lower power consumption. I've turned off timer 0 and 2 since I don't need those. Also turned off the UART and i2c ports and also the ADC. Now, the button is connected to a analog input so I do need the ADC. For taht, each time the button is pressed, the ADC is activaded for a short time and then turned off. That reduced the consumption to under 3mA so it should last a few days.



I program the board and now, I press the button and the hour LED will stay On for some time and the minute will blink 4 times. That's how we know time. Now, yes, the range is from 0-5, 5-10 and so on. If we press the button a long press, we enter the time set mode. We push the button as many times as needed to reach the desired hour. Long press again and now do the same for tne minute and that's it.






Help me by sharing this post

Go back ↞ See other blog→





ADVERTISERS
PCBWay Ad



AFFILATE














Gearbest JGAURORA A3S Fully Metal LCD Display Control DIY 3D Printer
JGAURORA A3S Fully Metal LCD Display Control DIY 3D Printer only $299.99
Gearbest Geeetech E180 Mini 3D Printer with WiFi Module
Geeetech E180 Mini 3D Printer with WiFi Module only $245.99


Gearbest JGAURORA A5X 3D Printer Kit Printing
JGAURORA A5X 3D Printer Kit Printing only $379.99


Gearbest Min DS202 Oscilloscope 113€
Min DS202 Oscilloscope 113€


Gearbest UTD2052CL DIGITAL 2-ch Oscilloscope 275€
UTD2052CL DIGITAL 2-ch Oscilloscope 275€


Gearbest UT139C True RMS Digital Multimeter 29€
UT139C True RMS Digital Multimeter 29€


Gearbest SBK8586 Soldering station Hot Air + Iron 63€
SBK8586 Soldering station Hot Air + Iron 63€


Gearbest BAYANGTOYS X21 Brushless RC Quadcopter
BAYANGTOYS X21 Brushless RC Quadcopter 153€