This week, I finished up all the hardware I’m going to work on in the time left devoted to this final project.
Back on Thursday, I installed LEDs in their holes and wired them up to the circuit board. First, I bent the positive end to an angle conducive to attaching a long piece of stripped, stranded wire. I soldered the four respective joints and cut the excess. Next, I applied some heat-shrink tubing around the joint to prevent shorting with the bases of the potentiometers or the ground wires on the LEDs (which were installed next).
To mount the LEDs in their holes, I applied some hot glue around the flanged end of each of the bulbs. Then I pressed them into the appropriate spots on the top of the panel.
I decided to use some tinned, non-insulated copper wire to connect all the grounds. I pulled off a piece from the spool (to straighten it), then wrapped it once around each of the LED leads. I soldered the joints and cut the excess wire. Finally, I installed a long piece of black wire to the exposed end on the newly-created grounding bus. There was no need to put heat-shrink tubing over the joint.
When this was all done, I used four zip-ties to consolidate the five wires (four outputs and one ground).
On the other end, I cut all the wires to the same length, and stripped a bit of conductor off each. I tinned the ends to prepare them for attachment to male pin headers. I placed the pin headers in a breadboard and tinned their ends. Then I melted the wires to the pins. I had to ensure that I was attaching the right wires to the correct rows to avoid confusion later.
At this point, I realized that I would need more female pin headers on my PCB so that I could manually connect the new ground pin to the grounding rail. So, much like before, I cut two bits of female pin headers to an appropriate length to straddle either side of the existing construction atop the board. Then I soldered the far ends of the female pin headers to ensure that they would be flush with the board. Once this was sorted out, the middle pins were easy enough to solder in place. For the new grounding connection, I simply took a piece of black, solid-core wire, and bent it to the same shape as I had originally on my breadboard. Essentially, I now have a custom-made breadboard that’s much smaller and lighter, containing only what I need in terms of connections.
By the end of that day in Lab, I had decided to create a box for my project. Some suggested holding this step until later, but I knew it would be nearly impossible to troubleshoot without some sort of stand atop which my monstrosity could rest. (This is similar to how a car mechanic uses a hydraulic lift to peer at the underbelly of a vehicle to perform sensitive work.)
I booked a time on Friday for the eLab in the afternoon. On a piece of paper, I sketched out a crude diagram of the box I wanted to make. I knew that Jack had already designed his to a height of 4 inches, so I used this dimension value as well. Then, I cut a plate for the bottom and two small sticks for the sides. This housing is not meant to be a fully enclosed box, just something to keep my hands free while tinkering. I was in a hurry, so instead of using the proper welding agent to bond the acrylic pieces, I settled for hot glue. Because this is technically not the best way to construct the box, I was suspecting the thing to collapse pretty quickly. Surprisingly, it actually has held up all week; my connections are pretty strong! when attaching pieces, I used other rectangles of acrylic to ensure that the pieces were being stuck together at exact 90º angles. A little bit of tape did the rest. It all worked on the first try! (Though I had to troubleshoot the printing of the laser. This was the first time that Franklin was not available to help me, so I made a few mistakes during the cutting process. But thanks to Franklin’s training, I was able to rectify anything I messed up. Thanks, Franklin.)
Finally, I was free to work on coding. I first got the lights flashing in the proper sequence. Then, I spent some time consolidating bits of code from different .ino files to get the serial properly sent to processing. I created a method that sends out all 6 values (the step number and the pot values for that step) at once when called.
On the Processing end, the serial data was fed into an array that updates every frame. Much like the toggle button syntax used in some of the labs, I recorded the last step value and compared it to the current step value. When they were no longer equal, I triggered an event. The test patch first drew ellipses in rapid succession, with their centers and major/minor axis values mapped to the five pots. The last row of pots was reserved for step length. I’m just using a simple delay() in the loop() in the C++ code on the Arduino side; no need to make things more complicated with millis() as of yet.
Since that point, I continued to work on different visuals. I’m still playing around with different ideas. Some friends were nice enough to make different suggestions. I also talked to Mort, who made suggestions I would only be able to implement in another iteration of this project (that’s for the summer). Each of these different designs have been turned into their own classes, so I can call as many instances of them as I want at a time. Their constructors pass in the relevant pot values, an update() method changes certain values per frame, and a sketch() function is called in the draw() function to put the visuals on the canvas.
Here are some examples of the sketches I’m playing around with:
Other than that, I’m basically done with the essential elements of this project! I’m so happy with how this turned out. In the time I have between studying for my other classes, I will continue to work on designing more visuals and sending different types of information via MIDI to a DAW.