advertisement
from the controlling a train-set from my pc department...
variable voltage from parallel port
Motion control, servos, steppers, etc. topic
Posted by martin r on 14 December, 2003 - 12:45 pm
I know that each of the output pins on my parallel port may be on (+5v)or off (0v)
but how can i then use these to create a variable voltage (0v-12v) sutiable for a train set?


Posted by Rufus on 15 December, 2003 - 5:45 pm
Probably the "simplest" thing to do is to use the output byte as the terminal count for a PWM circuit. Run an 8-bit counter continuously, compare the output count to the byte coming from the parallel port, then feed that comparator
output to a power transistor controlling the 12V power (you're NOT getting 12V power from your parallel port.). Just multiply your refresh frequency by 256 to find your counter input rate.

In other words, you have a counter which runs from 0-255 continuously and back to zero. When the count is less than the parallel port value, you'll get a 0 or +V output, which will change to/from 0 when then count exceeds the value, until the count reaches 255, then it will switch back. The proportion of the "on" time is the proportion of the current you'll get. A value of 127 will give you approximately half the power, etc.

You may want to run your comparator output through an opto-isolator, to keep the power supplies separate. You can probably run your counter and comparator from your computer supply without problem, but the 12V to run the train should be on a separate circuit.

Surely there is a model train special interest group who could supply you schematics and parts lists for such a controller!?!?!?

Good Luck.

Rufus


Posted by michael shiloh on 16 December, 2003 - 7:21 pm
Disclosure: I work for this company.

If you can use the USB port instead of the parallel port, then the Teleo sytem by MakingThings will accomplish this with a couple of off-the-shelf modules: A USB Translator gets from your computer to the Teleo Network, then a Motor Controller module gives you a full H-bridge controller at either 2 Amps or 10 Amps of up to 30 volts DC.

If you prefer the parallel port, we could design a custom interface for you.

If you have any questions feel free to contact me, probably offline as this is perhaps off-topic for this group.

Sincerely,
Michael Shiloh,
MakingThings
michael@makingthings.com


Posted by Curt Wuollet on 15 December, 2003 - 8:02 pm
Google "parallel port D/A convertor"

Regards

cww


Posted by Thomas Hergenhahn on 16 December, 2003 - 1:32 am
You will need additional hardware in any case.

--most simple: switch a pin on and off with variable duty cycle. Filter the squarewave to get a DC average. Requires exact software timing.

--also simple: Use multiple pins. Output a bit pattern representing a number. Connect an R/2R network to them. Needs all port output pins for just one value.

-- Connect real DACs. Use some address logic and latches to realize multiple outputs.

Finally, all these solutions would need an amplifier stage and additional power supply to achieve 12V output.


Posted by martin on 17 December, 2003 - 2:41 pm
thanx i will try to get my hands on a D\A coverter
ASAP.

mart

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
What garlic is to food, insanity is to art.
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive