Ambient Lighting for Baby with the ESP8266

There are plenty of great reasons to have a child. Perhaps you find the idea of being harshly criticized by a tiny person very appealing, or maybe you enjoy somebody screaming nonsense at you while you’re trying to work on something. But for us, we think the best reason for procreation is getting another excuse to build stuff. It’ll be what, at least two years before a baby can solder or program a microcontroller? Somebody’s going to have to do it for them until then.

To try to help his baby daughter get on a better sleep schedule, [Amir Avni] decided to outfit her room with some “smart” lighting to establish when it’s time for her to wake up. Not only can he and his wife control the time the lights come on to “day” mode, but they can also change the colors. For example, they can switch over to a red glow at night. Despite some learning experience setbacks, the both the parents and the baby are very happy with the final product.

An ESP8266 controls a WS2812 LED strip to provide the adjustable lighting, and a DHT22 sensor was added to the mix to detect the temperature and humidity in the baby’s room. [Amir] used Blynk to quickly throw together a slick mobile application that allows for complete control of the brightness and color of light in the room, as well as provides a readout of the environmental data pulled from the DHT22.

But not everything went according to plan. [Amir] thought he could power the LED strip from the ESP8266 development board by soldering to the 5 V side of its AMS1117 voltage regulator. Which worked fine, until he turned on too many LEDs. Then it pulled too much current through a resistor connected to the regulator, and let all the magic smoke out. An important reminder of what can happen when we ask more of a circuit than what it was designed for.

We’ve covered many awesome projects that were born of a parental need, from feature packed baby monitors to devices seemingly designed to program nostalgia in the little one’s subconscious.

16 thoughts on “Ambient Lighting for Baby with the ESP8266

  1. “Then it pulled too much current through a resistor connected to the regulator” — No, the parts he circled are diodes, not resistors. I have the same board and I accidentally burned out one of those diodes myself, too, when I slapped my screwdriver just a bit too close and it shorted out a couple of pins.

      1. Those are regular 2.54mm pins, much easier to solder to them than those pins on a regulator. I suppose he just never bothered to actually check what the pins do, though he should have; there is no diode between the USB-port and the VIN-pin, but there is a diode between the USB-port and the regulator, and it’s that diode he burned.

  2. I really doubt there is 1k resistor between USB 5V and 1117 regulator input, that wouldn’t pass enough current for ESP. That’s probably a diode since it burned, if it was polyfuse it would just stop conducting.
    Oh, and 150 those leds … that’s like 9Amps, that’s a challenge not only to PSU but to USB connectors and cables as well. In that case it would be best to connect LED strip directly to PSU, and use separate cable from PSU to ESP board.

  3. I haven’t looked at the code, but you don’t have to have all of the LED’s fully on at the same time to get a lot of light out of them. I routinely run them sequentially but at a high rate, and even 50 or less are more than adequate to light up a small room – especially when directed at a light-colored ceiling. In fact I’ve designed a bracelet that uses just 8 of these, and I get plenty of light for a few hours with just a 50mA-hr battery.

    1. Yes, there’s not a linear relationship to LED on time and the brightness that we perceive. I ran into this when I was trying to make an led-lit indicator fade out. I decreased the duty cycle of the PWM linearly from full to zero, but to my eyes it looked like mostly fully on with a rapid fade out at the end. I ended up fudging something that looked convincing enough.

  4. Nice project.

    I built something similar for my living room with a Particle Photon controlling WS2812 strips. The decorative modes are all controlled from a simple phone app, but I also use ifttt to have it turn a night light mode on and off, come on full brightness white when I arrive home after dark, display basic weather info in the morning, etc.

    I’ve never heard of Blynk though, I guess I’ve got some reading and experimenting to do this weekend :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.