View Full Version : Analog output from BasicStamp? (Replacing an analog pot with control from BS2)
TonyA
08-20-2005, 02:08 AM
Hi,
I am trying to achieve an analog output from the BS2. I 've read that you can simulate analog output using PWM.
Is there a way you can get a resistance output from the BS2?
What I'd like to do is replace an analog potentiometer on a certain device with control by way of the BS2.
Would a digital pot chip come into this? Or a digital to analog chip?
Thanks for any help, I appreciate it.
Tony
Beau Schwabe (Parallax)
08-20-2005, 02:19 AM
There are several application notes on how to do this... My favorite chips for doing this·are the DS1267 (Dual Pot) and the AD8803 (Octal Pot).
Here is an example that I did a few years ago...
http://webpages.charter.net/schwabelove/BasicStamp/
...See:
"AD8803 Octal Digital POT interface"
"DS1267 Dual Digital Resistor Interface"
"Radio Control Electronic Speed Controller using a Stamp1" for code and schematics.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 8/19/2005 7:22:34 PM GMT
TonyA
08-20-2005, 02:25 AM
Hi Beau,
Thanks for your help. Interesting projects there.
If I wanted just one pot control would the ad5220 work for controlling a simple analog oscillator?
(I noticed something on your site that gave me an idea. How could I go about getting a control voltage (CV out) output from the BS2?)
Thanks again,
Tony
Post Edited (TonyA) : 8/19/2005 7:30:40 PM GMT
Beau Schwabe (Parallax)
08-20-2005, 02:28 AM
I think it might help if we knew more of what you were trying to do in order for us to optimize the solution.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)
IC Layout Engineer
Parallax, Inc.
TonyA
08-20-2005, 02:30 AM
Beau,
I want to control a simple oscillator with the BS2. replace the oscillator's analog pot (used to control the oscillator) with control via the BS2.
Thanks,
Tony
Beau Schwabe (Parallax)
08-20-2005, 02:35 AM
What does the schematic of your oscillator look like? If the pot has a common node to power or gnd, then you may not need a digital pot at all.
You might be able to get away with using the PWM command with an OpAmp set as a voltage follower.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)
IC Layout Engineer
Parallax, Inc.
TonyA
08-20-2005, 02:56 AM
Hi,
I am looking into the possibilities of using the BS2 to control very simple oscillators (sound effects). The types of oscillators
you could make from a 555 timer chip and the chip in the attached schematic.
Also, how I might make a simple control voltage output. The type of CV used for analog musical synthesizers/oscillators. (I don't know too much about this stuff, so sorry if I am using the wrong terminology). The CV output would be used so that you could plug into an analog synth and control it.
These are my 2 objectives. I am interested in applications that involve sound manipulation and control. I have already worked somewhat with midi.
Thanks again for your help, I really appreciate anything you can impart to me.
Tony
The attached schem is from a kit available from electronicgoldmine.com *I want to be able to replace the cds cell with controll fron the BS2.
Post Edited (TonyA) : 8/19/2005 7:58:23 PM GMT
Beau Schwabe (Parallax)
08-20-2005, 10:40 AM
Tony said...
how I might make a simple control voltage output
There are a couple of ways... One is to use a DAC (digital to analog converter) IC.
Another is to use the PWM command in combination with an OpAmp configured as
a voltage follower. (See attached schematic)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)
IC Layout Engineer
Parallax, Inc.
TonyA
08-21-2005, 08:08 AM
Thank you for your help. I will give this a try.
Tony