Make a Voltage Controlled Resistor and Use It

 by Biotele
This is a three-in-one Instructable:
1. Make a Voltage Controlled Resistor
2.Use it to make a Voltage Controlled Oscillator
3.Use it to feed a signal into a laptop's microphone input.

The voltage controlled resistor is a very useful element in electronics. The one in this instructable takes a minute to make and does not require too much electronic knowledge to operate. It is made out of an LED and a Cadmium Sulfide (CdS) photocell. The LED changes light intensity with change of voltage/current. The photocell is a resistor that changes resistance with change in the intensity of light striking it.

To build a voltage controlled resistor, you need to glue the LED to the photocell then paint the whole assembly black to shut out ambient light. That's it!

The voltage controlled resistor can also be used to:
.Control devices like the volume of an amplifier
.Control gain in automatic gain control circuitry
.Feedback signals to control motors and robotics.
.Amplitude Modulate (AM) a signal.

Check out my other Instructables:
MAKE A HIGH VOLTAGE SUPPLY IN 5 MINUTES
Hack The Spy Ear and Learn to Reverse Engineer a Circuit
Super Easy E-mail Encryption Using Gmail, Firefox and Windows
Make a Ball Mill in 5 Minutes
Make a Rechargeable Dual Voltage Power Supply for Electronic Projects
SODA CAN HYDROGEN GENERATOR


 
Remove these adsRemove these ads by Signing Up

Step 1: Application: Voltage Controlled Oscillator

A voltage controlled resistor can be used to change the frequency of an oscillator. When a voltage controls the frequency of an oscillator, it is called a voltage controlled oscillator or VCO for short.

VCOs are used in FM modulation, mainly. In this case, it used to make a two tone siren which you can see in operation in the video below



(Note: the flashing LED is part of the voltage controlled resistor assembly, I did not paint it black to show how it operates. My hand is changing the pitch of VCO because it is shutting out the ambient light that affects the exposed photocell)
1-40 of 45Next »
ionia23 says: Sep 14, 2009. 4:31 PM
It must be me.

Correct me if I'm wrong, but with this design, as the LED light increases the photocell will decrease resistance. Simply put, bright light shining on the photocell will allow current to flow from the AC source to whatever you plug into this adapter.

It won't work the way you'd expect it to. Say you were trying to use this as a trigger for a light.

Led's require little current so you could take a speaker wire pair, connect it to your control wires on this box, and get an incandescent light to flash in time with the music.

Wouldn't work. No LED light = Outlet is live. LED light = Outlet is off.

That would have to be reversed.

