Intro: Node MCU With Three DS18B20
Hi. This is my first project, but second Instructable.
This is a project I made for weekend house, which is small but on two floors. It is quite unhandy to go up and down just to see temperature in every room, so I had to do something. So this project is result of my pure lazyness :-) Two indoor sensors and one outside, with LCD for read out and WiFi access point and HTTP output for read out when I'm on "wrong" floor.
This project uses Node MCU v0.9 (the first one I ordered, quite nice and stable), two DS18B20 sensor boards and one waterproof DS18B20, one 20x4 serial LCD (blue one, I don't like yellow), ethernet cable, bunch of wires, one 4K7 Ohm resistor, one mini breadboard and industrial electro-installation box. And heat-shrinking tube for insulation.
This project is pretty simple, as it doesn't have any fancy hardware, and Visuino scheme is simple and really straightforward.
Only problem I have encoutered is with connecting one DS18 sensor through ethernet cable. Ground and power were working great, one wire for each - but signal didn't work. As I'm not good with electronics (just messing with it, no background knowledge, so please understand that part), I didn't know how to fix this problem. And fix is made by accident - two wires are connected on breadboard side (two from ethernet cable, brown and green, together in one hole on breadboard), but four are connected on sensor side (four - brown, green, stripped brown and stripped green). Messing with naked wires and accidental touch to connection made thing work. I guess it is resistance matter, but I'll just have to dig in a bit more before I figure it out :-)
Step 1: Hardware Connection
As I already said, connection is simple, serial LCD is connected to D1 and D2 pins, ground floor sensor is connected to D3 pin, first floor sensor to D4 and outside sensor is connected to D6 pin. Connection to D5 pin caused Node MCU to reset all the time.
Indoor sensors doesn't need 4K7 resistor, as it is already soldered on that tiny board, but outside waterproof one need it. So I used Google, found out that it's best to solder it between power and signal wire, and I did so. It worked out just fine. To avoid any hot-wiring, it is insulated with heat-shrinking tube.
This is 4 different modules that require 5v power and GND pins, and Node MCU has, of course, only one 5V pin. So I have connected all to mini breadboard, 5V on one rail and ground to another, and all is connected to Node MCU to respective pins.
As I made to my other project, this LCD serial board also got mini switch instead of jumper for LED, so it can be turned of and on as you wish.
Step 2: Software Setup - Visuino and Visuino Only
I don't know how to make Arduino code. Without Visuino, I wouldn't even try to make things like this.
It's easy to make Visuino sketch for project like this, especially while looking at Boian's Instructables. For some parts it is just needed to make connections multiple times and to different pins, but that's about it :-) Easy.
Full Visuino sketch is attached, and all I can say it is simple and easy to read.
Step 3: Closing It All, Installation and Plans
The case is simple electro-installation box. Gray. Ugly gray. So ugly I decided to paint it in some nicer color, but it is on hold at the moment as I really want to do it good and weather doesn't allow me.
I have added foam inside, which holds all wires and Node MCU in place, as I didn't want to glue it - this way I have access to all in future - insted of wasting fourth row, I will install RTC with display in that row. One thing that I have in mind to do is add AC-DC converter inside the box, so I can ditch external USB power supply, but that will wait for a while, as I really need to learn more about Arduino boards and that AC-DC converter (I don't want to fry this board, it works really well).
The last thing I need to do is install it in house, drill two holes (one by window for waterproof sensor, one between floors for second floor sensor), fix the box on the wall, and just plug it in. When I complete this last step, I'll add pictures here :-)