connecting 1-wire temperature sensors
The 1-wire protocol allows us to connect numerous 1-wire sensors on the same digital pin since the individual 1-wire sensors are addressable. 1-wire temperature sensors have 3 pins, a power line(red), ground(black/green) and data line (yellow/white) in the diagram below.switching on parasitic resistors
A 4.7k parasitic resistor is required between the data line and power line with this temperature sensor as shown below:
Connecting 1-wire digital sensors to a v2 controllers is also very easy as well. There are 6 pins D26, 27, 28, 29, 30, 31 that have an on-board switch-able 4.7k parasitic resistor connected.
Pin D26 will be used for connecting the temperature sensor to the v2 controller as shown below. The switch 1 is flicked onto the ON side to activate the 4.7k parasitic resistor on the v2 controller as shown below:
This is shown below with the sensor wires connected on the board
checking your sensor data remotely
Power up your v2 controller and ensure that it is has a unique hostname and that it is connected to your wifi network. Check that your controller is sending data by checking that it shows up as an active device in this active device listing typically shown below: (devices in red are offline)
Clicking on the middle visualization field will give you the latest json reading of your v2 device as shown below if you have not opted into the v2 visualization services yet. a typical raw v2 device data forjson output is show below. the nuturientTemp entry in the record comes from the our 1-wire sensor.
1-wire configurations can support multiple sensors. If a second 1-wire temperature sensor is connected in parallel to this one it will appear as the roomTemperature in the json raw file data.
visualizing your sensor data
To see better v2 visualizations, you have to opt in by registering your device as shown in the screen below:.
This is still under development so for the moment, only your unique device name is required in the ‘name’ field. Then submit (this will redirect to a Google maps screen not being used at the moment).
mapping your sensors to pins
Click on the following url so we can now map our temperature sensor. a typical example is show below:
There are two dropdown menus, one that shows all pn data received and the other sensors supported by the v2 platform. The first 1-wire temperature sensor will shows up as the nutrientTemp as seen in the last entry above, map this to temperature_sensor on the sensor and click on the ‘add sensor mapping’ button. the second 1-wire temperature sensor would appear and roomTemp in the pin drop down menu if one was connected as well and required mapping.
interactive sensor icons
after mapping pins to sensors, the first sensor visualization can be seen using this jade url (remember to change to last part to your unique v2 controller name) . A typical mapped temperature sensor is show at the bottom of the list. Other sensors connected on the v2 controller board are also mapped. The colors of icons change base on the value of the data received.
changing sensor setpoints
trending your sensor data
visualizing your sensor data as graphs is easy using the v2 controller platform. click the following link to go to the grafana based graphing tools. shown below:
click on the graph title then ‘edit’ as shown
click on the series button and type in the first few letters of your controller name for it to show up on the list (it is case sensitive). next click on the value part to bring up all your controller pin names. for the temperature sensor, select (nutrientTemp or whatever name your temperature sensor pin is called)
this should bring up a graph showing your temperature (or whatever sensor) that you choose in the values field as shown below. click on the ‘Back to dashboard’ link to return to the main graph area to see temperature sensor trends.