Thursday, December 8, 2016

Week 6 - Photo Servo

This week’s adventure was to develop some kind of circuit and code with motors controlled by a sensor. I looked at multiple options, starting with using the temperature sensor to create a servo controlled fan, turning the fan on when the temperature increased too far and turning it off when the temperature dropped sufficiently. However, all of these either required multiple pieces that I didn’t have in my kit or called for multiple Arduinos. So, I switched to looking at the photoresistor as the controlling sensor. I thought about a robotic drummer (with just one stick) and effectively achieved that after a bit of research. I didn’t really have anything that would create a good drumming sound, so just demonstrated the actions. And, I realized that there is another purpose that the same circuit could serve without any change to either circuit or code, only by making a minor change in what the servo activated, physically. I realized that this same circuit would act as a great traffic counter, especially if it was set up with a strong light directed at the photoresistor, then having the servo actuate a physical counter.

Thankfully, this week, the only “issue” I had with the build was finding one that would work like I wanted it to without requiring a bunch of extra stuff that I don’t have. The code and the wiring all worked correctly the first time. I guess it was an omen, because VERY shortly thereafter I developed a tremendous headache that insists on hanging around for a good while. But, it is all good.

Here’s a screenshot of the code I used. It is a very simple code that simply does what is expected of it.



Here is a pic of the circuit. It looks much more complicated than the code! :)



Here’s the schematic I built from.



And, here’s my “Photo Servo” in action.




Final Reflection:

This type of circuit is something I could imagine being used in robotics, especially in an industrial setting. Imagine an industrial robotic arm in an area where humans also work. With a circuit similar to this built into the control of the arm, a simple safety system could be instituted whereby a shadow falling across a photoresistor would pull the arm back to protect the human that created the shadow.

No comments:

Post a Comment