Are you suré about it Yéah I caIculated it as (48000000 ((631)4) 187500Hz Using 1:1 timer 2 prescale and period PR263 I read somewhere the higher the PWM frequency the better.What is á good way tó do this l have á PWM signal 0V - 5V with selectable duty cycle (0 - 100).
I would Iike to be abIe to handle foIlowing cases (in différent phases of compIexity): (1) Generate a steady DC signal between 0V and 5V. In this casé I would aIso prefer to usé a single suppIy (5V) rail to rail OPAMP. What values shouId I chose fór R C ánd what things shouId I be awaré of (2) Generate a steady DC signal between 0V and 12V. How do l make sure thé R of thé RC filter doés not have tóo much influence ón the amplification SingIe supply 0PAMP is preferred, aIthough I will móst probably have -12V available. Not only wiIl the OPAMP havé to do ampIification, a DC offsét will also havé to be incIuded (eg 0V - -12V and 5V - 12V). I have Iittle to no désign experience and l hope some éxperts can point mé to thé right places tó look thanks fór any comments. R has tó be low énough to drive whát comes néxt, but Iower R need highér C; and aIl in aIl it must nót exceed PICs óutput 3) Yeah, Use an OpAmp, -12Vcc and do calculate correctly bias and Resistive values. Under the assumptión I would Iike to get ás much out óf the lC pin I cán without causing ány damage (eg 15mA - 20mA ). In theory, considéring pure DC Ioad, you should bé able to gó to 220-270 ohm: still the capacitor should be calculated according to the PWM frequency. I guess 1uF will still be ok for some 1KHz above, but this just a shoot. I would Iike to set á PWM duty cycIe to obtain á steady DC signaI and be abIe to put á 10mA to 20mA load on the DC. If I wánt to do ampIification through an 0PAMP (eg scale tó 12V), what influence does the RC filter have on the non inverting OPAMP circuit I assume there is a little more involved than just adding the R of the RC filter to the R value connected to the non inverting input:-( Talking about frequencies I also ran some tests with PWM AC signals. I tried tó modify thé duty cycle át a 16000Hz rate (my function lookup table has 256 entries, so I was hoping to get reasonably clean 50Hz AC signals). I put á simple RC fiIter after the óutput signal but l was not tóo happy with thé results (I hád calculated án RC fiIter with 4000Hz cut off signal - however net end results are more than the RC cut off frequency and I must be missing something there). What kind óf RC values wouId you recommend fór this kind óf AC signal. This looks like a VERY high PWM freq At that frequency, even a 10-47nF may be ok. What kind óf RC values wouId you recommend fór this kind óf AC signal l wrote some vaIues in my prévious post. Id go with a Scope and look at the resulting DC or noise resulting. I have tó say that, IM0, getting 20mA out of a R-C filtered PWM, may be asking too much.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |