GithubHelp home page GithubHelp logo

dciliberti / dht22_5sensor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 4.36 MB

This project shows how to use MATLAB and Arduino to acquire and fix data from a bundle of DHT22 sensors, live plot, and export the results.

Home Page: https://create.arduino.cc/projecthub/dancili/test-dht22-sensors-with-arduino-and-matlab-74e81d?ref=user&ref_id=238025&offset=1

License: GNU General Public License v3.0

C++ 22.82% MATLAB 77.18%
arduino matlab environment

dht22_5sensor's Introduction

Test DHT22 Sensors with Arduino and MATLAB

This project shows how to use MATLAB and Arduino to acquire and fix data from a bundle of DHT22 sensors, live plot, and export the results. This project has also been uploaded on Arduino Project Hub.

More details

Have you bought a bundle of temperature and humidity sensors and you have to pick up one for your project? Aren't you sure of their readings? Do you need to correct the acquired data? This project may help you!

I have been inspired by a MATLAB tutorial about live plotting the temperature data acquired with Arduino. I also have a package with 5 DHT22 sensors, which I wanted to test together, to see if they read the same values and they are within the tolerance limits established by the manufacturer.

The codes here uploaded should work flawlessly, provided that you have the required MATLAB packages and you have assigned the right serial port in the MATLAB script. Please, see the comments in the code.

Since the MATLAB code works with a loop, you may want to disable the Arduino reset when communicating with the serial port. Add a 10uf capacitor between GND and RESET, as explained here.

The data correction, useful to align the readings of the 5 sensors, was made by checking the live values with a laboratory instrument. In my case, the sensor number 5 was the only one that correctly read both humidity and temperature in several conditions. The other sensors measured different humidity values, but the same temperature. Thus, I have used data acquired in two tests from sensor number 5 to correct the humidity readings of the other sensors. In the code here uploaded this section is commented and MATLAB will plot and export data as they are acquired from the sensors. No user action is necessary. Please see the comments in the code and, if desired, edit the correction function according to your needs.

The DHT22 sensor should have a built-in resistor, but adding another 10 KOhm resistor is not a problem and should not alter the readings.

dht22_5sensor's People

Contributors

dciliberti avatar

Watchers

James Cloos avatar  avatar

dht22_5sensor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.