-
Notifications
You must be signed in to change notification settings - Fork 4
Setting up the hardware for the project
The hardware setup for the project requires the following main components:
- PocketBeagle.
- USB Audio Device.
- Microphone with Automatic Gain Control.
- USB Breakout Board.
The entire circuit is connected as shown in the assembly diagram:
The actual circuit looks like this:
-
Boot up the PocketBeagle with the latest Linux image The process of flashing the linux image on a microSD card is described here
-
Connect to the internet to install the required packages, if you are using Windows visit this link or if Linux use this link
-
Make some changes in the ALSA configuration files in order to use the USB Audio device as default.
Uncomment this line
load card-specific configuration files (on request)
Edit these lines
defaults.ctl.card 1 (from 0)
defaults.pcm.card 1 (from 0)
Comment out these lines (Just gets rid of some unnecessary ALSA warnings)
# pcm.rear cards.pcm.rear
# pcm.center_lfe cards.pcm.center_lfe
# pcm.side cards.pcm.side
# pcm.hdmi cards.pcm.hdmi
# pcm.modem cards.pcm.modem
# pcm.phoneline cards.pcm.phoneline
pcm.usb
{
type hw
card 1
}
pcm.internal
{
type hw
card ALSA
}
pcm.!default
{
type asym
playback.pcm
{
type plug
slave.pcm "usb"
}
capture.pcm
{
type plug
slave.pcm "usb"
}
}
ctl.!default
{
type asym
playback.pcm
{
type plug
slave.pcm "usb"
}
capture.pcm
{
type plug
slave.pcm "usb"
}
}
- Testing the gain of the AGC microphone, you can follow the link for details on how to set the gain effectively.
I will generally recommend everyone to try to solder male headers to the USB breakout board. I personally used female headers and so had to use additional wires to connect to the PocketBeagle. One thing that I learnt was that for the D+- pins we should try to use wires as short as possible. In my case I had an error -71 in my dmesg logs everytime I connected the USB audio device using this configuration, signifying a power issue, the pocketbeagle was overwhelmed by it, as also signified by some babble errors. One way to tackle the problem is by using a USB powered hub to power the audio device so that it does not draw power from the pocketbeagle, but this too didn't work in my case. All my errors were removed using a rather simple hack, using male headers for the breakout board as well as shorting ID-GND and VB-VI pins on the pocketbeagle directly, like the pic below:.