> I want to run my PIC at 3.3 volts but have a GLCD that requires 5 volts. It > was suggested by a friend that I could use the HPWM and a few diodes / caps > etc to generate the voltage required to power the GLCD at 5 volts. I need no > more than 5 ma for the Logic. > > My questions are. > > What kind of current could I generate with the HPWM Diode set up and can any > body point me in the right direction to find the components values etc to do > this. PS at the start - just saw you said 3.3v and not 3v. :-( That will make all the difference to the simple cap pump. With Schottky diodes you should get 5v OK. Tray 0.1uF pump cap and 10 uF or more filter cap to start as below. ______________________________ You could do this but the voltage generated may be marginal. Schottky diodes will help. I assume the cct you have in mind is (word cct :-) ) - Capacitor end1 to HPWM pin - Capacitor end2 to D1 Anode - D2 Anode to Vcc - D2 cathode to D1 Anode (and C1) - D1 cathode to output - C2 from Output to ground. C1 try 0.1 uF C2 use say 10 uF to start. PWM at say 10 kHz to start. D1 Charges C1 when PWM is low (from Vcc) and discharges into C2 via D2 when PWM is high. You get TWO diode drops here - one across D1 while charging C1 and one across D2 while charging C2. With silicon diodes eg 1N4148 you will get a max voltage of about 2 x (3-0.6) = 4.8v. This will droop somewhat under any load. With Schottky diodes you may get say 0.3 to 0.4 v diode drop or Vout = 2 x (3-0.3) = 5.4v max. You could use eg BAT85 Schottky at the current needed but an eg 1N5418 * is vastly overkill but may give lower drop. * - that part number from memory - may be wrong. 1A 30v Schottky. Synchronous rectification (use FETs instead of diodes) would help BUT adds complexity. eg use a small pnp for D1. Emitter to Vcc. Collector to D2 Anode. Base via say 10k resistor to HPWM pin. Transistor turns on when PWM is low. This MAY give you say (3-0.1) + (3 - 0.4) = 5.5v with a Schottky for D2 NB I have not tried this circuit - its just back of a keyboard (as it were) designing on the fly so YMMV but it should work OK. (I'd use a BC327 for the transistor but if you are in in US some other small pnp will probably be more available. ______________ An arrangement that is certain :-) to work is to ring an inductor. This can be slightly more complex to design than you may expect. See archives for Roman Black and others discussions on small step up converters. Starting point. Small npn transistor (BC337 etc) Small (say 100 uH) inductor L1 (Hobby stores etc) 10 k resistor R1 Diode 1N4148 etc Output cap C1 10uF say Zener 5v 500 mW or whatever. R1 from HPWM to Q1 base. Q1 emitter to ground. L1 from Vcc to Q1 collector D1 anode to Q1 collector D1 cathode to output C1 output to ground. Zener cathode to output Zener cathode to ground. PWM high pulse needs to be long enough to allow L1 to draw enough current but not longer (beware saturation if using this for higher powers.) Ton = L x I / Vcc approx eg Vcc = 3v, L = 100 uH, Vout = 5 Ipk = 2 x Iavgin = 2 x Iout x (Vo+0.6)/Vcc Ipk = 2 x 5mA x 5.6/3 ~= 20 mA Ton = 100E-6 x 0.020 / 3 = 0.66 uS Say 1uS Ton (!) Toff is long enough to ring = say Ton or so . ((Tring ~= Ton x Vcc/Vo) Zener clamps excess energy!!!! Vital to have. This circuit will happilyproduce 20 to 50 v unloaded. LCD would probably die. Roman has a 2 transistor standalone cct that works quite well. I have an as yet unpublished 3 transistor circuit that is rather more "designable". If all the above fails, ask again. __________________________________ If efficiency is not paramount then the Joule Thief really does work. http://www.emanator.demon.co.uk/bigclive/joule.htm Around 50% efficient AFAIR. Russell McMahon -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads