11-03-2009 10:31 AM - edited 11-03-2009 10:32 AM
Hello everybody,
I know Digital I/O used just for digital waves but I am wondering is there any way to have a DC constant voltage(0-5volt) using the digital I/O, maybe by increasing the pulse width and decreasing the frequency! Do u have any idea about?
Thanks,
Elahe
11-03-2009 10:59 AM
I could theoretically imagine that you can pass the digital output to a capacitor to integrate it and have an output voltage proportional to the duty cycle of the signal (with some ripple added to it), but I couldn't imagine the stability of this sytem and the difficulty to have it working in a reliable way. Additionally, I seem to remember that you can't modify the digital pattern while it is generated: if this is true it means that you can't change the voltage output without stopping it.
Considering the very small amount of money to invest on a small analog output device (e.g. the USB-6008) which has more flexibility, a higher voltage range and better output voltage stability I wouldn't go into this trouble.
11-04-2009 01:39 AM
Hi,
I'd seen such a thing in a motor control board I've tested.
The board converted a PWM signal to DC before feeding it to the DC motor, in order to control the its speed.
The PWM signal was fed to an H-bridge, and its output was passed through an LC-filter to convert it to DC.
You can directly use the DIO output to generate a PWM signal and feed the filter, but again as Roberto pointed out, it may not be the best method in terms of regulation.
By the way, the PWM signal was a few hundred kHz in my case. So you do not actually need a very low frequency.
In fact a higher frequency is better, since it reduces your filter component sizes.
11-04-2009 01:59 AM
An alternative could be to use some frequency-to-voltage converter like the LM2917 and drive the digital output vith variable frequency: datasheet and application notes for this or similar components hold several schematics for different applications and frequency ranges. I recently have seen some circuit wth a two-pole butterworth filter added to smooth residual ripple.
Bit again: is it worth the trouble?
11-04-2009 04:33 PM
Thanks all for your great ideas,
Roberto, I know it may seem strange, but I was thinking about this way as I have one DIO in hand but if I do not want to use that I have to pay for a DAQ, just as you mentioned it probably doesn't worth but anyway thanks for your responses.