Globally Synchronized Wifi Touch Lights

13,420

62

44

Introduction: Globally Synchronized Wifi Touch Lights

About: I'm a maker from Chicago, IL

This fall a recent death in the family left a bit of a gap in our life. My wife started searching for a way for our family to better keep in contact with each other. After some searching, she came across these long distance touch lamps. Intrigued by the concept, I searched to see if I could build a similar product at a more appealing price point.

After some searching, I discovered the kickstarter project of the same lamps found on Uncommon Goods and the creator’s step-by-step how-to explaining how he made the Filimin touch lamp. What follows is my own how-to on how I created wifi enabled touch lamps to connect my wife, her mom, grandma, and aunt.

The wifi lamps change color when touched and synchronize their colors to be the same no matter where in the world they are located. Each lamp gets assigned a default color so you know who has touched their lamp. This implementation is adapted and heavily borrowed from John Harrison’s original touch lights. You can find more detailed instructions in my wifi touch light blog post.

Step 1: Materials, Supplies, and Tools

Below are the materials, supplies, and tools I used to make my touch lamps.

Materials

Supplies

  • Wire (gauge 22AWG)
  • Solder
  • Hot Glue
  • Goo Gone to remove sticky adhesive from the bottom of the lamp

Tools

  • Screwdriver
  • Razorblade
  • Soldering iron
  • Hot glue gun
  • Drill and 3/32” drill bit
  • Wirecutter/wire stripper

Step 2: Disassemble the Unifun Touch Lamp

The first step is to disassemble your Unifun Touch Lamp. The finished product should look like the following.

  1. Remove the foam ring from the bottom of the touch lamp. Be careful to remove as much of the stickiness as possible from the bottom of the lamp.
  2. Unscrew the screws from the bottom of the lamp and remove the bottom plate.
  3. Remove the four silver screws to loosen the top white dome from the base of the lamp. Do not remove the dome yet.
  4. Peer between the white dome and the base for a thin wire connecting the top touch plate to the circuitboard. Cut this wire with a razorblade or wire cutter.
  5. Unscrew and remove the circuit board from the lamp base.
  6. Use a screwdriver to push the flaps holding the touch plate to the white dome.
  7. Use a soldering iron to remove the wire connected to the touch plate.

Step 3: Prepare the Shell

Once you have your lamp disassembled, you need to prepare it to be reassembled with your wifi-enabled components.

  1. Use Goo Gone or some other solvent to remove the sticky residue off of the bottom plate of the lamp.
  2. Use a 3/32” drill bit to drill a whole through the center of the battery compartment of the white dome.
  3. Cut a 6-3/4” piece of wire and solder it to the touch plate.

Step 4: Connect the Electrical Components

Now it’s time to connect the electrical components together.

  1. Solder a 3-3/4” wire to each of the VIN, GND, and D2 pins of the Particle Photon.
  2. Solder the 10M-Ohm resistor to pins D3 and D4 of the Photon.

  3. Thread the wires through the holes in the base and solder them to the NeoPixel. VIN should connect to “PWR +5V”, GND should connect to “GND”, and D2 should connect to “Data Input”. There may be multiple power and ground pins, choose the ones that are closest to the wires. It is helpful to plug a USB cable (unpowered) into the photon through the USB hole in the lamp base to help hold the Photon in place.

Step 5: Test the Lamp’s Functionality

At this point we are ready to test the Lamp’s functionality to ensure we soldered everything correctly and all the components are working.

If you have not yet set up your Photon, plug it in and use the app provided by Particle to connect to your Photon and get it connected to the internet via wifi. Particle provides good instructions for getting your Photon connected.

Once you have your photon connected, you should set up your development environment for getting code onto the Photon, I prefer using their command line tool, but their web IDE is pretty nice as well if you want to get started quickly.

If you are using the command line tool, then you can clone the repository containing the code from Github in order to flash it onto the Photon, otherwise you will need to copy and paste the code into the web browser in order to use it.

Find more details on working with the touch light code on my blog.

Step 6: Secure the Components

Once you have verified the lamp lights up as expected, you can secure the electrical components to the lamp fixture.

  1. Apply four dollops of hot glue to the lamp base in order to secure the NeoPixel. Do this quickly to prevent having the glue prematurely dry without securing the NeoPixel.
  2. Secure the wooden dowel to the lamp base (I used a pencil) behind the Photon board. This is used to prevent the Photon from moving when a USB cable is plugged into it. When gluing the wooden dowel, be careful to not cover the three holes that are used to secure the white dome to the lamp base (the fourth hole will be covered by the Photon).
  3. Unplug the USB cable from the Photon and check if it comes loose. If the Photon comes loose, secure it by gluing it to the base. If you cannot remove the Photon, put glue around the edges to make sure it stays in place. As soon as the Photon is put in place, make sure the Photon is aligned with the USB hole and plug the USB cable into the Photon to ensure it fits easily when the Photon is secured.

Step 7: Reassemble the Lamp

You’re almost finished! All that’s left is to connect the touch plate to the Photon and reassemble the lamp.

  1. Screw the white dome back into the lamp base.
  2. Reattach the touch plate to the white dome, threading the attached wire through the hole drilled in the battery compartment.
  3. Solder the wire from the touch plate to the D3 side of the resistor.
  4. Screw the bottom plate back on to the base.
  5. Place six felt pads along the bottom ring of the lamp, covering the exposed screw holes.
  6. You’re done! You can now play with your wifi touch lamp!

Step 8: Final Product

I built four lamps to give to my wife, her mother, grandma, and aunt. They work beautifully and were a joy to build. As a first Photon project, they were easy to get started and assemble. Check out the video above for a demonstration of how they work.

