Searching \ for '[PIC] PWM-> Circuit ?-> 2.4 to 2.6 VDC' 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/ios.htm?key=pwm
Search entire site for: 'PWM-> Circuit ?-> 2.4 to 2.6 VDC'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] PWM-> Circuit ?-> 2.4 to 2.6 VDC'
2005\12\25@212643 by Brooke Clarke

flavicon
face
Hi:

I'm working with a sensor that's specified to have an output between 2.4
and 2.6 VDC (Vcc +5 V) and would like to amplify it's DC output.
Since the signal output is on the order of a few millivolts an
adjustable voltage reference is needed to keep the op amp swing between
the rails.  I've been using a couple of fixed resistors and a pot for
this but would like to use the PWM output from a 16F88 and some type of
circuit that would provide the 2.4 to 2.6 VDC reference signal that
would not change (the actual value would be established once during
calibration).  When the PWM output was a constant +5 volts the circuit
output would be +2.6 VDC and when the PWM output was a constant 0 volts
the circuit output would be +2.4 VDC.

Is there a circuit that does this?  Since op amps come in dual and quad
configurations one or two would be available for this function.

Thanks,

Brooke Clarke, N6GCE

--
w/Java http://www.PRC68.com
w/o Java www.pacificsites.com/~brooke/PRC68COM.shtml
http://www.precisionclock.com

2005\12\25@221157 by Jinx

face picon face
> Is there a circuit that does this?  Since op amps come in dual
> and quad configurations one or two would be available for this
> function

Sounds like you might be able to use a voltage summer, with
rectified and smoothed PWM as a variable voltage

http://www.web-ee.com/Schematics/OpAmps/AN-20.pdf

If I understand you, the sensor has an output of 2.5 +/- 0.1V.
Correct ? And you want to amplify this 0.2V range ?

For example, like a Hall Effect sensor with a small output centred
about Vcc/2 ?

> Since the signal output is on the order of a few millivolts

Except I don't quite understand that bit. If the signal is a few mV,
what is the 2.5 +/- 0.1V ? Is the signal AC on top of the DC ? Or
is the "few mV" the +/- 100mV ?

Presently are you feeding the voltage from your 2 resistors and
pot into one of the op-amp inputs to shift the ouput ?

The other option is to use the F88's ADC directly, with -Vref
and +Vref set appropriately. But I'm not entirely clear what you
ultimately want to do with the signal - measure it or just amplify

2005\12\25@225434 by Bob Blick

face picon face
On 25 Dec 2005 at 18:26, Brooke Clarke wrote:
> I'm working with a sensor that's specified to have an output between 2.4
> and 2.6 VDC (Vcc +5 V) and would like to amplify it's DC output.
> Since the signal output is on the order of a few millivolts an
> adjustable voltage reference is needed to keep the op amp swing between
> the rails.  I've been using a couple of fixed resistors and a pot for
> this but would like to use the PWM output from a 16F88 and some type of
> circuit that would provide the 2.4 to 2.6 VDC reference signal that
> would not change (the actual value would be established once during
> calibration).  When the PWM output was a constant +5 volts the circuit
> output would be +2.6 VDC and when the PWM output was a constant 0 volts
> the circuit output would be +2.4 VDC.

Hi Brooke,

If you use filtered PWM to generate a reference voltage with a range of .2 volts from a possible 5 volts,
basically your gain is .2/5, or 1/25, so the ripple will be reduced. However, if your sensor amp is using it,
you'll be amplifying the ripple back up again. So if you have your opamp gain set to 500, you'll be
amplifying the ripple to 20 times higher than it was originally. So you must filter your PWM reference
with a very low frequency knee and be extrememly careful with circuit layout.

Is it important to have a DC amp? Why not just have an AC amp with good low frequency response and
if you really need to know, read the DC voltage of the sensor with another A/D channel?

Cheerful regards,

Bob

2005\12\26@125034 by Brooke Clarke

flavicon
face
Hi Jinx and Bob:

It is a Hall sensor.  The quiescent voltage spec with no magnetic field
is about 2.5 +/- 0.1 V.
The sensitivity is 5 millivolts per gauss.  Since the earth's filed is
0.5 gauss the actual signal will always be less than 2.5 mv (more than
300 times smaller than the offset).  In order to feed the 16F88 A/D
converter the largest possible earth's field signal a lot of DC
amplification is needed but the initial +/- 75 mv offset needs to be
backed out first.

I do want to read the unamplified sensor output on one A/D input channel
and the highly amplified output on another channel.  If VRef- and VRef+  
are set to 2.4 and 2.6 volts then the gain stage is limited to 100 mv /
2.5 mv or 40 and the large signal output from the sensor can not be used.

But if the 10 bit PWM output is filtered (this is not a problem since
the value does not change often) then the gain can be more like 2.5 V
from zero / 2.5 mv or 1000.  This has a lot of advantages.

Have Fun & Happy Holidays,

Brooke Clarke, N6GCE

--
w/Java http://www.PRC68.com
w/o Java www.pacificsites.com/~brooke/PRC68COM.shtml
http://www.precisionclock.com

2005\12\26@133810 by Kenneth Lumia

picon face
Brooke Clarke, N6GCE wrote:

>do want to read the unamplified sensor output on one A/D input channel
>and the highly amplified output on another channel.  If VRef- and VRef+  
>are set to 2.4 and 2.6 volts then the gain stage is limited to 100 mv /
>2.5 mv or 40 and the large signal output from the sensor can not be used.

Although I haven't been following this thread very closely, it appears
from above that you want to set VRef+ and VRef- to a 200mV difference.
If so, you have a problem.  Most of the PICs specify the minimum delta's
to be between 1.8 and 3.0V depending on the device and Vdd.  Check the
A/D converter characteristics table in the data sheet for your device
(deltaVref).  If I misinterpreted what you were saying in the above
sentence - well, never mind!


Ken
spam_OUTklumiaTakeThisOuTspamadelphia.net

2005\12\26@170657 by Jinx

face picon face
> It is a Hall sensor.  The quiescent voltage spec with no magnetic
> field is about 2.5 +/- 0.1 V

Sounds more like the differential (rather than summing) amp from
AN20. The PWM is adjusted to balance the 0G output of the
sensor. But because the G can go negative too, the zero output
from the differential amp could be level-shifted to mid-Vcc,
which you could do with a following summer. Another amp in
the package could be used to rectify the PWM

I'm sure Allegro have app notes for doing this

http://www.allegromicro.com/techpub2/techpub2.htm#B

2005\12\26@173025 by Jinx

face picon face
> It is a Hall sensor.  The quiescent voltage spec with no magnetic field
> is about 2.5 +/- 0.1 V

Have you tried specific interest groups ?

http://www.magnetometer.org/

http://www.pacificsites.com/~brooke/Sensors.shtml (??!!)

http://www.uksmg.org/magnet.htm

Is the resistor-based adjustment in that circuit something like
what you have now ?

634SS2 datasheet (169kB)

http://www.farnell.com/datasheets/34553.pdf

Did you see the thread "[EE] Use 405x instead was 4066 help" from
the third week of 12/05 ? In it was described the technique of using
PWM to make a variable resistor with a 4066, Perhaps you could
forget about making a variable V and make a variable R instead

2005\12\26@183008 by Mike Singer

picon face
Brooke Clarke  wrote:
> I'm working with a sensor that's specified to have an output between 2.4
> and 2.6 VDC (Vcc +5 V) and would like to amplify it's DC output.
> Since the signal output is on the order of a few millivolts an
> adjustable voltage reference is needed to keep the op amp swing between
> the rails.  I've been using a couple of fixed resistors and a pot for
> this but would like to use the PWM output from a 16F88 and some type of
> circuit that would provide the 2.4 to 2.6 VDC reference signal that
> would not change (the actual value would be established once during
> calibration).  When the PWM output was a constant +5 volts the circuit
> output would be +2.6 VDC and when the PWM output was a constant 0 volts
> the circuit output would be +2.4 VDC

Even without PWM, since you need no speed. Just charge/discharge a
capacitor through a resistor from PIC output and control the output
voltage(0-5v) using ADC.

Mike

2005\12\26@195627 by olin piclist
face picon face
Brooke Clarke wrote:
> I'm working with a sensor that's specified to have an output between 2.4
> and 2.6 VDC (Vcc +5 V) and would like to amplify it's DC output.
> Since the signal output is on the order of a few millivolts an
> adjustable voltage reference is needed to keep the op amp swing between
> the rails.  I've been using a couple of fixed resistors and a pot for
> this but would like to use the PWM output from a 16F88 and some type of
> circuit that would provide the 2.4 to 2.6 VDC reference signal that
> would not change (the actual value would be established once during
> calibration).  When the PWM output was a constant +5 volts the circuit
> output would be +2.6 VDC and when the PWM output was a constant 0 volts
> the circuit output would be +2.4 VDC.
>
> Is there a circuit that does this?

