Difference: ArduinoSensor (2 vs. 3)

Revision 32016-10-18 - TomErikHaugen

Line: 1 to 1
 
META TOPICPARENT name="LblDaq"

Arduino Sensor Circuit

Line: 12 to 12
 

Sensors

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,

Changed:
<
<
  1. SCK --->
  2. VDD --->
  3. GND --->
  4. SDA --->
>
>
  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.

Line: 27 to 28
  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.
Changed:
<
<
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.
>
>
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 can only read once every 4 seconds. However the current program actually only reads the sensors once every 10 seconds as we do not need more data than that.

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 using the following formula

dewpoint = 243.04*(log(RH/100) + ((17.625*temp)/(243.04 + temp)))/(17.625 - log(RH/100) - ((17.625*temp)/(243.04+temp)))
 
Changed:
<
<
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.
>
>
This is derived here and given in equation (8).
 

Read_Serial.py

Line: 39 to 44
  The Arduino is restarted whenever the serial connection is opened, so the header labels for the Arduino data will be printed whenever Read_Serial.py is run, and the reading does not happen when the serial port is not open.
Added:
>
>
The python script reads the serial port and waits for the first output from the Arduino (which is "Begin"). This is because there is often some left over gibberish that is read right when the serial port is open, so now it waits until the serial communication is actually ready. The python script also adds a timestamp to the data output, so the output should look like this:

hour minute second temp1 temp2 dewpoint1 dewpoint2

This is all saved to a file, titled "Output_Month_Day.dat" where month and day are the month and day when the script was run. Running the script multiple times on the same day will just append to the current file for that day and not recreate it.

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

Comments

<--/commentPlugin-->
Changed:
<
<
META FILEATTACHMENT attachment="temp_humidity.ino" attr="" comment="" date="1476297608" name="temp_humidity.ino" path="temp_humidity.ino" size="4780" user="TomErikHaugen" version="1"
META FILEATTACHMENT attachment="Read_Serial.py.txt" attr="" comment="" date="1476297608" name="Read_Serial.py.txt" path="Read_Serial.py.txt" size="264" user="TomErikHaugen" version="1"
>
>
META FILEATTACHMENT attachment="temp_humidity.ino" attr="" comment="" date="1476817691" name="temp_humidity.ino" path="temp_humidity.ino" size="4778" user="TomErikHaugen" version="2"
META FILEATTACHMENT attachment="Read_Serial.py.txt" attr="" comment="" date="1476817500" name="Read_Serial.py.txt" path="Read_Serial.py.txt" size="667" user="TomErikHaugen" version="3"
 
META FILEATTACHMENT attachment="README.txt" attr="" comment="" date="1476297608" name="README.txt" path="README.txt" size="1862" user="TomErikHaugen" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback