8 minutes reading time (1683 words)

Project S1.4 - Control panels

Person_looking_at_smartphone_in_the_dark_2

As I mentioned in UPDATED: My Home Automation Roadmap, I found that controlling lamps with remote switches is an easy and efficient method of bringing dumb lamps into the smart home fold. However, it introduces a new issue, I don't want to have to pull out my phone every time I want to turn one on or off. Imagine needing to get up in the middle of the night and having to find the phone in the dark, blinding yourself when you turn the screen on, finding the app and the lamp in the app and flipping it on ... all while trying to stay somewhat asleep. Enter, control panels.

Overview

It seems strange to remove local control of a lamp and then having to make something to bring it back. Seems counter productive - and if all you were going to do with it was turn the lamp on and off when you wanted it, that's entirely true. Don't bother adding the wireless control. A lamp works just fine as a lamp.

However, if you want to do more, then one necessary evil in adding the wireless switch is putting back the basic functionality that we all want in a lamp and maybe expanding it in the process. This project is actually several projects in one centered on a central platform that can then be modified based on need to do slightly different things.

 

20190207 134133 resized MediumThe Core

State: Beta - Version 0.5
Code: Alpha - Version 0.2

Hardware

At the core of this project is a ESP8266 chip that handles all of the processing and wireless communication all in one nice small package. Not to mention, it is very inexpensive. Depending on how you decide to incorporate it, the base parts can be had for as little as $2 USD. For my beta versions, I am using the ESP8266 on a NodeMCU development board which makes prototyping very easy and fast.

The core has the following requirements that may or may not all be used for each sub-project as needed:

  1. Take inputs from 6-8 buttons / inputs
  2. Display data on a small OLED screen
  3. Control an AC relay for controlling a low current (15amp max) house voltage device like a light, fan, etc
  4. Take in on variable analog input (for data collection, variable resistor input)
  5. Must be able to be powered by AC house voltage and if powered by AC, contain safety circuitry for overload protection

These sets of parameters is the framework I use to write the code for the processor and while limited, can be reconfigured in a wide range of use cases and incorporated into appliances.

CP1 bbThe wiring is pretty simple and shown below but to summarize, the ESP8266 has 13 usable digital I/O pins and 1 analog pin. Of those 13, there are some limitations and considerations for 8 of them so, the use case of the core can impact which pins are used so, my code allows for choosing which pins are used. I designed the core to use:

  • At least six as digital inputs
  • One pin is used as a digital output to control a relay.
  • I am using two of the remaining 6 for I2C communication to the screen.
  • I'm using the analog input with a LDR for dynamic screen dimming.

That leaves four digitial I/O for expanded use cases. There are some really good resources for pin configurations for the ESP8266 and some are here:

Code

The code is very early in development but basically this device communicates via MQTT over WiFi. State changes are transmitted in real time and the device can subscribe to MQTT topics for display on the screen or to toggle the AC relay. When the code reaches beta level, I'll release it on GitHub but for now, it is really basic and simple. The overall goals are as follows:

  • MQTT based communication
  • Definable I/O assignments
  • Modular device configurations
  • Web interface for settings config
  • WiFi adoption via default host on first startup

 

IMG 3015 MediumProject S1.4-A - Bedside Control Panel with Wireless Phone Charger

State: Alpha - Version 0.4

This project was the third to be devised but the first to be implemented and tested. The scenario above is exactly why I decided to move this one to the top of the list. This device adds a self contained wireless charger kit from China to the Core and the Charging LED was converted into an input for the Core. Additionally, I use this control panel to raise and lower the head of the bed through a relay board I built separately. (more to come on that project)

20190204 203647 MediumI designed and printed a box for one side of the bed for initial testing. Once it was pretty clear that I didn't make any critical design errors, I mirrored the design and printed it for the other side. The designs are on my TinkerCad profile as listed below. Please note that this is a early proof of concept design and is not the final finished design. It works as is and we've been using them for a couple of months without issue but you're mileage may vary as they say. I've also posted the super basic POC code on my GitHub profile as well. Please don't send me messages detailing how terrible the code is as I know - it's not finished.

