The project consists of two major units, a ceiling unit which houses PWM control and the LED strips themselves, and a bedside unit which has all the UI things (display, buttons, knobs etc). The heart of the project is an ESP8266 (or possibly ESP32) module that will handle all the time/calendar/alarm logic and also provides a simple web API + UI for configuring the system. To the ESP is connected a STM32 microcontroller module as a glorified IO expander. As such, it will manage all the "dumb" accessories like the 7-segment display etc.

In the ceiling unit sits another STM32 board that functions as a simple 2-channel PWM controller. It receives control messages via serial from the ESP and sets the PWM parameters appropriately. This is done to avoid driving PWM over long wires (from bedside to ceiling), which might or might not be actually necessary precaution. Not to make things too simple, I'm thinking of placing some sort of line filter in the ceiling unit so that the input power waveform would appear relatively DCish. Other than that, the design is basic µc driven low-side switching n-ch FET PWM control. To get low Rds and high switching speed, a gate driver IC is used to drive the FETs.

For more realistic sunrise simulation a "hybrid" LED strip is used. It has two different color temperature LEDs (2700 K and 6500 K) which can mixed to get any desired color temperature. As a low-cost option two separate different LED strips could be used for similar effect. This way I can set a warm low color temperature in the beginning of the sunrise and gradually push the color temperature higher in a very controlled manner. I predict that tweaking the curves for this will be an interesting task. I would have preferred to have even wider range, but understandably <2700K LEDs are not very common. I might throw in some amber LEDs just for effect at some point to compensate the lack low color temp white.

I'm planning to keep the physical UI very minimalist. Single knob that will function as manual brightness control and to shut the alarm. Everything else will be configured via the web interface on a mobile phone or a computer. This will both simplify the HW design significantly and make a more usable product (we've all heard the jokes about programming VCRs). And of course this allows me to ride on the IoT hype bubble.

Current status of the project is that I'm finalizing the overall design and preparing to order all the necessary parts for this. I'm kinda hoping to get the first version built before the winter with its sunless mornings runs out. Current undecided parts are:

  • Enclosures. They are just such a pain, especially with no tools at hand. Right now leaning towards a lasercut box, but that might change again next week if I get a better idea.
  • Filter design details. I suppose some random arrangement of caps and inductors will create some sort of filter. TBD if the whole filter is even necessary.
  • ESP8266 vs ESP32. I'm heavily leaning towards the older ESP8266 due better availability and wider community (documentation and libs). Swapping in an ESP32 is not impossible later if a need appears.