An Industruino customer asked us for help with implementing a timer system for a UV disinfection system. The user inputs a delay time and a runtime, and activates the system to switch on the relay after the delay time, for the set runtime. A buzzer beeps during the countdown. 2 PIR motion sensors can interrupt the runtime. Total runtime is logged to EEPROM.
This application uses an Industruino PROTO with a 32u4 topboard. We used the prototyping area to install the buzzer and the ESP8266 wifi module with a dedicated 3.3V regulator, as the module can draw up to 500mA.
The picture on the left shows the first prototype, with all the components on a breadboard, and using the green screw connectors on the Industruino to access the Arduino pins. This allows for very easy prototyping without any soldering.
As soon as the prototype was working, we soldered the components on the PROTO baseboard.
This picture shows the components installed on the PROTO baseboard, with the white wires in the front connected to the clearly marked Arduino pins.
On the top left you see the ESP8266 wifi module (ESP-01 version) with a pull-up resistor on the CH_PD pin. This module communicates with the Arduino over Software Serial, using only 2 digital pins for RX/TX and one pin for reset.
The 5V relay is housed in a separate DIN-rail casing to keep the 110/220V wiring away from the Industruino.
Below you see an overview of the hardware setup.
The unit can be fully controled with the 3 buttons on the Industruino membrane panel, but the customer also wanted wireless control.
The first prototype used the ESP8266 standard firmware with AT commands to run the web server from the Arduino code. This only allowed for very minimal web pages due to the limited memory available on the 32u4 topboard, and also caused glitches do to the multi tasking of the Arduino.
The second version implements a dedicated web server on the ESP8266, programmed in the Arduino IDE (version 1.6.5 with a special extension for ESP8266 boards). This allows for much smoother and reliable operation of the system, and slightly more fancy web pages. The ESP8266 and Arduino exchange simple status messages and parameters over the serial connection.
The ESP8266 creates a WLAN access point with a specific name and password, which can be accessed from phone/tablet/laptop over wifi, at a specific IP address.
The screenshot on the left is the web page in a Chrome browser; below is another web page on iPad. Note the web server uptime is more than 14 hours.
If you are interested in custom code for your Industruino projects, contact tom@industruino.com