Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure a 12VPWM signal with a 9401

Solved!
Go to solution

Hi all.  I have am trying to come up with a system to measure a 0-12V PWM signal.  This is a new requirement to a system that is already under development and is using some analog modules in a 9178 chassis.  It was not a signal that was to be measured when I choose hardware originally so I am trying to shoehorn it into my existing system.  The PWM signal comes on and off in pulses with a “large” amount of time (~2ms) between sets of pulses.  I need measure the jitter between the start of each set of pulses.  When I do the math to discern the timing information I need to be sampling at least 3MHz.   We are currently using a 9221 to look at the same signal but it has a max of 800kHz.  This or any other C series module (unless there is some third party one I am not aware of) will not have anywhere near the speed we need. 

One option would to use a scope (NI or otherwise) to measure the signal and then post process (post processing is fine) the data.  This is the fall back plan.  However it is desirable to do this all in the cDAQ chassis both for cost and simplicity reasons.  The only way I can see to do this is to measure it with a digital module such as the 9401.  I have a few questions below about this.  Please bear with me as I know they are simple but I am a mechanical engineer who got into software and not an EE.

 

  1.  How do I bring the 0-12V PWM signal into TTL levels so the 9401 can measure it?   I built a simple voltage divider below to test the idea. R1=150kohm R2=314kohm.

 circut.png

 

 Looking at the signals on a scope they did not look like I was expecting.   For the signal between V1 and V2 the amplitude is about what I was expecting but the signal appears as if it has been filtered.  The transitions of the PWM signal look are very gradual and will not suffice for a digital measurement.  The voltage between V2 and V3 is the waveform I was expecting but has an amplitude of ~7.2V instead of the ~8.1V I was expecting.  The PWM is somewhere around 100kHz with varying duty cycles.  Can anyone help me understand what I am seeing here?

2. Is there a better method than a simple voltage divider to do this conversion?

3. Am I just setting myself up for failure by trying to use this method?

 

Thanks

Lukin

Lukin
Certified LabVIEW Architect
0 Kudos
Message 1 of 5
(3,999 Views)
Solution
Accepted by topic author Lukin

You alrady calculated the needed timing (3Mhz) so I expect that your signal traces need a bandwidth of at least 10 times 3MHz -> 30Mhz

RF engineers would call that low frequency, however with equipment build for frequencies up to some 100kHz you have to take input impedances into account.

 

Your basic voltage divider need some extensions 😉    Like the 10:1 probe you migth know from the scope, where there is that little trim cap to get a nice square.

 

So to get back your square signal you need to add a (variable) capacitor parrallel to R1and for the calculation of your Voltage divider you need at least two more components that build the input impedance of your DAQ:

V2 to ground add a resitor of 1M and a Cap of 5pF (plus XpF for your connector?)  -> R2 is now 1/(1/314k + 1/1M) + 5(+x)pF = 239k

Now your voltage divider is 150k||Cvar to 239k||5(+x)pF , to get back your square also the cap ratios should match , Cvar should be 2 to 15pF  ,  adjust so no peaking occurs.

And here we are with your ~7.2 (7.37 by calculation) V

 

This calculation was done with the 9221 input impedance ... for the 9401 you will need a lower level and different values. 

Input cap of 9401: 30pF   and about 15k ( not shure about that, ask NI)

 

If the PWM is low impedance (usually is 😉 ) I would try a 10k current limiting resitor and a 4.7V Z-diode ...

 

Edit: For 30MHz bandwith take a look at the cabling, if the wires are longer (and the source can handle it) think of cable termination. (twisted pair ~100 Ohm) , but <1m I wouldn't care at the first try.

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 2 of 5
(3,982 Views)

Hi Henrik,

Thanks for the help.  Bassed off of what you said I was able to get a signal that I was able to do a proof of concept with the DIO on a X-Series daq card I had laying around.  It seems like I will need to do some tweaking to get everything just right but this gave me enough to say its a good route to take.  If you don't mind would explaining how (or point me to something to read) you came up with the values you did.  That way I hopefully will be albe to figure it out myself next time.

 

Thanks a ton for the help.

Lukin
Certified LabVIEW Architect
0 Kudos
Message 3 of 5
(3,963 Views)

Great, that I could help you 🙂

Spoiler
Did my good deed for today... let's go for a coffee 😄

 

You did well in drawing your input schematic, I only add some additional values for the physical voltage measurements. (Nearly) every measurement influences the measurant. Connecting a voltmeter is like adding a resitor and a small capacitor.*

The data I used can be found in the detailed specifications of your devices.

You look for 'input impedances' usually expressed in Ohm and pF.  (The DI was specified with input current ~250µA(?) so my 15k were a educated guess 🙂

(And if you can't find them ask the vendor for it, and if they can't tell you, hit them 😉  and measure them by your own, it's only physics). 

 

 *) depending on frequency and needed accuracy these models would be much more complex (sic!), usually you measure them (VNA) and use the results to compensate

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(3,949 Views)

Thanks for the info.  Next time I will hopefully be able to figure it out on my own.  Coffees on me 🙂

Lukin
Certified LabVIEW Architect
0 Kudos
Message 5 of 5
(3,936 Views)