Searching \ for 'DAC with PIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'DAC with PIC'.

Truncated match.
PICList Thread
'DAC with PIC'
1996\12\14@224006 by Bruce Bowling

flavicon
face
I need to operate a 1 milliamp panel meter using a 16C54.
The meter will be used to display measured periods, which
I have set up the timer to determine. The problem I am
having concerns driving the analog meter from 0 to 1 ma.
My first approach was to build a R-2R ladder using port_b
pins (yes, all 8 of them). The problem with this is that
the meter was loading down the ladder (the meter in series
with 5 Kohm), so I addded a unity-gain op-amp. But now I need
a rail-to-rail op-amp to drive the meter to its full
range (from 0 to 5 volts).

I started looking at other ways to accomplish the above meter
drive. I looked at commercial DAC chips, but all that I have found
need split supplies or 10 volts or more (I am driving the PIC
with 5 volts - no other supply is available). Is there a DAC
chip on the market which operates on single 5-volt supply?

I have also looked at using a PWM approach. The internal
timer is running at a frequency of 125 Khz, so I could set up
a PWM output on one of the pins. My questions are:

1) What filtering do I need on the output?  I only need around
10 Hz response on the meter, so I guess a simple RC would
work (right???)

2) Is this approach to generating analog outputs very accurate?

3) How do I work out the required components?

Thanks for any help - Bruce
--
-----------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-----------------------------------------------------
                Bruce A. Bowling
                Staff Scientist
  Thomas Jefferson National Accelerator Facility
   12000 Jefferson Ave - Newport News, VA 23602
                (804) 249-7240
spam_OUTbowlingTakeThisOuTspamcebaf.gov  http://devserve.cebaf.gov/~bowling
-----------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-----------------------------------------------------

1996\12\15@013059 by Jerry Meng

flavicon
face
At 10:40 PM 12/14/96 EST, you wrote:
>I need to operate a 1 milliamp panel meter using a 16C54.
>The meter will be used to display measured periods, which
>I have set up the timer to determine. The problem I am
>having concerns driving the analog meter from 0 to 1 ma.
>My first approach was to build a R-2R ladder using port_b
>pins (yes, all 8 of them). The problem with this is that
>the meter was loading down the ladder (the meter in series
>with 5 Kohm), so I addded a unity-gain op-amp. But now I need
>a rail-to-rail op-amp to drive the meter to its full
>range (from 0 to 5 volts).
>
>I started looking at other ways to accomplish the above meter
>drive. I looked at commercial DAC chips, but all that I have found
>need split supplies or 10 volts or more (I am driving the PIC
>with 5 volts - no other supply is available). Is there a DAC
>chip on the market which operates on single 5-volt supply?
>
Please try the Motorola MC144110/MC144111
Single supply 4.5 - 15 Volt, 6bit DA, 6ch/4ch
for more info please check their web http://www.motorola.com
I am not sure the URL is correct.

>I have also looked at using a PWM approach. The internal
>timer is running at a frequency of 125 Khz, so I could set up
>a PWM output on one of the pins. My questions are:
>
>1) What filtering do I need on the output?  I only need around
>10 Hz response on the meter, so I guess a simple RC would
>work (right???)
Yes, the RC filter is OK, but if the PWM frequency is only 10Hz
the response would be very slow, I was using about 110Hz in my
Ham Radio Keyer design to indicate the Morse code speed, it works
fine, but in my design the PWM is only 4bit :) I made the diagram
and source code available in my home page, but the code is acturely
for MC68HC705K1.

73(Best Regards)

Jerry Meng, BA1FB

.....ba1fbKILLspamspam@spam@amsat.org
http://www.srsnet.com/~ba1fb

1996\12\15@031041 by optoeng

flavicon
face
Jerry Meng wrote:
>
> At 10:40 PM 12/14/96 EST, you wrote:
> >I need to operate a 1 milliamp panel meter using a 16C54.
> >The meter will be used to display measured periods, which
> >I have set up the timer to determine. The problem I am
> >having concerns driving the analog meter from 0 to 1 ma.
......<snip>

No need for any more chips.  The essence of PICing, IMHO, is to
absolutely minimize hardware.  It seems silly to me to add expensive
outboard chips to PICs if you don't need them.

PWM will be quite easy and may require only a resistor in series with
the meter and no other components.
Assuming you are using 5V for the PIC Vdd, the value of the series
resistor Rx can be calculated from:

1 mA = Vdd / (Rx + Rmeter)

rearranging terms:

Rx = (Vdd / 1mA) - Rmeter

You can determine the meter resistance 'Rmeter' by measuring with an
ohmmeter, or, better yet, you can put a potentiometer in series with the
meter and adjust it until you get a full scale reading with the port pin
set to a logic hi level.  At 1 mA, the CMOS port outputs will drive very
nearly to Vdd and Vss, so either method will provide good accuracy.

If you detect any needle vibration at your PWM frequency, add some
capacitance in parallel with the meter.  Such capacitance could be as
large as (approximately):

C = 0.1 sec / (Rx || Rmeter)  Farads

Where (Rx || Rmeter) is the parallel combination of the values.  For
example, suppose:

Rx = 4K   and   Rmeter = 1K   (BTW, many 1mA meters have 1K resistance)

