I also changed my strategy in regards to actuating the scultpture. I decided to use mapping software connecting it to my mac to define the color of the LEDs. Building a connected system that would interact with TouchDesigner or Arena would allow me to change the colors and programs in easy to use interfaces and withiout having to code C in arduino.
I started experimenting with TouchDeisgner to understand how I could connect it to my board. My goal was to use the ESP32 board I had built. Following online tutorials, I realized that I should transfer data from TouchDesigner to my sculpture through serial. I found tutorials online that would help with that and after a lot of debugging, I was able to light on and off LED on a strip.
However, the data transfer rate was way too slow and the result was very choppy. This would not provide the result I intended for the project. I scraped the internet to find a new solution, but not much could be found. I realized that I had to use the DMX protocol to transder the data to the sculpture. I had 2 options, eaither doing it wirelessly, or through a XLR cable.
I started by exploring the wireless possibility through the ESP32. However, even programming it, I realized that this was very cumbersome. In a party environment, wireless connections are way more unstable and reliability is very important to my design. Luckily, I found another solution, a DMX breakout board by Sparkfun made for their ESP32 board. At 2am few days before the final, I decided to buy it with expedited shipping. I also made the decision to get the ESP32 board by Sparkfun. I understand that the spirit of the class is to build boards, however, I already onboarded this skill and had very little leaway to make sure this would work. I thought that biuying the ESP32 board was a good investment in the project given the situation. I also had to buy a DMX interface for my computer to output the signal.
However, I encountered great toruble when trying to program the unit. I thought that building a MIDI controller would be a piece of cake; it seemed like a very classic arduino project. However, it proved to be much more complicated than anticipated. The main issue came from the usb interface of the chipsets. It turns out that MIDI-over-USB is not native to a lot of chips. Namely, it is not native to the ESP32. I found software that could turn serial signals into MIDI, however these 32-bit pieces of software were not Mac friendly, and, even after a lot of research, I could not find an easy to use alternative.
I learned a lot about the type of chipsets and their usb interface. It turns out that only few arduinos can do native MIDI controls. These count the Arduino Micro and the Arduino Leonardo. They are able to achieve this feat because of their atmega32u4 (a chip we don't have in the lab...) After a lot of research though, I found a hack to use an arduino uno R3 as a MIDI controller. It required swapping the firmware of the usb interface (an atmega16u2). Using this hack and the controle surface library, I was to get it recognized as a MIDI controller. However, the workflow was very inconvenient as I had to flash the firmware back and forth everytime I wanted to tweak or test the code. I hope to work with Leo and Quentin find a better solution to this problem.
The idea is to have 4 branches, each branch with 3 rows of LEDs on them. In the middle, I will add the 16x16 LED matric I had used for my Halloween costume. I have a lot to learn about DMX data universes (that's the data format fort DMX) and hope that this many LEDs will be compatible with my architecture.
We had issues with the laser-cutter on Friday night. I hope to be able to cut my pieces on Saturday.
After researching a new solution, I came back to the idea of transmitting the DMX data over Artnet wifi directly to the ESP32. I used the board I had milled to test it and it worked on the first time. It turns out that you should always believe in yourself cause there's a way to make your DIY hardware beat $250 parts from Amazon. Also, FYI Enttec parts are very bad, I would not recommend ordering from them. Build quality is low and documentation is very unclear. I had my Eureka moment When the wifi connection worked and that my LED strip lit up. It was the first time when I really felt like I had a project and that I would be able to present to the class.
I experimented with the ESP32 and tried to push the number of LEDs I could power. I started having issues with some LEDs behaving weirdly, staying open when data was off and showing the wrong color. My belief is that the issue was 2-sided; there was too much data for my little chip, and there was not enough power coming out of my MacBook. After a few tries, I realized that one ESP32 hooked up to my computer was able to power around 270 LEDs. I thus decided to use two ESP32 chips powered by 2 different USB outputs to power the 550 LEDs of my design. To make it by the deadline, and to feel like I had not purchased parts for nothing, I used the Sparkfun ESP32 Thing Plus I had b ought for the DMX over XLR setup.
I decided to 3D print a stand for the LED matrix. This also enabled me to store the PCBs under the stand. I used Legos to prop up the PCBs. This had the double purpose of holding the board up to make accessible the pins, but also to make it somewhat modular. This strategy, while not perfect, makes the programming process easier (because the switches and buttons are more easily accessible).
One last thing I had issues with was the LED connections breaking apart. I had to resolder a lot of them and even had to scrape out some covering tape to reconnect one LED. To prevent this issue from breaking the system when I am at an event, far from a soldering iron, I added hot glue to all the cionnections.
With Arena, I found that using circular complex shapes was the best for the system. It creates interesting patters and visuals on the sculpture. I was also able to display text on the LED matrix I don't tink I'll be using this feature, but it's fun to know that I can! In TouchDesigner, using generative Ai to create text might be a cool system.
Below is a breakdown of costs.
ESP32 | 4.20 |
---|---|
LED strip | 33.00 |
LES matrix | 20.00 |
Sparkfun ESP32 Thing Plus | 24.00 |
Acrylic | 83.00 |
Misc hardware | 20.00 |
Other hardware of all sorts | 5.00 |
3d printing | 1.00 |
Glues and adhesive | 3.00 |
DMX interface I did not end up using | 25.00 |
Friends we made along the way | Priceless |