Weather Clock

by tittiamo68 in Circuits > Arduino

9285 Views, 58 Favorites, 0 Comments

Weather Clock

3.JPG

Update with electric scheme and Fritzing scheme


I make two premises :

  1. This is my first Instructable

  2. I'm an ignorant Italian who has not studied English at school, and that's why I asked for help to:https://translate.google.it

Start with thank a few people who, through their work, have inspired me and helped me to "play" with Arduino / Genuino

Michele Maffucci

Daniele Alberti

Mauro Alfieri

My professor of laboratory "Perito Carli"

My Workshop

20160226_044608.jpg

In my workshop I wanted a watch that in addition to the hours and the date I also wanted to know the ambient conditions

The work can be done easily with Arduino, only serves an RTC, a DHT22 (a bit 'more expensive but more accurate than a DHT11) and BMP180

But we see in detail the necessary material

Material

IMG_2144.JPG
20150722_110748.jpg
20150722_111100.jpg
IMG_2145.JPG
20160430_143219.jpg
IMG_2149.JPG
  • Arduino or Arduino standalone
  • BMP180 - Barometric Pressure/Temperature/Altitude Sensor
  • DHT22 - temperature-humidity sensor
  • RTC DS1307
  • 1 Stripboard
  • electric wires
  • 3 buttons
  • Boxes for four fruits GEWISS
  • LCD 20x4 I2c
  • 1 Photoresistance

Arduino there is little to say, because of limited space I used an Arduino Standalone

The sensors were purchased by aliexpress, they cost little but put us 40 days to arrive in Italy from China

The buttons are used to adjust the time since the RTC has a margin of error of one minute per month (diagram and sketches taken from arduinoenonsolo)

The Photoresistance to explain later

Protocol I2c

20160430_143120.jpg
IMG_2147.JPG

The DISPLAY, RTC and BMP180 communicate with Arduino through the I2C protocol and the library Wire.

All three elements must be connected in parallel to the respective SDA and SLC contacts Arduino that correspond to the pins A4 and A5.

To facilitate the work, and not to confuse the contacts I used the wires with the same colors

The RTC module is a "clock" that, by communicating with Arduino, counts the real time (Hours, Minutes, Seconds, Day, Month, and Year).
The RTC is supplied by a buffer battery that, when the power is off, continues to calculate the passage of time.

The BMP180 Module (Barometric Pressure / Temperature / Altitude Sensor) is a high-performance sensor that provides temperature, barometric pressure and altitude.
I used the library SparkFun

Display and Photoresistance

IMG_2145.JPG
IMG_2148.JPG
PhotoResistence.jpg

The Display is very bright, I want that when the room is dark, he decreases the brightness.

The I2C module for the display allows you to adjust the contrast and the jumper can turn off the backlight led, but if we put in place the jumper a photoresistor (that provided by the Arduino starter kit) with the increase of the light, its resistance decreases, as a result, increases the brightness of the display, while, in low light conditions, the resistance is very high and the brightness decreases.

DHT22

20160430_143221.jpg

As mentioned before, I used a DHT22, although more expensive than a DHT11, because it is much more accurate.

This sensor provides the temperature and humidity of the environment. Review of adafruit (from which I used the library)

To simplify the project I used a model with built-in pull-up resistor.

The data pin is connected to pin 4 of arduino

Buttons

IMG_2026.JPG

The buttons, as mentioned, are used to adjust the time without reloading the sketches.

It should to be constructed a small Pull Down circuit for each button.

The Arduino pin interested in this feature are:

  • Pin 6 = menu
  • Pin 7 = +
  • Pin 8 = -

Assembly

IMG_2034.JPG
IMG_2030.JPG
IMG_2029.JPG
IMG_2028.JPG
IMG_2027.JPG
IMG_2025.JPG
IMG_2024.JPG
IMG_2023.JPG
1.JPG

I chose a junction box for 4 fruits of GEWISS because it is the perfect size for the display that I used.

Not having points of anchor, I used an electric wire to attach the display to the front mask.

The LED (in series with a 220 ohm resistor) has been glued to the hole from 0.5 mm that I did.

To protect the photoresistor, I used a piece of clear plastic thatI don’t remember where I found.

I added a master switch to turn everything off when not needed.

For the mains I used a phone battery charger with mini USB plug.

The sensor of DHT was fixed so that it is external to the box.

To connect the PIR sensor I used a 2.5 stereo jack plug.

Arduino standalone and Stripboard, with the RTC and the resistance pull down (I'm sorry that you do not see), they are attached to the rear of the box with the M3 screws.

Arduino Code

Codice.JPG

...Allarm...

IMG_2146.JPG
IMG_2030.JPG
IMG_2023.JPG

My laboratory is located in the basement, and when I'm working I do not feel if someone comes to visit me, so I thought about adding an alarm with a PIR sensor, a LED and a BUZZER.

The PIR sensor needs to be powered at 5 volts supplied by Arduino and connected to pin 2

The LED is connected to pin 13

The buzzer to pin 9

You have been warned !

When you want to visit me…

Warn me !!!

Eletric Scheme

WeaterClock.jpg

Fritzing Scheme

Weather Clock2_bb.jpg

Downloads