Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noise in Analog Output Module Loop
Hi Josh,

I'm trying to use Analog Output Module to generate LED pulses with ramp-up and ramp-down intensity.  I can almost successfully control the LED shape, but when I check the output with oscilloscope, I realized that at the end of each loop, there is one sample that has 3-4V output.  I made sure that this sample is not included in my looped waveform.  Indeed, even if I generate a simple zero vector as a waveform and loop it, there are always one sample at the end of each loop that gives strange value. Do you have any idea why this happens?

I'm using WavePlayer, and my code for setting up WavePlayer is as follows (to make it simple, here I generated a simple zero vector waveform):

    LEDsamplerate = 10000;
    LEDwaveform = zeros(1,100);

    W = BpodWavePlayer('COM3');
    W.BpodEvents = {'On', 'Off', 'Off', 'Off'};
    W.TriggerMode = 'Toggle'; 
    W.LoopDuration = [20, 0, 0, 0];
    W.LoopMode = {'On','Off','Off','Off'};
    W.SamplingRate = LEDsamplerate;
    W.loadWaveform(1, LEDwaveform);
    LoadSerialMessages('WavePlayer1', {['P' 1 0]});

With this simple zero waveform, I still see a 5V sample at the end of each loop in my oscilloscope.  I would really appreciate it if you could let me know how I can resolve this issue.

Hi Hiroyuki,

I replicated the issue. It was a firmware bug, and I corrected it on the 'develop' branch of the analog output firmware repository, here.

Upload instructions are here (you'll have to use 'Manual'). If you're setting up a new Arduino installation, make sure to get version 1 of SDFat library from here. You'll need to change the current firmware version for WavePlayer in \Bpod_Gen2\Functions\Internal Functions\currentFirmwareList.m

Please let me know if this fixes the issue for you. If so, this fix definitely warrants a (long overdue!) version release for Bpod_Gen2.

Hi Josh,

Thanks!  That solved the issue and now the waveform looks clean.


Forum Jump: