analog output
Archiver
Posts: 46,084
Pete-
Take a look to see if the PWM instruction will take care of your
analog output requirements.
Steve
On 8 Jan 01 at 10:08, Peter William Green wrote:
> Hello,
>
> I hope that you can give me some advice on getting an analog output
> from a BS2.
>
> I am building an instrument which measures volume flow rate using
> ultrasonic pulses and need to measure pulse width's (~ 1 ms). I
> would like to output the result as an analog voltage. So the
> stamp's only job would be to trigger an event measure a pulse width,
> output the pulse width and do it again (as fast as possible).
>
> In the interest of speed I thought that a parallel DAC would be the
> fastest way to get info out of the stamp and let it take another
> sample. Does anyone have advice on a DAC which interfaces nicely
> with the stamp?
>
> I've never used a DAC before any advice would be appreciated.
>
> -pete
>
>
>
>
>
>
>
Take a look to see if the PWM instruction will take care of your
analog output requirements.
Steve
On 8 Jan 01 at 10:08, Peter William Green wrote:
> Hello,
>
> I hope that you can give me some advice on getting an analog output
> from a BS2.
>
> I am building an instrument which measures volume flow rate using
> ultrasonic pulses and need to measure pulse width's (~ 1 ms). I
> would like to output the result as an analog voltage. So the
> stamp's only job would be to trigger an event measure a pulse width,
> output the pulse width and do it again (as fast as possible).
>
> In the interest of speed I thought that a parallel DAC would be the
> fastest way to get info out of the stamp and let it take another
> sample. Does anyone have advice on a DAC which interfaces nicely
> with the stamp?
>
> I've never used a DAC before any advice would be appreciated.
>
> -pete
>
>
>
>
>
>
>
Comments
I hope that you can give me some advice on getting an analog output from a BS2.
I am building an instrument which measures volume flow rate using ultrasonic
pulses and need to measure pulse width's (~ 1 ms). I would like to output the
result as an analog voltage. So the stamp's only job would be to trigger an
event measure a pulse width, output the pulse width and do it again (as fast as
possible).
In the interest of speed I thought that a parallel DAC would be the fastest way
to get info out of the stamp and let it take another sample. Does anyone have
advice on a DAC which interfaces nicely with the stamp?
I've never used a DAC before any advice would be appreciated.
-pete
Well this is an interesting question and depends on the resolution you need
and what the load will be.
One way to go would be to use an RC network to filter the PWM command. If
the load is not too high (or if you can buffer with an opamp) you can get 8
bit resolution and you'd select the capacitor to hold the charge between
readings.
However, you want to go fast. It sounds like you only need two I/O on the
Stamp. So for a BS2 you have 14 I/O free. Why not consider a R2R network
made with 1% resistors? Connecting 8 I/O like this will give you 8 bit
resolution and it is as fast as it can be (parallel outputs). You might
still want to buffer the output with an op amp, but that's at 50 cent chip
(use an LM324 if you don't want to bother with a negative supply).
Need more bits, just use more bits off the Stamp.
Here is an R2R schematic (but rough looking):
http://www.hut.fi/Misc/Electronics/circuits/r2r.html
You want the Dc so drop the capacitor.
Look up R2R or DAC on the Web you should be able to find more.
Just to avoid being remiss, you could also extend your I/O with a PAK-III or
PAK-IV to do this same trick (or even the extra I/O on a PAK-I or II). In
addition, you can generate lots of PWM at once without stopping using a
PAK-V (no droop between samples). And, finally, you can measure lots of
pulses at once (and count them although it doesn't sound like you need that)
with a PAK-VII. All at http://www.al-williams.com/awce
Regards,
Al Williams
AWC
* Control 8 servos at once: http://www.al-williams.com/awce/pak8.htm
>
Original Message
> From: pwgreen@i... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5WEbIEwaZS5tv-yffQEEUVvmeJ9Krpo9AKxwLw49oHS8e-y8CHekw0K_lWGXkVu0GUpqGylwX7SJSvJEcHG8]pwgreen@i...[/urlOn Behalf
> Of Peter William Green
> Sent: Monday, January 08, 2001 10:09 AM
> To: basicstamps@egroups.com
> Subject: [noparse][[/noparse]basicstamps] analog output
>
>
> Hello,
>
> I hope that you can give me some advice on getting an analog
> output from a BS2.
>
> I am building an instrument which measures volume flow rate using
> ultrasonic pulses and need to measure pulse width's (~ 1 ms). I
> would like to output the result as an analog voltage. So the
> stamp's only job would be to trigger an event measure a pulse
> width, output the pulse width and do it again (as fast as possible).
>
> In the interest of speed I thought that a parallel DAC would be
> the fastest way to get info out of the stamp and let it take
> another sample. Does anyone have advice on a DAC which
> interfaces nicely with the stamp?
>
> I've never used a DAC before any advice would be appreciated.
>
> -pete
>
>
>
>
>
I've used TI's TLC7226 with good results. It's a cheap quad 8-bit DAC with
voltage outputs and a parallel interface. This chip requires a negative
supply voltage, but the current is so low that it's a minor problem. As
with most DACs, it also needs an external voltage reference, but 8-bit
accuracy isn't very challenging. Maxim's MAX506 is a similar component.
>I am building an instrument which measures volume flow rate using
ultrasonic pulses and need to measure pulse width's (~ 1 ms). I would like
to output the result as an analog voltage. So the stamp's only job would
be to trigger an event measure a pulse width, output the pulse width and do
it again (as fast as possible).
>
>In the interest of speed I thought that a parallel DAC would be the
fastest way to get info out of the stamp and let it take another sample.
Does anyone have advice on a DAC which interfaces nicely with the stamp?
>
>I've never used a DAC before any advice would be appreciated.
Mike Hardwick, for Decade Engineering -- <http://www.decadenet.com>
Manufacturer of the famous BOB-II Serial Video Text Display Module!