+21622886281
DHT11 ESP8266 Internet of things Project

Send data (temperature and humidity) to the Thingspeak site with Micro:bit

ThingSpeak overview

ThingSpeak is an open-source Internet of Things (IoT) application and API that allows users to collect and store sensor data in the cloud and perform analytics on that data. It allows users to create “channels” to collect data from multiple sensors, and also has built-in support for visualizing and analyzing the data. ThingSpeak can be used for a variety of applications, such as monitoring environmental conditions, tracking the location of assets, and controlling devices remotely. It is available for free and also has paid subscription plans for additional features and support.

ThingSpeak can be used with the Micro:bit to create IoT projects that collect sensor data and send it to the cloud for storage and analysis. The Micro:bit can be used to collect data from sensors, such as temperature, humidity, and light, and then send that data to a ThingSpeak channel using a wireless communication protocol such as Bluetooth or WiFi.

In order to use ThingSpeak with the Micro:bit, the user must create a ThingSpeak account and a channel. Then the user must program the Micro:bit to collect data from the sensors and send it to the ThingSpeak channel using the ThingSpeak API. This can be done using one of the Micro:bit‘s built-in programming languages, such as Microsoft Block Editor or Python.

Once the data is sent to the ThingSpeak channel, the user can then use ThingSpeak‘s built-in visualization and analysis tools to view the data and perform analysis. The user can also use ThingSpeak‘s API to retrieve the data and use it in other applications or services.

Overall, using ThingSpeak with the Micro:bit is a great way to create IoT projects that collect sensor data and send it to the cloud for storage and analysis. The Micro:bit‘s small size, low cost, and ease of use make it a great choice for collecting sensor data, while ThingSpeak‘s cloud-based platform provides a powerful and easy-to-use solution for storing and analyzing the data.

Purpose of this project:

Thanks to the Micro:bit card and the ESP8266 module connected to the Internet of Things (IoT: Internet of Things), it is possible to monitor in real time the temperature and humidity measured by the DHT11 sensor.

To create sensor data recording applications, you can use ThingSpeak which is an API and an open source application for the Internet of Things, allowing you to store and collect data from connected objects.

Necessary components

Micro:bit

The Micro:bit is a small, programmable microcontroller board designed to make learning to code and creating electronics projects accessible to beginners. It was developed by the BBC in partnership with a number of technology companies, with the goal of providing a simple, low-cost platform that could be used to teach kids how to code and create digital devices.

The Micro:bit is equipped with a number of sensors and input/output (I/O) devices, including an accelerometer, a compass, a thermometer, and two programmable buttons. It also features a 5×5 LED matrix that can be used to display text, images, and animations.

Users can program the Micro:bit using a variety of languages, including Python, JavaScript, and Microsoft Block Editor, and can also use it to control other devices and sensors via Bluetooth or USB. It can be powered by a USB cable or by a battery pack.

The Micro:bit board is widely used in schools and educational institutions, it is a good tool for learning the basics of coding and electronics.

Micro:bit GPIO card

The Micro:bit GPIO (General Purpose Input/Output) card is an accessory for the Micro:bit microcontroller board that provides additional input and output pins for connecting to external devices and sensors. The card connects to the Micro:bit via the edge connector on the bottom of the board, and provides access to a variety of different types of I/O, including digital I/O, analog I/O, I2C, and SPI.

ESP8266 wifi

The ESP8266 is a low-cost Wi-Fi microcontroller module that is designed for IoT applications. It is based on the ESP8266 chip, which is a 32-bit microcontroller with built-in Wi-Fi capabilities. The module is small, low-power, and easy to use, making it a popular choice for IoT projects.

The Micro:bit can be used in conjunction with the ESP8266 Wi-Fi module to create IoT projects that can connect to the internet and send or receive data. The Micro:bit acts as the main controller of the project, while the ESP8266 provides the Wi-Fi connectivity.

To use the ESP8266 with the Micro:bit, the ESP8266 module must be connected to the Micro:bit‘s pins and then programmed using the Micro:bit’s software development environment. This can be done using the Micro:bit‘s built-in support for the ESP8266, which allows the Micro:bit to communicate with the ESP8266 using a serial connection.

