Introduction: ESP8266 Wall Clock
This instructable is an enhancement of my old project https://www.instructables.com/id/Simple-7-Segment-... , the RTC module seemed not quite real time at all and drifted day by bay even I changed new battery, I reference to some other instructable makers would like to try use ESP8266 to connect the Internet clock source to get the real time.
The old 74HC595 decoder board still usable, I built an ESP8266 program fixture to connect the Arduino, many ESP8266 players should known it must be connected to 3.3V voltage source, but when I connect it to the decoder board, I accidentally connected the 5V source to decoder board and fired the ESP8266 even it connected to 3.3V source, find out later that TTL IC can also use 3.3V source.
Step 1: A Larger Display
After the first success I want it can be displayed as an wall clock, so I try to source bigger 7-segment module, this is not quite easy, finally I found some 2.25" 7-segment modules but are common cathode type (the LED used in the decoder board is common anode type), at first I think there should be no any problem, may be I can change the polarity to fix but I was wrong.
Except the common cathode type, the larger LED needs higher voltage minimal 8V to light it up, obviously it cannot be driven by the decoder board at TTL voltage, however the decimal point at the lower right doesn't high volt, I fired up one module when I test to light up the segments, but no problem, I only need to light up one decimal point.
The problem of common anode and common cathode is significant with the decoder board, the outputs from 74HC595 drive the digit lines and segment lines respectively, in order to work properly, the digit lines should connected the anode of LED, while the segment lines connected the cathode of LED, change the polarity the LED still lit, yes lit forever.
Step 2: Solved the Problems
Obviously there are two bigger problems to be solved after I brought the LED modules, I know it needs some drivers to change the polarity and pull up supply voltage, I started to use NPN and PNP transistors but no success, later I found some driver circuits from some makers as shown on the diagram which are quite similar to my design. After many hours of experiment, I was certain that which one should be drive the digits and which one should drive the segments.
On the last minute there is still a problem in the digit driver, I found all segments were inversely light up, I immediately check the code and correct the byte code table to common cathode configuration, finally solved the problem. Lastly to light the decimal point in the second digit I need to change the bit-wise OR '80' in common cathode, whereas in common anode, it should be bit-wise AND '7F'.
I didn't mentioned or upload any arduino code here because that is not written by me, I post no right, you may find many examples from many instructablers, I only introduce my work.
Step 3: Continue Build the Driver Board
Like the river of no return, once started you can't stop, I search all my old stock of NPN and PNP transistors, resistors and build the driver board in two evenings, I should think if I had brought the common anode type LED, I don't need such extra huge works.
Nevertheless extra works made you learn, not so bad!
Eric Brouwer made it!
We have a be nice policy.
Please be positive and constructive.