Jump to content
Electronics-Lab.com Community

0-5V Analog Output from my PC


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Dear K....21

I 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 ;D

its 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 Program

HTH - Shahriar

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites


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.
Link to comment
Share on other sites


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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
  • Create New...