Since I have been using a ton of ESP8266 and ESP32devices in my projects I decided to look for a suitable server with a good track record. During my research I singled out Home Assistant coupled with the ESPHOME Add-on as my go to software.
The ESPHOME Add-on is perfect for my projects since it does not require a MQTT broker and supports both the ESP8266 and the ESP32 development chips.
Step 1: Install Home Assistant on a suitable device to act as the server ( in my case it was on a Raspberry Pi 4 B) Link to install instructions here.
Step 2: Setup Port Forwarding/Virtual Server for port 8123 and DMZ Settings + uPnP.
Step 3: Setup Duck DNS for your Home Assistant server.
Step 4: Restart Home assistant.
If you are using LTE with Telkom ( like me in South Africa ) be sure to set your APN to unrestricted …. link to tutorial here.
Once your server is up and running and using HTTPS instead of HTTP you can download the HA APP to your mobile device and insert your DuckDNS domain name into the Home Assistant URL field.
The DS18B20 is an electronic thermometer which has a high accuracy. Multiple thermometers can be connected on the same wire because every one has it’s own internal address. The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points.
Temperature range: -55°C to +125°C
Designed for : -10°C to +85°C (+- 0.5°C)
Unique 1-Wire Interface Requires Only One Port Pin for Communication.
Programmable Resolution from 9 Bits to 12 Bits
3 – 5.5V DC Supply Voltage
My version is a copy from the original Dallas version but it will still work with the Arduino Dallas 1 wire library. ( manufacturer 7Q-TEK )
Read more about the fake, counterfeit or clone DS18B20 sensors here.
Recently I have been working on a remote battery monitoring system. Hardware + the software side of things. During my research I played around with a few store bought sensors and some small homemade sensors. Surprisingly it’s quite easy building simple analog sensors with minimal waste and a reliable working order.
The biggest challenge has been fitting all the sensors on a small PCB and picking a MCU development board with minimal trade offs.
After some time I decided to go for the Wemos D1 Mini and an analog multiplexer to handle all the analog signals.
The three sensors I chose are Voltage divider ( homemade ), Current sensor ( store bought ) and a LDR ( homemade ).
In a future post I will show a relatively compact PCB with an MCU, wireless connection and voltage, current, watts, temp, light, onTime, WiFi signal plus send/receive data collection points.
In some cases you will have a MCU with only one analog pin (A0). For example in my case I have the Wemose D1 mini with only one analog pin (A0) however I would like to increase these pins with the MC14051B Analog Multiplexer/Demultiplexer. This is a cheap easy fix but the downside is that it requires an additional chip (the MC14051B ).
The MC14051B analog multiplexer is a digitally–controlled analog switch. The MC14051B effectively implements an SP8T solid state switch, the device feature low ON impedance and very low OFF leakage current. Control of analog signals up to the complete supply voltage range can be achieved.
I created a small breakout board to make testing and experimenting a little easier.
More information about increasing analog pins can be found here.
The Wemos D1 mini is a small WiFi based development board. The board is based off of the ESP-8266EX MCU developed by Espressif . The dimensions are 34.2*25.6 mm which allows this small package to be used effortlessly in large scale applications. Shields are also widely available and add to the ease of use for this board.
11 digital IO, interrupt/pwm/I2C/one-wire supported(except D0)
1 analog input(3.2V max input)
a Micro USB connection
Compatible with MicroPython, Arduino, nodemcu
Operating Voltage 3.3V
Digital I/O Pins 11
Analog Input Pins 1(3.2V Max)
Clock Speed 80/160MHz
Flash 4M Bytes
My specific board comes from a company called Farylink. It looks like they make small boards with wifi capabilitys.
According to there website:
Shenzhen Huayulian technology co., LTD is an IOT company that integrates rd, production and sales and is technology-oriented and service-oriented. With a rich background in the IOT industry, it focuses on the research, development and production of IOT communications.