Then, C = 0.1 / (800) = 125 uF

The meter inertia and inducance should average out the PWM nicely.
Meter coil inductive flyback should not be much of the problem: Q is
usually quite low and made even lower by Rx.

NOTE: If you use an ohmmeter to measure meter resistance, be sure to
verify that it does not source much more than 1mA to make its resistance
measurements.  If you use the potentiometer method, be sure to avoid
adjusting it to too low a resistance value, or, use another resistor in
series to prevent overcurrent from damaging the port pin or the meter.
The potentiometer method has the advantage that you  are also adjusting
out any forward drop due to port pin output impedance.


--

Paul Mathews, consulting engineer
AEngineering Co.
optoengspamKILLspamwhidbey.com
non-contact sensing and optoelectronics specialists

1996\12\15@111452 by Martin J. Maney

flavicon
face
On Sat, 14 Dec 1996, Bruce Bowling wrote:

 [NON-Text Body part not included]

Oops, I was planning to read the rest of your posting after replying to
one bit.  Can you fix your e-mail agent so that it sends standard mail,
please?

Anyway, the MAX517 is one of many single-supply 0-5V DACs on the market.
Of course, it has essentially no current drive for outputs right at either
the supply or ground, but that will be true of anything that's swinging
rail-to-rail.  And with an IIC interface it only needs two pins for
control.

1996\12\15@131035 by nigelg

flavicon
picon face
In message  <PICLIST%.....96121422400650KILLspamspam.....MITVMA.MIT.EDU> EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU
writes:
> I need to operate a 1 milliamp panel meter using a 16C54.
> The meter will be used to display measured periods, which
> I have set up the timer to determine. The problem I am
> having concerns driving the analog meter from 0 to 1 ma.
> My first approach was to build a R-2R ladder using port_b
> pins (yes, all 8 of them). The problem with this is that
> the meter was loading down the ladder (the meter in series
> with 5 Kohm), so I addded a unity-gain op-amp. But now I need
> a rail-to-rail op-amp to drive the meter to its full
> range (from 0 to 5 volts).

There is no need to go to 5 volts, just reduce the value of the series
resistor to change the FSD of the meter.

> I started looking at other ways to accomplish the above meter
> drive. I looked at commercial DAC chips, but all that I have found
> need split supplies or 10 volts or more (I am driving the PIC
> with 5 volts - no other supply is available). Is there a DAC
> chip on the market which operates on single 5-volt supply?

I don't have the information to hand, but don't some of the ZN series
DAC's work off 5 volts only?.

> I have also looked at using a PWM approach. The internal
> timer is running at a frequency of 125 Khz, so I could set up
> a PWM output on one of the pins. My questions are:
>
> 1) What filtering do I need on the output?  I only need around
> 10 Hz response on the meter, so I guess a simple RC would
> work (right???)

Just feeding an analogue meter requires very little filtering, you could
even try it with none - the movement should average out the pulses. With
125KHz pulses the needle shouldn't 'wobble'.

> 2) Is this approach to generating analog outputs very accurate?

It's more accurate than an analogue meter, it's commonly used to provide the
tuning voltage in TV receivers. The varicap tuner requires a steady voltage
between 0 and 33 volts to select the channel, this is often done via PWM
with a micro output feeding an NPN transistor with the collector connected
via a resistor to the 33 volt very stable supply (generated with an IC). The
output is then fed a low-pass filter consisting of two or three resistors and
capacitors. In this setup 10mV change on the tuner will produce a visible
effect on the picture!.

> 3) How do I work out the required components?

Sorry, my maths isn't very strong :-). I would be inclined to try feeding the
meter directly from an output pin via a 5K (less the internal resistance of
the meter) resistor. Obviously when the pin is permanent high it will read
full scale, and when low will read zero. Then try 50/50, and you should read
2.5, and anywhere in between for respective ratio's. It may be avantageous to
use a smaller resistor to feed the meter, then you could get full scale
while still feeding pulses.

{Quote hidden}

       /--------------------------------------------------------------\
       | Nigel Goodwin   | Internet : @spam@nigelgKILLspamspamlpilsley.demon.co.uk     |
       | Lower Pilsley   | Web Page : http://www.lpilsley.demon.co.uk |
       | Chesterfield    |                                            |
       | England         |                                            |
       \--------------------------------------------------------------/

1996\12\20@075324 by Luc Martin

flavicon
face
About PWM appraoch, be sure the meter will filter above 50 Hz.
You may avoid filtering.

Regards.

  ________________________
+                                                +
+ Luc Martin                              +
+ DOS is beautiful                     +
+ KILLspamlucKILLspamspamgreco2.polytechnique.fr +
+________________________+

1996\12\20@091810 by Luiz Marques

flavicon
face
> I started looking at other ways to accomplish the above meter
> drive. I looked at commercial DAC chips, but all that I have found
> need split supplies or 10 volts or more (I am driving the PIC
> with 5 volts - no other supply is available). Is there a DAC
> chip on the market which operates on single 5-volt supply?

Analog Devices makes the AD557JN, a low cost single 5 V supply 8-bit DAC
in a 16 pin DIP case.

Luiz Marques

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...