Post

Software Issues and Soldering | Pi 5 Build Log 4

Since the PCB has arrived I have been integrating the various modules that I had partially installed on the previous version of the robot using a Raspberry Pi 3B+. The new Raspberry Pi 5 has been a great upgrade, but has come with a few teething issues that I have had to work around.

Take a look at the build video to see the latest progress on the modular biped.

Adafruit support

It seems that many of the Adafruit modules I have been using have not yet been updated to support the Pi 5. Unfortunately there was no way of verifying this before attempting to install the modules, and in most cases there is not a workaround offered.

Adafruit MAX98357 I2S Class-D Mono Amp

The MAX98357 is a little amplifier that can be used to drive a speaker using i2s. In the previous version of the project I used an amp that connected to the Pi’s audio jack. This jack is not present on the Pi 5, so I needed to find an alternative.

Unfortunately the configuration of this module is not compatible with the Pi 5, and there is no workaround for this.

https://cdn-learn.adafruit.com/downloads/pdf/adafruit-max98357-i2s-class-d-mono-amp.pdf

As a side node, the script install location is no longer working, as the branches have been renamed but the documentation has not been updated. The you can find the new location here

Once downloaded and executed there are a few steps to test the amplifier, including restarts. Unfortunately the end result is that the amplifier is not detected.

There is an issue logged on github GitHub which mentions compatibility with bookworm (the new version of the Raspberry Pi OS), but no details on when a fix will be available.

Adafruit I2S MEMS Microphone Breakout

Similarly with the amplifier, the MEMS microphone that worked so well on the Raspberry Pi 3B+ also fails to install on the Pi 5.

https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout

The command to install is:

1
2
3
4
cd ~
sudo pip3 install --upgrade adafruit-python-shell
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2smic.py
sudo python3 i2smic.py

But unfortunately there is an error when running the script and the mic is not available with arecord -l:

1
2
3
4
5
6
7
8
9
Cloning into 'Raspberry-Pi-Installer-Scripts'...
make -C /lib/modules/6.1.58-v8_16k+/build M=/home/archie/Raspberry-Pi-Installer-Scripts/i2s_mic_module clean
make[1]: *** /lib/modules/6.1.58-v8_16k+/build: No such file or directory.  Stop.
make: *** [Makefile:38: clean] Error 2
make -C /lib/modules/6.1.58-v8_16k+/build M=/home/archie/Raspberry-Pi-Installer-Scripts/i2s_mic_module modules
make[1]: *** /lib/modules/6.1.58-v8_16k+/build: No such file or directory.  Stop.
make: *** [Makefile:35: all] Error 2
make: *** No rule to make target 'snd-i2smic-rpi.ko', needed by 'install'.  Stop.
DONE.

Again, as of writing there are no details on when a fix will be available.

Neopixel I2C support

The i2c neopixel support is enabled with the Adafruit NeoDriver - I2C to NeoPixel Driver Board - Stemma QT. The installation guide uses the Adafruit CircuitPython seesaw library.

This library can be installed on the pi with the following command, and seems to be fully compatible with the Pi 5:

1
pip3 install adafruit-circuitpython-seesaw

Within a few minutes I managed to get my SMD SK6812 neopixels working with the Pi 5 using this library.

Neopixel GPIO support

The neopixels could alternatively be controlled with a single GPIO pin and I was keen to test this out as it removed the need for the expensive i2c module.

The rpi_ws281x library is used to control the neopixels, but this is not yet compatible with the Pi 5.

You can read about the issue here. Unfortunately there is no workaround for this yet, but the issue is being worked on.

Fortunately the i2c module has been integrated into the PCB so I can continue to use the neopixels with the i2c module until the GPIO support is available, then potentially update the board to make the i2c module optional.

GPIO library support

Another blocking issue is that the PiGPIO library is not yet compatible with the Pi 5. This is used to control the GPIO pins on the Pi, and is used by the motion sensor and (new) servo.

The issue is being worked on, and you can read about it here

The suggestion is to use the alternative library in the Raspberry Pi Utils library.

Alternatively, the GPIOzero library may be another option. I am using this in the project as a workaround for the time being.

Camera support

As mentioned in the previous build log, the CSI camera is not supported on the Pi 5 without a specific update being installed. Fortunately this can be fixed by running sudo rpi-update pulls/5691, but it’s worth noting that updating your Pi in future may revert this change (as seems to have happened to me recently).

Soldering

Moving on from the software issues, I have been working on soldering the PCB. The process of soldering the SMD (surface mount) components is a little more involved than the through hole components, but with a little practice it’s not too difficult. I was able to solder not only the SK6812 neopixels, but also the 0603 capacitors, although I had help from the Linkmicro LM249MS digital microscope for this, which made the process a lot easier!

Once the SMD components were soldered I was able to solder the through hole components. As this is a test board I wanted to be able to disconnect the modules in case this was not the final design, so I soldered female headers onto the board and connected the modules with male headers. This allows me to easily remove the modules if I need to.

I was surprised to find that the neopixels worked first time, and I was able to control them with the i2c module. I was also able to connect the DC-DC converter via JST connector and power the PCB and the Pi 5 without any issues (so far!).

Viam Modules and Support

I have been working with the team at Viam to integrate the Pi 5 with their platform. We have been working on a number of issues, and the team have been providing great support via their Discord server.

I will create a separate post detailing the process, as it has been an interesting journey and I have learned a lot about the Viam platform along the way.

Thanks to Viam’s team for their support so far.

You can take a look at some of our conversations on the Discord server in the Ask Viam section.

This post is licensed under CC BY 4.0 by the author.