Lance Allen is right, you have to base the duty cycle on the ratio of the desired power consumption and the max power consumption, not just the voltages. I was so intent on demonstrating a working circuit with values that I failed to notice that I was using a voltage instead of power ratio. Actually, though, the duty cycle has to be higher than the 3% that Lance mentioned, due to the fact that the current in the coil will be ramping up, not going up instantaneously. In fact, if the frequency is made sufficiently high, it is the inductive reactance of the coil that will dominate, not the DC resistance. So, the value of the PWM is between 3% and 17.5% for the example we have been illustrating. There are also differences when driving an inductive, resistive, or capacitive load using a fixed PWM. Purely capacitive loads charge up, and the current decreases while the voltage tends towards max. Inductive loads will have ramping currents, and if a shunting diode or snubber is not used, the coil can generate some really nasty spikes when the FET turns OFF. Purely resistive loads are the tamest of all loads Also be careful with regards to the actual switching FREQUENCY used. When the frequency is too low and you have an inductive load, then you will have moments when the current will exceed the maximum you want and may do permanent damage. You are safer starting with higher frequencies and lower duty cycles and experimenting until you find the best combination. Or eliminate all the guesswork and use a technique that includes negative feedback. That will cost you some more pennies, though... Even a load like a light bulb can be burned out if a voltage in excess of the lamps max voltage is applied for too long. The actual operating frequency IS important! Lance Allen said: >I would add that there is a gotcha with this technique..... the PWM >duty cycle should be calculated to the power NOT the voltage. As >in 80V down to 14V at 500mA is derived by V div by A... so at 14 >volts the solenoid uses 7 watts but at 80 volts the solenoid uses >(instantaneously) 228 watts, so the ratio for the PWM is 3%!!!! >(NOT 17.5% as in voltage only). >Been there ... blown up that by not thinking of this. -----Original Message----- From: Thomas McGahee To: PICLIST@MITVMA.MIT.EDU Date: Thursday, February 03, 2000 3:32 PM Subject: Re: [OT] Solenoid Driver - Need a few good ideas... >I would not use any form of linear regulator, as the >power dissipation would be about 33 Watts. > >Wagner had the right idea: use the same FET that >switches the relay current ON as a switchmode >regulator. Since the load is pre-defined as being >14 V at .5 Amps we have all the info we need. > >The FET will be held OFF whenever the relay coil >is to be un-energized. When the relay coil is to be >energized, the duty cycle will be based on 14/80 >which is 17.5% ON time. > >If you want, you can use the PIC to provide the >17.5% PWM signal. When the output is LOW, the >FET and relay are OFF. When the PIC provides a >17.5% PWM output, then the FET will chop current >into the relay and create an average of 14 V across >the coil. > >If you don't want the PIC to generate the PWM >signal, then you can use a low power >555 timer, 2 resistors, one diode and two capacitors >to generate the 17.5% duty cycle rectangle wave. > >You then need some way for the PIC to "gate" the >oscillator so that it can unconditionally turn >the oscillator off. A simple way to do this is to >directly pull the gate of the FET LOW. > > > > +------*---*----o +5 > | | | > r |8 | 4 > r R1 --------- > r 7| | > -------*----| | > | | | Low | > V --- | Power | > --- A | | > | | | 555 |3 17.5% Duty Cycle > | r | Timer |------> Osc. Out > | r R2| | > | r | | > | | 6| | > *------*----| |-----+ > | | 2| | 5 | > --- +----| | --- > --- C1 | | --- .01 uf > | --------- | > | | 1 | > Gnd Gnd Gnd > >Equations: R1/(R1+R2) = 17.5/100 > >Suggest 18k for R1, and 82k for R2. >This will give 18% which is close enough. > >The value of C1 will not affect the duty cycle, >but it does determine the operating frequency. >Something around .01 to .1 should work fine. >You may have to play with the resistor/capacitor >values to find out which what duty cycle and >frequency actually works best. > >Frequency must be high enough to prevent >"chattering" of the relay when it closes. >Also, too low of a frequency can allow >excessive current flow. I suggest starting with >a frequency of at least a few kilocycles. >If you select the right frequency you can >reduce power dissipation and maybe not >even need a heatsing on the power FET. >But ALWAYS use a good heavy duty heatsink when >testing, since "accidents do happen" > >The nice thing about the 555 circuit is you can test >the technique without actually having to connect >it up to a PIC. Where we show the PIC I/O line >below you can substitute a pushbutton to ground >for testing purposes. > > > 80VDC Supply > | > | > *-----+ > | | cathode > c --- > relay coil c A anode > c | > | | > *-----+ > | > 1k ||---. > Osc. Out>--rrrr--*-||<--, N Channel HEXFET > | ||---| > | | > PIC I/O>---------+ | > Gnd > >The PIC should tristate the line when it want the >relay ON, and pull the line LOW when it wants the relay OFF. > >If you experiment with this method, post your >experiences (and values used) to the PIC list. > >Fr. Tom McGahee > > > > >-----Original Message----- >From: Crosby, Jay >To: PICLIST@MITVMA.MIT.EDU >Date: Thursday, February 03, 2000 12:26 PM >Subject: [OT] Solenoid Driver - Need a few good ideas... > > >>Now that the list has slowed down discussion on relay drivers with low >>voltage supplies, I need some ideas on the opposite problem, too much >>voltage on my supply. >> >>I need to drive a solenoid on and off from a logic level output. The >>solenoid has 28ohms of coil resistance, and a 500mA operating spec. The >>only available power I have to drive it must come from the 80VDC supply. >If >>I had a lower voltage on the power supply, say 60V or less I could use an >>off the shelf regulator design to give me a reasonable 14V output in which >>to drive the solenoid. Of course the simple solution is to use a power >>resistor to 80V, in series with the solenoid, but this wastes way to much >>power. >> >> I am thinking about using a hexfet as the switching device and of course >>apply diode protection across the coil, and the needed current limiting >>resistors to obtain 500mA. >> >>The LM317HV looks like it could provide some solutions, but I don't think I >>can exceed 60V from input to output. Is there a way to cascade this >device? >>Here is a rough idea of what I had in mind. >> >> >> >> 80VDC Supply >> | >> | >> Regulator Solution >> | >> | >> +14VDC >> | >> | >> Solenoid with diode protection >> | >> | >> 50ohm ||---. >> Logic Out---\/\/\---||<--, N Channel HEXFET >> ||---| >> | >> | >> Gnd >> >>Priority of tradeoffs: >>1) Reliability (room temp. operation only) >>2) Needless Power loss >>3) Number of components (complexity) >>4) Price (don't want to spend more than $30) >>5) Size (not much of a factor) >> >>Thank you in advance for your help, >>Jay >>