cwi-dis / lissabon

Off-grid lighting control
1 stars 0 forks source link

lissabon off-grid lighting control

build-platformio

Lissabon is an experiment in smart control over off-grid lighting. The intention is to provide a set of small dimmers, remotes and user interfaces that allow you to control lighting. The target application area is strictly low-voltage, battery operated and solar powered.

The project got its name from Tuinpark Lissabon, an allotment ("volkstuintje" in dutch) in Amsterdam, where the experiment was conducted...

Setting

The intended application area is an off-grid premise (holiday home, caravan, boat, etc) with solar cells backed by a 12V battery. Low-voltage LED lights are available as LED strips, MR-16/GU5.4 spots and various other forms, but control hardware - and especially smart home control hardware - is often geared towards use in a 110/220V environment where power is always available and not at a premium.

Requirements

The low-power requirement holds for dayly use, it is okay if the components use more power when installing new fixtures or reconfiguring the system.

Power consumption

Preliminary analysis of the power consumption is availble in doc/ble-power.md.

Design choices

Lissabon is built on top of the iotsa Internet-of-Things framework, using the ESP32 system on a chip, which has WiFi, Bluetooth LE and low power support built in.

Lights are always eased on and off, not switched instantaneously. This looks cool, but it is also the intention that it makes the user less susceptible of any delay in operation.

This is one of the things that needs to be tested formally.

During normal operation Bluetooth LE is used to communicate, and components are in a wake/sleep cycle. When awake they broadcast their existence with a BLE advertisement (consuming about 50mA). If not contacted within 0.2 seconds by a remote control they go into low power mode (consuming about 5mA) for 2 seconds. As the component has been inactive longer this 2 second sleep period will increase. When a local control (knob, touchpad) is operated the component awakes instantly.

Deep sleep is not used, even though idle power consumption would go down to about 0.1mA: a wakeup from deep sleep is essentially a reboot, and would consume 100mA for about a second. This means that a deep sleep of less than 20 seconds is essentially a waste of power. This decision may be reconsidered in the future.

When the installation has to be reconfigured all components are sent a BLE instruction that will make them enable WiFi. They will keep WiFi enabled (consuming about 100mA) until they have not been contacted for 2 minutes. The configuration application (when written:-) will run on a smartphone or Raspberry PI that will also provide the WiFi Access Point (software base station).

Using igor on a Raspberry PI as the basis for the control application needs to be investigated. It may be overkill, but it would allow things like waking PI once per day, and using a 3G/4G or Lorawan connection to "phone home" and report on the status of things like temperature, humidity level, battery level, etc)

Components

libLissabon

This is a shared library containing iotsa modules used by multiple other components. Various options are set using C-preprocessor defines, so the library is included as source in the components that actually use it.

When building libLissabon using platformio run it will actually build two test components:

lissabonDimmer

A dimmer, with buttons, touchpads, rotary control or neither. It is intended for LED lights, monochrome ledstrips or incandescant lights.

lissabonLedstrip

A dimmer with buttons, touchpads or neither for smart (neopixel) RGB or RGBW ledstrips.

lissabonRemote

A wireless LiPo-powered remote control that can control a predefined set of dimmers.

lissabonController

A more elaborate remote control with a display. Incomplete.

Pictures

Lissabon Dimmer, plug-in variant with rotary control: Plugin Dimmer

Lissabon Dimmer, for use in inaccessible locations: Hidden Dimmer

Ledstrip dimmer, with brightness and color temperature touchpads: Ledstrip Dimmer

Wireless remote control, inside and outside with holder: Wireless Remote

Controller: to be supplied

In situ pictures: to be supplied