But here is a quick rundown:

  • Choose a side to print (not were the power plug is as that is the "back" of the device)
  • There are 3 small items that are spacers for different uses a long bar that you'll need two of as a set of stand-offs for the buttons and one F shaped stand off to raise the perf board for the NodeMCU. The final U shaped stand-off is to separate the charging board from the coil. I used this in my first box but not in the second - I had enough space to mount the board next to the coil.
  • I used hot glue to affix all of the components in place but other glues and methods that are non-conductive should be fine as well.
  • Use the circuit diagram below to wire the control panel. I used breadboard style perf board for the main board for simplicity but used standard no-trace perf board for the buttons. I wound up using two as I didn't have one that was wide enough.
  • NOTE: Check your spacing of the buttons before you affix them as the holes in the enclosure aren't based on the standard perf board hole placement.
  • Remove the charging LED on the charging board by heating it up with a solder iron tip and then solder a wire to the + side. This will be the input to the processor for charging status.
    NOTE: Measure the voltage from this line with respect to ground. I received a pack of 4 of these and of the two I've built, one outputs 5 volts on that line and the other, 3.3. If the output is 5V, you'll need to use a voltage divider to lower the 5V to 3.3 before connecting it the ESP8266 lest you risk burning out the input and possibly damaging the processor altogether.
  thumb 20190204 113946 Medium 20190204 161329 Medium  20190204 162100 Medium  20190204 162119 Medium 
  20190204 202031 Medium   20190204 202543 Medium   BedsideCP1 bb  

Resources:

 

Project S1.4-B - Countertop Control Panel

State: Pre-Alpha - In development

Similar to the bedside control panel listed above, the countertop version is intended for central locations in the house. As this unit is still in the initial design stage, there are some aspects that I haven't decided on yet but I am considering the following:

  • Simple - Very basic stripped down 8 button version with no screen or chargers.
  • Media Charging Hub - Same configuration as above except that instead of a wireless charger, it will include USB charging ports for tablets and phones that is both standard 5v and the fast charging 9v as well.
  • Data Gathering - A combination of 6 button CP with the unit I'm designing for Project S1.8 - Indoor Environmental Sensors

In the end, I may design each of these three as separate projects. More to come on this one.

 

thumb 20180506 105608 MediumProject S1.4-C - In-Wall Control Panel

State: Pre-Alpha - In development

This project is wrapping up initial design. Ordinarily, I'll create a very simple proof of concept device and test attributes along the way but due to the riskier nature of this device, I have been proofing individual components and ideas in blocks during the design. My full proof of concept device will start out as a fully designed device that has had individual components stress tested before construction. My goal is to prep this device for UL listing. I'm not sure how I'll pay for it considering the price tag but I'd like to market this product in the future.

Without giving too much away, the goals of this project is to have a MQTT based in wall switch with multiple buttons for controlling more than one device - including the AC circuit it is connected to. There are two versions of this device in development - one with a screen for displaying data per the user's specification and another without.

 

Project S1.4-D - In-Wall Control Panel with Dimmer

State: Pre-Alpha - In development

This project is in its early design stage. The goals of this project is similar to the project above but also incorporates a dimming circuit instead of just on/off control of the circuit.

 

Project S1.4-E - In-Wall Three-way Switch Control Panel with Circuit State

State: Pre-Alpha - In development

This project is wrapping up initial design. The goals of this project is similar to the project S1.4C above but is designed to be one node in a three-way switch configuration. The three-way part is simple enough. The challenge is in creating circuit that can detect the state of the load without injecting voltage in the line as some devices in this category do.

0

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
Thursday, 25 April 2019

Captcha Image