Re: Driving servos from a PC
- From: "Chris" <cfoley1064@xxxxxxxxx>
- Date: 15 Dec 2006 06:40:52 -0800
Pete Verdon wrote:
As part of a construction project for a charitable event, I need to
build a number of big analogue dials (like an old-fashioned voltmeter)
controlled by a series of PCs (each computer drives two dials). Accuracy
isn't critical, but I do have a fairly strict budget restriction.
One possibility seems to be to use an RC servo to move a big cardboard
needle. I've not used servos before, but a little research suggests that
the required position is commanded by altering the pulse width of a ~5v
50Hz square-wave signal a little either side of 2ms.
As I said, I don't have much of a budget. I also have limited
electronics knowledge. But is it totally unrealistic to consider
controlling these servos via a soundcard output? I envisage putting one
dial on each of the left and right channels, and getting the card to
spit out an appropriate wave-form to each of them. I realise this won't
be a proper square-wave, but am I likely to get close enough?
What else have I missed? Do you have another (cheap) suggestion, whether
involving servos or not?
Thanks,
Pete
Hi, Pete. You already have the capability in your parallel printer
port -- output logic level signals. You can also use the PC to supply
5V power for the servo. But the devil is in the details.
You didn't mention the other jobs you're having the computer do, or
even what operating system you're using or what programming language.
If you're using DOS and your PC isn't doing anything else, you can just
set your printer port for SPP in the BIOS and then use QBASIC or
anything else that provides direct control of the PC's ports to program
a timing loop to output the pulses (which are supposed to be 5V logic
level, positive-going pulses, 1-2ms. pulse width every 20ms). Voilla
-- done. Additional cost = zero.
If you've got other things to do with your program, or if you're using
Windows, it gets a little stickier. That's because the servo turns off
unless it gets at least one pulse every 30ms. or so. Using Windows,
you'll need help with DLLs and drivers.
You might want to try going to the Jan Axelson/Lakeview Research
website for more information. Chances are you'll find what you need
there (and you might want to get a copy of the book "Parallel Port
Complete", provided with a CD that has the support software for various
languages).
http://www.lvr.com/parport.htm
Good luck
Chris
.
- Follow-Ups:
- Re: Driving servos from a PC
- From: Pete Verdon
- Re: Driving servos from a PC
- References:
- Driving servos from a PC
- From: Pete Verdon
- Driving servos from a PC
- Prev by Date: Re: Driving servos from a PC
- Next by Date: Re: modulated dimmer "switch"
- Previous by thread: Re: Driving servos from a PC
- Next by thread: Re: Driving servos from a PC
- Index(es):
Relevant Pages
|