Project tutorial

Kids RGB LED Star Nightlight © GPL3+

Create a light-sensitive, star-shaped RGB LED nightlight for your kids, your family, your friends, or even yourself!

  • 2,670 views
  • 1 comment
  • 15 respects

Components and supplies

Neopixel strip
NeoPixel strip
×1
TinyDev
×1
LDR - light dependent resistor
×1
Mfr 25fbf52 221r sml
Resistor 221 ohm
×1
A000066 iso both
Arduino UNO & Genuino UNO
The UNO can optionally be used as a programmer for the TinyDev or another Tiny85 board.
×1

Necessary tools and machines

3drag
3D Printer (generic)
09507 01
Soldering iron (generic)

Apps and online services

About this project

Build video

I love making projects for my kids and I also love making projects using RGB LEDs, so I came up with the idea of a light-detecing, star-shaped RGB LED nightlight for my kids' rooms.

The nightlight can detect if it is in darkness and turn on the RGB LEDs to 50% brightness, and then dim them back to 10% brightness over an hour.

If the nightlight detects it is in light, it will turn off the LEDs which of course, also saves battery life.

The star is 3D-printed and uses a TinyDev ATtiny85 board to control the LEDs, because it has super low power consumption and is only 26mm x 9mm in size, the same width as an RGB strip, but you can of course substitute the TinyDev with any Arduino-compatible microcontroller.

The nightlight runs off 2x AA batteries.

Step 1 - 3D Print the Star

Grab the STL of the star and print it out (or design and 3D print any other shape).

Step 2 - Gather the Electronics and a Microcontroller

Once you have your TinyDev or other microcontroller, work out which digital GPIO you are going to use for the RGB Strip output and which analog GPIO you will use for the LDR input and adjust the code to use the correct pins.

Now is a good time to upload the code to the microcontroller so you don't have to pull the project apart later to do it.

Step 3 - Solder the RGB Strip to the Microcontroller

You now want to solder the VCC, DATA and GND pads on the RGB strip to some wires or header and then solder/connect those to your microcontrolller.

Ideally, if your microcontroller has a 5V pin, connect the VCC of the RGB strip to that, otherwise 3.3V is fine.

Connect the GND on the RGB strip to a GND pin on the microcontroller, and lastly connect the DATA to the digital GPIO you selected earlier.

Step 4 - Connect the LDR and the 220 Ohm Resistor

Solder one leg of the LDR to one leg of the resistor and then cover with some heat shrink to both shield and strengthen the connection.

Now solder/connect the other leg of the LDR to the analog GPIO you selected earlier and solder/connect the other leg of the resistor to a GND pin on the microcontroller.

Step 5 - Power or Battery

Lastly, decide how you are going to power your nightlight. I used 2x AA batteries in a battery holder, and soldered the wires to the VCC IN and GND IN of the TinyDev.

Depending on your microcontroller, you ay choose to use a Lipo rechargeable battery, a USB cable (be careful how much current you pull from it) or a 2.1mm jack with a 5V power pack.

Note: If you are using your own microcontroller, it's good practice to put a 300-500 ohm resistor between the GPIO and Data line of the RGB strip, and to put a 10uF capacitor across the VCC and GNC connections to the RGB strip.

Step 6 - Insert the RGB Strip into the Star

​Carefully insert the RGB strip, bending it around the star shape until all of the strip is in the correct place. be careful when bending the strip around the sharper edges to ensure you don't crack or break the strip.

Step 7 - Hang It on the Wall

I added velcro tape to my battery pack to stick it to the wall, so it can be removed easily to change the batteries, but feel free to use any mounting mechanism you like.

Extra Step: Change Up the Colours or Animations

Feel free to code whichever colours or animations for the nightlight... set specific colours that you like most, or have the LEDs pulse instead or move.. it's totally up to you!

That's it... a quick and simple project that is both useful and amazing to look at, and your kids or family or friends are just going to love it.

Hope You Enjoy This Project!

Follow me on:

http://youtube.com/unexpectedmaker

http://twitter.com/unexpectedmaker

https://www.facebook.com/unexpectedmaker/

https://www.instagram.com/unexpectedmaker/

https://www.tindie.com/stores/seonr/

Code

Kids Star Nightlight
The code is an Arduino Sketch that should work on almost any Arduino compatible micro-controller

Custom parts and enclosures

Kids Star Nightlight
In the STL folder is a 3D STL model of the star than you can print on any 3D printer

Schematics

Kids Star Nightlight
The TinyDev board layout
Board layout hackster nvfsotohrj

Comments

Similar projects you might like

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 10,005 views
  • 5 comments
  • 20 respects

Multicolor Knight Rider with RGB PL9823 LED + Arduino UNO

Project tutorial by Giovanni Gentile

  • 3,931 views
  • 0 comments
  • 10 respects

Music Adaptive RGB LED with Arduino and Processing

Project in progress by ounane mohamed elfarouk

  • 3,001 views
  • 8 comments
  • 24 respects

Automated Staircase RGB LED Lights

Project tutorial by Team NotEnoughTech.com

  • 27,609 views
  • 19 comments
  • 98 respects

The Magnetic Field and RGB Tester

Project tutorial by Kutluhan Aktar

  • 3,530 views
  • 0 comments
  • 14 respects
Add projectSign up / Login