Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deliver clicks at given rate Analog Output Module

I would like to deliver auditory clicks at a given rate using the Bpod Analog Output Module. Is this possible? Which firmware would I need to use for the module and is there any documentation on how to implement the delivery of the stimulus? 

Thanks a lot!
Hi Veronica,

With its default WavePlayer firmware, the analog output module can play waveforms you program into it in advance.

To create a waveform of clicks in MATLAB, you'd do the following (assuming your sampling rate is 50kHz)

MyWave = zeros(1,500000);

This will play 0V at each of 50,000 samples per second, lasting for 10 seconds.

Then, at each position where you want to play a click, change two samples from [0 0] to:
[1 -1]

So two clicks 100 microseconds apart would look like:

...0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, 0, 0... 

Once you have the waveform you want, you can load it to the WavePlayer with the loadWaveform() method. Assuming you initialized the WavePlayer as 'W', it would be:

W.loadWaveform(3, MyWave); % Load the waveform as Wave# 3

Then, you can trigger it from the MATLAB command line with:
W.Play(1:4, 3); % Play waveform 3 on channels 1-4

Please let us know if this works for you!



Forum Jump: