Difference between revisions of "1-Wire Hub"
From PhotoVoltaic Logger new generation
m (→Build) |
m |
||
Line 1: | Line 1: | ||
+ | {{TOCright}} | ||
== Abstract == | == Abstract == | ||
Line 19: | Line 20: | ||
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20. | If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20. | ||
− | == | + | == Draft == |
− | |||
− | |||
− | |||
− | |||
− | |||
So put all together to get an imagination. | So put all together to get an imagination. | ||
Line 35: | Line 31: | ||
The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line. | The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line. | ||
− | Put it all together and minimize | + | == Build == |
+ | |||
+ | * As small as possible | ||
+ | * Simple to build > breadboard platine | ||
+ | * Stable > Normal mode | ||
+ | * Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies | ||
+ | |||
+ | Put it all together and minimize. | ||
[[File:1-WireHubBreadboard.png]] | [[File:1-WireHubBreadboard.png]] | ||
− | (View from top | + | (View from top, printed circuits and soldering on the bottom) |
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires. | The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires. |
Revision as of 07:30, 5 March 2014
Contents
Abstract
I monitor here 3 1-Wire temperature sensors. (DS18B20 datasheet)
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.
Sensors and network
The DS18B20 temperature sensor can be powered by an external supply on the VDD pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply.
- In normal mode, each sensor is connected between a power line (VDD pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.
- Parasite power mode requires both DS18B20 GND (pin 1) and VDD (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.
http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing
http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html
http://datasheets.maximintegrated.com/en/ds/DS18S20.pdf
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.
Draft
So put all together to get an imagination.
Please note:
- Mind the diode and the resistor!
The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with 2 wires of the cable, to build a single long line.
Build
- As small as possible
- Simple to build > breadboard platine
- Stable > Normal mode
- Linear topology (according to this guidelines) > more stable than star topologies
Put it all together and minimize.
(View from top, printed circuits and soldering on the bottom)
The cyan, red and black thick dots are the soldering points for the upstream Data, +5V and GND wires.
Use a bit thicker telephone cable: J-Y(St)Y 2x2x0,8 for lower loop impedance.