Be the First to Share

    Recommendations

    • Plastic Contest

      Plastic Contest
    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest

    44 Discussions

    0
    nainaaa
    nainaaa

    14 days ago

    I was able to compile my code, but when I try to flash to a lamp it says permission denied. I'm not sure what's going wrong.

    0
    pblesi
    pblesi

    Reply 13 days ago

    Hi Nainaaa,

    Could you post the exact command and error message you are receiving?

    -- Patrick

    0
    nainaaa
    nainaaa

    Reply 13 days ago

    I actually figured it out a few hours after I posted but totally forgot to remove the comment. Thank you though!

    0
    assaf386
    assaf386

    Question 3 months ago on Introduction

    Hi, are there additional lamp models that will work?

    0
    JoS119
    JoS119

    Answer 3 months ago

    to be honest you remove most of the internals from the lamp so any lamp casing will work as long as you can fit all the bits in.

    0
    JoS119
    JoS119

    Question 7 months ago

    Has anyone managed to get multiple Wifi cedentials set up on the lamps? I want to send one to my parents but don't want them to have to do anything other than plug it in. I'm able to put on one set of credentials but when I try and add a second the code doesn't compile. I want to be able to test that it works here before sending it too.
    Thanks

    0
    XerxesC
    XerxesC

    Question 10 months ago

    My lamps are working perfectly and I have lamp 2 setup with static wifi credentials (tethered to my phone). I am experiencing a weird issue though:

    - When lamp B (setup on tethered SSID and the second lamp in the array) is touched after many seconds of inactivity, it will always change color of both lamps.
    - When lamp B is touched within 10 seconds of receiving a color change from lamp A, it will always change color of both lamps.

    - When lamp A (setup on home SSID and the first lamp in the array) is touched after many seconds of inactivity, it will always change color of both lamps.
    - When lamp A is touched within 10 seconds of receiving a color change from lamp B, it will change only its own color for ~6 seconds and then assume the color of lamp B again. Once touched again after any amount of time thereafter, it will change both lamps colors.

    Any ideas anyone?

    0
    XerxesC
    XerxesC

    Question 10 months ago

    I have two lamps that light up the same color at the same time.

    The touch plate on neither lamp works for me. With the default settings the lamps seem to change color randomly and I've tried messing with the variables in the code to no avail. 'particle subscribe' doesn't seem to register touches, it just updates every 6seconds for both devices...

    Any help would be much appreciated

    0
    XerxesC
    XerxesC

    Answer 10 months ago

    I was using a 10-Ohm resistor instead of a 10M-Ohm resistor lol. Mystery solved

    0
    junho.you
    junho.you

    Question 10 months ago

    Edit solved!
    I was having trouble with a stupid "Error: Failed to Compile. Please review your code."
    I'm new to this so I did not specify which device I wanted to flash to smh. This is great work Patrick. Thanks!

    0
    JasToddRob
    JasToddRob

    Question 1 year ago

    Very cool lamps, would love to build a couple myself. Do they turn off automatically after a certain amount of time? If so, how long?

    0
    pblesi
    pblesi

    Answer 1 year ago

    Hi JasToddRob,

    Yes they do turn off after a period of time. The value is configurable, but it stays on for about 1-2 hours by default.

    0
    jhei1
    jhei1

    Question 1 year ago

    I have set up two lights and they work independently but they does not follow the change of colour for the other one. Both lights are connected to wifi.

    0
    pblesi
    pblesi

    Answer 1 year ago

    Are you seeing the lights report messages in the Particle Console? Are they both reporting messages, but the second light doesn't take on the color of the first when you touch the first? If this is the case, I would check the listening code to make sure you are listening for the right type of message.

    0
    gpaisano42
    gpaisano42

    1 year ago

    Wondering how to change the brightness of the lamps. I've gotten them to work perfectly but the brightness is a bit too high. I tried adjusting some things in the code under brightness but I couldn't seem to figure it out. Thank you in advance.

    0
    pblesi
    pblesi

    Reply 1 year ago

    gpaisano42,

    The first numbers here control the brightness at each stage of the light: https://github.com/pblesi/touch_light/blob/bacacf3...

    You will want to adjust down the 255 number, and potentially other values as those will be the brightnesses as the light decays.

    0
    AlexTheLion2015
    AlexTheLion2015

    Question 1 year ago

    Okay guys, clearly not all the code is here and easy to find, if someone could gladly post everything, including ALL the files, that would be great, I am having a hard time right now trying to get two photons flashed because the repo wasn't complete with the files that needed to be included.

    0
    pblesi
    pblesi

    Answer 1 year ago

    Hi Alex,

    Are you using the web IDE? If so, then I believe you need to include the neopixel library separately, whereas the command line CLI should automatically include the neopixel library using the project.properties file: https://github.com/pblesi/touch_light/blob/master/project.properties

    See the following link for instructions on adding libraries to your project within the web IDE: https://docs.particle.io/tutorials/developer-tools/build/core/#using-libraries

    0
    hsangione
    hsangione

    Question 1 year ago

    I've figured out the code and sensitivity, sorry for the spam of questions, but last one. Is there a way to turn the lamps off without unplugging them?

    0
    pblesi
    pblesi

    Answer 1 year ago

    Unplugging the lights is currently the only way to turn them off. I have not explored adding a manual switch, but I believe you could add a switch to a different set of pins, and then use the value of the switch to set a brightness multiplier for the light. A multiplier of 0 would turn the lights off, a multiplier of 1 would leave the lights on.