Once the connection is established, the Micro:bit can then send and receive data over Wi-Fi using the ESP8266. This allows the Micro:bit to connect to the internet and interact with other devices or services, such as sending sensor data to a cloud service or receiving commands from a smartphone app.

It is also possible to use the ESP8266 to create a standalone Wi-Fi access point and web server, this way the Micro:bit can be controlled remotely via a web interface.

5V/3.3V power supply module

A 5V/3.3V power supply module is a device that converts a higher voltage, typically 12V or 24V, into a lower voltage, usually 5V or 3.3V, which is required by most microcontrollers and other electronic devices. These modules are commonly used in projects that involve microcontrollers like the Arduino and Raspberry Pi, as well as in IoT and other electronic projects.

THE 5V/3.3V power supply module is particularly important when using the ESP8266 Wi-Fi module, as the ESP8266 requires a stable 5V power supply in order to function properly. The ESP8266 is a 5V device and using a power supply that is not providing the correct voltage can damage the device or cause it to malfunction.

DHT11

The DHT11 is a low-cost humidity and temperature sensor that can be used to measure relative humidity and temperature. The sensor uses a capacitive humidity sensing element and a thermistor to measure the surrounding air, and provides a digital signal output.

The DHT11 sensor is a 3-pin device, typically:

  • Vcc, which is connected to a power supply (usually 3.3V or 5V)
  • Data, which is the digital output pin that provides the sensor readings
  • GND, which is the ground pin

The DHT11 sensor provides a relative humidity measurement with an accuracy of +/-5% and a temperature measurement with an accuracy of +/-2°C. It is a low-cost, low-power sensor that is commonly used in projects such as home automation and weather stations.

To use the DHT11 sensor with the Micro:bit, the sensor must be connected to the Micro:bit‘s pins. The DHT11 sensor typically has 3 pins: Vcc, Data, and GND. The Vcc pin should be connected to the Micro:bit‘s 3V3 pin, the Data pin should be connected to one of the Micro:bit‘s digital I/O pins, and the GND pin should be connected to the Micro:bit’s GND pin.

Once the sensor is connected, the Micro:bit can be programmed to read the temperature and humidity data from the sensor. There are libraries available for Micro:bit that can be used to read data from the DHT11 sensor, such as DHT11 Micro:bit library. This library provides a simple API for reading temperature and humidity from the DHT11 sensor.

It is also possible to send the data obtained from the DHT11 sensor to the cloud using a wifi module such as ESP8266, this way the data can be accessed remotely, and it can be used in other applications.

Overall, using the DHT11 sensor with the Micro:bit is a great way to measure temperature and humidity in a variety of projects. The Micro:bit‘s small size, low cost, and ease of use make it a great choice for collecting sensor data, while the DHT11 sensor provides a low-cost, easy-to-use solution for measuring temperature and humidity.

Test plate

A test plate, also known as a prototyping plate or a breadboard, is a device that is used to build and test electronic circuits. It provides a convenient way to connect components such as resistors, transistors, and LEDs, without the need for soldering.

Connecting wires

Connecting wires are used to connect electronic components in a circuit. They are typically made of copper and are coated with insulating material to prevent electrical contact between the wires themselves or between the wires and other conductive materials.

Mounting:

To perform the assembly

For ESP8266 :

  • the RX pin to Pin P0 of the Micro:bit card

  • the TX pin to Pin P1 of the Micro:bit card

  • the GND pin to the GND of the Micro:bit card

  • the two pins 3V3 and EN to the 5V pin of the power supply module

For DHT11 sensor:

  • the DATA pin to P2 of the Micro:bit card

  • the VCC pin to the 3.3V pin of the Micro:bit card

  • the GND pin to the GND pin of the Micro:bit card

The temperature values sent by the Micro: bit card to the thinkspeak.com site

The humidity values sent by the Micro: bit card to the thinkspeak.com site

Makecode Program




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top