Searching \ for 'A/D and signal -10V..+10V' 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/io/atod.htm?key=a%2Fd
Search entire site for: 'A/D and signal -10V..+10V'.

Truncated match.
PICList Thread
'A/D and signal -10V..+10V'
1998\06\10@090848 by Chaipi Wijnbergen

flavicon
picon face
Hello PicList members,

I need to build a device that would be able to measure an analog signal that
range from -10V to +10V.

Can anyone please suggest a circuit that will enable a PIC 16C77 to sample
this voltage ?

Thanks Chaipi


                              \\\|///
                            \\  ~ ~  //
                             (  @ @  )
----------------------------oOOo-(_)-oOOo-----------------------------------
!                                                                          !
! Chaipi Wijnbergen                                                        !
! Electronics/Computer Eng. M.Sc. Tel  : +972-8-9343079                    !
! Optical Imaging Laboratory      Fax  : +972-8-9344129                    !
! Brain Research Center           Email: spam_OUTchaipiTakeThisOuTspamtohu0.weizmann.ac.il       !
! Weizmann Institute of Science   WWW  : http://www.weizmann.ac.il/~chaipi !
! Rehovot 76100 ISRAEL                                                     !
!                                                                          !
------------------------------------Oooo.-----------------------------------
                         .oooO     (   )
                         (   )      ) /
                          \ (      (_/
                           \_)

1998\06\10@095400 by Steven Kosmerchock

flavicon
face
Chaipi,
Look in the PICList archive in the month of March and around the last week of th
e month. I remember their being a discussion similar to this. The subject was "D
riving/reading +/- 10V serial lines". I hope this was of some help.
               Best regards,
               Steven



*************************************************
Steven Kosmerchock
Enginering Technician
CELWAVE
Phoenix    Arizona    USA
email:   .....steve.kosmerchockKILLspamspam@spam@celwave.com
*************************************************
www.geocities.com/researchtriangle/lab/6584
*************************************************

---- PICLIST(a)MITVMA.MIT.EDU's Message ----

Hello PicList members,

I need to build a device that would be able to measure an analog signal that
range from -10V to +10V.

Can anyone please suggest a circuit that will enable a PIC 16C77 to sample
this voltage ?

Thanks Chaipi


                              \\\|///
                            \\  ~ ~  //
                             (  @ @  )
----------------------------oOOo-(_)-oOOo-----------------------------------
!                                                                          !
! Chaipi Wijnbergen                                                        !
! Electronics/Computer Eng. M.Sc. Tel  : +972-8-9343079                    !
! Optical Imaging Laboratory      Fax  : +972-8-9344129                    !
! Brain Research Center           Email: chaipispamKILLspamtohu0.weizmann.ac.il       !
! Weizmann Institute of Science   WWW  : http://www.weizmann.ac.il/~chaipi !
! Rehovot 76100 ISRAEL                                                     !
!                                                                          !
------------------------------------Oooo.-----------------------------------
                         .oooO     (   )
                         (   )      ) /
                          \ (      (_/
                           \_)

1998\06\10@120647 by Joe Little

flavicon
face
    I saw a circuit like that years ago.  It amounted to a precision full wave
    bridge rectifier made out of op amps (to invert the negative swing,) and a
    polarity detector.  The PIC would see the output from the A2D and a
    polarity bit.

1998\06\10@122255 by andre

flavicon
face
Chaipi Wijnbergen wrote:

> Hello PicList members,
>
> I need to build a device that would be able to measure an analog signal that
> range from -10V to +10V.
>

this is how I would do.
what ever voltage you are dealing with you have to lower it to 5 volts.


-------/\/\/\/\-----
                     |
                   5k pot

                    gnd

middle pin of your pot goes  to pic
connect 10 volts on input adjust the pot to 5 volts.


now next thing to do is to determine the polarity -10 or +10



before you do any conversion

1. make port digital
2. test for   -10  that is 0
3. test for  +10 that is 1
this way you can determine input signal.
both ways you do the same conversion.



> Can anyone please suggest a circuit that will enable a PIC 16C77 to sample
> this voltage ?
>
> Thanks Chaipi

Andre Abelian

1998\06\10@151733 by Sean Breheny
face picon face
On Wed, 10 Jun 1998, Chaipi Wijnbergen wrote:

> Hello PicList members,
>
> I need to build a device that would be able to measure an analog signal that
> range from -10V to +10V.
>
> Can anyone please suggest a circuit that will enable a PIC 16C77 to sample
> this voltage ?
>
> Thanks Chaipi

Chaipi,

I think that this could be best done by having + and - 5 V
supplies running a rail-to-rail op-amp in unity gain inverting voltage
adder configuration. The input signal would go thru a divide by four
attenuator and into the adder. There would also be a 2.5 V signal feeding
the other input to the adder. A +/- 10V signal, divided by four and added
to 2.5, yields 0 to 5V, which could be fed to the pic. The signal
reaching the pic would be inverted, so the software would have to invert
it back. THe whole circuit would involve only 10 parts. Hre is a lame
ascii art drawing of the circuit:


X-------+
       |             +-------------------10k---------------+
       15k           |                                     |
       +---10k-------+-----[op amp inv input               |
       5k            |                           output----+-2.2k---+-PIC
       |             |                                              |
      GND            |   +-[op amp non inv input                    -
                     |   |                                          ^
          5v         |  5k                                          |
          |          |   |                                         GND
         10k         | GND
          +-----10k--+
         10k
          |
         GND

Note the protection diode on the pic input. THis is to supplement the PIC
internal diode if the op amp should output below 0 V. If the voltages
very close (within 60mv or so) to  +10 and -10v matter, run the op amp
off +/- 5.5V supplies. Otherwise, you can run it off +/- 5v. You might
also want to use a potentiometer for the 2.5V voltage divider, since you
can compensate for slight errors in the circuit by adjusting it.

Good luck,

Sean


{Quote hidden}

1998\06\10@162120 by Harold Hallikainen

picon face
On Wed, 10 Jun 1998 14:49:58 -0400 Sean Breheny <EraseMEshb7spam_OUTspamTakeThisOuTCORNELL.EDU>
writes:
>On Wed, 10 Jun 1998, Chaipi Wijnbergen wrote:
>
>> Hello PicList members,
>>
>> I need to build a device that would be able to measure an analog
>signal that
>> range from -10V to +10V.
>>
>> Can anyone please suggest a circuit that will enable a PIC 16C77 to
>sample
>> this voltage ?
>>
>> Thanks Chaipi
>


       Have a look at the Maxim MAX197.  Figure 4 on their data sheet
shows how to measure +/- 10V DC samples with a single ended A/D.  It's
done with three resistors and a positive voltage source to the -10V is
biased up to 0V.  The same technique could be used with a PIC A/D.


Harold

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\06\10@163042 by Mike Keitz

picon face
> I need to build a device that would be able to measure an analog
>signal that
> range from -10V to +10V.

> Can anyone please suggest a circuit that will enable a PIC 16C77 to
>sample
> this voltage ?

If the source of the -10 to +10 V has a sufficiently low impedance, the
simplest way is with a resistor divider.  First, realize that the input
voltage changes over a range of 20V while the voltage to the PIC should
change over a range of 5V.  So no matter what else happens, the circuit
needs to divide the input voltage by 4:

In --R1-----PIC
        |
       R2
        |
       GND

R1 = (4-1)*R2 = 3*R2

Just to put some numbers on it, we'll make R2 1K and R1 3K.  This is
about right for the PIC inputs, which are recommended for a resistance of
less than 10K.

But this circuit isn't complete, since it will measure voltages of 0-20 V
fine but we want -10 to + 10 V.  One solution would be to connect the
entire circuit "ground" to -10 V.  This isn't very practical.  Another
would be to connect the bottom end of R2 to some constant voltage, call
it Vx.  But what voltage?  Well, when the input is -10 V, we need the PIC
pin to be at 0V.  So 10V / 3K = Vx / 1K.  Vx should be 3.33 V.  Does this
check out?  With 0V Vin, Vpic should be 2.5V.  We have 2.5V / 3K =
(3.333V-2.5V) / 1K, which is true.

Very likely, there isn't a handy source of +3.333V in the circuit.  But
there is lots of 5V.  So we could use another resistor divider to derive
3.333V:

5V ---R3-*------R4---GND
         |
3.33V here^

For this to work, (5-3.333) / R3 = 3.333 / R4.  That simplifies to R4 = 2
* R3.  But to be able to connect R2 (from above) to the junction and
still approximate a constant source of 3.33V, R3 and R4 must be very
small compared to R2.  This isn't practical, since it would cause a heavy
current drain from the 5V supply.

Thinking about it some more, R2 isn't necessary at all if the parallel
combination of R3 and R4 is 1K.  The combination of R3 and R4 and the 5V
supply will act like R2 and a 3.333 V supply would have (This is one of a
very few truly useful things I learned in college).  I'll spare the
details of my twisted algebra to find R3 and R4, but the solution is  R3
= 1.5K and R4 = 3K.  So the final network is:

         +5V
           |
          1.5K
           |
Vin --3K----*---- PIC
           |
          3K
           |
          GND

You can scale the resistances to any convenient value, consistent with
the source and load impedances.  Only the ratio of the values is
important.

Note that disconnecting the input will cause a reading of +3.33V, not 0V
as you might expect.  Remember the Vin end of R3 must be connected to a
low impedance in order for it to work.

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\06\10@171955 by Aaron Hickman

picon face
Sean,

   I have been using the Linear LTC1605, which accepts +/-10 V and uses a 5
V power supply.  If you need some code snipets that show how to drive it
with a PIC16C54 let me know!

Aaron Hickman

1998\06\11@174948 by Thomas McGahee

flavicon
face
Sean,
OK, let's assume you want the absolute cheapest LINEAR method
of converting the -10v to +10v input into a PIC digestable
voltage level of from 0 to 5 volts.

I could just give you the circuit, but I prefer to show
others how to design such circuits themselves. I have been
teaching electronics at Don Bosco Technical high school
for the last 21 years, and so education is a big part of
my mind-set.

We have to convert a negative voltage into a positive output,
so we will be designing an inverting op-amp circuit.

The input range is 20 (-10 to +10), the output range is 5,
so the "gain" is 5/20=1/4.  So we will use an inverting
amplifier with an input resistor that is 4 times larger
than the feedback resistor. For now let us choose Rin=4K
and Rf=1K.  The formula for a straight
line function with negative slope is y=-mx+b  where y is the
output, -m is the slope or gain defined as Rf/Rin, and b is the
offset. plug in known values, such as y=5 when x=-10.

So, y=-mx+b becomes  5=-1/4*(-10)+b
Solving for b we get 2.5
Now we have the formula y=-(1/4)x+2.5
Solve for where x=y and you get the value 2
So, the reference voltage that must be attached to
the non-inverting input of the op-amp must be +2 volts.
We will get this via a simple voltage divider consisting
(for now) of a 3K and 2K resistor in series connected to
ground and +5.

The -10 to +10 volt input signal must be capable of driving
the input impedance of the op-amp circuit. You can make the
input impedance higher by simply maintaining the same resistor
RATIO of 4K and 1K and increasing the values to 400K and 100K.
You can do the same with the reference divider. Use 300K and
200K.

Final design looks like this:
                                       100K
                             ---------/\/\/\--------
                  400K       |       \             |
-10 to +10 in >---/\/\/\------*------|   \          |
                               (-)  |      \       |
                                    |         >----*------> 0 to +5
                  300K         (+)  |       /
+5 reference O---/\/\/\------*------|    /
                             |      | /
                             \
                             /
                             \ 200K
                             /
                             |
                           -----
                            ---
                             -
Op amp should be a rail-to-rail type with power connections
to ground and +5 volts.

Man, do I hate ascii art!!!

Hope this helps.
Fr. Tom McGahee


----------
> From: Sean Breheny <shb7spamspam_OUTCORNELL.EDU>
> To: @spam@PICLISTKILLspamspamMITVMA.MIT.EDU
> Subject: Re: A/D and signal -10V..+10V
> Date: Wednesday, June 10, 1998 2:49 PM
>
> On Wed, 10 Jun 1998, Chaipi Wijnbergen wrote:
>
> > Hello PicList members,
> >
> > I need to build a device that would be able to measure an analog signal
that
> > range from -10V to +10V.
> >
> > Can anyone please suggest a circuit that will enable a PIC 16C77 to sample
> > this voltage ?
> >
> > Thanks Chaipi
>

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