User Tools

Site Tools


Milwaukee Makerspace Lighting Control System

Behind the furnace room light switch panel there is now an ESP8266 controller that reads the button presses and controls the various light zone via its firmware. The controller also enables the use of remote switches located in the lighting zones themselves. Further, for the east room only, a website is available to control zones 5, 6, and 7. (Member Pallets, 3D-Lab/Member Shelves, and Craft Area 2)

Furnace Room Light Control Panel

Furnace Room Light Control Panel

Remote Light Switch

Remote Light Switch

ESP8266 Master Light Controller

ESP8266 Master Light Controller

Operation Details

The ESP8266 Master Light Controller is a key component of the system. Both the furnace room push buttons and the lighting zone SSRs are wired directly to master controller. An Arduino sketch converts button presses on the furnace room control panel into signals to the SSRs. However, the master controller is also attached to the space's WiFi and listens for commands from remote switches via the MQTT protocol.

The Remote Switches, like the master panel, connect to WiFi. The Remote Switches also run an Arduino sketch but the sketch converts button presses into MQTT protocol commands meant to be picked up and acted upon by the master controller via WiFi.

Button presses from the furnace room panel will turns the lights on immediately. Once the lights are on, a long press on the button will start a five minute timer to turn off the lights. The buttons on the furnace room panel will blink while the five minute timer expires. The five minute timer is intended to give occupants of a zone warning that the lights have been commanded to go off in the event someone in the furnace room commands the lights off without realizing there is someone presently in the zone.

The remote switches, being located in the lighting zone itself, turn the lights on and off immediately with dedicated buttons. The remote switches display the status of the light zone on their integrated LCD panel. If a five minute timer is counting down due to a furnace room or website off command, the remote will blink and emit noise to alert any current occupants that someone outside the zone has commanded the zone to go off.

The website, for the zones it applies to, works similar to the furnace room panel in that lights come on immediately, but the off command starts the five-minutes-to-off timer.


Master Control Panel

The master control panel has provisions for eight zones. Currently seven zones are used:

  1. Welding Area / Forge Area
  2. CNC room
  3. Woodshop
  4. Metal shop
  5. Member Pallets
  6. 3D Lab / Member Shelves
  7. Crafting Area 2
  8. Spare

Remote Switches

As a practical matter you can have as many remote switches as desired. Any given zone can have any number of remote switches and all will work in cooperation. It is fairly easy assemble new switches. No soldering is required.

Remote switches consist of four main components:

  1. A generic micro USB charger

It is important to program the TTGO unit BEFORE it is assembled into the 3D printed case. After programming, press the middle button until the number in the upper part of the LCD display matches the zone you wish to control. (Consult the numbered zone list above.)

Programming is done with the ESP tool.

  • Follow the instructions to install ESP tool.
  • Connect a USB cable from the TTGO board to your computer
  • Determine which serial port it created. (This process varies by computer type)
  • Run the tool: –chip esp32 –port your_com_port –baud 921600 –before default_reset –after hard_reset write_flash -z –flash_mode dio –flash_freq 80m –flash_size detect 0x10000 ttgo_remote_switch.ino.esp32.bin

The 3D printed case is meant to be assembled with #2 1/4" screws.

Finally it is important to locate the assembled switch in the zone it will control.

If you'd like to go deeper you can find all the design documents at github. Note that TTGO remote switch is on the esp32 branch but the ESP8266 master controller that is running at the space is on the master branch.

projects/lightingcontrollerv3.txt · Last modified: 2019/03/31 00:18 by roycep