Zenbu Manual
This is the manual/datasheet for the Zenbu-pHat. This hat for the Raspberry Pi gives you microphones and a 3W amplifier.
Last updated
This is the manual/datasheet for the Zenbu-pHat. This hat for the Raspberry Pi gives you microphones and a 3W amplifier.
Last updated
Only connect suitable speakers. Using speaker with a insufficient power rating can lead to overheating, its destruction or in the worst case cause fire.
Make sure the software you are using is not pulling GPIO 17 to HIGH if no audio output is intended.
Do not remove LRCLK while BLCK is present. Removing LRCLK while BCLK is present can cause unexpected output behavior, including a large DC output voltage to the speaker.
If smoke develops or if the speaker is heating up, disconnect the device from the power source immediately and contact the manufacturer at office@nyumaya.com.
We only supply the hardware and have no influence on software. The Zenbu-Kit is intended to be used for research and development. Make sure that you have suitable knowledge to operate it safely. Faulty software can cause damage to the speaker.
We recommend using a power supply capable of delivering 2.5 Ampere. If you experience system restarts during playback we recommend using a better power supply.
The Zenbu Mic Board features two InvenSense ICS-43434 microphones. The board is powered from a 3v3 supply. Internally the Mic Board uses a 3v3 to 1v8 LDO which reduces noise in the power supply for the microphones.
Stereo bottom port MEMS-Microphones: ICS43434
Signal to noise ratio: 65 dBA
Acoustic overloading point: 120 dB SPL
Amplifier MAX98357A
Power 3.2W Output Power into 4 Ω
Load 4/8 Ω
All expansions are powered by a shared 300mA LDO
Older version of Raspbian or other Linux distributions will include the necessary driver for the pHat. Get the latest version of Raspbian and flash it to a SD Card. Update any old version of Raspbian:
If you have accidentally messed up the alsa configuration it can happen that phantom controls remain visible (e.g. in the alsamixer). To reset the alsa configuration to a clean state remove the alsa state file and make alsactl not executable. This will prevent alsa to recreate the state file. After rebooting alsactl has to be made executable again.
On a fresh install aplay -l will show two additional sound cards.
Edit the file /boot/config.txt and comment the dtparam=audio=on line to disable the raspberry default audio. If you want to keep the default audio you have to modify your /etc/asound.conf file accordingly (This one assumes the Zenbu Sound-card has index 0)
The Zenbu pHat will work without any special alsa configuration, but will have no volume control. This can be especially troublesome since the microphones will pick up sound at very low volume.
We provide a possible configuration to boost the microphone volume and provide a software volume control. Edit the file /home/pi/.asoundrc and replace the content with the following content.
Use the included 7pin cable to connect the microphone board to the connector labeled MIC on the baseboard. Connect the speaker to the 2 pin connector on the baseboard which is labeled LS.
The green led on the Zenbu board can be switched on by setting the Raspberry Pi’s GPIO 13 to high. Here is an example how this can be done from the command line.
Test your speaker by entering this command in the command line.
speaker-test
You should now see an output like this
and you should hear a pink noise coming from the speaker. You can stop the test by hitting CTRL+C
Use arecord to capture a short audio file from the microphones. Then you can use aplay to replay the captured audio file.
arecord -f S32_LE -r 48000 -c2 > /tmp/audiotest.wav
aplay /tmp/audiotest.wav
Another simple way to test the microphones is streaming the audio to a Host-PC. Use arecord to record audio and nc for the transmission on the Raspberry Pi. Assuming the IP-Address of the raspberry is 10.0.0.41:
pi@raspberrypi:~ $ arecord -f S32_LE -r 48000 -c2| nc -l 5555
On the Host-PC use nc connect to the Raspberry Pi and use a pipe to redirect the audio data to aplay
user@hosstpc:~ $ nc 10.0.0.41 5555|aplay
My Raspberry Pi doesn’t recognize the pHat: Make sure you use an up to date version of Raspbian. Make sure the pHat is connected to the Raspberry Pi before booting.
The microphones are not working: Make sure your ALSA settings are correct. If you skipped creating the asound file the volume of the microphone may be too low to hear. Try speaking closer to the microphone to verify this.
Why are you using the google-voicehat driver? The basic philosophy of Linux is avoiding code duplication. The google-voicehat provides a minimal generic duplex I2S implementation. Any duplex sound-card which doesn’t require any special configuration will work with it. Introducing another redundant driver would add unnecessary complexity to the Linux project.