killerleprechaun21 Posted October 3, 2005 Report Posted October 3, 2005 Hey there!I'm a 4th year Computer Engineering Student at UWO and I cannot for the life of me figure out a way to use my serial port, parallel port, or audio ports on my PC to provide a simple variable 0-5V Output!The project will simply involve providing three different devices with 0-5V depending on feedback provided from software. All I need to know is if there is a relatively simple way to use ANY port of my PC to output zero to five volts. The software can be interfaced with any low-high level programming language. The project at this point is completely open to suggestions, so any suggestions that you have are more than welcome!Sincerely,Stephen Quote
Guest Alun Posted October 3, 2005 Report Posted October 3, 2005 There is no way to directly output a DC signal from your PC, the serial and paralell ports are digital outputs and sound card will have a low frequency cut off of about 20Hz. To get a DC output you need to add an DAC (Digital to Analogue Converter) to the RS232 or RS424 port, how good are you at electronics? if you don't want to build anything then I think you might be able to buy pre-built hardware for this. Quote
Shahriar Posted October 3, 2005 Report Posted October 3, 2005 Dear K....21I have a program which is for Audio editing and in a section it has an Equation Builder. In this section the software will generate a signal proportion to the Equation you write, then Plays it. (i.e. 3Sin(2*PI*f*t) )You can receive the signal in Sound Card ;Dits name is Goldwave. If you look it up in web i think you can find it. anyway if you think this is what you are looking for I can send it.But I think it is not difficult for you to write such ProgramHTH - Shahriar Quote
Guest Alun Posted October 3, 2005 Report Posted October 3, 2005 Shahriar,You've said "it plays it" and in doing so it's generating an AC waveform, I assume killerleprechaun21ants a DC signal, I don't know if this'll work but it's worth a go, is this software free? Because I wouldn't buy it unless I know it's going to work if I were you. Quote
Staigen Posted October 3, 2005 Report Posted October 3, 2005 Hi there killerleprechaun21, and welcome to this forum :)How accurate must it be?There is a way to accomplish this in an easy way, if it dont have to be very accurate. Just use a R2R ladder connected to your parallel port. If you want moore accuracy you must use a DAC!//Staigen Quote
MP Posted October 4, 2005 Report Posted October 4, 2005 Also note that the 4 pin USB port has 5 VDC on pin 1 referenced to pin 4 ground.Pins 2 and 3 are the data lines. This is how you power a USB device.MP Quote
Staigen Posted October 4, 2005 Report Posted October 4, 2005 Hi againTo MP: Note that Stephen wanted a simple variable 0-5 Volt output. A simple way to do this is a R2R ladder connected to the parallel output. Also there maybee is needed some sort of latch.//Staigen Quote
MP Posted October 4, 2005 Report Posted October 4, 2005 Staigen,I missed the word variable in his post. It is still feasible. Before I posted, he was getting discouraging posts telling him that this could not be done. R2R is not variable either. R2R will only give multiple choices. You should post a drawing of an R2R supply so that Stephen has this drawing in his choices as well.Also note that the serial port and USB ports are more robust. When using the Parallel port for a power supply, one should add protection to the circuit. You can ground the pins of the serial port and not cause harm. Also note Parallel port has 5 volts on the pins where the serial port can provide more voltage, which gives you more overhead for filtering.It is a simple matter to take the drawings that I have posted and turn them into variable outputs. Now you see a DC voltage source. Make it do what you want. Make it variable; Make it a switcher; etc.MP Quote
ante Posted October 4, 2005 Report Posted October 4, 2005 Hi Stephen,The gameport (soundcard) has 5Volts at pin 1, 8 and 9 sometimes also on pin 15, ground (negative) at 4 and 5. Most gameports can provide >100mA. If you need a steeples variation from 0 to 5Volts you can’t use digital control (software), this will have steps = analogue is impossible. I you can allow steps; there are way to do it though. Quote
Guest Alun Posted October 5, 2005 Report Posted October 5, 2005 Before I posted, he was getting discouraging posts telling him that this could not be done.If you'd actually bothered to read my post properly you'll find that I said no such thing, I said that there is no way to directly get 0-5V from your serial or parallel ports, to do this you need a DAC which is exactly what an R2R network is. Quote
MP Posted October 7, 2005 Report Posted October 7, 2005 If you'd actually bothered to read my post properly you'll find that I said no such thing, I said that there is no way to directly get 0-5V from your serial or parallel ports, to do this you need a DAC which is exactly what an R2R network is. Quote
ante Posted October 8, 2005 Report Posted October 8, 2005 Hi Alun,I don’t think “steps” is the way to go when the topic says “0 – 5V ANALOG output”. “Steps” in my electronics world is digital not analog! Quote
Guest Alun Posted October 8, 2005 Report Posted October 8, 2005 Alun, he does not need a R2R for a simple 5V DC source as indicated in his first sentence....and I was not pointing a finger at you. Cool down my friend. There were other posts as well. But since you mention it, you told him he needed a DAC. He does not. He can actually achieve a varying output voltage with pulsing the signal.An R2R network is a very simple DAC, but I know what you mean, I was origionally thinking about a proper IC. I'm sorry for having a go but I just wish you would stop thinking the worst of people all the time. All of the people who've posted in this thread have had good intentions, it just makes be cross when I see someone falsely accusing them of ill-doing when all they were doing id trying to help or even putting across their opinions. Just because I didn't think it was possible with out a DAC it didn't mean that I was being discouraging - the very fact I suggested a solution to the problem indicates otherwise.You might be right. He said he wanted a simple variable 5V DC. Then in the next paragraph states that there are software parameters. Not clear to me what parameters will vary the DC....but still does not need a DAC to accomplish this.I think the problem is that the origional post wasn't very well worded so his requirements were unclear in the first place.Hi Alun,I don Quote
jarmund Posted October 8, 2005 Report Posted October 8, 2005 If i've understood your problem correctly, this can be solved easily by using the audio output combined with a rectifier and a capacitor. after that, feed it through a transistor to make sure that you get up to five volts (Collector-Emitter voltage can be pulled from the parallel port). To adjust the voltage, simply adjust the amplitude of the sound you are playing. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.