Searching \ for '[EE]: PWM-to-analog voltage' 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=analog
Search entire site for: 'PWM-to-analog voltage'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: PWM-to-analog voltage'
2000\08\04@174453 by Andrew Kunz

flavicon
face
Comments on using this as a variable voltage source to control contrast on an
LCD:


          D1      R1
CCP2 ------>|----/\/\/\/-----o--------
                            |       |
                           ---      \
                           ---C1    /R2
                            |       \
                            |       /
                            |       |
                            |       o---- To LCD
                            |       |
                            |       \
                            |       /R3
                            |       \
                            |       /
                            |       |
                            o-------o
                                    |
                                   -9V

CCP2 will output a PWM which will vary according to the user's contrast desires.

D1 protects the pin against reverse voltage.

R1 limits current to C1 (forming a simple LPF).

R2 and R3 divide the voltage to limit the range.

Comments?

Thanks.

Andy

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\04@182721 by Dwayne Reid

flavicon
face
At 05:44 PM 8/4/00 -0400, Andrew Kunz wrote:
>Comments on using this as a variable voltage source to control contrast on an
>LCD:
>
>
>            D1      R1
>CCP2 ------>|----/\/\/\/-----o--------

D1 is superfluous - it will always conduct with that negative supply
present.  Otherwise, I thinkit looks fine.

dwayne



Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 16 years of Engineering Innovation (1984 - 2000)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\04@204737 by David Covick

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

Andrew,

I designed this little circuit a few months ago using SPICE.
Just vary the PWM and you are home free.  You don't need any external
negative voltage!!  It produces negative voltage on its own using a positive
voltage in a charge pumping type method off the PIC PWM.

The attached virus free jpg schematic will fill you in.

Have at it!

Sample ref code:

Connect PORTC.2 of 16F877 to PWM IN.
Connect Vee on LCD to Vee Out.


'**************** LCD Display Negative Voltage ********************
'********************* 16F877 @ 20 MHz ****************************

PR2=255              ' Set PR2 to 19.53 kHz
CCPR1L=230           ' Set Pulse width - CCPR1L must be less than PR2.
                    ' Lower number(pulse width)=higher view angle
                    ' PR2 value is 100% duty cycle.
                    ' PR2/2 = 50% duty cycle.
TRISC.2=0            ' Set CCP1 bit as output
T2CON=%00000100      ' Timer on prescale is 1
CCP1CON=%00001100    ' Set PWM Mode
'******************************************************************

Any questions let me know.

David



{Original Message removed}
part 2 12943 bytes content-type:image/jpeg; (decode)


part 3 129 bytes
--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\05@043712 by Peter L. Peres

picon face
D1 is useless used like this imho, the cap should be between GND and R2/R3
node imho and drop R1. Apart from that LCDs are usually so insensitive wrt
Vlc that you can do almost anything you want here (I mean noise, triangle
wave etc on Vlc, anything as long as you do not approach the backplane
rate or its low harmonics to within 30 Hz or less).

hope thsi helps

Peter

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

2000\08\08@101531 by Andrew Kunz
flavicon
face
>I designed this little circuit a few months ago using SPICE.
>Just vary the PWM and you are home free.  You don't need any external
>negative voltage!!  It produces negative voltage on its own using a positive
>voltage in a charge pumping type method off the PIC PWM.
>
>The attached virus free jpg schematic will fill you in.

Tried it.  Looking at it with a scope, I see a standard "ac-coupled" waveform
from the PWM output pin relative to GND.  If I disconnect the diode/cap circuit,
the waveform has nice square form.

I didn't have any 1N34's so we stuck in a 1N4004.  Right now I'm searching out a
1N34 cross to see if it's sensitive to the diode type used.

Any ideas?  All the connections appear to be correct, diodes are in correctly,
etc.

Thanks.

Andy

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\08@102824 by David & Lily Covick

flavicon
face
Andy,

The diodes are very important....you are correct.  If you do not use 1N34's
or a germanium diode substitute, then it will not work properly......believe
it or not :)

I know the circuit works fine and I've shared it with others with
success....

Keep on trying.  Possibly it will work with silicon with
modification.....but the 1N34's are needed for low forward drop....this is
what is killing the operation.

I think another alternative is a 1N270.....try looking up that one.

David


{Original Message removed}

2000\08\08@103822 by Andrew Kunz

flavicon
face
Thanks, David.  The tech hunted around and found some 1N34's in the stock room.
He's swapping them out now.

Thanks.

Andy









David & Lily Covick <dacspamKILLspamWEST.NET> on 08/08/2000 10:27:08 AM

Please respond to pic microcontroller discussion list <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>








To:      EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [EE]: PWM-to-analog voltage








Andy,

The diodes are very important....you are correct.  If you do not use 1N34's
or a germanium diode substitute, then it will not work properly......believe
it or not :)

