-----Original Message----- From: Russell McMahon To: Jon ; PICLIST Date: Thursday, 14 May 1998 18:07 Subject: Re: Re: Frequency for PWM >Sorry if this is too laboured - I don't know how much you >know so I'll try to spell it out well. > >If you are willing to follow the PWM output by a filter and >a buffer (which can be as simple as a 1 transistor emitter >follower) then you can make the PWM as slow as you wish. > >PWM output to Resistor. >Other end of resistor has a capacitor to ground. >Resistor/capacitor junction goes to NPN transistor base. >Transistor collector goes to V+ >Transistor emitter goes to gauge etc. >(Real life may get a little more complex but this is a good >start). > >The product of the Resistor value in ohms x the capacitor >value in farads is the time constant Trc. >Trc should be "several times" longer than the period of the >longest PWM pulse (experimentation will teach you more >faster here than theory). > >If you make Trc very long and the PWM slow to match then the >gauge may respond too slowly for your needs. A standard >meter (with relatively fast response) can be used in place >of the gauge here. > >In practice you will find that capacitor leakage and >transistor base drive (amongst other things) (and you >willingness to wait for the gauge to move :-) ) will place >an upper limit on the time constant achievable. > >For R= 100K and C = 1uF then Trc = 0.1 seconds. >PWM at 0.01s LONGEST pulse component would (off the top of >my head) be somewhat jittery on a meter (but a gauge >wouldn't be). 1 MOhm/1uF would be OK in this case but as >Ibase is only about 5v/1MOhm = 5uA you can only supply about >1ma out (typical transistor current gains (beta) are 200 ish >(more is possible) 200 x 5uA = 1mA). Using a bigger >capacitor instead would be OK (10uF, 100uF, ...) but watch >capacitor leakage currents. > >Use of an op-map follower as a buffer would reduce these >problems. > >-----Original Message----- >From: G.Daniel Invent Design > >To: PICLIST@MITVMA.MIT.EDU >Date: Tuesday, 12 May 1998 22:37 >Subject: Re: Frequency for PWM > > >>PHXSYS wrote: >>> >>> Hello >>> >>> I have an application where I want to PWM a FET to drive >a gauge. Is there any >>> rule for the frequency PWM should be applied. I don't >want to dedicate my >>> 16F84 to a PWM task. Can I run at i.e. 50HZ and complete >other tasks in >>> between, kind of like a R/C servo? I suppose it really >depends on the >>> characteristics of the driven device, but I am looking >for some general rules. >>> >>> Thanks >>> >>> Jon >> >>Fuel guage example: >>turn the ignition on and time full scale deflection(if tank >full of >>fuel). divide this time by minimum of 20 and PWM at this >period or >>smaller >> >>many car guages use bimetalic strips with nicrome heater >winding, >>thermal inertia of this would take next to zero time >overhead for a PIC >> >>regards, >>Graham Daniel. >> > >