WiFi 7 Segment LED Clock

4,753

63

7

Introduction: WiFi 7 Segment LED Clock

About: Now retired but have a passion for robot design and construction. Also enjoy programming, my career was largely commercial programming and design work using Cobol, Fortan, and industrial automation and integ...

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.

Supplies:

Equipment List

1. WEMOS R1 D2 Arduino card with on board ESP8266 WiFi module

2. Light Detecting Resistor plus 22ohm resistor

3. Two pole switch, coloured wires, PCB female plugs, heatshrink, PCB board, 3mm plastic supports

4. LED plus 330ohm resistor

5. BME280 temperature sensor

6. MP3-TF-16P player plus 22ohm resistor

7. 4 Ohm 5W speaker

8. 16 X 2 line LCD screen using IC2 communications (optional, used mainly for testing)

9. RTC Clock DS3231

10. 2 X DC Step Down 12V – 5V

11. 2 X 74HC245 IC Chip plus 20 chip carrier

12. 2 X 74FC595 IC Chip plus 16 chip carrier

13. 8 X 22ohm resistor

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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.

Be the First to Share

    Recommendations

    • Magnets Challenge

      Magnets Challenge
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    7 Discussions

    0
    JimS282
    JimS282

    Question 9 hours ago

    ChristineNZ,
    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

    0
    erickserdahl
    erickserdahl

    17 days ago

    Will there be a corrected "Fritzing" diagram available?
    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.

    0
    ChristineNZ
    ChristineNZ

    Reply 17 days ago

    Hi,
    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.

    0
    erickserdahl
    erickserdahl

    Reply 16 days ago

    Hi ChristineNZ,
    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.

    0
    jeff.verive
    jeff.verive

    17 days ago

    I really like this project a lot! The woodworking is very nice, and you clearly did a fair amount of planning. I love the use of a tablet to set/read the date and time and access other functions!

    I have a few questions about the project:
    1) Have you double-checked the Fritzing schematic? You show the power indicator LED and its series current dropping resistor in *series* with the 12V supply's positive connection in the switched wire. This means all of the current for running the clock flows through the LED, and depending on the different clock functions the current may exceed the LED's rated current. Typically LEDs for power indication are connected in parallel to the switched input power wires. This way it's much easier to select a proper resistor value (the Fritzing schematic shows 33 ohms, but the parts list shows a 330 ohm resistor).

    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.
    0
    ChristineNZ
    ChristineNZ

    Reply 17 days ago

    Hi, thanks for pointing out the errors in the Fritzing diagram, I have corrected those that I have found. The LED was a very silly mistake in fact I had placed it across the 5V and GND of the 5V distribution board, the fritzing diagram should show 330ohms for that resistor. You where correct the WEMOS board was a D1 R2 version. The 5V from the DC-DC supply does input to the VIN pin on the WEMOS, this I have used before as I understand that providing it is 5V this VIN pin can be used to power the WEMOS. As regards the HDSP-C2G1 LED this datasheet was the nearest I could find, as the originals I had have no markings on them whatsoever, the datasheet matches the LED size and pinouts. I did not in fact mention that I uprated the supply to the 74AC245 and 74HC595 to 6.5V, their maximum being 7V, to help improve the intensity of the LED displays. The clock has now been running for 2 months without any problems or heating up of any components. I understand that these larger LED displays use two LEDs per segment, instead of a single LED per segment.

    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.

    0
    jeff.verive
    jeff.verive

    Reply 16 days ago

    Christine,

    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.