IoT Electronics

This is a project outline of an IoT system I'm creating to install into off-grid environments, in my case a motorcaravan. The whole purpose is to be able to make standard modules to monitor and control the different components without having buy different 'off the shelf' systems to do individual parts of the solution. I hope that it provides inspiration to create something similar or to adapt and improve on my efforts.

 

To this end it consists of a core microcontroller element, the ESP8266, to which other sensors and actuators can be connected in a standard way. The software to run this is aimed at being a single image easily adaptable and customisable to the various configurations required. The initial version requires some basic customisation and then loading of the software onto the microcontroller but the next stage is to provide a web customisation feature so that the image can be loaded as default and then setup as required. Communication with the microcontroller under normal operations is via MQTT over wifi, but has also been tested over wired Ethernet on Arduino. I haven't tried bluetooth yet but definitely will with the appropriate controller.

 

A primary objective has been to keep costs as low as possible, low power consumption and size, so to this end the main target platform is the ESP01 version of the ESP8266, an implementation which is very common, low cost and is already extensively used in IoT implementations.

 

It's not very big and has limited connectivity, but does have loads of processing power and inbuilt wifi. It runs from 3.3 volts so needs a power supply to be fitted to enable it to run with 12V or 24V systems. As many of the other electronics either requires or can use 3.3V this doesn't present to many problems. 

This implementation does not have significant security which anyone using this version should be aware of, it's only as secure as your wifi is.

 

The primary interface for this design is I2C, so any I2C compatible modules should be useable, and many which I think useful have been included already. It also includes implementations for onewire devices which are useful, especially where their unique construction makes them essential, such as external temperature sensors or liquid monitors. The ESP01 can provide serial connectivity, and this is used to communicate with modbus compatible equipment, STM8S103 relays and a bluetooth sensor.

 

 

A list of supported devices is here but more detail is in separate sections for the implementation of each one.

ESP01 - core processing, wifi transmitter

MP2307 based buck-boost power convertor

The following has been tested and the code currently supports.

INA219 single voltage and current sensors to monitor battery usage and charging (I2C)

INA3221 triple voltage and current sensors to monitor battery usage and charging (I2C)

BMP280 - temperature and pressure monitor (I2C)

MAX435 - to interface with industry standard components such as solar controllers (Serial)

DS18B20 - robust temperature sensor (Onewire)

DHT11 - temperature and humidity monitor

ADS1115 - quad precision voltage sensors (I2C)

PCF8574 - digital input/output module, can be used with normal switched relays (I2C)

PCF9591 - quad voltage sensors and a single voltage output (I2C)

MCP4725 - single voltage output (I2C)

STM8S103 based relays (Serial)

OLED Display (I2C)