> > NEIL GANDLER wrote: > > > > I am trying to control the speed of a 12 volt .5A fan from > > a PWM output of a PIC 16c74 microcontroller. I can vary the > > duty cycle of this signal from 0-100% in software. But the > > frequency of this PWM signal will vary from 5khz - 15khz > > depending on the requirement of the second PWM channel of > > PIC, used for another application. > > The other solution I proposed last time but didn't elaborate > was the idea of using a DC-DC converter as a variable power > supply > > [ DC to DC design deleted ] Well considering the wattage and the fact that variable voltage will affect the fan's speed, let me add to the direct voltage control argument in the form of a PIC controlled variable power supply. In several projects I've successfully used a LM317 variable voltage regulator as a programmable power supply. The operation of the part is simple: the Output voltage is 1.25V higher than the voltage at the Adjust pin. So by setting the voltage at the Adjust pin, the output voltage of the part can be controlled. The logical part for varying the Adjust pin voltage is one of a number of programmable potentiometers. The Dallas Semi DS1267 is the best example. The PIC serially programs the correct resistance into the DS1267 and the DS1267 is used as a voltage divider to select the LM317 Adjust voltage. The last time I used that arrangement I used a op-amp in unity gain following to provide the adj pin the proper impeadance. Worked like a champ. Hope this helps, BAJ