IOT Weather Station With Google Chrome
by WombaticsCo in Circuits > Arduino
50 Views, 0 Favorites, 0 Comments
IOT Weather Station With Google Chrome
This project demonstrates how to use an SAM01 Arduino Nano board without WiFi to communicate with Google Chrome through the Serial Port API. The data collected from sensors (like temperature and humidity) is sent to an IoT platform such as ThingSpeak for visualization and analysis. Additionally, a Traffic Light LED Board displays the comfort level in real time using red, yellow, and green LEDs.
Supplies
- SAM01 Arduino Nano Board or Similar
- DHT11 temperature and humidity sensor
- Traffic Light LED Board (with Red, Yellow, and Green LEDs)
- Jumper wires
- USB cable to connect Arduino to a PC
- A PC with Google Chrome browser installed
- ThingSpeak account (free account is sufficient)
Features
- Read temperature, humidity, and calculate a 10-level comfort score.
- Display comfort levels using a Traffic Light LED Board:
- Red LED: Low comfort level (1–3).
- Yellow LED: Medium comfort level (4–7).
- Green LED: High comfort level (8–10).
- Visualise real-time sensor data on a browser-based dashboard.
- Send data to ThingSpeak for IoT data logging and visualisation.
Circuit Diagram
Build the circuit as shown below:
- Connect the DHT sensor to the Arduino:
- VCC to 5V
- GND to GND
- DATA to Pin 8
- Connect the Traffic Light LED Board:
- Red LED to Pin 3
- Yellow LED to Pin 4
- Green LED to Pin 5
Arduino Code
Upload the following code to your Arduino. It reads temperature, humidity, and calculates a 10-level comfort score. The comfort level is displayed using the Traffic Light LED Board, and data is sent to the serial port in a format that can be read by the browser.
Downloads
Create a ThingSpeak Account
Sign up a ThingSpeak Account
- Visit ThingSpeak.
- Click on "Sign Up" at the top-right corner of the page.
- Fill out the registration form with your details (email address, password, etc.).
- Verify your email address by following the link sent to your inbox.
- Log in to your account.
Set Up a ThingSpeak Channel
- Once logged in, click on "Channels" in the top menu and select "My Channels".
- Click the "New Channel" button.
- Fill in the required details:
- Name: Give your channel a meaningful name (e.g., "Arduino Environment Monitor").
- Fields: Add three fields:
- Field 1: Temperature
- Field 2: Humidity
- Field 3: Comfort Level
- Click "Save Channel".
Get Your API Key
- Open your newly created channel and navigate to the API Keys tab.
- Copy the Write API Key provided. You'll use this key in the HTML file to send data to ThingSpeak.
HTML Dashboard
Create an HTML file to communicate with the Arduino via the Serial Port API and send the temperature, humidity, and comfort level to ThingSpeak.
- Copy and paste the code below into a text editor.
- Save it as dht_weather_station.html
- Replace the "const apiKey =" with your ThingSpeak Channel API Key
Test and Run
Connect the Arduino to your PC via USB.
Open dht_weather_station.html in Google Chrome.
Click "Connect to Arduino" and select your serial port.
Observe:
- Temperature, humidity, and comfort level displayed on the webpage.
- The Traffic Light LED Board indicating the comfort level.
- Data sent to ThingSpeak for real-time logging and visualisation.
Conclusion
This project showcases how to bridge the gap between an Arduino without WiFi and IoT platforms like ThingSpeak using the Google Chrome Serial Port API. With visual indicators from the Traffic Light LED Board, users can easily monitor environmental comfort levels.
Let me know if you need further refinements!