loading

I wanted to give my family a simple, meaningful, beautiful way to stay connected. We are spread out across two countries, and sometimes misunderstandings between us make communication even more difficult.

As holiday presents this last year I built 6 RGB Wi-FI enabled networked decorative touch lights. Each member of my family has one connected to their Wi-Fi. When one of us is thinking of the family, that person can touch their light. Everybody’s light will light the same color simultaneously. All of us will know one of us is out there thinking of us. If the same person touches the light again, the color for all the lights will vary slightly. That person can find a color that speaks to them to share with all of us.

If another member of the family then touches their light, everybody’s color will change more dramatically. All of us will know one of us has responded. All the lights fade to black within 2 hours of being touched.

There is no limitation to how many lights can be synchronized; it's just a function of how many people are in your family and how many lights you want to make. You could make just a pair of lights or 500 of them all networked together if you wanted.

These lights have been received so positively that we have decided to manufacture and sell them. If you can order some today, you can have them at your home before the holiday season this year for less money than it costs to make them yourself. But for you DIYers out there, let's get started!

Step 1: Gather Materials, Supplies and Tools Needed

Materials

Supplies

Electronics

  • Spark Core ($39 each. You need one for each light)
  • One Raspberry Pi (any model) with SD card ethernet cable and power. (You can substitute any Linux server)
  • Adafruit 16 Neopixel Ring ($10 each. You need one for each light)
  • Conductive paint. (One light can use as much as 10ml of paint. I know it's expensive but I tried various DIY conductive paint recipes but could find nothing that works like the real thing.)
  • Wire. A 4-wire-strip ripped off ribbon cable from an old computer works great.
  • 10 MOhm resistor.
  • High quality cell phone charger power supply. Cheaper off-brand power supplies do not work because the power is not clean enough for the touch sensing. Simple filtering with a capacitor does not fix this. You can buy name brand units (Samsung, Apple, LG, etc.) Alternatively, I picked up used brand-name chargers from the thrift store for $0.99 each and they work great.

Tools

Step 2: Frost Acrylic

Frosted acrylic sheets are expensive and hard to find. As an alternative you can frost your own acrylic fairly easily:

  1. Fasten acrylic securely to a flat solid surface
  2. Using a vibrating electric sander, sand acrylic with 60 grit sandpaper

Sand both sides of the acrylic so the acrylic diffuses the light fully. Many DIYers recommend finer grit sandpaper to frost acrylic, but rougher sandpapers such as 60 grit are better for diffusing.

(I loved this job because I got to use my dad's old vibrating sander. He was a great DIYer and he is no longer with us, so it's nice to have memories of him and his projects when I use his tools.)

Step 3: Cut Acrylic

Using a table saw, cut four 3.5"x7" sheets and one 3.5" square sheet of acrylic for each light. Set the saw blade at a 45 degree angle so you get a nice mitered corners. Acrylic is less forgiving than wood and hard to cut cleanly without cracking or melting. Here are some tips:

  • Use a sharp blade with very fine teeth designed for cutting acrylic.
  • Run the blade slowly.
  • Set the blade height to barely clear the acrylic.
  • Tape both sides of the acrylic with masking tape or painter's tape where you are going to cut it. This helps prevent cracking.
  • Push the acrylic through the blade with a sacrificial piece of wood on top so the acrylic will not kick up off the table.

( I used my dad's old table saw for the job. That was awesome. :-) )

Step 4: Decorate Acrylic Sheets With Conductive Paint. Attach Wires.

Using conductive paint, make a nice design on the inside of each side of each shade. This design serves as the touch sensor so make sure your design is nice and dense i.e. no huge gaping holes. Also, conductive paint is not that conductive so make your lines nice and thick. Be very generous with how much paint you use.

For each side of each shade, strip the end of a wire and sandwich it into the paint at the bottom of the side of the shade. If you need a weight to hold the wire, small change works well, as you can see in the picture. (No real elephants were harmed in the process of making these.)

Decorate the tops of the shades as well. Choose a place where the conductive paint of the top will meet the conductive paint of one of the sides so you can get conductivity to the top of your shade. You will connect the side to the top in a later step.

Allow the paint to dry overnight.

Step 5: Spray Acrylic

Using frosted paint, spray acrylic on both sides. This will help solidify the conductive paint, help the shades diffuse the light further, and give the shades a more polished look.

Apply multiple light coats so the spray doesn't run.

Step 6: Glue Acrylic

Prepare the acrylic by lightly sanding and cleaning the edges of the acrylic where you will be applying the cement.

Acrylic cement spreads easily and looks ugly when it runs. To help keep it from running, tape the edges of the acrylic. Run the cement as finely and evenly as you can. Use the top of the shade to square the shade and glue that at the same time. Tape the entire shade together and allow to dry overnight.

Step 7: Complete Shade

In an earlier step you chose a place where the conductive paint of the top would meet the conductive paint of one of the sides. Now that the shade is glued you can complete that connection electrically: Using an Exacto knife, gently scrape off the frosted paint at the two areas of contact. This will ensure a good electrical connection. Dab a bit of conductive paint to bridge across the two areas.

At this point you should have a complete shade with four wires coming out at the bottom, one for each. Solder these wires together.

If your cuts were not perfect (and mine were not), you might also want to add a black trim on the edges of your shade to cover up the irregularities. We used bias type and secured it with tacky glue.

Step 8: Prepare the Base

The base needs a channel for the power cord, a hole for the wiring to get from the bottom to the top of the base, and a recess for the Spark Core chip to live:

  1. Using a drill press and 1/8" drill bit, drill a slot for the power cord to go through. Smooth the slot with sandpaper.
  2. Using a drill press and 1/2" drill bit, drill a hole through the base. The hole can be anywhere as long as it is on the inside part of the shade when the shade is glued to the base.
  3. With a router and router bit, create a recess for the Spark Core. Clean the recess with a scraper and sandpaper. The last picture in this step shows how the Spark Core will sit in the recess of the base.
  4. Spray paint the base with several coat of black paint.

Step 9: Prepare and Solder Connections

  1. If your Spark Core has header pins, snip them off with wire snips.
  2. Solder a 10MOhm resistor between pins D3 and D4 of the Spark Core.
  3. Cut the power cord to the cell phone charger. Confirm with a multimeter which wire is 5V and which is ground. Don't trust the color coding of the wires; I've found a few chargers were the colors were reversed from what I would have expected.
  4. Solder 5V and Gnd of the cell phone charger to the appropriate pins on the Spark Core
  5. Solder 4 wires to pins D2, D3, 5V and Gnd to feed through the base hole. I used part of an old floppy drive ribbon cable but any 4 wires will work.
  6. On the top side of the base, solder the wire connecting D3 to the 4 wires making up your touch sensor on your shade. Solder the 5V and Gnd wires to your Neopixel 5V and Gnd. Solder D2 to Neopixel Data in.

The picture shows the Spark Code glued into the recess of the base. Don't glue anything yet, though. Let's test and make sure everything is working first.

Step 10: Load the Code, Test and Debug

Load the Code:

  1. Set up your Spark Core as outlined on the Spark website. It does not matter what you name your core but for convenience you might number it 1 through however many lights you are making. Besides recording the Spark UID you will want to make note of your access token for your Spark account. You will reference all three of these numbers later when networking them.
  2. Upload the Spark Core code (attached) to the Spark Core. The code is called FiliminPrototpe.ino. For your convenience I have included the two files which comprise the Neopixel library and which the code references. The Spark website offers several ways to upload code. I recommend using the Spark CLI.
  3. At the top of the code that there are tweakable parameters and an array to put in SparkIDs. You do not need to worry about this for testing. The code works fine for testing with no changes.

Test:

  1. After visually checking your connections and confirming there are no shorts, plug in your cell phone power supply.
  2. If your connections to the Neopixel are secure, after the Spark connects to the Wi-Fi you will see the Neopixel cycle through a rainbow of colors then turn off.
  3. If your touch sensing is working, the Neopixel will light a random color when you touch the shade.

Debug:

  1. To help you with any problems, there are two booleans you can set at the beginning of the code: #D_SERIAL true will output debugging values to the serial port.#D_WIFI true will output debugging values to the Spark Cloud.
  2. The two values you want to note when debugging touch sensing are tBaseline and tDelay. tBaseline is an averaged floating point value calculated as a timed rate of decay for the touch sensor when nobody is touching it. tDelay is a more current value which is compared to tBaseline to detect touch. tBaseline will typically hover between 100 and 250ish. If it is higher, you probably have a bad connection. If it is lower, that suggests a short or lower quality power supply.

Reading Debugging Values from the Spark Cloud:

When #D_WIFI is set to true you can see the values for tBaseline and tDelay in Linux using the Spark CLI:

Step 11: Network the Lights

To network the lights, you need to run a server connected to the Internet. Any server will work, including any Raspberry PI. I used a Raspberry PI Model A.

The server's job is to continually poll the lights to look for changes. If it sees any changes, it updates all of the lights to reflect the change. If you look at the Spark API you would guess that such a server would not be necessary as the lights could monitor each other through the cloud. I tried this first and under ideal conditions it works. However it is not a robust solution: flaky Internet connections and Spark's own throttling system can throw off the synchronization too easily. I have spoken with Spark about this and now expect later versions of Spark's hardware and cloud to address these problems fully in the very near future.

Configure the server script:

  1. The server is a simple Bash script. It keeps a log file called /var/log/lampServer. Make sure that the user running the server can write to this file.
  2. Edit the top of the server script putting in your token and the Spark IDs of all of the Spark Cores.
  3. Make the script executable: chmod 755 filiminPrototypeServer.sh

Configure the Spark Core code:

  1. Edit the Spark Core code from the previous step so that the Spark IDs of that code match completely with the Spark IDs listed in the server script. This includes the order in which the IDs are listed.
  2. Upload the edited Spark Core code to each of the Sparks in your lights.

Run the server. Plug in a couple of lights and touch one of them after they all find the Wi-Fi. Your lights should now be synchronized!

Step 12: Configure Watchdog Script on Boot

The server script will occasionally conk out with the message "Alarm Clock." To automatically restart it, use the attached watchdog script which runs the server script and detects if it freezes or stops. I have fully tested this solution over months now and have seen that the watchdog script successfully keeps the server script running continually without interruption.

To configure the watchdog script, edit the top lines to reflect correctly the path and filename of the server script.

Set the watchdog script to automatically run when when the server is booted. For a Raspberry Pi you can find a few techniques to do so here.

Step 13: Finish Up

At this point, your lights are fully functional and you just need to complete assembly:

  • Glue Neopixel to the center of the base. Allow to dry
  • Glue shade to base. I used tacky glue so it wouldn't hold too strongly. It dries clear and holds tight but not too tight so I can break the shade off the base for any maintenance.
  • Glue or tape Spark Core to recess of the base.
  • Staple cell phone power cord to the channel in the base.

Enjoy your networked RGB decorative touch lights!


Acknowledgements:

  • I was originally introduced to the Spark Core at MakeICT. I also used MakeICT's facilities for some of the building of this project.
  • I got help building from my great friend Finn and my fiancé Vanessa.
Meant to mention that I soldered solid copper instead of using conductive ink.
<p>Beautiful!</p>
<p>You mentioned Particle working with you on the issue of needing a Raspberry Pi to act as a server instead of each lamp using particle.publish() events/web hooks for the sync functionality - is this something that ended up getting fixed globally or just in relation to your product?</p><p>This is an awesome idea and I'm currently using 3 Photons and doing holiday presents this year using this as inspiration. Being as new as I am to electronics and programming, I figured I would ask if this got sorted out or if using the Raspberry Pi was still a necessity before struggling to make it happen myself.</p><p>I have a few ideas for added functionality/features, but that can come later since I can roll out updates over their cloud IDE - I just need to make sure I've got it 90% working and I'll be fine!</p><p>Thanks for this great instructable and hopefully for any advice/answers you may provide!</p>
<p>Sorry not to notice this comment until now. I am not sure if Particle ever solved this robustly as I moved to the ESP8266 for this sort of work. I use MQTT with the 8266 and that seems to work pretty well and not require the Pi. However you will need some sort of MQTT broker and you could use the Pi for that, or a cloud service (which is what I do). You can program an 8266 using the Arduino IDE and installing the correct board manager. Dev boards such as the NodeMCU are pretty cheap.</p>
<p>Huh, that's interesting: I did the opposite switch you made since I was getting super flaky reliability from my NodeMCU board. I guess the devs there must of flushed out the issues.</p>
<p>Adafruit's neopixel library on the 8266 was very unstable at least a few months ago, and it did software UART was plaqued with problems on the 8266. That might have been part of what you ran into with reliability. You need to use a hardware UART solution with the 8266. Something like this: https://github.com/Makuna/NeoPixelBus/tree/UartDriven</p>
Love it. Here is one of my finished lamps. The other two were gifted tonight. Now to figure out how to avoid the Pi.
I made some changes to this build, mostly due to the lack of tools on hand. I'm 90% finished, which my pictures reflect. I still need to wire the lamp panels, and add the finishing touches like the bias tape. <br><br>I stained the base rather than spray paint. I used a dremel to substitute a router. I used a chop saw rather than a table saw. I changed the cut lengths of the acrylic so I didn't have to miter, keeping it to straight cuts. <br><br>One change I would recommend is to remove the pins from the board. This made it far easier to soldier the wiring.<br><br>Very rewarding build :)<br><br><br>
<p>That's awesome! Looks great! I also removed the pins from the board. If I forgot to put that in the directions, I'll add that.</p>
<p>I'm having no luck with the touch sensing through the acrylic. I can touch the side with the paint applied and it works great. Touching the side that's facing out produces nothing. Any ideas?</p>
<p>In step 10 I outline 2 variables you can read through the cloud. I'd open up 2 terminal windows and look at those values. You should see tDelay changing as you touch the side facing out. If you see it changing, you can adjust the sensitivity in lines 23 and 24. For example try the sensitivity at 16 and baseline_sensitivity at 32.</p>
<p>I figured it out how to observe in spark dev.</p>
<p>Cool. Keep us posted with what you figure out.</p>
<p>Here's what I'm finding: </p><p>I can't produce consistent 100+ values. I've checked for shorts and I can't find any. I've swapped power supplies and that didn't make much of a difference. Once I achieve a solid 100+ baseline, the simple process of flipping the base over will change the values and I'll lose the progress I made. I'm usually hovering in the high 80's to mid 90's</p>
<p>Your design is different so maybe high 80s and mid 90s is OK. What does tDelay look like as you touch and move your hand away from the outside of the shade?</p>
<p>That's problem for me. I couldn't install the spark CLI because of some serial port issue inside node.js on my pc. Could you do the same in the Spark Dev tool?</p>
I was wondering if your lights work with Angels? My soldier son died last November and I miss him. My daughter said I could be alone in his house anymore and was always getting signs from him in Washington. Now I'm in Texas and haven't seen or heard from him. I'm worried he could be lost and I want to know were to get three so me and my daughters can talk to my son in heaven. How and where can I get three, please. <br>Teri Cunningham<br>milimama2005@gmail.com. You can see my son on my Facebook if you want<br>7903 chestnut Barr dr<br>Converse, tx 78109<br>Thank you<br>
<p>I am so sorry for your devastating loss. Unfortunately, I do not think these lights can help you talk to your son. I wish you the best of luck, Teri.</p>
Ok thank you. I hope I can find something but if you come up with something please let me know. I love your ideas
Would it be possible to add a wps button?
<p>I don't think so. I'm sure the Spark Core I used doesn't support WPS. And I can't find anything suggesting that the newer Spark Photon supports WPS.</p>
<p>Once the lamps are distributed, do you have to supply your Spark login credentials to your circle so they can configure their wifi's through the app? Or can they create their own accounts and rename their cores?</p>
<p>Yes you have to supply your Spark login credentials for these lights. For the Kickstarter campaign we have worked with Spark to avoid this step.</p>
<p>This is a really sweet project and your lights look great. Thanks for providing a well detailed set of instructions.</p>
<p>What a great idea, wish I was more electrically &amp; electronically inclined I'd make a few for family &amp; friends that seem like family. Would these work in England and Holland if I get the proper power supply?</p>
<p>They will work fine in England and Holland. I encourage you to make them, but if you aren't up for the challenge, there's always our Kickstarter where you can preorder them. ;-)</p>
<p>waw .. amazing idea and most importantly the concept behind it .... love it so much </p>
<p>Awesome! Such a nice way to keep in touch, will definitely have to try this. </p>
<p>I love this idea but I'm electronically challenged. Is this something I could do with very little electronic knowledge? I have great basic carpentry skills and multiple electric tool use so I'm not worried about the construction aspects. Any suggestions? How much are 4 lamps is I bought them instead?</p>
<p>The electronics are not bad at all. You need a resistor and the conductive paint. That's it. No circuit board. One component really. If you can use a multimeter and measure conductivity and 5V you should be good.</p><p>The programming is a bit complicated. If something were to go wrong, it might be tricky to reverse engineer what is going on.</p><p>Overall I'd say if you are up for the challenge, go for it. You'll learn a ton and you have us to come back to and ask questions if you get stuck.</p><p>In terms of how much 4 lights would cost, I am taking preorders in quantities of 3 and 5 and you can check that all out on the Kickstarter: http://bit.ly/why647</p>
<p>I'm interested in making some of these, but I'm wondering how you get the Sparks to connect with the wifi. Don't they need the wifi's key? Each for its own home.</p>
<p>Yes there is a free app for iOS and Android you download that Spark Labs provides. The app finds your wifi name. You put your key in the phone and hold down the &quot;mode&quot; button of the Spark Core. 10 seconds later the core knows your name and password. It's pretty slick. You can also give the Spark your key connecting the USB of the spark to your computer and using a terminal program. The Spark remembers several keys too. You can read more about this at spark.io</p>
A touching tribute to family. See what I did there?
<p>That is seriously cool and creative! What a great idea to keep a family (or firends) connected. Thank you for sharing.</p>
<p>This. Is. Amazing.</p>
Awesome! I see you're using a spark core. Do you know if the new spark photon will be capable enough to remove the need for the raspi?
<p>I haven't played with a Photon yet but as I understand it, the Photon is not more capable in the way you are describing. However the expansion of the actual Spark API and cloud will indeed eliminate the for the RPi in the very near future. And consequently for our Kickstarter product we do not intend to have any server. We can handle all the synchronization in the cloud.</p><p>I intend to release all code, instructions etc for our product just as I have for the prototypes assuming a successful Kickstarter launch allows us to take this next step.</p>
<p>Is there a reason that you couldn't use the cheaper Photon model instead of the Core? </p>
<p>The reason I didn't use a Photon is that it wasn't available last Dec. They are currently taking orders for June shipment.</p><p>For our Kickstarter we will be using the P1, which is basically an OEM version of the Photon.</p><p>I haven't played with a Photon yet so I can't speak directly to its capabilities but I expect the code in this project will work with only minor modification.</p>
it's a superb idea.... thanks for sharing :-)
<p>I love these, and the idea behind them is brilliant! (Ha!)</p><p>Thank you for sharing this great tutorial. I have to say, I really appreciate the thorough and excellent documentation. Nice work, all around!</p>
<p>Thanks. It's sort of a retro look at technology in some ways...trying to offer a new idea of social networking that communicates in a simpler and more beautiful way than our phones and laptops can sometimes provide. I'm glad you like it.</p>
Can you network more than 6, or is that the limit?
<p>You can network as many or as few as you want. 2, 6, 500, whatever.</p>
Awesome!
<p>This is so wonderful! I'm sure these have brought a lot of happiness to your family. And a great Instructable to boot! Thanks for sharing.</p>
<p>Pretty cool</p>
That is a very good, very social idea. When I studyed interior design, I had an idea with a similar concept. Connecting swimming-halls with cameras all over the world. The screen would look like a window, but insted of looking outside, you would look into another swimming-hall at the other side of the world, learning about other cultures.<br><br>Hopefully someone uses these concepts one day.
<p>That's a very sweet way to communicate!</p>
<p>Great job! I love this concept; lovely idea. ;) </p>

About This Instructable

43,768views

806favorites

License:

Bio: I am a musician and electrical/computer engineer. I also make new media art when I can create that opportunity. I currently serve as Concertmaster ... More »
More by whyameye:Networked RGB Wi-Fi Decorative Touch Lights PetSafe Pet Barrier Transmitter 
Add instructable to: