WiFi 7 Segment LED Clock
Intro: WiFi 7 Segment LED Clock
Project: WiFi 7 Segment LED Clock
Date: November - December 2019
The 7 Segment Clock uses a common Anode 5V supply via 22ohm resistors based Shift Register control. The main reason for building this clock was firstly the reuse of two bedside clocks each with 4 X 7 Segment Displays and the second reason the inclusion of a Wemos R1 D2 board connecting to which is a bespoke Android Application. The Android Application uses WiFi communication to send and receive commands to and from the clock. The Android Application can “SET” the time and date of the clock and “GET” the current time, date, temperature, pressure, and humidity.
In addition, and the help from David at the Nixie Google Group who kindly provided me with a schematic of a suitable 74HC595 SPI 16 shift register and a 74HC245 Octal tri-state transceiver register based circuit to support the 8 X 7 segment LEDs using the multiplex method of display. A simple PCB board was constructed using two 74HC595 20 pin IC chips located on 20 pin carriers and two 74HC595 16 pin IC chips located on 16 pin carriers. The output of one side of the circuit was used to support the Anodes of each of the 8 x 7 Segment LEDs and the other side of the circuit was used to support the 7 segments, via 22ohm resistors in series, plus the decimal point.
STEP 1: CONSTRUCTION
Attached are Fritzing diagrams of the clock construction showing the WEMOS card, LCD display, MP3 player, BME280 sensor, two step-down DC supplies, an RTC DS3231 clock, and finally Light Detecting Resistor. The second Fritzing diagram shows the Shift and Octal register-based circuit and its connections with the WEMOS. Three attachments cover the 7 Segments LED, 74HC245, and 74HC595 IC Chips.
The clock case was constructed from mahogany with 8 simple boxes constructed to surround each of the 7 segment LEDs. Each box is connected to the next using a 15mm steel tube which passes though each box and via a hollow mahogany box which connects the horizontal steel tube to a vertical steel tube that supports the clock display. The steel tube is fixed to the hollow box below which contains the clock support equipment. The wires connecting each LED are fed though each box and via the steel tube down to the clock system below, one set of eight segment control wires fed in one direction and the second set of eight wires, anode control, are fed in the opposite direction.
The various photos show the layout of the basic components onto the clock's base board. The use of a distribution board for both the I2C communications and 5V power has the advantage of only requiring two pins on the WeMOS board and allows two DC-DC step down 12V to 5V supplies to be used. The first supply to power the board, LCD, RTC, MP3 player etc., the second dedicated to powering the clock display and display driver circuit.
STEP 2: SOFTWARE
The attached files include the ICO Arduino source file and the Android App. The first ICO file contains code which allows the WEMOS to control the BME280, RTC Clock, and LCD screen. This project gave me the opportunity to build on an original Wifi Robot project. The WEMOS D1 R2 Arduino software was based on a previous clock where a Wifi communications package was added using a simple “GET” and “SET” host commands to firstly get the current clock values and secondly set the current clock date and time, as displayed on the App., is used to remotely update the clock. The second ICO file, "WifiAccesPoint" is a simple test routine to establish that the correct send and return strings are working correctly.
NOTE: Currently I cannot upload the following file "app-release.apk". I am waiting for the support team to fix this problem.
It should be noted that version 1.8.10 Arduino IDE has been used and the board selected was "LOLIN(WEMOS) D1 R2 & Mini". The following special libraries were downloaded: Wire.h, LiquidCrystal_I2C.h, SoftwareSerial.h, DFRobotDFPlayerMini.h, SparkFunBME280.h, RTClib.h, ESP8266WiFi.H, WiFiClient.h, and ESP8266WebSErver.h The Wifi access Point created by the WEMOS ESP8266 chip is called "WifiClock" and has a password of "password". It is possible to update the clock not using the bespoke Android App.rather using a standard web page viewer, with the "Wificlock" access point selected, and entering https command as follows:
For the SET command:
"http://192.168.4.1/SET?PARA1=HH-MM-SS&PARA2=DD-MM-YY&PARA3=VV&PARA4=Y&PARA5=Y"
Where time and date are entered using the standard format and "VV" is the 0-30 chime volume, first "Y" next to PARA4 is "Y" or "N" to select the chimes to be played option and the second "Y' next to PARA5 is "Y" or "N" to select the Night Save option which closes down the display during the hours of darkness.
For the GET command:
"http://192.168.4.1/GET"
This returns a string of data from the clock in the following format:
HH,MM,SS,DD,MM,20,YY,HHH,HH,PPP,PP,CC,CC,FF,FF,VV,Y,Y
Where "HHH,HH" is the humidity reading, "PPP,PP" is the pressure reading, "CC,CC" is the temperature in Centigrade, "FF,FF" is the temperature in Fahrenheit, "VV" is chime volume, "Y," is chimes required, and the second "Y," is Night Saving required.
It should be noted that the Tablets' Location Services must be enabled otherwise the WiFi scan button will not return any available networks including of course the WiFiClock network.
STEP 3: PROJECT OVERVIEW
This has been a very interesting project as it has brought together two new elements, namely the use of Wifi as a method of updating the clock, rather than use of a keyboard. Secondly the use of a Shift and Octal register based control circuit for the 7 segment displays. I find it of great satisfaction to be able to re-use old redundant equipment and bring it back to life.The development of an Android based Application allows the clock to be viewed remotely, although a 20 meter range limit, is all that can be expected from the WeMOS ESP8266 chip and its limited power. An alternative to the shift based display driver I have used is one using the MAX7219 IC display driver chip which is designed to provide the 5V supply to 7 segment based displays.
My next project's components have arrived these include old new stock IN-4 Russian Nixie tubes and INS-1 Neon tubes. I intend to return to the MAXIM range of IC driver chips and string together four of these chips in order to drive the IN-4 and Neon based displays.
7 Comments
JimS282 4 years ago
This looks to be a great project. I've done a dozen or so Nixie clocks (mostly from kits), but I want to give this a try. I might be in way over my head, since I do not have a ton of Arduino experience. I hoping I can count on your instructions, and the numerous other in the Instructable family to get me through this.
I've ordered most of the components that I didn't already have, but, I having trouble with the LEDs. The ones I have are likely going to be too large for this project. I have a set of really nice 4" leds, but they take 10v to 12v to fire. I may have to give up on these, unless you have an idea how to get the extra voltage to them.
Thanks for all you effort here. People like you really help in keeping and old man like me actively engaged in fun and challenging projects.
JB
erickserdahl 4 years ago
The concept/idea of using 2 shift registers instead of 8 is very interesting
and would have utility in similar applications if the actual electronic circuit
diagram and commented software code could be "instructed" and understood.
ChristineNZ 4 years ago
The WEMOS Fritzing diagram has been updated to fix some of the errors. The Display Driver Fritzing diagram is hopefully a faithful reproduction of the actual circuit, however I do also have an original hand drawn circuit diagram, which I followed, which I am happy for you to have via E-Mail.
erickserdahl 4 years ago
Thank you for your response. I will look for the updated Fritzing diagram.
A copy of the original hand drawn circuit diagram would be extreamely
helpful. Please email to eserdahl@pacbell.net .
Best Regards, Erick.
jeff.verive 4 years ago
I have a few questions about the project:
2) Is the board really a WeMOS R1 D2, or is it a WeMOS D1 R2?
3) Does the 5V from the DC-DC converter go to the 5V on the WeMOS board? You show it going to Vin on the Uno, but for driving Unos directly from a 5V supply it's best to connect the supply to the Uno's 5V pin.
4) Are you really using the HDSP-C2G1 LED display as shown in the 609986,pdf? This display doesn't seem to be available in blue, and each segment would require more than 5V to light up.
ChristineNZ 4 years ago
The 74AC245 and 74HC595 circuit came from David at the Nixie-e Google group, a very good source of help, I can provide the original hand drawn circuit he provided to me in order that I could get this project to work. The main reason for going down this route with the 74 chips was that the MAX6921 IC driver chip I was originally using in my previous projects could not supply less than 8V as an output.
jeff.verive 4 years ago
Thanks for the reply; I understand your design choices. As for the MAX6921 chip putting out higher voltages, that's not a problem for LEDs as long as the current setting resistor for the chip is set properly. If you decide to try this chip in the future, I can help you determine the right resistance value.