Because my PC is always with me.Why do you need the signal from a PC since the signal could readily be generated by some external circuits?
Do you need to control it otherwise?
How can i program a sound file Wayneh ?I'm with @crutschow. I don't see why you can't use the audio port. It would be trivial to program a sound file to send whatever waveform you want. If the voltage isn't quite right, just add a buffer in between, maybe a simple comparator. But depending on the downstream filtering you mentioned, you may not need that.
The first task is to find sound editing software for your OS. You can likely use free software, like GarageBand on a Mac, and I'd exhaust those possibilities first. Tone generators might also work. Can't help you on Windows.How can i program a sound file Wayneh ?
You can use the audio port. The only drawback I possibly see is getting 5 volts from a audio out. Thus, add some amplification. Audacity is a sound program and will do triangular wave forms but I can't seem to generate a waveform below 1.0 Hz. Then I found this:You can use a low-cost PC sound card as an analog-function generator by controlling the PC with the program "SoundArb ". I have yet to try a triangular wave at the low frequency of 0.0333Hz but it may work. Certainly worth a try. I will need a plug for my sound out to hack and try placing a scope on sound out and seeing what we get.I'm with @crutschow. I don't see why you can't use the audio port. It would be trivial to program a sound file to send whatever waveform you want. If the voltage isn't quite right, just add a buffer in between, maybe a simple comparator. But depending on the downstream filtering you mentioned, you may not need that.
How do you get Audacity to generate anything sub 1.0 Hz?I would use a software chirp generator as found in Audacity ( http://www.audacityteam.org/ )and feed that chirp into a frequency to voltage converter like a LM2907 or LM2917 that is powered by a usb port. ( http://www.ti.com/lit/ds/symlink/lm2917-n.pdf ). I would add an op-amp for gain and ofset controle.
Maybe I am looking at this all wrong but I read where the original poster mentions:Why would you have to? Run the PWM at 1kHz and vary the duty cycle at whatever slow rate you want.
So I start seeing a triangular or sawtooth waveform at sub 1 Hz. Maybe I am just looking at this all wrong with the limited information we have?I'd like to get a slow ramp signal from 0V to 5V in 30sec, then return to 0V :
or istantaneously and the repeat the slow ramp to 5V
or with a slow down ramp, from 5V to 0V in 30 seconds.
The last one is preferred.
And then the cycle repeats itself.
Yes, i need a triangular or sawtooth waveform at sub 1 Hz (0,033 Hz).Maybe I am looking at this all wrong but I read where the original poster mentions:
So I start seeing a triangular or sawtooth waveform at sub 1 Hz. Maybe I am just looking at this all wrong with the limited information we have?
Ron
I am not sure to understand the link to Digikey.am i missing something here? one capacitor, one resistor and a DTR line. i did the same thing years ago with something like this: https://www.digikey.com/product-det...qsrqU-iTgyNQoIawbG3JXXglexkIESKN4IaAnJY8P8HAQ
wrote a simple program to open and close the com port, thereby raising and lowering the DTR.


the UART Evaluation Board is a cheap device that you can just plug into ur USB. it comes with free software drivers from the FTDI website. install the drivers, plug in the board and check in device manager. there's a new COM port available. run a terminal program like teraterm on the PC and connect to the new port. the DTR line on the device will go high.I am not sure to understand the link to Digikey.
Well, how about passing the output as I suggested above through a low-pass filter, to remove the PWM frequency and leave only the signal?Yes, i need a triangular or sawtooth waveform at sub 1 Hz (0,033 Hz).
From a PC.
Warning! Note that you cannot assume that the USB port will always be assigned the same COM port. Depending on what you plug into the available USB ports, the assigned COM port may change.The link is just a USB to RS232 converter. Most newer computer motherboards do not have a RS232 port. The idea being thet you can open a port and then under a timer function enable and disable the DTR or RTS. The idea then being to take the square wave and convert it to a triangular wave I guess by mention of a resistor and capacitor. The problem is I doubt you will ever get a close to linear triangular waveform out. Not with the long duration you are looking for.
Years ago I made a small simple program to communicate with the comm port. While I did not run the DTS and RTS on a timer function you can turn the pins on and off. Here is an example of the program. There is not much to it. If you click the link and download the program is looks like this:
View attachment 128071
Using your Device Manager to see what your comm port is you choose the Comm Port from the drop down menu.
View attachment 128072
In the example on my computer it was Comm 4.
I used a common USB to RS232 converter, (Keyspan USA-19HS) My DTR and RTS outputs were about -5V and 5 volts. The DTR and RTS are digital outputs, the CTS, CSR and DCD are digital inputs. I applied 5 volts to the respective pins. After choosing the comm port click Open Port and the program runs. There is not a heck of a lot to it. So you open a port and once the port is open you can use code under a timer function to turn the DTR and RTS digital outputs on and off. It's just a Boolean function as in True or False.
The problem I see is taking that On and Off pulse and converting it to an accurate triangular waveform, especially with a 30 second duration. I don't see a pretty linear waveform happening. Anyway, feel free to play around with the little program. I also tried to get PWM from those lines and it failed for the reasons I already mentioned.
Now if someone has a thought as to how to make what you want happen they are welcome to present a schematic or something workable because I can't make it happen for the reasons I covered. I wrote the little program for either Windows 2000 or Windows XP, I forget but it was long ago. It has run fine on every Windows version since including Windows 10.
Ron
Very good point and why I mentioned:Warning! Note that you cannot assume that the USB port will always be assigned the same COM port. Depending on what you plug into the available USB ports, the assigned COM port may change.
The drop down offers 1 through 15 which is the maximum. The port needs to be chosen before clicking the start button.Using your Device Manager to see what your comm port is you choose the Comm Port from the drop down menu.