Wednesday, August 10, 2011

Wall-A's "Arm" and V_o

Greetings world!

For at least one person, it'll be obvious why I've posted this. Several months back I began working on a project involving an ATMEL based micro-controller, some servos, and a few sensors. The goal of the project was to experiment with different differential-drive algorithms, and to gain experience with the spiffy soldering iron I 'burrowed' from my step-dad. Originally, the project ran on a homemade augmented micro-controller, but later moved onto an Axon II because I was a noob and the thing had more documentation than the relic tomes ATMEL offered.

The baby I brought into the world was given the name of "Wall-A." She is a 2 wheel differential drive critter with an ultra-sonic sensor, and 2 homemade light sensors made out of cheap cadmium sulfide (CdS) photoresistors that are cheaply available from the Shack. I'll be giving a brief overview of the schematics involved with the photoresistor set up.

First off, this is a CdS photoresistor.
In absolute darkness, you can consider it to be in the off position. The voltage potential running through the leads would be 0. If photons from light hit the surface of this circuit element the pathway for current running through the leads is opened. Effectively, higher levels of frequencies correlate to a decrease in the resistance this pathway offers. In the photo below you can see me holding a photoresistor connected to a multimeter and pointing it towards a lamp.

In order to make a useful application of this for data logging, it's best to take advantage of something known as the voltage divider rule. The standard equation governing this circuit is set to calculate what the out voltage is.
(eq1.1) v_o = R*v_i/(R+R_p), where v_o = voltage that gets read by the micro-controller, R = resistance provided by a static resistor, v_i = voltage coming in, R_p = the variable resistance provided by the photoresistor which is correlated to the intensity of the light hitting the circuit element. It is R_p which we are trying to solve for. The schematic and soldered circuit looks like this.

The voltage across each resistor in a series circuit divides in direct proportion to the individual series resistances. Thus, you can always determine the proportion in which voltage drops are distributed around a circuit. Since we are solving for R_p, eq1.1 rearranges to
(eq1.2) R_p = ((R*v_i)/v_o) - R

Again, R_p correlates to the intensity of the photons hitting the surface of the photoresistor. In plain English, it gives you a calculated value based of an analog reading from the circuit. Ahh.. It would tell you how dark or not dark it is outside.

So this is how you would create your very own light sensor. Typically they sell for ~$5 on the market, but if you have the materials at hand, you can make your own in as little as a couple minutes. These sensors are currently being used on the Wall-A prototype to help the little guy stay hidden in the darkness. He is a photophobe you see.


Yes, that is a 2x4, duck tape, and cardboard you see. Wall-A is an incredible advanced high-tech prototype and will be doing stuff like curing cancer, or harassing neighborhood cats one day.



















No comments:

Post a Comment

(-_-)...