Yes, this requires 3 resistors and a capacitor at minimum, although an extra
pair or two of resistors and capacitors might be a good idea to get better
PWM filtering.  Think of it as a voltage divider between the PWM output and
a 2.5V source.  You should be able to come up with resistances for that, or
at least ratios.  Now realize the bottom resistor of the divider as two
separate resistors, one to 5V and the other to GND.  Each of these have
twice the value of the bottom resistor of the hypothetical divider.
Together they are indistiguishable from a single resistor to a 2.5V source.
Look up Norton equivalence if you don't understand.

> Since op amps come in dual and quad
> configurations one or two would be available for this function.

You might want one as a buffer, but if you're really clever you can combine
the PWM divider and filter with the diff amp directly.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\12\26@212945 by Jinx

face picon face
part 1 536 bytes content-type:text/plain; (decoded 7bit)

> Even without PWM, since you need no speed. Just charge/
> discharge a capacitor through a resistor from PIC output and
> control the output voltage(0-5v) using ADC.

That sounds like a simple elegant way to do it Mike. I'm just
reading an article about using piezos as a percussion source
for a MIDI project. An LM324 is used to buffer the piezo
and charge a 1uF cap with the peak output when it's struck.
This voltage is then measured by the PIC's ADC. The result
is the force of the hit


part 2 1176 bytes content-type:image/gif; (decode)


part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2005\12\27@125511 by Brooke Clarke

flavicon
face
Hi Jinx:

What I'm trying to do has not been done before.
Hall effect devices are typically used with strong magnetic fields, i.e. near magnets.
The Allegro app notes are all aimed at that application.

Yes, the circuit at magnet.htm is using a couple of pots to generate current to buck out the Hall offset.  This circuit uses a split (+ and -) power supply but they are only using a positive output, don't know why.  But again here the magnetic field driving the Hall effect device is from a nearby magnet, not the earth's magnetic field.

I think I have figured out how to do the subject circuit.  Step one is to take the PWM output through a simple voltage divider changing the output to zero to 0.2 volts (i.e. divide by 25) and place a very large cap that's good at the PWM output frequency across the bottom resistor, now the output is a DC voltage with some ripple that can be added to 2.4 volts from another voltage divider.

Have Fun & Happy Holidays,

Brooke Clarke, N6GCE
--
w/Java http://www.PRC68.com
w/o Java www.pacificsites.com/~brooke/PRC68COM.shtml
http://www.precisionclock.com



Date: Tue, 27 Dec 2005 11:30:25 +1300
From: Jinx <.....joecolquittKILLspamspam@spam@clear.net.nz>
Subject: Re:
To: "Microcontroller discussion list - Public." <piclistspamKILLspammit.edu>
Message-ID: <005e01c60a6b$f924ba30$0100a8c0@ivp2000>
Content-Type: text/plain; charset=iso-8859-1


>> It is a Hall sensor.  The quiescent voltage spec with no magnetic field
>> is about 2.5 ± 0.1 V
>  
>

Have you tried specific interest groups ?

http://www.magnetometer.org/

http://www.pacificsites.com/~brooke/Sensors.shtml (??!!)

http://www.uksmg.org/magnet.htm

Is the resistor-based adjustment in that circuit something like
what you have now ?

634SS2 datasheet (169kB)

http://www.farnell.com/datasheets/34553.pdf

Did you see the thread "[EE] Use 405x instead was 4066 help" from
the third week of 12/05 ? In it was described the technique of using
PWM to make a variable resistor with a 4066, Perhaps you could
forget about making a variable V and make a variable R instead

2005\12\27@144738 by Mike Hord

picon face
> It is a Hall sensor.  The quiescent voltage spec with no magnetic field
> is about 2.5 +/- 0.1 V.

Is it *really* a Hall effect sensor or is it a GMR sensor?

GMR sensors can be a good way to do small field
detection, because they use a resistor bridge type
configuration.  Amplification can be performed with
any resistor bridge amp circuit.  If you can change
to a GMR circuit, it might be worth it- see NVE Inc.
for details.

Mike H.

2005\12\27@162924 by Jinx

face picon face
> magnet.htm

