09-27-2021 07:00 PM
Hi
I want to generate a triangle-shaped signal continuously a having slope of 1v/s, starting voltage 0v, a peak voltage of +5v. The next triangle signal should start 1 sec after the prior triangle finishes. The resting voltage should be 0v, I need the highest resolution possible. I am using PCI-MIO-16E-1 board.
Thanks
09-27-2021 07:57 PM
Are you talking about "highest" time resolution or voltage resolution? Your hardware is just 12 bits. The output speed can be up to 1MS/s, but since you only have 12 bits you can go much slower without losing anything in each ramp. Do the math.
What software are you trying to use (LabVIEW? Something else?)
09-27-2021 09:56 PM
Building on the points already made by altenbach, 12 bits means 2^12=4096 discrete digitized voltage levels. The most appropriate voltage range your device supports is 0-10 V. You'll only be using half that range, so you'll have 2048 discrete voltage levels to work with in the 0-5 V range. That makes discrete increments of about 2.5 mV.
You'll be going up and back down that triangle in 5 seconds, so you can *usefully* change output levels at a rate of only 4096 changes / 5 sec = 819.2 Hz. Like altenbach said, nowhere near 1 MHz.
So if you set your sample rate for 819.2 Hz, you can hit every available voltage level with a single sample as you ramp up from 0 to 5 and back down again. Then append another 819 zero values at the end to occupy the 1 second between triangles.
Here's how it'd look in LabVIEW:
-Kevin P
09-27-2021 11:05 PM
If you like to use the full 12-bit resolution, you can wire an external +5V reference on AO_EXT_REF terminal, this would give you a resolution of 1.22mV.
The downside is the stability and accuracy of the external 5V reference.
09-28-2021 02:57 AM
Or simply use a voltage divider to get down to 5V 🙂
Just keep in mind that the input impedance of whatever is following add to the divider 😉
To increase the resolution one would switch to other hardware .. however to push it with the stuff you have, you can think about a PWM modulation with max DA samplerate and toggle the least significant bit... followed by a lowpass filter...
To get the cleanest ramps (no steps), the classical way would be a adjustable current source driving a capacitor...