Print
Category: Projects

 

If there was a microcontroller that you could describe as ‘fun’ it should surely be Espressif System’s ESP32 family. Packing the processing power of a Pentium from c. 1999 with Wifi + Bluetooth + many hardware I/O interface protocols, this thumb print sized CPU module on a thumb sized PCB with USB-Serial presents a great little platform. At around $10 for a basic one they are virtually free. Then for a few dollars more add a small screen to display user data, such as the WeMos Lolin32 OLED, you’ve got neat device hub for Internet of Things.

IoT enabled PLCs are available but they are somewhat expensive, and unless using an embedded PLC of some form, the IoT functionality can be rather limited. If one limitation is say not providing secure MQTT (aka MQTTS) then your MQTT data and the MQTT broker & server on the web are more at risk. Assuming the PLC can interface using IP or Serial (even the atrocious AB Rockwell protocols) then a very economical IoT Gateway can be put together using say a WeMos Lolin32 plus a Serial to TTL converter (e.g. MAX3232).

Why a microcontroller vs say embedded Linux? Well from hard knocks RPis and Beaglebones crash too often or the SD card gets corrupt and then they crash. Afterall this is Industrial Internet of Things not a ham IoT proof of concept.

The driver to this project was to provide a very cost effective logging and alarm platform with remote change capability and without the need to open Router ports; basically SCADA plus Change with some caveats. After dabbling with Azure and Google Cloud IoT it soon became apparent that to scale those up was going to be relatively expensive for database and run time. So after much shopping I settled on an Ubuntu Virtual Private Server hosted by interserver.net. So far (10 months) the basic $6/mth package has proven adequate and very reliable. As an aside the VPS also hosts the Apache + MySQL + Joomla with which you are viewing this page, plus Postfix and associated add-in modules for secure email. I'll post/blog somewhere what the config is.

 

Thirsty Nomad Brewing Data Logging

Thirsty Nomad Brewing LLC is a nano brewery in Charlotte that I happen to be one of the owners of and I’m the head-brewer come engineer and maintenance tech. The Fermentation Control at Thirsty Nomad Brewing LLC, Charlotte uses a Koyo CLICK PLC. [BTW I love CLICK PLCs for simple stuff!] ModbusRTU is natively supported by this PLC. In Slave (Server) mode the CLICK PLC responds to the master requests without additional PLC programming.

The basic topology of the system is:

 Basic Data Flow

 

ESP32 Lolin OLED + MAX3232 powered by 5VDC from CLICK RS232 Serial Port and housed in small box. Box is mounted externally to steel enclosure for WiFi reception.

 

 

Basic Dashboard for current Fermenter and Brite Tank data (plus change of settings) and Graphing of historian data from database.