Intro: Color Changing Night Light
This project will help you create a night light that changes colors slowly.... smoothly drifting from one color to the next.
The electronics will be built from a tiny arduino based circuit board.
I selected a tiny digispark from digistump (or a clone is fine).
You can glue any sort of seashell or covering over the Neopixel light.
Step 1: Arduino IDE Set Up - Add Additional Boards
This is the toughest part of the project, and I will leave the details to the steps to the manufacturer of the boards.
Digispark is made by Digistump. The steps to add this circuit board to your Arduino IDE program can be found here. -
This board started off as a kickstarter project, and has been upgraded over time. As such, it may require a struggle to get the board added to your arduino.cc program. I used version 1.6.9 and pasted in the link it suggested into my additional board window inside the program, as described in the link above.
suggested board code to paste into window - http://digistump.com/package_digistump_index.json...
Once you get the board added, your screen should show the digispark board like this picture.
Step 2: Parts Required
You will need:
A tiny USB connected Arduino based circuit board.
I chose a - Digispark. They come in 2 types. Be sure you get the one with the USB connector. We will be powering the board by plugging it into a small phone charger module. I will post a link to Digistump, and also a store that sells Chinese made parts below.
Either will work. Digispark or Digispark
A Neopixel light to connect to our board. You can select any type of Neopixel that uses the WS2812 standard. I will post a link to Adafruit, and also a store that sells Chinese made parts below.
Either will work. Neopixel or Neopixel
A phone charger. You can get one at any convenience store. I found mine at CVS or Rite Aid drugstore for less than $10. We only need a 5v USB output for the digispark board.
A soldering iron with solder
A pair of wire cutter/strippers
Small piece of wire
A small sea shell
Some good glue to attach the shell to the plastic phone charger. I used a regular hot glue gun.
Step 3: Program the Digispark
I suggest you practice programming the Digispark to ensure it is actually working. You can use the BLINK example in the arduino.cc program.
From Digistump website:
The Digispark works a bit differently than some Arduino compatible products. The Digispark programs with a different procedure.
From the Tools menu select Board→Digispark (Default - 16.5Mhz) (The Tools→Programmer selection does not matter) Write some code, open your code, or open a Digispark example. You do not need to plug in your Digispark before invoking upload Hit the upload button. The bottom status box will now ask you to plug in your Digispark - at this point you need to plug it in - or unplug and replug it. You'll see the upload progress and then it will immediately run your code on the Digispark. If you unplug the Digispark and plug it back in or attach it to another power source there will be a delay of 5 seconds before the code you programmed will run. This 5 second delay is the Digispark Pro checking to see if you are trying to program it.
Step 4: Wiring Diagram
The digispark can only handle 5 volts on the 5 volt pin, so be careful. The Vin pin can handle more voltage.
Also be sure to wire our pins to the IN side of the neopixel, not the OUT. The 5v and gnd won't matter, but the signal must be soldered to just the signal IN pad.
5v - 5v to neopixel in
gnd - ground to neopixel in
D0 - signal to neopixel in
Step 5: Helpful Hints
If you are not sure how to get that tiny Digispark program to work, try it first on an UNO board. After you get your program tuned up how you want it (adjust the delay code timing near the end), then you can download it onto the Digispark board.
The Digispark versions have different pins for the on-board LED. Make sure you don't use the same pin. You can determine which pin your board uses, by testing it with the BLINK example code. Just change the pin number for the output pin you want to try. Most boards have an LED on pin 13. Digisparks have it on either pin ZERO or pin ONE.
Don't plug the digispark in to your usb port until after you pressed the download button, and the compiler asks for the board (read the code errors at the lower portion of the screen).
Black out the on board power led with a black sharpie pen if it shows.
Don't melt the wall wart with the hot glue. Glue just a bit at a time, and let it cool.
Good Luck and have fun !