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 ?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
pogo wrote:

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

K8000
frequency
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 !
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi
There seems to be problems with some of the links at the moment, but an excellent site for PC/IO interfacing is at http://www.boondog.com/tutorials/tutorials.htm
They have tutorials so you can build your own cards, and write code to control motors using PWM!
Cheers
|-]
Dale

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi again
If you use Internet Explorer the links are OK...something wrong with Firefox I think...
Cheers
|-]
Dale

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
    --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..
--
"Steamboat Ed" Haas : Living on the fringes of
Hacking the Trailing Edge! : most good bell curves...
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
pogo wrote:

I have done it using RT Linux. A real time kernel module generates the PWM and a user space program controls it.
Ed
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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 (http://www.seetron.com/ssc.htm ) to make my servo signals (with a USB to RS232 converter).
-howy
this was compiled using borland C.
/////// start of SEROV1.CPP ////// #include <stdlib.h> #include <stdio.h> #include <bios.h> #include <dos.h>
#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<0) w=0;
outportb(PPORT1_DATA,0x00); delay(10); outportb(PPORT1_DATA,0xff); for(x=0;x<1000L*(w+1);x++); outportb(PPORT1_DATA,0x00); delay(10);
for(j=0;j<10;j++) { if(bioskey(1)) { switch(bioskey(0)) { case ESCAPE_KEY: quit_pgm(); case UP_KEY: w+=1; printf("\rw=%03d",w); break; case DOWN_KEY: w-=1; printf("\rw=%03d",w); break; default: break; } } } }
quit_pgm(); } // end of main
void quit_pgm(void) { exit(0); }
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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 <stdlib.h> #include <stdio.h> #include <bios.h> #include <dos.h>
#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<0) w=0;
outportb(PPORT1_DATA,0x00); delay(10); outportb(PPORT1_DATA,0xff); for(x=0;x<1000L*(w+1);x++); outportb(PPORT1_DATA,0x00); delay(10);
for(j=0;j<10;j++) { if(bioskey(1)) { switch(bioskey(0)) { case ESCAPE_KEY: quit_pgm(); case UP_KEY: w+=1; printf("\rw=%03d",w); break; case DOWN_KEY: w-=1; printf("\rw=%03d",w); break; default: break; } } } }
quit_pgm(); } // end of main
void quit_pgm(void) { exit(0); }
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
howy wrote:

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Matthias Melcher wrote:

I don't run Windoze on my modern PC. Under other operating systems this is not so difficult.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.