PLEASE correct me if I'm wrong or mssed something. I really want to be wrong about this.
PaulMcCulloh in reply to ionia23Jan 13, 2010. 12:13 AM
You're wrong.  : )  Consider a residential street light:  as dusk approaches, less light shines on the photocell until the street light comes on (light is low = resistance is LOW).  As dawn approaches, more light shines on the photocell until finally the street light turns off (light is high = resistance is HIGH).  Another example:  You walk into a store and a buzzer rings.  What has happened is that your leg has momentarily blocked a beam of light shining across the doorway onto a photocell on the opposite side:  the resistance of the cell has gone from HIGH (light shining across doorway) to LOW (light blocked by leg), allowing current to flow to the buzzer, which sounds.  Simply put, the resistance of the photocell INCREASES as more light shines on it and DECREASES as less light shines on it. 
-max- in reply to PaulMcCullohApr 30, 2012. 4:51 PM
wait... i thought resistance decreases with more light, thus letting more power though it. so in your case, the lamp would be on during sunlight and off at night. you need to invert that signal and change it to a either ON or OFF (binary) signal with a chip, and have the signal amplified with a relay to turn on or off the 400W street light.
-max- says: May 5, 2010. 11:19 AM
for more efficiency, use a reflective paint for shielding.  like metallic silver or metallic gold paint;  or plain white paint. or even siple piece of tin (aluminum) foil or aluminum tape.
burzvingion says: Oct 15, 2007. 5:04 PM
It is slightly misleading to call this a voltage controlled resistor. A more proper term would be opto-isolator. While it will work well in a variety of applications, a faster and more accurate alternative might be to use a digital potentiometer. They are available in various configurations, maxim has quite a few app notes on them.
Polymorph in reply to burzvingionAug 28, 2008. 2:17 PM
It would be more accurate to call it a -current- controlled resistor, in that the current vs light output from an LED is fairly linear over a wide range. While it is true that the resistance vs light of a CdS photocell is not linear, for audio applications you rarely want linearity.
jackever in reply to burzvingionJan 30, 2008. 9:46 AM
It is not misleading!! You are right in that it is an opto-isolator but it is a voltage controlled resistor. Think about it: 1 change the voltage applied 2. the resistance of the photo cell changes What is your criteria for a V.C.R.?? This soluton has been used even before LED's with incandecet bulbs. It was invented by Alexander Graham Bell. And is very cost effective, and simple. How does much does a digi-pot cost and the supporting parts to develop the digit input??
burzvingion in reply to jackeverJan 30, 2008. 8:35 PM
My apologies. I did not intend to imply that it would not work, merely that it may not be optimal for certain applications. Particularly where a quick response time or linear response curve are desired.
jackever in reply to burzvingionJan 31, 2008. 7:12 AM
Thanks. Every application has its own options and optimal solutions. I need to check my spelling- Incandescent- not incandecet . also to many does's.
Sandisk1duo says: Mar 16, 2008. 6:20 PM
you should use a high intensity LED instead of the red
Biotele (author) in reply to Sandisk1duoMar 17, 2008. 4:15 AM
The red LEDs where the only ones that I had that were rectangular. Rounded LEDs are harder to glue. Changing the type of LED changes the transfer function. The cadmium cell best respond to green light.
Polymorph in reply to BioteleJul 13, 2008. 10:37 AM
I've done this for years, you just sand the end of the LED flat. You aren't even worried about it being smooth since it is glued onto the photocell.
Biotele (author) in reply to PolymorphJul 14, 2008. 2:23 AM
What do you use them for?
Polymorph in reply to BioteleAug 28, 2008. 11:27 AM
A number of things, anywhere I need a variable resistor and it is easier if it is isolated (versus using a FET as a variable resistor). I've used it as part of an AGC circuit. Used several to modify a Radio Shack digital echo box into a nice Effects box that would vary the echo depth, timing, volume, etc. so it would act as a multi-effects guitar pedal. Made VCO with a 555 timer. Remote wired volume/balance/tone controls. Etc. CdS photocells are most sensitive to green/yellow light, so I usually use a yellow LED (less forward voltage than a green LED).
Biotele (author) in reply to PolymorphAug 28, 2008. 1:19 PM
they are perfectly suited for AGS in the audio range and they are less of a headache to design than jfet in the feedback loop of an op-amp. They can be used as digitally controlled variable resistors with a voltage hold circuit. I even linearized them by using a reference CdS in a feedback loop matched with the working CdS ( I glued the CdSs side by side and used one LED for both).
Polymorph in reply to BioteleAug 28, 2008. 2:02 PM
And they have a faster attack time (ie, change to low resistance with light) than decay (ie, change to high resistance with less light) that is well suited to AGC. I like your idea for linearization.
thermoelectric in reply to BioteleAug 28, 2008. 12:55 AM
Glue to the photocell!
Sandisk1duo in reply to BioteleMar 17, 2008. 4:35 PM
i agree that they are harder to glue, but you get a lower resistance as a final product. also, what wattage are those photocells?
Biotele (author) in reply to Sandisk1duoAug 23, 2008. 5:31 PM
you can easily fry them at moderate voltages, I guess a 1/4 watt.
Derin says: Apr 22, 2008. 7:25 AM
be careful with cadmium it is both toxic and recognised as calcium
Sandisk1duo in reply to DerinAug 23, 2008. 5:45 PM
recognized as calcium in your body?
Derin in reply to Sandisk1duoAug 23, 2008. 11:21 PM
yep,it acts like it has calcium,instead it has CADMIUM in it.So that spreads the poison and gives it a permanent home.
Sandisk1duo in reply to DerinAug 23, 2008. 11:34 PM
crap! i'm gonna recycle away my NiCad batteries! <-after i drain the last bit of life out of them
Derin in reply to Sandisk1duoAug 24, 2008. 12:06 AM
oh yay NICD OUT!NIMH IN!!
Sandisk1duo in reply to DerinAug 24, 2008. 1:20 PM
ya, but NiCad batteries can take a beating when you re-charge them, since i don't like to go on a quest to find my only charger, i usually just charge the batteries with my variable PSU
jcomtois says: Mar 9, 2008. 6:28 PM
Nice concept. This voltage controlled resistor is like an analog opto-isolator, very cool. I just finished a similar "digital" version for controlling 110V outlets. Someone below mentioned driving the LED in pulse-width modulation fashion and it occurred to me that this would be a good way to completely isolate digital noise from an analog circuit because not only are the two circuits electricall isolated, but the CdS cell also has a such a comparatively long time constant.
Biotele (author) in reply to jcomtoisMar 10, 2008. 2:44 AM
This is precisely an analogue opto isolator. I could not find ones that are ready made and affordable so I made them myself.
jcomtois in reply to BioteleMar 10, 2008. 4:53 PM
yep, that's how I got into Instructables. Have you plotted the response curve of any of these? How linear are they?
Biotele (author) in reply to jcomtoisMar 11, 2008. 6:15 AM
Yes it is in step 4. It is non linear, of course, which give this device the ability to mix signal like a diode.
jcomtois in reply to BioteleMar 11, 2008. 5:04 PM
Sorry, I was skimming the site and missed it.
lucianoabcd says: Aug 23, 2007. 11:28 AM
Have you tried reading the mic input with some program (I mean other than a wav recorder!) ?? I've always wondered whether the microphone could be used as a cheap and easy signal input port...
Biotele (author) in reply to lucianoabcdAug 24, 2007. 4:04 AM
Yes, I used Audacity. One of the main motivation behind this instructable is to use the mic as an easy Analog to digital converter.
lucianoabcd in reply to BioteleAug 30, 2007. 7:37 AM
I would like to use some dll or ocx from inside a vb or c program... And going beyond, I'd like to try this as an input system for my pocket pc, lol !!!
Biotele (author) in reply to lucianoabcdAug 30, 2007. 10:02 AM
You can do that. Some pocket PC don't have a mic input, so you need to hack out the mic and solder the decoupler instead. You need to make sure that the internal mic has a voltage on it, or else you need to supply a voltage to the CdS.

As for the program on pocket PC you can try Bioera

http://www.bioera.net/
Brandon121233 in reply to BioteleAug 25, 2007. 2:27 PM
Try a program called scope
Biotele (author) in reply to Brandon121233Aug 25, 2007. 2:39 PM
what I need, is a program like labview but limited to microphone input. That will be ideal.
therian says: Aug 26, 2007. 6:31 AM
can anyone please give resistor or voltage controlled oscillator circuit (not 555 or variable diode one)
therian in reply to therianAug 26, 2007. 6:33 AM
something what can make radio frequency
therian in reply to therianAug 26, 2007. 8:20 AM
like RC oscillator circuit ( cant find any)
rc jedi says: Aug 21, 2007. 6:21 PM
i thought of it one time to solve some servo control mixer issues like used in r/c planes, but aren't cds a bit slow? not in human terms but in freq 50hz or faster? if true, could photo transistors in linear mode substitute? thay are faster. your project has lots of applications, thanks for doing the work, we now have a circuit example to follow!
1-40 of 45Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!