FAQ: No Sound or Silent Recordings & Gimbal Issues

Q: Why can't I hear any sound, and why is there only silence when recording with the microphones? Also, why aren't the gimbals working?

A: We have prepared an installer specifically for users of Raspberry Pi named "pi." For this user account, we place a script that initializes the drivers for both sound and gimbals.

If you've set a username other than "pi," you may encounter issues with initializing the sound system or gimbals. We plan to update this soon to ensure compatibility regardless of the username. In the meantime, if you experience this issue, you need to run a script located in "/etc/rc.local". This script can be downloaded from: https://saraai.com/_SaraKIT/audio/audio_start.sh, which is located in the /home/pi/scripts/ directory on our devices.

Here is what you need to do to ensure everything functions correctly:

Execute the script to initialize the gimbals and sound system. Here is the content of the script for clarity:

#!/bin/bash
# Starting the gimbals
raspi-gpio set 17 op pn dl
sleep 1
raspi-gpio set 17 op pn dh
echo "Engine driver reset"

# Turning on the audio, allowing 3 seconds for the voltage to stabilize to avoid the 'pop' effect.
raspi-gpio set 27 op pn dh
sleep 1 
raspi-gpio set 26 op pn dl
sleep 1
raspi-gpio set 4 op pn dh # Disable class D amplifier
sleep 1 
raspi-gpio set 16 op pn dl # Reset DSP processor
sleep 1
raspi-gpio set 16 op pn dh # Enable DSP
sleep 1
raspi-gpio set 4 op pn dl # Enable amplifier

echo "Audio ON"

This script resets the engine driver and manages the power settings for the audio to prevent any abrupt noise or damage, ultimately activating the audio and gimbals. Ensure that this script is executable and properly configured to run at startup.

If you have further questions or need more assistance, please contact us at contact.

 

 

Q: My AS5600 encoder is not working. What should I do?

A: The encoder inputs J402 and J404 require a PWM signal from the encoder. There is a significant quality issue with the cheapest AS5600 decoders. We purchased four different units, of which three did not work at all in PWM mode. One of them had the analog output enabled by default instead of PWM, and it only started working after being configured via software to use PWM (which required initial connection in I2C mode). I've outlined how to enforce PWM mode in this short Python code (link).

There are no such troubles with another model, the AS5048A - out of five different units, each worked without any issues, which is why we recommend purchasing this model instead.

 

 

Q: My encoder does not display the full 360-degree angle (360° = 2*Pi = 6.2831 rad) or skips certain values. What should I do?

A: Each type of encoder, and even individual units, can have slightly different parameters (±10% for an encoder of the exact same type), which is why we need to set the appropriate parameters using the following commands:

For C++:
void Encoder_Param(unsigned char EncoderId, uint16_t minpwm, uint16_t maxpwm);

For Python:
def Encoder_Param(EncoderId, minpwm, maxpwm):


For example, for the AS5048A:
Encoder_Param(0, 173, 45886);

For the AS5600:
Encoder_Param(0, 1470, 47900);