Just need to ask a simple question as i am not very familiar with electronics. I would like to build a Temperature sensor for my aquarium and integrated it with Home Assistant. I have found this link that looks promising that uses a NodeMCU V3 and a DS18B20 sensor and ESP Home integration. The only difference is that i am planning to use this sensor
My question is, why do we need a resistor between the power and the data? Also, does it have to be a 4.7K or it can be as well a 3.3K? I have a 3.3K available at home from another project but the 4.7K is very difficult to find in my area.
It will work with a 3.3K pull-up. Particularly if you only have one sensor on the bus. If you have more it might self heat the sensors causing your readings to be very slightly high.
The upper limit
This gives us the upper limit on the resistance that works. It needs to be low enough, given the capacitance of the wires and attached sensors, to bring the voltage on the line high before the host checks the value. For a single device, and a short length of wire, 100k is likely low enough, 50k is low enough for 3 devices and a meter of wire (or thereabouts), or 1 device and 10m of wire. Also, you can cheat and attach a second pin in pull-up mode if you need more power delivery.
This assumes are are running a dedicated power line, using it in parasitic power mode you have to account for the power draw of the device on the other end, which willrequire looking at the applicable data sheets.
Thanks for the reply, although i have to admit that i have no idea what the pull-up is, i will give it a try with the 3.3K resistor i already have. Before doing so, i will try to go through the links you shared to educate myself better.
Thanks for your reply too i much appreciate it. However, the NodeMCU + DS18B20 costs 7.09€ and the kit on that same vendor costs 11.90€ which for the use of just one resistor (and maybe nothing else from that kit) i consider it too expensive.
The vendor had a box of several resistors that includes the 4.7K for just 2.50€ but is out of stock. I would be willing to pay that if it would be available!
for providing closure to the question above, i would like to let you know that it works with a 3.3K resistor as well. Already installed in the tank and measuring.
i am returning back to one of my older posts as i would like to update the sensor i have already built with a fan to cool down the tank during the warmer months or in case of a temperature increase.
Since the fan is going to sit on the aquarium lid, i will need a waterproof fan which usually are 12v. The idea here, is to power both the fan and the nodeMCU ESP8266 from the same 2A, 12v power supply.
Obviously, in the above image, a 12v power supply is used that feeds power to the fans and then it goes to step-down converter outputing 3.3v for the NodeMCU having a common ground.
My questions are:
Where do i connect the 3.3V (which pins) output from the step-down converter on the NodeMCU to power it up? I have exactly the one from the picture above.
Which pin can i use to send the signal to the fan to start?
Ok, i think i solved my first question. The difference is that on my setup, i have an ESP8266 and the on the other picture its and ESP32. So according to the picture below i should:
Step-down from 12V to approx 9V and plug it on VIN and Ground (right side top pins on the above picture). This will provide power to the NodeMCU without the USB.
The DS18B20 can stay as is with its positive on a 3.3c pin and negative on a ground. D7 can remain for data.
Remaining to be solved:
Where do i connect the data cable for the fan.
The code used in addition to what i have already
If all the above is correct, it should work, if not, then it will be a nice boom in the house!