Arduino Sensor Circuit

A simple temperature and humidity sensor has been set up to monitor the environmental conditions of the testing chamber. This page goes over the hardware and software of the monitor system, if you want to know about running the dry air and cooling system refer to the environmental controls TWiki page.


Arduino Uno

The monitor system is run by the Arduino microcontroller, currently using the Arduino Uno. The Arduino is connected to the computer with a USB A to B cable, and communicates with the computer through a serial port.


The Arduino is connected to 2 identical SHT75 sensors. Each has 4 pins: a clock pin (sck), a 5V power pin (VDD), a Ground pin (GND), and a data pin (SDA). The pinout is shown below,

  1. SCK --->
  2. VDD --->
  3. GND --->
  4. SDA --->
All of the sensors are connected to the same ground and 5V power pins on the Arduino. Currently they both have seperate SDA and SCK connections, however as the circuit gets updated (e.g. if more sensors are needed) the SHT75's should all be able to share an SDA bus and have seperate SCK connections. Since the Arduino can only communicate with one at a time there should be no problem sharing a data connection.

These sensors have a similar protocol to I2C for communication, but note that it is not an I2C connection. The seperate sensors do not have individual addresses.


There are two major component programs, one is loaded to the Arduino itself, and one reads the output.


The Arduino code for reading the SHT75 sensors, this code is largely copied from this site. There are a few updates to the code, most of which revolve around having multiple sensors.

To avoid sensor self heating the sensors cannot be running more than 10% of the time. The combined time of querying the temperature and the humidity takes 0.400 seconds per sensor, therefore the sensors are only read once every 4 seconds.

The temperature and humidity are measured separately in degrees Centigrade and percent relative humdity. added in a line of code (getDewPoint) that calculates the dew point from these measurements.

The Arduino communicates through a serial port (ttyACM0)to the computer. It is very simple to read a serial port with a python script, however there are 2 possible problems to run into.

  • The serial port itself does not exist until the Arduino is plugged into the computer, so running the python script will not work unless the Arduino is connected.
  • The serial port has automatic protections on it that make it unreadable. To remedy this enter sudo chmod 666 /dev/ttyACM0 to change the permissions on the port as the superuser (this will require the password)

The Arduino is restarted whenever the serial connection is opened, so the header labels for the Arduino data will be printed whenever is run, and the reading does not happen when the serial port is not open.

-- Tom-Erik Haugen - 2016-10-12


Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt README.txt r1 manage 1.8 K 2016-10-12 - 18:40 TomErikHaugen  
Texttxt r1 manage 0.3 K 2016-10-12 - 18:40 TomErikHaugen  
Unknown file formatino temp_humidity.ino r1 manage 4.7 K 2016-10-12 - 18:40 TomErikHaugen  
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2016-10-12 - TomErikHaugen
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback