Wired clock

Here is an original clock which is connected to your WIFI network. In addition to displaying the time, it also displays the day, date, month, temperature and humidity. I only used a few ports for this project, so you can install other sensors to make it something more complex. Residential electrical wiring is copper wire with a diameter of 1.5mm (approximately AWG15). It’s very difficult to do something straight with this big electric wire, but I’ve made some templates for you to make it easier for you.

Materials

Programming

*** Note that it has several libraries to install and you must also install the card manager URL before programming the ESP8266. ***

Download the program to run the clock.

You have a lot of things to do after downloading the program. See the following.

You must click on “File” then on “Preference”.

Next to “Additional card manager URL” add this line which is between the quotes “https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/ package_esp8266com_index.json “with that you will be able to add the ESP32 and ESP8266 boards, but for this project we only need the ESP8266.

Now we will be able to add the ESP8266 card, here the card is already installed.

Click on “Tool – Card type – card manager”.

The Map Manager window will appear, then you will write “esp8266” in the search window.

Click on “Install”.

You can install the ESP8266 card.

Click on “Tool – Card type – ESP8266 Boards – Generic ESP8266 Module”.

Now, you have to install all these libraries.

Click on “Sketch – Include a library – Manage libraries”.

The library manager window will appear, then you will write the name of the first library “timelib” in the search window.

Click on “Install”.

Do this for each library.

You may have to look further down the list to find the right library.

Enter the name of your wireless network and your password.

Choose the server for the time synchronization, then you need to choose the correct “Time Zone” for your region. It is currently configured for Quebec.

Remove the two slashes (//) that are opposite your region and put some on the line where there was none.

In Europe it should look like this:

const int timeZone = 1; // Central European Time
// const int timeZone = -5; // Eastern Standard Time (USA)
// const int timeZone = -4; // Eastern Daylight Time (USA)
// const int timeZone = -8; // Pacific Standard Time (USA)
// const int timeZone = -7; // Pacific Daylight Time (USA)

Finally, you have to define what type of temperature sensor you have (DHT11 or DHT22). Remove the slashes on one to put them on the other as needed.

To be printed

Download the file to print directly.

You can also go to Thingiverse for download.

Rooms

These two pieces are to hold the base of the project as well as the screen.

Before choosing the parts to print for your project, you must look at the first pin of the screen, in this way, you will print the correct model.

Here we have two types of SSD1306, one has GND on the first pin and the other has voltage (VCC) on the first pin.

The “GND” on the first pin is model2 and the “VCC” is model1.

Wire Clock Screen Negative Model1.obj
Wire Clock Screen Positive Model1.obj
Wire Clock Screen SCL and SDA.obj
Wire Clock Sensor Data.obj
Wire Clock Sensor Positive and Negative.obj

Here you have the parts to print for model1.

Using these parts, you are going to be able to do straight wiring.

Wire Clock Screen Negative Model2.obj
Wire Clock Screen Positive Model2.obj
Wire Clock Screen SCL and SDA.obj
Wire Clock Sensor Data.obj
Wire Clock Sensor Positive and Negative.obj

Here you have the parts to print for model2.

Using these parts you will be able to do straight wiring.

Electronic diagram

Here is the electronic diagram for this small project.

Assembly

For this project it is necessary to use a copper wire with a diameter of 1.5mm (approximately AWG 15)

Take the electrical wire and bend it 90 degrees, choose a jig, then place the copper wire on the jig and mark with a felt-tip pen where you want to bend your wire. Bend the wire 90 degrees in the direction of the template, then put the wire in the template and cut both ends to get the correct length.

And there you have it, you have made a wire with the right angle, now do the same with the other templates.

You need to make a duplicate of wires with two different jigs (Wire Clock Screen SCL and SDA and Wire Clock Sensor Positive and Negative)

Sew all your threads.

Add extinct on pins D1, D2, D5, GND and 3V3 opposite the arrows, this will facilitate the installation of the copper wiring.

Solder the four wires for the SSD1306 screen.

If you need to bend the wires then you have to use extra pliers because if you move the wire without holding it with another pliers you may damage the PCB and your project will not work.

If you decide to remove the sensor as in the picture, then you will have to install a 10k resistor on pins 1 and 2 otherwise there is already a 10k resistor on the circuit.

Solder the wire to D5, then solder the other two wires to 3V3 and GND, then solder the temperature sensor.

For this project it is possible to install two types of temperature sensors, DHT11 and DHT22. The temperature sensor installed in the photo is the DHT11, the less expensive of the two.

How are they different?
Temperature difference
DHT11: -20 to 60 ℃
DHT22: -40 to 80

Temperature accuracy
DHT11: ± 2%
DHT22: ± 0.5%

Humidity range
DHT11: 5 to 95% RH
DHT22: 0 to 100% RH

Humidity precision
DHT11: ± 5%
DHT22: ± 2%

Approximate cost
DHT11: $ 5.00
DHT22: $ 10.00

The DHT22 outperforms the DHT11 in every aspect, from temperature range to temperature accuracy, from humidity range to humidity accuracy.
The only downside to the DHT22 is, of course, its slightly higher price tag, but you’re paying for the best specs.

You have to separate the screen from the print circuit, but you have to be careful not to cut yourself or break the screen or even cut the feed strip.

Solder the screen onto the wires.

It is necessary to check to have the good type of screen compared to the wires which were bent beforehand, the pin 1 of certain screen is the earth (GND) and the other is the current (VCC).

Install the PCB on the base, then put four M3 5mm screws.

Take the display holder and insert the display into the notch of the holder, then screw the holder onto the display PCB with four M2 nuts and screws approximately 7mm long.

Final result.

Enjoyed the Article? Share it!

Facebook
Twitter
LinkedIn
Imprimer