Huh? What's that? Digital are basic on and off signals that most computers use. A light switch is digital in it's own way.  It is either on of off.  Analog would similar to that of a fader control light switch where you can adjust the level of light. How can we do that if we do not have a fader control? Actually we can if we use several light switches and way step the output through a resistor (reduces electricity or power). Sometimes this is called an r2r network (resistors connected to resistors) . If you can ever noticed the latest radio turners they now increase or decrease the tuning of a radio station in steps instead of a continuous change. That is what we are going to attempt to do.  You could do this on most any micro-controller with digital output. arduino, pic, basic stamp, or etc. For our purposes, we will be using a standard computer parallel port. (Not tried this with usb parallel cable).  NO soldering required!!

What parts are needed:
9 - 20k ohm resistors
9 - 10k ohm resistors
1  - 10 uf capacitor
1 - parallel breakout cable (i.e.:
https://www.instructables.com/id/Mini-parallel-port-break-out-cable/  or
1 - extra long wire about a foot long.
3 to 4 alligator ended connector cables.
1 - good breadboard.
(amplifier not required)

Now build the r2r dac circuit as provided, but attach the voltmeter what the amp goes.Once that is done we need to create some computer code to test the circuit. We will use freebasic on linux.
for y = 1 to 255
for x = 1 to 100000
out 888, y
next x
next y
out 888, 0

Once you have written your code, you need to convert or compile it for the computer to use.

$ fbc -lang qb test.bas

Hook up the meter and set it for low dc voltage. Then run the program.

$ sudo ./test

Now notice the incrementally increases in the voltage. It almost seems if someone was turning the knob on a fader switch.The only shortcoming to this is it takes eight switches to do it. Then again it is very easily computer controlled!!! You can also use what is know as PWM (Pulse Width Modulation) with only one switch to do the same thing, but it takes fancier programming to do that.

Applications: Control the speed of a motor the intensity of light or anywhere variable voltage is needed to control a device. This circuit will NOT work with high voltage. See a professional for what exactly is needed if you want to use high power equipment.

Note: if we went the other direction and use the parallel port for input we could take a low voltage analog signal and turn it into a number or what is called as digitizing it.

Note 2: you probably can get sound out of this circuit, but you would have to use a pwm routine.
<p>Nice, thank you!</p>

About This Instructable




Bio: computoman.blogspot.com Bytesize articles instead of a trilogy in one post.
More by Computothought:Coffeepot meals Easy sun hat Easy cakes and pies. 
Add instructable to: