Jump to content
  • 0

Voltage spikes when changing voltage


graham

Question

Hello,

I am using a discovery 2 board to supply analog pulses to a laser controller. I am controlling the pulse amplitude (voltage) and duration from LabView. All is mostly working fine, except I have the following issue:

When applying a pulse of lower voltage than the previous pulse, there is a positive pulse which comes before the actual desired pulse. Please see attached photo from my scope display. It seems related to changing the voltage, and it decays back to zero after a few ms.

When applying a pulse of higher voltage than the previous pulse, there is a negative pulse. This is not so critical for me but I want to remove it as well.

When applying a pulse of the same voltage as the previous pulse, there is no additional spike or pulse.

I measured the amplitude of these 'unwanted' pulses, and they follow a linear releationship with the difference in voltage between the previous and current pulses.

Please can somebody advise me where this is coming from and how to solve it? Is it related to the voltage idle setting?

 

Kind regards,

Graham

discoverypulses.JPG

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Hi @graham

I don't exactly which functions are you using, how are you configuring to generate the pulses...

The AWG (FGen) on AD uses two gain steps: 1V amplitude (2Vpk2pk) and below, and above. Changing the gain/amplitude dynamically from above 1V to 1V or below could output some glitch of microsecond length.

Try to stop the FGen before configuring then starting it again.

Link to comment
Share on other sites

Hi @attila

Attached are two screen grabs of my labview program. First I initialise the AD2 as a function generator using the steps indicated in the first screen grab. I set the idle and amplitude to 0, and use the square wave function. I set the phase to 270degrees so the pulse happens in the 'centre' of the run time, therefore the initial voltage is zero. I use a state machine, so after initialisation, when I call for a pulse to be generated it executes the second screen grab. Here, the idle is again set to 0, and I set the amplitude, frequency, and runtime of the pulse I want. I realise I am repeating some configuration VIs such as the set amplitude, maybe I should do it in a cleaner way.

I have tried various things, including putting the 'Stop' VI before configuring, and also the 'output disable' VI, but still I always get the glitch pulse. When you say 'try to stop the FGen', do you mean to use the 'FGEN Stop' VI? I also have a 'set idle' VI included (before the 'configure standard waveform' VI), but this doesn't seem to make any difference at all.

Thanks for your help, I will keep trying by rearranging the configuration order.

Graham

fgen init.PNG

fgen pulse.PNG

Link to comment
Share on other sites

I have investigated the behaviour in waveforms, and I think the problem is that the idle is being set to 'offest', but I want it to be set to 'initial' (this is why I include a 270degree phase, so the initial value is always 0V.

The 'dwf analog out set idle' function takes an integer as the input for the idle value. I have been using 0, but should I use something else to set it to 'inital'?

Thanks,

Graham

Link to comment
Share on other sites

Hi @graham

Avoid adjusting the offset in quick tasks since this has long (~10ms) settling time.
Leave the offset at default 0V and use only the amplitude to generate pulse. You can use the pulse signal type:
DWFAPI BOOL FDwfAnalogOutNodeFunctionSet(HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC func);
const FUNC funcPulse = 7; 

The Idle options are the following:
typedef int DwfAnalogOutIdle;
const DwfAnalogOutIdle DwfAnalogOutIdleDisable = 0; // no supported on AD1,2, offset is used instead
const DwfAnalogOutIdle DwfAnalogOutIdleOffset = 1;
const DwfAnalogOutIdle DwfAnalogOutIdleInitial = 2;

image.thumb.png.fc36d65c790f66c67cb7a3c5af91161f.png

Link to comment
Share on other sites

Hi @attila

Can you change this behaviour to use amplitude instead of offset? Or enable to use amplitude for fast changes and offset for slow changes of output voltage. I need this for fast variable PSU which is driven by AD2. Sometime I need long settling time and sometime I need to have short settling time.

Thank you

Link to comment
Share on other sites

Thank you, @attila!

This makes more sense. But I don't think it helps me because the 'pulse' option is not available in the latest waveforms toolkit for LabView (1.0.3.26).

I updated the waveforms program (I was on the previous version), and now the pulse option is available in this software. But I need to use it in LabView.

Thanks,

Graham

Link to comment
Share on other sites

Hi @graham

Just like you are calling the other FDwf functions you can use the FDwfAnalogOutNodeFunctionSet(hdwf, 0|-1, 7) instead the "FGEN_ConfigureStandardWaveform" VI
Or you could use the "FGEN_ConfigureArbitraryWaveform' VI specifying a pulse waveform

DWFAPI BOOL FDwfAnalogOutNodeFunctionSet(HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC func);
const FUNC funcPulse = 7; 

Link to comment
Share on other sites

Hi @attila

Thanks again for your reply.

I am trying with the  FDwfAnalogOutNodeFunctionSet you suggested, using 7 as the value for function. But what should I set as the node value? What is the node value? I couldn't see it in the manual unfortunately.

 

Thanks,

Graham

Link to comment
Share on other sites

Hi @graham

Use node 0.
FDwfAnalogOutNodeFunctionSet(hdwf, -1, 0, 7)
-1 = all enabled channels, 0 = channel 1, 1 = channel 2
0 = carrier
7 = pulse

typedef int AnalogOutNode;
const AnalogOutNode AnalogOutNodeCarrier = 0;
const AnalogOutNode AnalogOutNodeFM = 1;
const AnalogOutNode AnalogOutNodeAM = 2;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...