Awesome Open Source
Awesome Open Source

familamp

Alt text

Overview


Networked lamps using a Particle Photon, WB2812B LEDs (aka NeoPixels), and a touch-sensitive panel. They communicate and synchronize colors across lamps via the internet and Particle's cloud using Particle.subscribe() and Particle.publish() functions. Bonus of using Particle's cloud: easily push updates and add features from Particle's browser-based IDE and Console.

Images


Demo of operation:
Alt text
https://youtu.be/uUX5NEsEXrw

Special mode idle sequences (instead of being off, the lamp runs an assigned idle sequence on holidays) Alt text Alt text Alt text

Alt text

Circuit boards from Osh Park: Alt text

Hardware


  • Particle Photon
  • WB2812B strip of LEDs. I used 60 per lamp, because this seemed like a good match for my 2A power supplies.
  • A 3.3V to 5V logic level shifter to convert the 3.3V data bus from the Particle Photon to 5V the NeoPixels require.
  • Pre-cut acrylic pieces to make the acrylic light box. TAP Plastics was the vendor I chose for this. (See Other Note #1) For each lamp:
    • 2 cut-to-size 1/8" thick pieces, 5" x 9-7/8"
    • 2 cut-to-size 1/8" thick pieces, 4-3/4" x 9-7/8"
    • 1 cut-to-size 1/8" thick piece, 5" x 5"
  • A sheet of thin copper for the top. I used a smooth ball peen hammer on the copper before installation to give it a hammered look.
  • Wood for the base and any flourishes you want for your lamps
  • 3/4" x 3/4" outside corner moulding (if desired, to hide seems).
  • Custom PCB (I designed this in EAGLE and requested manufacture by OSH Park)
  • Other supporting bits (per lamp):
    • 1 resistor of value between 300 and 500 Ohms
    • 1 resistor of value between 1MOhm and 10MOhm (See Other Note #2)
    • A barrel jack of matching dimensions to your power supply (Mine were 5.5mm with a 2.1mm center pole)
    • A 5V power supply able to power the lamp. I chose a UL listed supply of 2A. (See Other Note #3)
    • Feet for the bottom of the lamp. I grabbed some rubber feet from my local hardware supply store.
    • Mounting hardware to attach the PCB. I used small screws and standoffs from my local hardware supply store.

Software


Assembly


  • 1MOhm resistor between pins D3 and D4 of the Particle Photon
  • D2 goes to a 3.3V to 5V Logic Level Shifter, then to a resistor of value between 300 to 500 Ohms, then to the data input pin of the NeoPixels.
    • The resistor prevents voltage spikes that might otherwise damange the first pixel in the string.
  • D3 of the Particle Photon is connected to the touch sensitive hammered copper panel on the top of the lamp.
  • Connect a capacitor (1000µF, 6.3V or higher) across VIN and GND on the Particle Photon, then connect VIN and GND to the corresponding NeoPixel pins.
    • The 1000µF capacitor prevents the initial onrush of current from damaging the pixels over time. I ended up using a 500µF capacitor instead so it would fit my design's physical contraints better.
  • I used a 9" length of 1" PVC pipe to wrap the NeoPixels around, and hot-glued this into a hole in the top of the wood base.
    • Do not use hot glue to glue the NeoPixels to the PVC pipe. Either buy the NeoPixels with 3M tape on the back or use something like silicone (do not power the pixels on until after the time indicated for complete dry time on the glue of choice to prevent shorting the pixels). When I used hot glue, this caused the strip to stop working correctly

Other Notes & Lessons Learned


  1. I tried saving money here by buying a large sheet of clear acrylic and cutting it myself, then sanding to make clear into frosted. It turns out cutting acrylic is not easy to do well. Abandoned this idea and bought clear acrylic pre-cut from a vendor, then sanded with 60-grit using a random orbital sander to frost the acrylic. This still took forever. If I were to do it again, I'd just buy pre-frosted with a medium light pass-through level.
  2. A lower resistance is less sensitive, but also polls faster. A high resistance takes longer to poll but can detect changes to capacitance with more sensitivity. Prototype between 1MOhm and 10MOhm to see what works with your design. I chose 1m ohm because the code loops back through a the captouch poll function frequently in the middle of effect transitions. It does this to try to be responsive to touch as quickly as possible. In really dry weather it does slow down polling significantly which has the end result of making slightly stuttery animation effects, even with 1MOhm.
  3. Try to avoid power supplies that are not UL-Listed. 2A was a good middle ground for a reliable supply. This device draws ~1A at 5V on its brightest setting during typical usage. If all LEDs are at maximum brightness white (not something available in the current code), the lamp draws almost 3A.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c-plus-plus (17,355
iot (536
lamp (24
leds (14

Find Open Source By Browsing 7,000 Topics Across 59 Categories