Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Speaker for Bpod HiFi Module HD
#1
I am completely new to Bpod system and trying to use Bpod HiFi Module HD. I would appreciate it if someone could recommend a few affordable options for the speaker to use with it. The doc says any "amplified speaker" will do, but not sure what exactly that means. For e.g., how do I tell if a speaker is an amplified speaker or not or more generally if it would work with Bpod HiFi Module HD? Will Bpod HiFi Module HD be able to control volume and tone frequency in any such speakers through its Matlab interface?
Reply
#2
Hello Malda,

Generally, a speaker that has a power connector (and often a volume knob) contains an audio amplifier circuit. An earlier generation of training rigs at CSHL used this one (now discontinued):

[Image: s-l1600.jpg]
If ultra-high fidelity ultrasonic reproduction matters, I'd consider Avisoft's amp and speaker. TDT also has a good option.

You can get acceptable ultrasonic performance for most applications via a DIY route: This speaker + this amplifier + this power supply. You'll need to solder some speaker wire to the speaker, and you'll need a 3.5mm audio cable. You'll also need to figure out how to mount the speaker in your rig. As with any DIY option, definitely validate the setup with a measurement instrument (ultrasonic mic) to make sure it's doing what you expect before you start experiments.

If you just need distinguishable audio cues (i.e. if the character of the sound is unimportant for your analysis beyond separate cues being distinguishable to the test subject), you can use a set of consumer grade computer speakers similar to the ones pictured above.

The Bpod HiFi module is controlled from MATLAB via this class in the Bpod_Gen2 repository. Once you've created an instance of the class with 
Code:
H = BpodHiFi('COM3'); % Where COM3 is the HiFi module's USB serial port

you can adjust the volume with:

Code:
H.DigitalAttenuation_dB = N; % Where N is attenuation in dBFS. 0 = Full volume. Values are negative, and can range to -120.

Waveforms can be rendered in MATLAB as vectors with values ranging between -1 and 1. Bpod includes some convenience functions for generating waveforms. Waveforms are sent to the HiFi module with:

Code:
H.load(X, Waveform); % Where X is the index of the waveform

Once loaded to the device, the waveform can be triggered from any state by setting its output actions (also see this):

Code:
{'HiFi1', ['P' Z]} % Where Z is waveform index. Note that Arduino indexes by 0, so waveform 3 is known as 2 on the Arduino side.

The HiFi module can generate its own pure tones and white noise waveforms using 'Synth' functions. Setup from MATLAB is documented here, control from the state machine is documented here, and an example 2AFC protocol using synth is given here.

-Josh
Reply


Forum Jump: