|
ARD-NANO30 |
x 1 | |
|
SSD1306 OLED I2C |
x 1 | |
|
TCA9548A multiplexer module |
x 1 | |
|
BME280 sensor module |
x 1 |
|
arduino IDEArduino
|
|
|
Soldering Iron Kit |
Classic Style Arduino Weather Station with three Oled Displays
So far I have made several weather stations that display local values as well as internet data, which you can view on my playlist.
This time I will present you a way of making a very interesting desktop weather station that displays the values of the three basic weather parameters, Atmospheric Pressure, Air Humidity, and Temperature on three separate Oled Displays. The idea is to resemble a classic retro weather station that has three separate instruments, one for each parameter.
Due to the small size and readability of the displays, this station would represent an ideal useful gadget on any desk.
As for the way of making, this device is extremely simple and suitable for beginners.
The device consists of several components:
- On the back there is a power input connector, a switch as well as a BME280 sensor module
- Arduino Nano Microcontroller
- Three SSD1306 OLED displays with I2C communication
- and TCA9548a multiplexer modu
If you want to make a PCB for this project, or for any other electronic project, PCBway is a great choice for you. PCBway is one of the most experienced PCB manufacturing company in China in field of PCB prototype and fabrication. They provide completed PCB assembly service with worldwide free shipping , and ISO9001 quality control system. Also, on their site there is an online gerber viewer where you can upload your gerber and drill files to render your board.
In fact, by making this device I wanted to show the function of such a multiplexer. Namely, the Arduino Nano has only one I2C input (A4 and A5), and when it comes to connecting an I2C display to the Arduino, we are limited to only one screen. In special cases, when the display itself has the option to select one of two different I2C addresses, we can connect a maximum of two displays. In a case like this, when there is a need for more displays, then it is most practical to use this multiplexer module, which can connect up to 8 I2C devices to one microcontroller.
Writing the code is quite simple, and it is necessary to indicate the number of the I2C output of the multiplexer and the content that should be displayed on the screen connected to that output.
And now let's see how this device works in real conditions.
Immediately after turning on the device, in the first few seconds, the parameter that will be displayed appears on each screen in large letters. After that, the values for the current temperature, pressure and air humidity are displayed with two decimals. And again, on the yellow bar, but this time in small letters, it shows the parameter and the unit whose value is shown on the corresponding display.
If we want to display the Relative value of Atmospheric Pressure specifically for the area in which we live, we should in the part of the code
pressure = bme.seaLevelForAltitude(700.0, bme.readPressure())/100.0;
to put the appropriate altitude (in my case it is 700m). I also made a version of the code where the values are displayed in larger digits, but without decimals.
And finally, a short conclusion. This is a very simple visually effective, but also very useful device that accurately displays the three basic meteorological parameters using only one inexpensive sensor. It is installed in a suitable plastic housing made of PVC material, and coated with colored self-adhesive wallpaper.
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display(128, 64, &Wire, 4);
Adafruit_BME280 bme;
float temp, hum, pressure;
void TCA9548A(uint8_t bus)
{
Wire.beginTransmission(0x70);
Wire.write(1 << bus);
Wire.endTransmission();
}
void setup()
{
TCA9548A(1);
bme.begin(0x76, &Wire);
TCA9548A(2);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(4);
display.setTextColor(WHITE);
display.setCursor(18,20);
display.println("HUM.");// Print text
display.display();
TCA9548A(3);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(4);
display.setTextColor(WHITE);
display.setCursor(10,20);
display.println("PRES");// Print text
display.display();
TCA9548A(4);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(4);
display.setTextColor(WHITE);
display.setCursor(10,20);
display.println("TEMP.");// Print text
display.display();
delay(5000);
}
void loop()
{
TCA9548A(1);
temp = bme.readTemperature();
hum = bme.readHumidity();
pressure = bme.seaLevelForAltitude(700.0, bme.readPressure())/100.0;
TCA9548A(2);
display.setTextColor(WHITE); display.clearDisplay();
display.setTextSize(2); display.setCursor(0,0); display.print("Humidity %");
display.setTextSize(3); display.setCursor(20,30);
display.print(hum);
display.display();
TCA9548A(3);
display.setTextColor(WHITE); display.clearDisplay();
display.setTextSize(2); display.setCursor(5,0); display.print("Press. hPa");
display.setTextSize(3); display.setCursor(0,30);
display.print(pressure);
display.display();
TCA9548A(4);
display.setTextColor(WHITE); display.clearDisplay();
display.setTextSize(2); display.setCursor(30,0); display.print("Temp C");
display.setTextSize(3); display.setCursor(20,30);
display.print(temp);
display.display();
delay(1000);
}
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display(128, 64, &Wire, 4);
Adafruit_BME280 bme;
int temp, hum, pressure;
void TCA9548A(uint8_t bus)
{
Wire.beginTransmission(0x70);
Wire.write(1 << bus);
Wire.endTransmission();
}
void setup()
{
TCA9548A(1);
bme.begin(0x76, &Wire);
TCA9548A(2);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(4);
display.setTextColor(WHITE);
display.setCursor(18,20);
display.println("HUM.");// Print text
display.display();
TCA9548A(3);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(4);
display.setTextColor(WHITE);
display.setCursor(10,20);
display.println("PRES");// Print text
display.display();
TCA9548A(4);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(4);
display.setTextColor(WHITE);
display.setCursor(10,20);
display.println("TEMP.");// Print text
display.display();
delay(5000);
}
void loop()
{
TCA9548A(1);
temp = bme.readTemperature();
hum = bme.readHumidity();
pressure = bme.seaLevelForAltitude(700.0, bme.readPressure())/100.0;
TCA9548A(2);
display.setTextColor(WHITE); display.clearDisplay();
display.setTextSize(2); display.setCursor(0,0); display.print("Humidity %");
display.setTextSize(4); display.setCursor(45,30);
display.print(hum);
display.display();
TCA9548A(3);
display.setTextColor(WHITE); display.clearDisplay();
display.setTextSize(2); display.setCursor(5,0); display.print("Press. hPa");
display.setTextSize(4); display.setCursor(15,30);
display.print(pressure);
display.display();
TCA9548A(4);
display.setTextColor(WHITE); display.clearDisplay();
display.setTextSize(2); display.setCursor(30,0); display.print("Temp C");
display.setTextSize(4); display.setCursor(45,30);
display.print(temp);
display.display();
delay(1000);
}
Classic Style Arduino Weather Station with three Oled Displays
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Mirko Pavleski
- Testing 2500W Large Induction Heater An induction heater is a device that uses electromagnetic induction to heat objects. It consists of...
- Arduino FFT Audio Spectrum analyzer on 8x32 color matrix WS2812B The spectrum analyzer displays the amplitude of signals as a function of frequency, allowing engine...
- Unusual Led Ring Arduino Clock, Temperature, and Humidity meter There are many arduino clock projects with temperature and humidity readings where the results are ...
- How to make simple portable PEMF Magnetic Pulser PEMF (Pulsed Electromagnetic Field Therapy), which is also known as magnetic pulse therapy uses ele...
- Single Mosfet Mini SSTC Tesla coil with 10 + cm Spark A Solid State Tesla Coil (SSTC) is a type of Tesla coil that uses solid-state components such as tr...
- How to Make EM84 (6E2) Vacuum Tube Stereo VU Meter A VU meter, also known as a Volume Unit meter, is a device used to display the audio signal level ...
- Universal Arduino Staccato controller for SSTC and VTCC Tesla Coils The VTTC Staccato Controller was developed in the attempt to create longer sparks from VTTCs while ...
- DIY extremly Sensitive and cheap Arduino Seismometer A seismometer, is an instrument used to detect and record ground motion caused by seismic waves, su...
- DIY Extremly Sensitive and cheap Geophone sensor for Earthquakes detecting A geophone is a device used in geophysics to detect ground movement. It is specifically designed to...
- Arduino FFT Spectrum analyzer on VFD display GP1287 An audio spectrum analyzer is a device that visualizes the frequency content of an audio signal. It...
- DIY simple Spark Gap Tesla Coil Tesla coil is a type of resonant transformer circuit invented by Nikola Tesla around 1891. It is a ...
- DIY PC controlled high power PEMF Therapy Device PEMF or Pulsed Electromagnetic Field therapy is a type of therapy that uses electromagnetic fields ...
- DIY Precise Arduino Miliohmmeter In practice, we very often need to measure low resistances. Measuring low-value resistances, especi...
- The simplest way to determine the quality of lighting in your home - bulb flickering meter Light flickering can be a common issue and may occur with various types of bulbs, including incande...
- Classic Style Arduino Weather Station with three Oled Displays So far I have made several weather stations that display local values as well as internet data, whic...
- How to build simple cheap Hulda Clark Syncrometer Hulda Clark's Syncrometer was a device she claimed could detect the presence of various substances ...
- DIY simplest small CRT Oscilloscope An oscilloscope is a measuring instrument used to visualize and analyze electronic signals. It is c...
- Arduino Door Lock with Smartphone Flashlight Login (Li-Fi project) There are many different arduino door lock projects, where the access method is using a keyboard, R...
-
Open Source Very Large Stick - Freejoy & MMjoy2 breakout board
488 0 0 -
RF Control training board for students based on ESP32 C3
647 0 2 -
Aquarius+ Computer, Standard PCB
860 0 4 -
KINETIC COASTERS with a TWIST! Laser or 3D Print some DIY Magic
595 0 1 -
RPI - 8 IO PLC With ATTiny85 Watch Dog
515 0 1 -
Nintendo Famicom HVC-001 Controller Shells
615 0 1 -
COMMODORE 128 DIAGNOSTIC REV.785260 KEYBOARD DONGLE
573 0 4 -
COMMODORE 128 15KHz DISPLAY ADAPTER (C128 80 COLUMN ADAPTER)
778 1 5 -