Playing around with Servo Motors

This week in Physical Computing, we learned analog outputs with Servo motors and tone outputs. This was my first foray into working with motors, so I wanted to make sure I knew how to work these bad boys. We were assigned this week to find an application with motors or tones, and I decided to focus on motors in order to get more practice with them.

Servo_lab

For our lab, I hooked up my Servo motor to a potentiometer, and it was cool to see how we could control the Servo motor to the input from the potentiometer. But for my assignment, I wanted to play with more sensors than potentiometers, since I was already familiar with potentiometers thanks to our labs last week.

I saw that I had a force resistor and a photocell in my Arduino starter kit, and I wanted to practice using them. I didn’t know what I wanted to build, and since I was in LA this week, I also didn’t have a lot of supplies available to me. I kept trying to think of a practical application with these sensors and the motor, but my mind was drawing a blank. So I searched the internet for inspiration, and I ran across this wonderful box:

What a funny way to use motors! I was so busy trying to find a useful practical application, I didn’t even think about impractical ones. My background in marketing and economics trained me to always think of practical solutions. If I ever want to become an artist, I’ll need to train myself to unlearn this trait. So I decided to make a useless contraption of my own, but with a force resistor and a photo cell as well. Here were my early schematics:

useless_machine_sketch

The Servo motor would push down on a force resistor which would light up an LED. The LED would shine light into a photocell, which when it detected a certain amount of light, would trigger the Servo motor to move 90 degrees. When the photocell detected less than a certain amount of light though, the Servo motor would move back to its original position, restarting the cycle.

Trivial? Maybe. Useless? Definitely. Good practice? Absolutely.

Test_circuit

Before I put anything together, I tested the circuit to make sure everything worked. The photo above shows the LED shining light into a photo cell, while the Servo motor and a force resistor (FSR) are connected to an arduino. The light would turn on whenever the FSR was activated.

Since I was traveling this weekend, I didn’t have the resources nor the time to build a box this week. I can’t wait to take Fabrication in my second half of this semester, so I can build some beautiful enclosures for my arduino projects. In the meantime, I created a barebones prototype would help me practice building circuits as well as explore different components and sensors.

useless_machine_prototype

With some blue foam and a found metal tube, I built my useless machine. I used a metal tube in order to isolate the light that the photocell receives. With the photocell in one side and a green LED in the other, my useless machine was complete. Here’s a video of it:

As you can see in the video, the Servo presses down on a force resistor which turns a green LED on. The photocell reads this light, and triggers the Servo to move. When the photocell detects that the light is off, the Servo presses down on the force resistor again.

Some notes: in order to program the photocell and force resistor, I looked at examples that were provided on the Arduino website. I also used electric tape for this prototype, as I did not want to use hot glue and ruin my Servo machine. Lastly, I look forward to learning to fabricate to build a more beautiful enclosure for this contraption.