I was reminded recently that when writing code in C, you have to take care to understand how variable are going to be used when declaring them. I was had just finished working on the code used to control the fire effects at The Crucible‘s Maker Faire 2013 booth when the system just seemed to come to a halt. That’s not quite what it was supposed to do.
The system was designed to have 3 24′ towers as the central part of the booth. On top of the towers would be accumulator based fire effects – a 24″ round sphere w/ a 2″ exhaust port, a 9″ x 24″ oblong tank w/ a massive 3″ pneumatic solenoid / exhaust and three smaller accumulators based on old fire extinguishers. The solenoids on the fire effects would all be controlled with an Arduino. The idea was that there would be no direct user interaction this year but the system would run automatically. Plug in the Arduino and away we go.
The code would run one of a number of possible sequences, pause between 30 and 90 seconds, randomly run the next sequence, pause . . . And it did that, most of the time. A couple of times after starting up the Arduino, several sequences would run and then nothing else would happen. Made me wonder if I had crashed the Arduino.
I added some Serial.print statements to the code to dump out details on what was happening internally and ran the code again. This time it ran without issue for almost 2 hours before coming to a halt. Looking at the output on the serial console showed that that pause value was -31438. Of course everything came to a halt, the system was attempting to pause negative 31,438 milliseconds! This didn’t make much sense until I reread the Arduino docs and saw that ints are 16 bit values. Of course it rolled over into a negative number.
Digging into the code I realized that I had used int’s in several places where an unsigned long was needed. Once fixed, all was right with the world and the system went on to work just fine for both days of the Maker Faire.
Perhaps I need to start writing these systems on a Raspberry Pi where I can use Python 😉
For the Crucible’s 2013 Soirée, I created a medium sized fire cauldron that was part of the performance.
The cauldron was created from an old halon tank from a fire suppression system. A ring was welded around the outside as a handle to allow the dancers to manipulate it without coming in contact with the fire. And a ring over the top allows the cauldron to be hung from a 19′ cable.
Inside the center of the cauldron is a kevlar wick sitting in a small pill box. The kevlar is doused with a measured amount of white gas and lit.
After the first light, I was concerned about the cable and connections living inside the fire. The cable was shortened and a 4′ chain added in its place. This moved the cable out of the fire and made the effect much safer.
Over the past several months, Chris Niemer and the amazing volunteers, interns and staff of the Crucible’s smithy have been working to rebuild a used Nazel 2B power hammer. Under Chris’s guidance, they were able to get the power hammer installed and running for today’s power hammer class w/ Toby Hickman. Frackin’ awesome!
Seems I’m becoming a bit enamored with CNC machinery. I’ve used the Tormach CNC Mill and WaterJet at the TechShop for several projects. I just love the precision and ease with which I can fabricate what’s needed. There’s just something very satisfying about directing a 50,000 psi water and garnet spray at a piece of stainless steel to cut out shapes.
It would be fabulous to have these machines in my studio but it’d be rather cost prohibitive to make that happen right now. So in the mean time, I’ll start playing with CNC systems on a much smaller scale.
My first foray is to build a ShapeOko CNC mill. I received the kit from Inventables and started assembling it almost as I was pulling the pieces from the box. A couple of days later, I had a running CNC machine!
Of course, it wasn’t without issues. Seems that I wired the Y axis motor incorrectly and it moved backwards!
Much better but I did notice that the left side of the carriage drags a bit since the drive is only on the right side. I think I can add a second stepper motor to the left side to provide direct drive instead of transferring the movement across the carriage. Should be easy enough to do…