> This circuit uses a split (+ and -) power supply but they are only using
> a positive output, don't know why

The 741 isn't a rail-to-rail amp, so probably the output can't get down
to as low positively as they want with a single-ended supply

2005\12\29@214321 by Mike Singer

picon face
Brooke Clarke:
> I think I have figured out how to do the subject circuit.
> Step one is to take the PWM output through a simple
> voltage divider changing the output to zero to 0.2 volts
> (i.e. divide by 25) and place a very large cap that's good
> at the PWM output frequency across the bottom resistor,
> now the output is a DC voltage with some ripple that
> can be added to 2.4 volts from another voltage divider.

Brooke,

Why not first try usual approach: Expand your range 2.4v-2.6v to 0-5v
with some op.amp and then use, say 12(14)-bit stanard ADC ? You will
get sort of sub 0.1mv resolution. Extract you effective output
programmatically and get it to DAC if needed.

Mike

2005\12\31@201937 by Mike Singer

picon face
part 1 3491 bytes content-type:text/plain; charset=ISO-8859-1 (decoded quoted-printable)

I did not caught the moment when the thread jumped off-list.
So I'm reposting it now.

-----------------------------------------------------------------------

Brooke Clarke  wrote:
> If the 0.2 volt range is expanded to 0 to 5 volts then the amplification
> is 5 / .2 = 25 (fairly low).
> Using an external 12 or 14 bit A/D adds cost and complication.  For more
> money a MR sensor would work much better, but the idea is to see of a
> very low cost Hall sensor will work.

Brooke,
let's take PIC16F676 worth one dollar or so.

If after pre-amplifying your signal 25 times from m volts to, say, 100
mV, you think the signal is still weak for PIC16F676 A/D, you can add
a 4-bit R2R ladder to the another input resistors of your Op Amp to
adjust the Op Amp's offset, thus allowing bigger amplification.

The 4-bit R2R ladder is to be controlled by PIC16F676. This way you
can narrow you input range up to 16 times, making possible not 25, but
250 amplification. So your useful signal will be up to 1v. Not that
weak signal for 10 bit A/D with 2v reference level.

Don't use noisy PWM when measuring mVolts

Regards,
Mike

-----------------------------------------------------------------------


Hi Mike:

I've just been surfing Microchip App Note 655 and the R2R ladder looks
like a very nice solution.

Thanks very much,

Brooke


-----------------------------------------------------------------------


HI again Mike:

I've been trying to figure out the circuit and think I'm back to the
original question.
For example an R2R ladder driven from the PIC provides a zero to five
volt ramp with 5v/(2^n) where n is the number of bits.
I can dedicate 5 I/O pins to the ladder so get 0.156 volt steps out of
the D/A converter.  So the problem is the same as with PWM, that's to
say how to get the 0->5 volt range compressed into a 2.4 to 2.6 volt
range?

Happy New Year,

-----------------------------------------------------------------------


Brooke Clarke  wrote:
> I've been trying to figure out the circuit and think I'm back to the
> original question.
> For example an R2R ladder driven from the PIC provides a zero to five volt
> ramp with 5v/(2^n) where n is the number of bits.
> I can dedicate 5 I/O pins to the ladder so get 0.156 volt steps out of the
> D/A converter.  So the problem is the same as with PWM, that's to say how to
> get the 0->5 volt range compressed into a 2.4 to 2.6 volt range?

One input of the Op Amp - to the device's output. The second input of
Op Amp - to the central point of the voltage divider (2.5V). The
bottom resistor of the divider is compound -some resistor and R2R
ladder in series (the ladder - on the bottom).

Regards,
Mike

-----------------------------------------------------------------------

Hi Mike:

I can't visualize the circuit.  Could you send it as a hand drawn
schematic (jpg, bmp, tif, etc)?

Thanks,

Brooke


-----------------------------------------------------------------------

Brooke Clarke  wrote:
> I can't visualize the circuit.

I can hardly too now.

> Could you send it as a hand drawn schematic
> (jpg, bmp, tif, etc)?

Yes, definitely with my Epson Perfection 2480 (heck with CADs), after
I sobber up a bit tomorrow :-) It's 2:10 am now here.

Happy New Year,
Mike.

-----------------------------------------------------------------------

Tomorrow has come. The "scheme" is attached :-)

Regards,
Mike


part 2 14956 bytes content-type:image/jpeg; name=1.jpg (decode)


part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

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