I know the circuit works fine and I've shared it with others with
success....

Keep on trying.  Possibly it will work with silicon with
modification.....but the 1N34's are needed for low forward drop....this is
what is killing the operation.

I think another alternative is a 1N270.....try looking up that one.

David


{Original Message removed}

2000\08\08@103826 by Alan B. Pearce

face picon face
> I didn't have any 1N34's so we stuck in a 1N4004.

I have seen reverse recovery problems on 1n4004 diodes at 50Hz!!! Even the fast
switching versions would probably have problems at any frequency you would put
out the PWM. Try 1n4148 if you can live with silicon diodes, or go to schottky
diodes. These should be eminently satisfactory at the voltage and current levels
involved if you cannot find germanium ones readily.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\08@120450 by Dan Michaels

flavicon
face
Andy Kunz wrote:
>>I designed this little circuit a few months ago using SPICE.
>>Just vary the PWM and you are home free.  You don't need any external
>>negative voltage!!  It produces negative voltage on its own using a positive
>>voltage in a charge pumping type method off the PIC PWM.
>>
>>The attached virus free jpg schematic will fill you in.
>
>Tried it.  Looking at it with a scope, I see a standard "ac-coupled" waveform
>from the PWM output pin relative to GND.  If I disconnect the diode/cap
circuit,
>the waveform has nice square form.
>
>I didn't have any 1N34's so we stuck in a 1N4004.  Right now I'm searching
out a
>1N34 cross to see if it's sensitive to the diode type used.
>
>Any ideas?  All the connections appear to be correct, diodes are in correctly,
>etc.
>


JFTHOI, try schottky diodes, and also try referencing the output RC
filter to gnd instead of +5V.

Also, the PWM frequency and relative values of the 2 caps are going
to have some effect on how well this ckt works under loading.
Also, max load current is going to be <= max current out of the
PWM pin - 20 mA.

- danM

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\08@173924 by markwillcox56

picon face
1N4000 series diodes have a slow rise time. They are suitable for line/mains
frequencies up to about 500Hz.


{Quote hidden}

>{Original Message removed}

2000\08\08@205501 by David Covick

flavicon
face
Andy,

Let us know how you come out.

David


----- Original Message -----
From: Andrew Kunz <RemoveMEakunzspamTakeThisOuTTDIPOWER.COM>
To: <PICLISTEraseMEspam.....MITVMA.MIT.EDU>
Sent: Tuesday, August 08, 2000 7:38 AM
Subject: Re: [EE]: PWM-to-analog voltage


> Thanks, David.  The tech hunted around and found some 1N34's in the stock
room.
{Quote hidden}

<RemoveMEPICLISTEraseMEspamEraseMEMITVMA.MIT.EDU>
{Quote hidden}

1N34's
> or a germanium diode substitute, then it will not work
properly......believe
{Quote hidden}

searching
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\10@084114 by Andrew Kunz

flavicon
face
I had to move the filter to reference to GND, but it works now.  Very precise
control (I'm using 10-bit PWM mode).

Thanks.

Andy










David Covick <RemoveMEdacKILLspamspamWEST.NET> on 08/08/2000 08:53:04 PM

Please respond to pic microcontroller discussion list <PICLISTSTOPspamspamspam_OUTMITVMA.MIT.EDU>








To:      spamBeGonePICLISTSTOPspamspamEraseMEMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [EE]: PWM-to-analog voltage








Andy,

Let us know how you come out.

David


{Original Message removed}

2000\08\10@092122 by David Covick

flavicon
face
Andy,

Don't know how you can ground the RC?  Then it won't work as -3 to +1?

What voltage range are you getting Andy?

David

{Original Message removed}

2000\08\10@092947 by Andrew Kunz

flavicon
face
>Don't know how you can ground the RC?  Then it won't work as -3 to +1?
>What voltage range are you getting Andy?

-1.5 or so to +.8 or so

Before I did this, it would not change the output voltage at all.

Andy

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\10@094244 by David Covick

flavicon
face
Hummm.....I have it exactly as the schematic shows...the RC to +5 and it
works -3 to +1.

Well, new one on me......glad you got it working :)

David


{Original Message removed}

2000\08\10@095446 by Andrew Kunz

flavicon
face
>Hummm.....I have it exactly as the schematic shows...the RC to +5 and it
>works -3 to +1.
>
>Well, new one on me......glad you got it working :)

What frequency were you using?

Andy

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\10@101805 by David Covick

flavicon
face
Andy,

19.5 kHz

David


----- Original Message -----
From: Andrew Kunz <KILLspamakunzspamBeGonespamTDIPOWER.COM>
To: <EraseMEPICLISTspamEraseMEMITVMA.MIT.EDU>
Sent: Thursday, August 10, 2000 6:53 AM
Subject: Re: [EE]: PWM-to-analog voltage


{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

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