Networked energy-metering nodes (at 10A 85-265VAC) nodes for home and building automation. And smart capacitive light switches, too!
Here are some more pics/video of the wall switch.
The wallplate has 2 separate touch-sensing zones, and LEDs for user feedback. AC power is supplied at 85-265VAC.
Each wall switch communicates its switch state via MQTT back to OpenHab (via the ESP8266 which powers the whole thing) and the actual switching (controlling power points, lights or whatever) happens at another connected device on the LAN.
Because the LEDs are RGB, under firmware control, tweaking the desired color in firmware is easy.
Fancier ideas (LED colour change in response to power measurement at that node?) are possible too.
This one is slightly modified from the previous iteration - the cheaper Atmel/Microchip ATM90E26 analog front-end is used, and mounting holes are added, and the board is tidied up a little bit while still keeping everything compact. But it's essentially the same functionality.
There are some files up in the Git repository now if you're interested in having a look at those.
Well, not everything is up quite yet... will be soon. Still an ongoing work in progress.
Looks good :)
It's not quite as sensitive as I'd like, but that can be improved by increasing the gain, swapping a couple of capacitors in the touch sensing hardware.
It seems to make an audible click in the video but it's actually silent. That's just the wall box (which is loose on my desk) rattling slightly when touched.
The energy-metering module is based on the Cirrus CS5463, with a shunt resistor providing the AC load current signal and a voltage divider providing the load voltage signal. But I might swap it over for the Atmel/Microchip ATM90E26 since it's substantially cheaper. The power data is read out by the MCU/wireless board via the SPI interface.
A pair of terminal blocks provide the line and neutral connections to both the AC supply and the load, and an offline switcher provides power to the system, just like the wall switch board. A 10A relay switches power to the load, with the logic-level relay drive passed down from the MCU, and 3.3V power supplied to the microcontroller board.
The RF communications component is implemented as a separate module, rather than an all-in-one single PCB. This means that the RF module can be swapped to support different types of networks and different chipsets - for example WiFi solutions from Broadcom or TI or Atmel, or the Espressif ESP32, or 802.15.4 solutions such as the TI CC2538 or Atmel's ATmegaRF 802.15.4 solutions, or Bluetooth solutions such as the Nordic nRF51822. LoRA may also be used, for example to control an agricultural pump in a remote paddock. You may want to use different wireless hardware, or a new device that isn't even on the market yet. And you don't want to redo the design and layout across the whole system, so let's make it modular and replaceable.
Today the way to go is a single-chip solution providing both your wireless connectivity and application microcontroller on a single chip - such solutions are common today, low cost, and a good fit for many different wireless connectivity standards such as WiFi, BLE or 802.15.4.
The first of several radio modules that I'll implement will be the familiar Espressif ESP8266.
Sorry, that one isn't back from the fab yet. :)
The wall switch module is fitted into a standard blank wallplate. (The prototype board shown in the photo is slightly smaller than the usable cavity in the plate... I'll make it slightly bigger in the next batch.)
As well as the interface to the microcontroller/RF daughterboard, this board is fairly simple. Most of the usable wallplate area is filled by the two capacitive touch "buttons", which are actuated through the dielectric wallplate.
Two RGB LEDs provide user feedback of the state of the two control "channels", and along with the two Atmel AT42QT1010 touch sensors and pair of LEDs, the power supply components account for essentially everything else on the board.
The PCB is glued into place behind the wallplate, and there is no drilling or machining of the wallplate.
This provides easy manufacturing and a sleek, minimalist appearance.
Proximity sensing works straight through the plate, and the plastic wallplate provides a completely enclosed, insulated barrier between the user and the components at AC line potential. This enclosed galvanic isolation barrier removes the need for high-potential galvanic isolation for the line-powered or line-sensing components elsewhere in the system. (The high-voltage buck converter is happy with an input anywhere in the 90-260VAC range, making it worldwide-compatible.)
I couldn't figure out any alternative LED form factor that provides high-brightness RGB in the "flush" form factor desired, but this is simple and cheap, and bending the LED over is not a challenge. A WS2811 serial bus is used to provide control of the RGB LEDs for both sensor channels using only a single pin on the MCU board. (3.3V is passed through to the microcontroller, along with ground, both touch sensor digital channels, and the WS2811 bus.
The high-brightness RGB LEDs are a conventional 5mm form factor, and they're "upside down", through two holes in the PCB, with the protruding top of the LED lens flush with the bottom of the PCB against the white wallplate. These LEDs project a bright spot of light straight through the white plastic - the plastic is translucent enough and the light is bright enough. This means no holes need to be drilled, and no LED mounting hardware is needed.
When the LEDs are off, the system is completely "invisible", with no penetrations or mounting hardware on the plate.
This video shows an older early prototype which is similar, but only has a single touch sensor channel.