We can attach wide range of Analog and I2C sensors to TQL SensorHub. The following are the steps to add additional Analog sensors to the TQL Sensor Hub
- Most of the analog sensors have three pins the Analog pin, Voltage pin and Ground pin. For example consider the Keyes ADC thermistor KY-013 shown in the Image below.
- To add the above sensor to TQL Sensor Hub Connect the Vcc pin to Vcc terminal, Ground pin to Ground terminal and signal pin to A2 terminal of the TQL Sensor Hub using jumper wires, this terminals are illustrated in the image below.
- Using a browser, Google Chrome is recommended, open the webpage using the URL http://192.168.0.1:8080/fid-smartfarmui/app/index.html.
(Note: the above step assumes you are connected to SmartFarmGateway Wi-Fi network)
4. Select the appropriate Sensor Hub, to which you have connected the temperature sensor in the above step. Use the Mac address to identify the sensor Hub.
5. click on the Sensor Profile button, then add the appropriate sensor profile, in the opened pop up window, then click on Update button and then on close button after that.
A sample sensor profile for the above temperature sensor is given below.
Code Block | ||||
---|---|---|---|---|
| ||||
<SensorProfile> <Sensor> <Id>1</Id> <Type>ADC</Type> <Resolution>12</Resolution> <SensorFormula>Sensor[0]</SensorFormula> </Sensor> <Sensor> <Id>2</Id> <Type>ADC</Type> <Resolution>10</Resolution> <SensorFormula>Math.abs((Math.round((1/(0.001129148 + (0.000234125 + (0.0000000876741 * Math.log(1000.0/((1024.0/Sensor[0] - 1))) * Math.log(1000.0/((1024.0/Sensor[0] - 1))) ))* Math.log(1000.0/((1024.0/Sensor[0] - 1))) )) - 273.15 - 5) * 100)/100)</SensorFormula> </Sensor> <Sensor> <Id>3</Id> <Type>ADC</Type> <Resolution>12</Resolution> <SensorFormula>Sensor[0]</SensorFormula> </Sensor> <Sensor> <Id>4</Id> <Type>ADC</Type> <Resolution>12</Resolution> <SensorFormula>Sensor[0]</SensorFormula> </Sensor> </SensorProfile> |
6. Now reboot the sensor hub.
7. In the Sensors table create one more entry select ID as 2, Sensor type as Temperature Sensor, enter some min, max and radius values and click on the Add button button beside it.
(Note: Since we connected to terminal A2 we use ID as 2, If we connected to terminal A3 or A4 we should use ID as 3 or 4 respectively)
8. After sometime you can see the temperature sensor value being populated as shown in the image below.
Sensor List
Below are the links to few ADC Sensors that can be used with TQL Sensor Hub
- Temperature sensor- http://www.ebay.com/itm/1Pcs-KEYES-KY-013-Analog-Temperature-Sensor-Module-FOR-The-ARDUINO-AVR-PIC/281783027817?_trkparms=aid%3D222007%26algo%3DSIM.MBE%26ao%3D1%26asc%3D20150313114020%26meid%3Dd4c4a5ebc038411eb4e317a252c87cbb%26pid%3D100338%26rk%3D5%26rkt%3D30%26sd%3D172167904858&_trksid=p2141725.c100338.m3726
- Temperature senor https://www.amazon.com/SunFounder-Thermistor-Sensor-Arduino-Raspberry/dp/B014KNVSHG/ref=pd_rhf_dp_s_cp_6?ie=UTF8&pd_rd_i=B014KNVSHG&pd_rd_r=F79R5K7DNM6PF80EWY8W&pd_rd_w=ANzaT&pd_rd_wg=FMBOk&psc=1&refRID=F79R5K7DNM6PF80EWY8W
- Humidity sensor- https://www.sparkfun.com/products/9569
Light sensor -https://www.sparkfun.com/products/8688
we will also be needing Jumper wires, Breakaway headers to connect these sensors, you can find jumper wires at this link https://www.amazon.com/gp/product/B014SE32EE/ref=pd_sim_147_2?ie=UTF8&psc=1&refRID=P79ZPG8YCKVTBAXD5RRD and Breakaway headers at this link https://www.amazon.com/gp/product/B008999TAG/ref=pd_sbs_23_1?ie=UTF8&psc=1&refRID=8F8BF00J3W5ADFNNZYZG