This week’s class discussion and accompanying lab revolved around analog output from the Arduino. My only experience with this to before was with fading LEDs, so I was excited to start moving motors and making noise!
I decided I wanted to build off of my last lab (…didn’t have the heart to pull out all those LEDs just yet…), and add new features to what I already had. When looking for inspiration around the web for using motors with and Arduino, I noticed that some breadboard diagrams used a diode for protection but our material did not. It seems like the transistor in our kit has a diode built in. Might be a question for class: is this the exception or the rule when buying transistors? In any case, having one built in saved me some space on my already cramped circuit board.
The knob pot interacts with the light in the same way as the previous lab. When there is no light, we are all the way down and when the green LED is lit we are at full value. Let’s take this motor for a spin!
I know it is a simple thing to do, but it really is a cool feeling making things move. As you can kind of see from the light (placed my hand there on purpose as to not blind the camera), and hear from the motor, the motor is moving.
An idea was forming, so I quickly moved onto adding some noise. Using the tone() function examples along with the pitches.h header file was very straightforward.
What is that white blob in the video? It is a substance called prototype plastic that I picked up a few years back at a local Makerfaire. Initially it comes as little plastic beads, and if you let it soak in extremely hot water for a few minutes it becomes malleable. You can mold it into whatever you want, and when it cools, it hardens again. It is useful stuff! Pretty strong, but also reusable. I had an idea I wanted to try:
I have a little hand cranked music box that uses music sheets that you can author yourself by using a special punch hole tool. What I wanted to do was link the mechanical action of the DC motor to the crank of the music box. So I molded this “adapter” that held both shafts tightly together. Long story short, I couldn’t get it to work. I could make the motor spin with the plastic on it, but at the end of the day I just don’t think the motor was strong enough to make the music box crank spin.
Certainly opened my eyes to the potential complexities of mechanical action. Turning the music box with your hand is a smooth and reliable interaction, and I just assumed this little motor was up to the task. Apparently not so. Definitely would like to talk in class about the process of picking motors, and building or choosing more… professional “middleware” to put between a motor and an object (as opposed to my freaky plastic blob).
So with that little experiment aside, I decided to implement the other half of my concept. Make the digital noise increase in speed with the potentiometer. I love making crazy noises, so I had a bit of fun with extremely speeding up the example sequence:
I have some ideas on how to make this a performative musical device as I grow my physical computing skills. Stay tuned. In the meantime, I’ll be trying to get “shave and a haircut” out of my head after listening to it over and over again. Thanks, Arduino example code.