This is an old revision of the document!
Make Ceiling Lights great again
State as of 12017-01-01 (he)
Original work by: xro
- 6 Ceiling lights
- 4 neon lights
- 2 LED strip neon replacements
- 2 5-wire 230V cables connect the lights to a self-made relay box
- Each ceiling light
- shares Earth and N
- has it's separate L
- relay box contains
- 1x 4-channel opto-isolator relay 5V/230V , switchable with 3.3V IO, pull low to GND to switch
- 1x 2-channel opto-isolator relay 5V/230V , switchable with 3.3V IO, pull low to GND to switch
- Lasercut-Box with Light-Switches on wall
- offers 6 2-way up/down switches
- offers 3 push-buttons
- --> 15 buttons
- contains Teensy 3.0 µC (??)
- contains RF433 transmitter
- Teensy µC
- reads 15 buttons
- controls RF433 tx
- has 6 unused gpio prepared to switch ceiling light directly
- firmware takes rf433 cmds on
/dev/ttyACM0
- firmware reports buttons and takes gpio-to-set-states on
/dev/ttyACM1
- firmware also switches currently unconnected gpio directly
- Relay-Box is connected to RaspberryPi1's GPIOS running as licht.realraum.at
- 5V to VDD
- 3V3 to VCC
- gpio4, gpio23, gpio18, gpio17, gpio22, gpio21
- RaspberryPi1
- installed in carton box on shelf above passage
- powered by USB-Multi-Charger
- runs golightctrl
- switches ceiling lights via GPIO
- which provides Webserver to switch lights
- reads Buttons from teensy
- knows ceiling light states from GPIO
- sends RF433 cmds directly via teensy or sends request to send to arduino on mursat shelf via MQTT
Current Problems
- if raspberryPi1 dies or has problems, light can not be switched
- teensy Firmware logic for gpios LOW == ON needs to be changed
- switching ceiling light power on/off is probably not as quick or nice-to-look-at as having planned ESP8266 based H801 do it
Project CeilingLight on Steroids
Working on it: xro
Plan is to replace all the power-sucking neon-ceiling-lights with LED strip lights. Furthermore white-light color-temperature should be adjustable. For party and effect purposes the ceiling lights should be dialable to any colour. To accomplish this, 2 LED strips will be installed in each ceiling light. 2.5m RGB+CoolWhite and 3m WarmWhite LED Strip for each light. They will be controled with a ESP8266 based H801 for each light. Thus we can choose colour and white-colour-temp for each light.
Status: All materials bought, H801 deilvered, awaiting delivery of LEDs and power supplies
TODO
- (done) verify H801 can be flashed with Sming firmware
- (skipped) connect 2.5m RGB-CW and 3m WW LEDs to H801 and test with default firmware
- (done) Measure power consumption of LED-Driver
- power consumption in soft-off (H801 stays powered): ~0.36W
- power consumption in all-on: 62.4W
- 10m ColdWhite, max duty: 29.1W
- 10m Blue, max duty: 28.7W
- 10m Red, max duty: 35.6W
- 10m Green, max duty: 25W
- 10m RGB, max duty: 59.8W
- 10m RGB+CW, max duty, 5m each on a 74W Powersupply: 66.6W (Netzteile am Anschlag)
- 10m WarmWhite, max duty, 5m each on a74W Powersupply: 61.4W (Netzteile am Anschlag)
- 10m RGB+CW+WW, Strip1+2,max duty, 5m each on a 74W Powersupply: 124W (Netzteile am Anschlag)
- 5m RGB on Powersupply1 + 5m CW on Powersupply2: 74W
- 5m RGB on Powersupply1 (74W) + 5m CW+WW on Powersupply2 (74W): 44.4W
- 5m RG+WW on Powersupply1 (74W) + 5m B+CW on Powersupply2 (74W): 76W
- --> RGB+CW Strip1 pro Meter: max(44.4/5,66.6/10)=max(8.88,6.66) = 8.88W/m
- --> WW Strip2 pro Meter: 61.4W/10 = 6.1W/m
- RGB+CW Strip1 60LED/m laut Verkäufer: 11.52W/m
- WW Strip2 60LED/m laut Verkäufer: 14.4w/m
- (done)test WIFI reception of H801 in ceiling light without installing it permanently. Test various possibly installation locations to improve WIFI reception. e.g. put H801 outside light-metal-casing and under gypsum-ceiling plates or outside light-metal-casing and visible next to light.
- tested in Leinwand/Mitgliederregal Ceiling Light, which is known to have worst WiFi reception from years ago TP-link Test.
Works Flawlessly :)
- tested in Leinwand/Mitgliederregal Ceiling Light, which is known to have worst WiFi reception from years ago TP-link Test.
(done) reflash and write new trusted firmware for H801, so that it can be controlled via MQTT and remembers a default light-setting
- see HackADay-Artikle
- see OpenSource Firmware for H801
- see esp8266 Forum
- see Protocol Documentation
- see Ready Made MQTT Firmware
- (check) use Sming
- (check) use Sming new PWM Lib with compile flag
- (done) on power-on default-light setting is used
- (done) MQTT commands
- action/ceilingN/light {"r":int, "g":int, "b":int, "cw":int, "ww":int} | N={1..6,All}, int={0..1000}
- action/ceilingN/defaultlight {"r":int, "g":int, "b":int, "cw":int, "ww":int} | N={1..6,All}, int={0..1000}
- (done) provide backup interface. e.g. telnet
- secure backup telnet interface
test in dry state
- startup behaviour: PWM pins start in INPUT direction, all channels except R- light up for 700ms \ --> prefer solution where H801 soft-disables the LEDs and itself stays powered versus being powered on/off constantly
- startup behaviour: configured default light state apply's really fast after about y1.4s (not after blinking due to INPUT direction though)
- WIFI connection (with DHCP) works really fast. takes about <=6s
- MQTT works really well
- Telnet configuration works really well
- spiffs flash-time pre-configuration works really well
- test in indirect ceiling illumination configuration
- Strip1 (RGB+CW) width: 12mm
- Strip2 (WW) width: 9.5mm
- test in ceiling light enclosure
- WIFI works really well, surprisingly no problem
- Testinstall one in ceiling light
- installed in middle-membeshelp light. Splice power from Lasercutter CeilingLight
- 3m Warm White
- 2.5m RGB+Coldwhite
- Things learned
- use 12mm 5pin clip-connectors for 12mm wide 5pin RGBW Led strip (not 10mm) -> ordered 12mm
- some connector cables are too short -> need to be extended --> ordered longer ones
- use extra double sided tape at ends
- cut closer to 55cm than 60cm, keep away from edges light wise
- keep switching power supplies away from WiFi H801
- WarmWhite Strip needs to split. Looses brightness after 1.5m -> T-Connectors ordered
- change golightctrl so it can control H801
- install in ceiling lights
- put CW-LEDs currently in one ceiling lights into MaSha
WW-LEDs in all Ceiling lights as Simple-Light
RGB+CW+WW-Fancy-Lights int all Ceiling lights
Project Switches as Robust Fallback
Plan: connect Relay directly to Teensy µC
Working on it: xro
Status: Concept
TODO
- change teensy firmware to switch LOW for light-on
- ensure H801 firmware acts transparent. Power on -> Light, Power off -> no light
- always cut power if physical switches are used
- change golightctrl to
- send soft-off to H801 if web-buttons are sued
- cut power via relay if physical buttons are used
- cut power if presence=false
- connect Relay directly to Teensy µC