Electronic – Controlling Voltage or Current with a PIC

inverterpicvoltage

Although I have a fundamental understanding of electronics, I still have much to learn and this one has me stumped.

I am trying to control the speed of a TB Woods SM1 AC Inverter drive that in turn controls an AC motor. My options for speed control are a 0-+10v analog signal, a 4-20mA analog signal, or RS485 via a port by the same name on the drive to set the frequency (0-60Hz). I am unfamiliar with RS485.

Does anyone know how to control this with a PIC? I am planning on using the PIC18F4520. I can spare 8 bits of binary output pins, if I have to.

Best Answer

Probably the easiest way would be to use PWM and a low pass filter (with cutoff frequency well below the PWM frequency). The output of the filter will assume a DC level proportional to the duty cycle. For example if your Vdd is 5V, the a 50% duty cycle will give you 2.5V, 10% will give you 0.5V etc.
You would have to use e.g. an opamp with a gain of 2 to convert the 0-5V to 0-10V.