possible to output PWM to speed controller from PC parallel port ?

Is it possible to provide PWM output to a speed controller ( such as the Devantech MD03 ) using a PC parallel port ? If possible, I would think there would need to be a background process running to keep telling some controller on the motherboard to output the PWM.)

Has anyone done it ? Any comments ?

Reply to
pogo
Loading thread data ...

You can do it with some circuitry, for instance, I am using a Velleman K8000 I/O board. I wire the D/A converter output of the I/O board into a comparator. The other input of the comparator is the ourput of a ramp generator. This produces a PWM signal.

Typically, though, you wouldn't want to drive the PWM directly from the parallel port because you will spend a lot of time in I/O and the frequency will be pretty low.

Reply to
mlw

That tells me exactly what I wanted to know. I didn't really think it would be worth the effort since my thoughts on doing this were to simply reduce the number of extra components / controllers for a PC / mini-ITX based robot.

Thanks !

Reply to
pogo

Hi

There seems to be problems with some of the links at the moment, but an excellent site for PC/IO interfacing is at

formatting link

They have tutorials so you can build your own cards, and write code to control motors using PWM!

Cheers

|-]

Dale

Reply to
Dale T Stewart

Hi again

If you use Internet Explorer the links are OK...something wrong with Firefox I think...

Cheers

|-]

Reply to
Dale T Stewart

Cool! I've been using this guy's TRIPOD code and didn't even know he had a working boondog.com site because everytime I looked for it I got a blank page. Thanks !

P.S. This thread is almost gone on my newsgroup server.

Reply to
pogo

I have done it using RT Linux. A real time kernel module generates the PWM and a user space program controls it.

Ed

Reply to
Ed Okerson

About 10 years ago I wrote some experimental code to do servo control all in software on a PC without any buffer circuitry needed. It is very crude and may need some tuning to get the pulses the correct spacing, but it moved a servo to different positions using the UP/DOWN keys....

I now use a Mini SSC RS232 controller

formatting link
make my servo signals (with a USB to RS232 converter).

-howy

this was compiled using borland C.

/////// start of SEROV1.CPP ////// #include #include #include #include

#define ESCAPE_KEY 0x011b #define UP_KEY 0x4800 #define DOWN_KEY 0x5000 #define LEFT_KEY 0x4b00 #define RITE_KEY 0x4d00

// parallell port address you want to talk to #define PPORT1_DATA 0x03bc

void quit_pgm (void);

void main(void) { int i,j,w=1; long x;

for(;;) { if(w

Reply to
howy

About 10 years ago I wrote some experimental code to do it all in software on a PC without any buffer circuitry needed. It is very crude and needs tuning to get the pulses the correct spacing, but it moved a servo to different positions using the UP/DOWN keys....

-howy

this was compiled using borland C.

/////// start of SEROV1.CPP ////// #include #include #include #include

#define ESCAPE_KEY 0x011b #define UP_KEY 0x4800 #define DOWN_KEY 0x5000 #define LEFT_KEY 0x4b00 #define RITE_KEY 0x4d00

// parallell port address you want to talk to #define PPORT1_DATA 0x03bc

void quit_pgm (void);

void main(void) { int i,j,w=1; long x;

for(;;) { if(w

Reply to
howy

This will not work with todays PCs anymore because WIndows messes up your timing in the 'for' loop. Actually, a good compiler will remove the 'fro' loop entirely when optimizing. And last but not least, there is no outportb command on WIn2k/XP anymore. The parallelport can only be talked to via drivers.

Reply to
Matthias Melcher

I don't run Windoze on my modern PC. Under other operating systems this is not so difficult.

Reply to
Ed Okerson

--Works great with a Victor controller and a Stamp. I've done this to run those DC windshield wiper motors. Watch out for capacitor drift..

Reply to
steamer

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.