• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Cheapest Arduino LED Clock With Arduino Clone at $8

By Abhishek Ghosh March 19, 2017 7:06 am Updated on March 19, 2017

Cheapest Arduino LED Clock With Arduino Clone at $8

Advertisement

Lately we published some guides with basic electronic components. Here is Cheapest Arduino LED Clock Which With Arduino Clone Will Cost $8 To You. It is really usable LED Clock for any purpose, it not only for fun out of development. Commercial clocks will cost more than $10. Basically if the DIY electronic stuff is not cheap, it becomes useless thing. You can use such clocks anywhere but you will always need to supply 9v power to Arduino board. I have not calculated the cost of battery. If you use 4 or 6 AA cells, it will also work. I must inform you that there are kits sold with the name “Electronic Clock DIY Kit Digital Tube” which cost around $12, which are based on Arduino UNO, there is “PIC16F877A Digital Clock Kit” which costs around $8.

Cheapest Arduino LED Clock With Arduino Clone

In our case advantages are full control of quality of components and the chance to use for other projects in future. There is no disadvantage is that, it is not for real time clock, there is no button control, it is only 24 hours clock. If you want Arduino real time LED clock, you should follow this guide.

 

Cheapest Arduino LED Clock : Buying the Materials

 

You simply need to follow our older guides :

Advertisement

---

  1. Cheapest Arduino clone
  2. TM 1637 LED Display
  3. Optional – TM 1637 LED Display Real Time Clock

 

 

Cheapest Arduino LED Clock : Circuit Diagram and Code

 

The circuit diagram is quite easy, you just need to follow the old guide TM 1637 LED Display. Connecting TM1637 to Arduino:

Vim
1
2
3
4
5
Arduino              TM1637 display
PIN #7 ------------------ CLK
PIN #8 ------------------ DIO
3.3V   ------------------ VCC
GND    ------------------ GND

Real time clock module is optional and 9v battery power supply is what needed. You need an enclosure which can fit the whole stuff nicely. I kept the whole codes here on Github – TM1637-Clock-Arduino, you will use the hour minute clock (or code from below). Too much basic clock but easy for anyone to assemble.

Here is the code. You will set the current time by editing the values at line 16 and 17. Several peoples coded it, I have only adjusted it to correct 23:59 to 00:00 part.

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
const int clock = 7;
const int data = 8;
uint8_t digits[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f };
void setup()
{
  setupInterrupt();
  pinMode(clock, OUTPUT);
  pinMode(data, OUTPUT);
  start();
  writeValue(0x8c);
  stop();
  write(0x00, 0x00, 0x00, 0x00);
}
byte tcnt2;
  unsigned long setMinutes = 34;
  unsigned long setHours = 23;
  unsigned long time = (setMinutes * 60 * 1000) + (setHours * 3600 *1000);
void setupInterrupt()
{
  TIMSK2 &= ~(1<<TOIE2);
  TCCR2A &= ~((1<<WGM21) | (1<<WGM20));
  TCCR2B &= ~(1<<WGM22);
  ASSR &= ~(1<<AS2);
  TIMSK2 &= ~(1<<OCIE2A);
  TCCR2B |= (1<<CS22)  | (1<<CS20);
  TCCR2B &= ~(1<<CS21);
  tcnt2 = 131;
  TCNT2 = tcnt2;
  TIMSK2 |= (1<<TOIE2);
}
ISR(TIMER2_OVF_vect) {
  TCNT2 = tcnt2;
  time++;
  time = time % 86400000;
}
void loop()
{
  unsigned long t = (unsigned long)(time/1000);
  uint8_t minutes = (byte)((t / 60) % 60);
  uint8_t hours = (byte)((t / 3600) % 24);
  uint8_t seconds = (byte)(t % 60);
    write(digits[hours / 10], digits[hours % 10] | ((seconds & 0x01) << 7), digits[minutes / 10], digits[minutes % 10]);
}
void write(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth)
{
  start();
  writeValue(0x40);
  stop();
  start();
  writeValue(0xc0);
  writeValue(first);
  writeValue(second);
  writeValue(third);
  writeValue(fourth);
  stop();
}
void start(void)
{
  digitalWrite(clock,HIGH);
  digitalWrite(data,HIGH);
  delayMicroseconds(5);
  digitalWrite(data,LOW);
  digitalWrite(clock,LOW);
  delayMicroseconds(5);
}
void stop(void)
{
  digitalWrite(clock,LOW);
  digitalWrite(data,LOW);
  delayMicroseconds(5);
 
  digitalWrite(clock,HIGH);
  digitalWrite(data,HIGH);
  delayMicroseconds(5);
}
bool writeValue(uint8_t value)
{
  for(uint8_t i = 0; i < 8; i++)
  {
    digitalWrite(clock, LOW);
    delayMicroseconds(5);
    digitalWrite(data, (value & (1 << i)) >> i);
    delayMicroseconds(5);
    digitalWrite(clock, HIGH);
    delayMicroseconds(5);
  }
  digitalWrite(clock,LOW);
  delayMicroseconds(5);
  pinMode(data,INPUT);
  digitalWrite(clock,HIGH);
  delayMicroseconds(5);
  bool ack = digitalRead(data) == 0;
  pinMode(data,OUTPUT);
  return ack;
}

Tagged With arduino led clock , writeValue(0x8c); , светодиодные самоделки , цифровые часы своими руками , часы на ардуино нано и адресной ленте семисегментные

This Article Has Been Shared 993 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Cheapest Arduino LED Clock With Arduino Clone at $8

  • Arduino Based Patient Monitoring : Overview

    Here is an Overview of F/OSS Arduino Based Patient Monitoring in Terms of Ease of Build, Cost, Features & Comparison With Proprietary.

  • DIY Robot Guitar & Piano Player : Arduino to EV3

    Though This Article on Arduino to EV3 DIY Robot Guitar & Piano Player We Want to Deliver An Introductory Idea On What Peoples Are Developing.

  • Arduino 7 Segment LED Display Tutorial (TM1637 4 Digit)

    Here is Detailed Arduino 7 Segment LED Display Tutorial For the Beginners With Example Codes, Circuit Diagram Which Uses TM1637, Has 4 Digit.

  • Making a Digital Clock : Arduino 7 Segment 4 Digit TM1637

    In This Guide We Will Be Making a Digital Clock With Arduino 7 Segment 4 Digit TM1637 Display Unit With RTC. Circuit Diagram, Code Provided.

  • Cheapest Arduino UNO Kit on Copper Board

    Here is List of Components To Get Your Own Cheapest Arduino UNO Kit on Copper Board or Breadboard. With Quality Components it Will Cost $3.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Top 10 Anti Hacking Software for Microsoft Windows January 22, 2021
  • What is Software Modernization? January 21, 2021
  • Cloud Computing : Cybersecurity Tips for Small Business Owners January 20, 2021
  • Arduino : Independently Blink Multiple LED January 18, 2021
  • What is a Loosely Coupled System? January 17, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Cheapest Arduino LED Clock With Arduino Clone at $8," in The Customize Windows, March 19, 2017, January 22, 2021, https://thecustomizewindows.com/2017/03/cheapest-arduino-led-clock-with-arduino-clone-at-8/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy