Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Problem controlling a servo (http://www.chiefdelphi.com/forums/showthread.php?t=38625)

Entropia 17-06-2005 08:37

Problem controlling a servo
 
Hey

I took the easy way of controlling a servo motor (currently using Hitec HS-311) with PC via its parallel port. I hooked the servo to 4.5V power source and the signal lead to parallel port's data pin 8. I wrote a Win32 application to control it, but it seems to have no control. When I turn the control on, the servo moves to the beginning of its motion range and stays there. I have tried to alternate the "refresh" rate (from 5 milliseconds to a hundred milliseconds) but this only changes the frequency of the servo when it heads to the beginning of its range. I have also tried to alternate the position pulse width from 500 microseconds (0.5 milliseconds) to 2500 microsends (2.5 milliseconds) but it has no effect. Any ideas what might be wrong?

The program is available for download here: servocontrol.zip 220kb
It is hardcoded to use 0x378 parallel port and to use datapin 8 (pin 9 in the connector).

I would be hugely grateful if someone could hook an oscilloscope to the parallel port and see if it outputs proper control pulse/signal. I'm going to take my servo to a local shop and have it checked incase it's faulty.

Regards, Entropia

ConKbot of Doom 18-06-2005 14:54

Re: Problem controlling a servo
 
The pulse going to the servo should be between 1mS (far one side) and 2 mS (Far other side). When you get outside of that, you get un-predictable results.

Entropia 18-06-2005 18:36

Re: Problem controlling a servo
 
Problem found; faulty parallel port. It gives out a nice 5V when not loaded but even a single LED attached to it drops the voltage down to 2V. And that's not enough to even signal the servo. Next up: building a buffer circuit. Recommendations appreciated. :)


All times are GMT -5. The time now is 10:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi