Adding Additional Sensors to TQL Sensor Hub

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


  1. 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.



  2. 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.



  3. 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.



Sensor Profile
<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