Replies: 7 comments 2 replies
-
Details of a custom board pinout with discrete components: https://raspberrypi.stackexchange.com/questions/144434/cm4-custom-board-with-max98357 |
Beta Was this translation helpful? Give feedback.
-
It has taken a while to get this component to play nicely with the INMP441 microphones, but I have an installer script (or three) that should work. I will keep testing as the installation modifies the same files which can cause conflicts. The installers need to be executed in the following order, with multiple restarts during the process (which is why they are not a single install):
The scripts may require re-running after restart, so I'll try to make that clear from the debug output. Full commit showing changes: fbe3eae More informationIt seems as though the adafruit i2s installer scripts are a good baseline for this, and I have created my own bash scripts to do the following:
The original mic installer attempts to make and install There is a line added to /etc/asound.conf TestingI have tested the speakers using
Testing the microphones and speech recognition can be done by enabling the
|
Beta Was this translation helpful? Give feedback.
-
Scratch that. On a second attempt this doesn't work well at all. I had an issue with the CM5 and ended up reinstalling the bootloader and re-flashing the eMMC, but this time using the install scripts hasn't been successful. I can consistently get the mics working but the amp module will break the mics and then not work itself either.... Fun! |
Beta Was this translation helpful? Give feedback.
-
A little dated but I'll take a look at this as a possible improvement adafruit/Raspberry-Pi-Installer-Scripts#322 Also this |
Beta Was this translation helpful? Give feedback.
-
I have been trying a few things to resolve this including re-running the mic installer, and even creating a modified amp installer (I didn't keep this, but here it is):
The mics work, but the speaker seems to hit a 'device busy' error when I test them with
Running
Card should match the card number in Testing has been difficult as the device configuration is changing after restart. I managed to do a complete test of speech recognition and echoing out via TTS by adding the speech recognition module to the TTS module main execution:
The device name is 'pulse' in this case as the 'lp' device was not present. But this allowed me to echo back the speech heard by adding Furthermore, running elevenlabs from a module (or even just hardcoding a module to run) results in an error:
This error doesn't happen if I run the module directly Definitely a lot of work to be done in the code but at least the hardware is capable of using both. Current config for above successful test: aplay -l:
arecord -l
I ran the mic installer again most recently, and then restarted. The device numbers seem to change on restart, which doesn't help with hardcoding configurations.
On restart playback cards 1 and 2 swap, but the above test still works and |
Beta Was this translation helpful? Give feedback.
-
Update: The error This was because I had previously installed modules outside of the virtual environment as part of the viam config steps. I have since archived those dependency files and that small issue, at least, is fixed. |
Beta Was this translation helpful? Give feedback.
-
I definitely find that running the mic installer fixes a few problems, but none of this is particularly clean. I've pushed a version of the |
Beta Was this translation helpful? Give feedback.
-
As part of the proposed changes for Cody, the Raspberry Pi 5 will be replaced with a Pi Compute Module 5. This will allow a carrier board to be created that can house the core modules needed for the robot in a much smaller package.
This discussion details the potential use of the MAX98357A I2S amplifier, and will hopefully allow the module to be embedded on the carrier board directly as discrete components.
This image shows the pinout and includes an example of the MEMS mic currently used in Buddy:
GPIO pins 18, 19 & 21 are used (where 18 & 19 are shared with the other I2S device as expected).
Datasheet:
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX98357A-MAX98357B.pdf
Beta Was this translation helpful? Give feedback.
All reactions