I am bored with this killjoy corona still lingering around and while sitting here playing video games trying to get cool screenshots for battlescreen contest I wondered just how hot my windowsill would get when the sun was on it. Well, it turns out quite hot.
With the help of these little modules, I was able to get a wireless reading from my windowsill and display the data on a small 0.96" OLED display. I also was able to get it close enough to my television so that I could display and log the data on there as well.
Above we have the Transmitter module all wired up on a breadboard. Every 20 seconds the black Arduino on the left of the photo gets the Temperature and Humidity reading from the blue DHT11 module on the right of the photo. The Arduino then sends the temperature and humidity data and transmit it to the Receiver module in the picture below.
Forgive my messy wiring and bad photography, below are some diagrams that will be much easier for you to follow along with.
Below is the Receiver module which takes the temperature and humidity data from the Transmitter module and converts it to an integer that we can more easily understand. For example, we can measure the percentage of humidity in the air and use celsius to define the temperature. We then display this easy to read information on the small OLED display in the bottom left of the photograph.
On the left of the graph, we have the window just before the sun hit it this morning. It then warmed up extremely fast to over 40 degrees Celcius! Much higher than I would have expected. But it goes to show how effective greenhouse can be. It's -15 degrees on the other side of that window!
Before we begin, you will need to install the following libraries on the Arduino IDE
- Adafruit_GFX.h
- Adafruit_SSD1306.h
- SPI.h
- DHT.h
In order to use the 433 MHz transmitter and receiver you will need to download the Radiohead (not the band) Amplitude Shift Keying Library from here and install the .zip file.
And here are the .ino files on my github that contain the code to put onto your Arduino.
https://github.com/LacksAgency/Arduino-Wireless-Temp-Sensor
Step 1
Using the Arduino IDE, upload the Transceiver .ino file to the Arduino you plan to transmit data from.
- Ground to Ground
- VCC to 5V
- Data from DHT11 to Digital Pin 7
- Data from 433 MHz Transmitter to Digital Pin 12
Plug the transceiver into its own power source and let it normalize the sensor while you create the receiver
Upload the Receiver .ino file to the Arduino that will receive the data.
The OLED display requires only 3.3 Volts so wire that to the 3.3V pin
- Ground to Ground
- SCL to the SCL Pin
- SDA to the SDA pin
The Transmitter has some extra pins.
- Ground to Ground
- VCC to 5V
- Any of the 2 middle Data Pins go to Digital Pin 11
Plug the receiver into a power source and it should start displaying the temperature in roughly 30 seconds. It will update the Temp and Humidity every 20 seconds until power is disconnected or the data is interrupted. If you are having trouble with range on your 433 MHz module experiment with different types of antenna.
I created a device to see how hot my window sill gets because the quarantine blue have me doing that kind of odd stuff... In order to help me create such a device I mashed together the following separate tutorials. Some of the photos also belong to them.
https://randomnerdtutorials.com/guide-for-oled-display-with-arduino/
https://makerguides.com/dht11-dht22-arduino-tutorial/
https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/
https://www.airspayce.com/mikem/arduino/RadioHead/index.html