Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Parallel port 0-10volt output

Status
Not open for further replies.

KOEZE

New Member
Hello,

I'm converting my lathe from single phase to 3 phase power. For this I purchased a VFD. Since I also plan to convert it to CNC I'd like to be able to control the main motor speed via parallel port.
The servo's are controlled via puls/dir meaning that a clock pulse on one of the outputpins of the parallel port is used to control the position of the servo (or stepper for that matter) and 1 is used for direction (low CCW high CW).

My software allows me to use a similar setup for spindle control. 1 pin for rpm control and 1 for direction.

Does anybody have a clue how to do this. My VFD needs a 0-10 volt signal to control RPM. The driection is simply a matter of controlling a relay to put 10 volts (supplied by VFD) to either the CW or the CCW input of the VFD. It should be quite easy with a frequency to voltage converter.

I know there are more people struggling with this problem and also post on their behalf.

Erik Jan
 
anyway, you need relay to control direction and you need analog voltage 0-10V to control speed. it sounds like AB160 series VFDs. they are the only ones i can think of using 10V for I/O (standard is 24V).
to generate this from LPT port you will need some external circuit.
i would recommend going with microcontroller based design although
it is possible to do it with discrete components.
for example you could use LPT to simply turn on two transistors.
one can be driving relay to set direction, the other could be used as part of PWM circuit to generate analog signal and therest is programming.
you could use LPT outputs to control D/A converter coupled with opamp to produce analog. this is probably the simplest to do and doesn't require fancy timing but it might not nececarily give you resolution you would expect (you probably won't need it anyway).
say you have D7 reserved for direction and D0-D6 to control the analog output. with these seven bits you can create 128 combinations.
this means you could control the speed with resolution equal or slightly better than 1%.
 
Direction input may also be 24 volts. This is not inmortant since I'll simply controll it by relay.

The solution proposed by Panic Mode is not exactly what I'm looking for since the software only allows 1 pin for spindle speed control. What I have in mind is 3 pins total for VFD control. 1 pin for enable, 1 pin cw/ccw, 1 pin with variable frequency for speed control. This last signal must be converted to a 0-10volt to replace the analog pot meter used to control the spindle speed now.

Attached is a link to a device similar to what I need.
**broken link removed**. However This device is designed for a number of applications that I do not need which makes things unnessecary expensive.

VFD is a Telemechanique Altivar 5 single phase VFD of 0,75kW. It is a relatively old VFD with pot meters for control of acceleration and deceleration of the motor but it is more than enough for my needs.
 
OK, so the pin produces a variable frequency to control the RPM.
Do you know what the maximum and minimum frequencies are?
A quick Google found an LM2907 frequency to voltage convertor.
Personally, provided the maximum frequency isn't too high, I'd use a PIC with a PWM output.
 
From what I know it's possible to generate up to 45000 hz on the parallel port. So you suggest I let a Pic do the math and convert the parallel port frequency into 0-5V by PWM.

Thanks for the reply. I'll look into that.

Erik Jan
 
Got things sorted.

got an optocoupler to spare my printerport in case of a ....up.
secundary side is hooked up to +10V and with a resitor in series connected to the input of the VFD and a condensator parallel to the input.

Now I generate a PWM signal on the parallel port and I get my 0-10v signal.

Erik Jan
 
I realize that. This made me dive into the software a little deeper.
Thanks for your assistance JohnBrown.
 
if you ask me i wouldn't bother with PWM on LPT.
just look up simple DA convertors like in the OLD days. :D

yes there was time when sound card on pc was unthinkable
or at least VERY expencive. solution in many cases was
simple resistor ladder network connected to LPT to produce
sound in far better quality when compared to PC speaker.
(well it did eat lots of resources to produce audio signal but it worked).

all you need to do is write to the port ONCE when change occurs
(no need for PWM bit banging and hogging pc resources and fighting with
Windows for repeatable timing).

of course analog output will be low, but nothing a simple OpAmp
wouldn't cure.
 
@Panic mode,

D/A converter is not an option. I use commercially available software that can generate either a pulsed output or a PWN output on a single pin to control spindle speed. A D/A converter would take half my parallel port pins to control and I need the other i/o pins for other tasks.
I need at least 8 to control the 4 servo drives I'm making. I need 1 foor the emergency stop. I need pins for homing switches. I need pins to switch on the cooling pump, etc.

This is for controlling a homemade CNC mill. I may not even have enough i/o in 1 parallel port and may have to buy me another.

Erik Jan
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top