Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
raspberry_boards:raspi-sound-hat [2020/03/04 23:53]
admin [Paper PCB]
raspberry_boards:raspi-sound-hat [2020/09/01 19:25] (current)
admin [Alsa Mixer Settings]
Line 1: Line 1:
-===== Raspi-Sound-Hat =====+===== Raspi-Sonic-Hat =====
  
-The Raspi-Sound Hat is a sound card for the [[https://​www.raspberrypi.org/​|Raspberry Pi]]. It is based on the [[https://​www.cirrus.com/​products/​wm8731/​|WM8731]] I2S sound chip by Cirrus Logic (former Wolfson). The board design is a hybrid of the [[https://​statics.cirrus.com/​pubs/​proDatasheet/​WM8731_v4.9.pdf|WM8731 datasheet]],​ the [[https://​www.mikroe.com/​audio-codec-proto-board|Audio Codec Board - PROTO]] and the [[http://​www.audioinjector.net/​rpi-hat|Audio Injector]]. That is why one can use the [[https://​github.com/​Audio-Injector/​stereo-and-zero|Audio Injector software]].\\+{{:​raspberry_boards:​raspi-sonic-hat.jpg?​600|}}\\ 
 + 
 +The Raspi-Sonic-Hat is a sound card for the [[https://​www.raspberrypi.org/​|Raspberry Pi]]. It is based on the [[https://​www.cirrus.com/​products/​wm8731/​|WM8731]] I2S sound chip by Cirrus Logic (former Wolfson). The board design is a hybrid of the [[https://​statics.cirrus.com/​pubs/​proDatasheet/​WM8731_v4.9.pdf|WM8731 datasheet]],​ the [[https://​www.mikroe.com/​audio-codec-proto-board|Audio Codec Board - PROTO]] and the [[http://​www.audioinjector.net/​rpi-hat|Audio Injector]]. That is why one can use the [[https://​github.com/​Audio-Injector/​stereo-and-zero|Audio Injector software]].\\
  
 This sound card  features two line inputs and two line outputs.\\ This sound card  features two line inputs and two line outputs.\\
Line 34: Line 36:
   * 5x 10 µF   * 5x 10 µF
   * **Diodes:**   * **Diodes:**
-  * 3x LED+  * 1x LED 
 +  * **Inductor** 
 +  * 1x 10µH 
 +  * **Cristal** 
 +  * 1x 12 MHz
   * **Semiconductors**   * **Semiconductors**
-  * 1x ADC MCP3008 ​+  * 1x LD1117V33 (3V3 version!) 
 +  * 1x WM8731
   * **Mechanical:​**   * **Mechanical:​**
-  * 1x IC socket, 16pins +  * 1x SMD adapter board 28 pins 
-  * 1x pin strip 1x8 +  * 2x pin strip male 1x14 pin 
-  * 1x pin strip 1x2 +  * 2x pin strip male 1x4 pin 
-  * 5x mini switch +  * 1x pin strip male 1x3 pin 
-  * **Potentiometers:​** +  * 1x pin strip female 1x2 pin 
-  * 2x 100 k+  * 1x push button
  
 ---- ----
 ==== Installation === ==== Installation ===
  
-After connecting the Audio Injector to the Raspberry Pi change ​some configurations,​ in:+After connecting the Audio Injector to the Raspberry Pi some software should be installed.\\ 
 +First you have to download the deb package from [[http://​forum.audioinjector.net/​viewtopic.php?​f=5&​t=3]]. 
 +   $ wget https://​github.com/​Audio-Injector/​stereo-and-zero/​archive/​master.zip 
 +Unpack it: 
 +   $ unzip master.zip 
 +And install it: 
 +   $ cd stereo-and-zero-master/​ 
 +   $ sudo apt install ./​audio.injector.scripts_0.1-1_all.deb 
 +Change ​some configurations,​ in:
    $ sudo nano /​boot/​config.txt    $ sudo nano /​boot/​config.txt
-Comment out:+Put in comment:
    # dtparam=audio=on    # dtparam=audio=on
 And type in: And type in:
 +   # Enable audio (WM8731)
    ​dtoverlay=audioinjector-wm8731-audio    ​dtoverlay=audioinjector-wm8731-audio
 ctl + o for saving, press return and ctl + x to leave.\\ ctl + o for saving, press return and ctl + x to leave.\\
Line 61: Line 77:
 ==== Alsa Mixer Settings ==== ==== Alsa Mixer Settings ====
  
-[[https://​github.com/​Audio-Injector/​stereo-and-zero]]\\ +To enable the audio output: 
-There are two reference alsa mixer files which will allow you to setup default ​output ​with either line input or microphone input : +   ​$ ​amixer set '​Output Mixer HiFi' on 
-Download+Go into the folder: 
-   ​$ ​wget https://​github.com/​Audio-Injector/​stereo-and-zero/​archive/​master.zip +   $ cd stereo-and-zero-master/​audio.injector.scripts-0.1
-Unpack it: +To setup the output ​run the following command: 
-   $ unzip master.zip +In combination with the microphone input:
-go into the folder: +
-   $ cd stereo-and-zero-master/​ +
-and run:+
    $ alsactl --file asound.state.MIC.thru.test restore    $ alsactl --file asound.state.MIC.thru.test restore
 +or in combination with the lines input:
    $ alsactl --file asound.state.RCA.thru.test restore    $ alsactl --file asound.state.RCA.thru.test restore
 +to check the alsa setting:
 +   $ alsamixer
  
 ---- ----
Line 117: Line 133:
 //graphic from: //graphic from:
 [[https://​hifiduino.wordpress.com/​2014/​11/​13/​raspberry-pi-b-digital-audio/​]]//​\\ [[https://​hifiduino.wordpress.com/​2014/​11/​13/​raspberry-pi-b-digital-audio/​]]//​\\
 +
 +----
 +==== Install the Shutdown Button and the LED ====
 +
 +Download the Python script:
 +  $ wget www.dernulleffekt.de/​programme/​scripts.tar.xz
 +And unpack it:
 +  $ tar -xf scripts.tar.xz
 +Go to in the script folder
 +  $ cd /​home/​pi/​scripts
 +Change owner & rights
 +  $ sudo chown root:root shutdownbutton.py blink.py
 +  $ sudo chmod 755 shutdownbutton.py blink.py
 +Create the autostart:
 +    $ sudo nano /​etc/​rc.local
 +Write before "exit 0":
 +  ​
 +  # run reset and shutdown script and the blink script
 +  printf ">>>>>>>>​ Starting shutdown aund reset button on GPIO 27 and a blinking LED on GPIO 04"
 +  /​home/​pi/​scripts/​shutdownbutton.py & 
 +  /​home/​pi/​scripts/​blink.py &
 +
 +To save and leave press: CTRL+O, Enter, CTRL+X\\
 +Reboot:
 +  $ sudo reboot
  
 ---- ----
Line 127: Line 168:
 [[https://​github.com/​Audio-Injector/​stereo-and-zero]]\\ [[https://​github.com/​Audio-Injector/​stereo-and-zero]]\\
 [[https://​learn.adafruit.com/​adafruit-max98357-i2s-class-d-mono-amp/​raspberry-pi-usage]]\\ [[https://​learn.adafruit.com/​adafruit-max98357-i2s-class-d-mono-amp/​raspberry-pi-usage]]\\
 +[[https://​alsa-project.org/​wiki/​Main_Page]]\\
  
 ---- ----
 ==== License ==== ==== License ====
  
-The Raspi-Sound Hat was designed by **Wolfgang Spahn** 2020.\\+The Raspi-Sonic-Hat was designed by **Wolfgang Spahn** 2020.\\
 It is licensed under a [[http://​creativecommons.org/​licenses/​by-nc-sa/​4.0/"​|Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]]. It is licensed under a [[http://​creativecommons.org/​licenses/​by-nc-sa/​4.0/"​|Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]].