Bob Rathbone Computer Consultancy
Total Page:16
File Type:pdf, Size:1020Kb
Raspberry PI Internet Radio Constructors Manual Bob Rathbone Computer Consultancy www.bobrathbone.com 1st of January 2016 Version 4.7 Bob Rathbone |Raspberry PI Internet Radio - / 1 Contents Introduction .......................................................................................................................................... 11 Examples ........................................................................................................................................... 12 Building in a IR sensor and remote control ....................................................................................... 15 Hardware .............................................................................................................................................. 16 Raspberry PI computer ..................................................................................................................... 16 The HD44780 LCD display ................................................................................................................. 17 Using the Raspberry PI model B+ an Model 2 .................................................................................. 17 Raspberry Pi Zero .............................................................................................................................. 18 Radio variants ................................................................................................................................... 20 Housing the radio .............................................................................................................................. 21 Wiring .................................................................................................................................................... 22 Version 2 or model B+ boards (latest) .............................................................................................. 23 Version 1 boards (early boards) ........................................................................................................ 23 Rotary encoder wiring ....................................................................................................................... 23 LCD Module Wiring ........................................................................................................................... 24 Power supply considerations ............................................................................................................ 25 Preventing electrical interference .................................................................................................... 26 Using a clip on ferrite core on the +5 volt cable ........................................................................... 26 Fit a mains filter ............................................................................................................................ 26 Try a decoupling capacitors .......................................................................................................... 26 GPIO Hardware Notes ........................................................................................................................... 27 Parts List ................................................................................................................................................ 28 Construction HD44780 LCD................................................................................................................... 29 Building the LCD and pushbuttons interface board .......................................................................... 29 Construction using an Adafruit LCD plate ............................................................................................. 31 Introduction ...................................................................................................................................... 31 Using other switches ......................................................................................................................... 31 Using the Adafruit LCD plate with the model B+ and 2B .................................................................. 32 Construction using an I2C LCD backpack .............................................................................................. 33 Adafruit I2C Backpack ....................................................................................................................... 33 Arduino PCF8475 I2C backpacks ....................................................................................................... 34 Creating the interface board for the I2C back pack .......................................................................... 34 Construction using the PiFace CAD ....................................................................................................... 35 Bob Rathbone |Raspberry PI Internet Radio - / 2 Installing an IR sensor and remote control ........................................................................................... 36 IR Sensor........................................................................................................................................... 36 Remote control ................................................................................................................................. 36 Remote Control Activity LED ............................................................................................................. 36 System Software installation ................................................................................................................ 38 SD card creation ................................................................................................................................ 38 Conventions used in this tutorial ...................................................................................................... 38 Online update and upgrade of the Operating System ...................................................................... 38 Setting the time zone ........................................................................................................................ 39 Changing the system hostname and password ................................................................................ 40 Installing or upgrading the radio Software ........................................................................................... 42 Music Player Daemon Installation .................................................................................................... 42 Install the Radio Daemon .................................................................................................................. 42 Options 1, 2, 3 or 4 ........................................................................................................................ 44 Options 5, 6 or 7 ............................................................................................................................ 44 Option 8 PiFace CAD ..................................................................................................................... 45 Update the radiod.conf file ........................................................................................................... 45 Reboot to enable the software ..................................................................................................... 45 Testing the Music Player Daemon MPD ........................................................................................... 46 Installing the I2C libraries ................................................................................................................. 46 Installing the PiFace software ........................................................................................................... 49 Installing the Infra Red sensor software ........................................................................................... 49 Enabling the repeat on the volume control .................................................................................. 52 Configuring the remote control activity LED .................................................................................... 53 Configuring USB speakers instead of the analogue output .............................................................. 53 Configuring a CMedia USB dongle .................................................................................................... 54 Changing the date format ................................................................................................................. 54 Configuring the Adafruit LCD backlight colours ................................................................................ 55 Configuring the playlist number ....................................................................................................... 55 Configuring startup mode for Radio or Media player ....................................................................... 55 Upgrading from earlier versions ....................................................................................................... 55 Operation .............................................................................................................................................. 57 Starting the program ......................................................................................................................... 57 Buttons .............................................................................................................................................