- Red Wire: from 3.3v of Raspberry
- Black Wire: ground from Raspberry
- Yellow: PIN 1-Wire (as IN) from Raspberry (7th?)
- Brown: PIN 17 (as OUT) from Raspbery
The pull-up resistor used to drive the DS1820 is a 4.7K.
On the 17 PIN of the Raspi I connected the base of a 2N2222A (diode only for testing, later I will connect a relay).
The GPIO 17 pin is configured as an output pin, so it can drive current through the base of the transistor, thus lighting the LED.
The sensor functions perfectly and I can monitor the ambient temperature very well. A bash script checks if the room temperature reaches >= 28°. In that case the LED is on, otherwise the LED is off.
Here are my questions:
- Is the LED (circuit) in parallel with the DS1820 (circuit)?
- The LED is quite dim. If I leave out the 330 resistor, the LED is very bright (and not burning).
- Since I have 2 circuits (LED + DS1820) and I am driving the LED with a 300 Ohm resistor, do I need to change the resistor at the DS1820 or is it drawing the right current?
- What kind of tests do you recommend? (E.g. "Measure the current between X and Y, if it is > of xxxA then.........") etc etc.