Archive | Electronics

On Sound Reactive WLED

After spending a few years writing and sharing animations with the FastLED display library for addressable LED strips, I incorporated sound reactivity to WLED. This included both volume reactive routines as well as frequency reactive routines using various Fast Fourier Transform libraries.

My YouTube account has several animations:

https://www.youtube.com/user/atuline/videos

Continue Reading →
Continue Reading

My lantern collection

I have over 50 animated lanterns, which were made using tissue paper and various frames such as:

  • Bamboo
  • Grapevines
  • 10 AWG wire with brazing
  • Round reed
  • Chicken wire

They have been on exhibition at the following venues:

  • North Delta Luminary Festival
  • Renfrew Stillmoon Festival
  • Deer Lake Luminescent Art
  • Secret Lantern Society Solstice Festival
  • Maple Ridge Celebrate the Night
  • Surrey Garden Light Festival
  • Scouts Canada Watershed Fun Night

Click on images in the article to see an animated version. The animations are customizable via Wi-Fi.

Continue Reading →
Continue Reading

WLED and FastLED

WLED is a relatively new platform for communicating with and animating LED’s without requiring a PC to drive them. As a FastLED afficionado, I’ve been developing my own code to communicate with several displays. The summer of 2019 was spent implementing an MQTT infrastructure that would support my FastLED sketches and after MUCH trial and error, I got it to work as shown here:

As a result of the challenges I faced, this effort took several months and I still didn’t accomplish my goal at the end.

Continue Reading →
Continue Reading

Cost of an Addressable LED Lantern Display

These links provide a rough pricing guideline for sourcing addressable LED electronic components for an animated lantern from Amazon. Locally would cost more:

Cost of purchasing electronic components is approximately: $55 plus tax & shipping

Lantern consumables include:

  • Bamboo, grapevine, round reed
  • Masking tape
  • Zip ties
  • Hot glue gun and glue
  • White/vanilla/coloured tissue paper
  • Optional specialty paper (tissue or mulberry)
  • Optional decorations (leaves, etc)
  • White glue or Mod Podge
  • Optional acrylic matte finish
  • Water
  • Fishing line (for larger lanterns)
  • Table covering (to contain the mess)
Continue Reading

On Wiring up a New Project

I’ve been working on an interactive art project as a favour for a friend of mine that would allow you to push buttons, use rotary encoders, potentiometers and so on in order to control an animated light fixture elsewhere in the room.

These controls would allow you to change:

  • Brightness
  • Display mode
  • Palettes
  • Speed
  • Toggle direction
  • Toggle glitter
  • and so on. . .

To do so, I’m using an ESP8266 enabled FastLED based lantern combined with an ESP32 based control panel. They’re both MQTT enabled, and I’ll be using an Android phone as the wifi hotspot and MQTT broker.

Here’s an email I sent about my progress in wiring and initial coding for the control panel:

I finished wiring up all the pins this morning and . . .

ABSOLUTELY NOTHING WORKED. Wouldn’t even upload to the ESP32. Got out the voltmeter and started measuring:

  1. LED was wired backwards (causing it to not upload), so I removed it temporarily.
  2. Some pins didn’t support internal pullup so I had to do some research and re-wiring.
  3. Didn’t set internal pullup correctly in the code. Found and fixed.
  4. Got digital pins working with basic digitalRead().
  5. Found an ESP32 button library, so I don’t have to worry about de-bouncing.
  6. Got that working with multiple buttons.
  7. Had to rename the analog ports and got the potentiometers working. Values were backwards, but math fixed that.
  8. Had previously successfully tested a rotary encoder library, so I added the code.
  9. One rotary encoder wasn’t working. Swapped wires, was the same encoder. Pins were OK.
  10. Had a rotary encoder soldering issue (solder blob). Fixed that and got both working as well.
  11. Soldered on a new WS2812 LED. Installed FastLED and got that working once I found a compatible pin.
  12. Got some ESP32 network code. It compiled.
  13. Got my old MQTT networking code. It compiled as well.
  14. Have smushed together my wifi/MQTT code with FastLED and the various inputs.
  15. Amazingly, it all still compiled.

Next step will be to start adding MQTT publishing functionality to each of those inputs.

So far so good. This shit takes time to do though. As <other friend> well knows, it can take a LOT of time.

In summary, things typically don’t go as expected, so it can boil down to troubleshooting techniques. Divide and conquer.

Update: The next day, I had the buttons and potentiometer working just peachy. Only problem is, that my mode selector was meant for buttons and I was trying to use a rotary encoder for that. Now have to change code for both the control panel as well as the lantern to accept the values provided by the rotary encoder. Have also got the LED on the control panel to show Red when there’s no network connectivity, Orange when it’s connected, and finally Green when both wifi and MQTT are connected.

Continue Reading

Getting Started with ESP8266 and MQTT

Being able to control an Arduino remotely really ups our automation game. In the beginning, it was buttons and potentiometers and from there, we graduated to Infra Red remote control.

With the widespread availability of IoT (Internet of Things) functionality, we now have Internet connectivity to our Arduino compatible microcontrollers. One method is to setup our Arduino as a web server, and Jason Coon’s ESP8266 webserver is a prime example.

Another option is a messaging protocol called MQTT (Message Queuing Telemetry Transport) which provides a lightweight method of controlling IoT devices, and in this case an ESP8266 based microcontroller.

This tutorial goes through the steps of setting up an Android phone and an ESP8266 based WeMOS D1 Mini with MQTT controls to turn the internal LED of the ESP8266 on and off.

Continue Reading →
Continue Reading