Adding a Status LED for RP3 B+

I’m doing a little troubleshooting on the Raspbrry Pi 3 B+ and figured I’d add my notes somewhere for safe keeping.

I’ve added a fancy metal momentary push button with blue led surround to switch my Volumio off/on using GPIO 3 and GPIO 4 with the GPIO Buttons plugin and a pair of diodes on the switch to ground both inputs when the switch is depressed.

I am using the UART on GPIO 14 to energize the LED when the Raspberry Pi is running which has used in the past however, apparently the Raspberry Pi 3 B+ uses a software UART rather than hardware and as a result, the LED energizes for a few seconds during boot and then extinguishes.

I’ve done some digging around and there is a fix which causes a kernel panic and there is another fix for that too.

  1. In order to make GPIO 14 to energize the LED when the Raspberry Pi 3 B+ is running, we need to add a line to userconfig.txt in the boot directory to turn the UART on: enable_uart=1

  2. When I added this line, it caused my system to hang on boot and it never came on line. Apparently this is a problem in the Raspberry Pi 3 firmware and in order to correct it we need to do the following. We need to edit the cmdline.txt which is also in the boot directory. We need to remove the reference to kgdboc. In my instance of Volumio, I removed kgdboc=serial0,115200 from the file and it came back online just fine.

If anyone has anything else to add, I’ll be happy to update my system. I have a concern that when I do another update on Volumio, I will need to edit cmdline.txt before I reboot or I run the risk of a broken system.

Hi,
I’m no expert but I followed the instructions here https://howchoo.com/g/ytzjyzy4m2e/build-a-simple-raspberry-pi-led-power-status-indicator and also here https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi

Seems to work for fine for me. Also see comments in both articles

Good luck

Hi @digbyf,

Welcome to the Volumio community. I’m not a very active member but since this is your first post, I’m happy to welcome you into the fold. Volumio is an outstanding streamer. I’ve been using it since before it was called Volumio and it plays 99% of the music in my home and office.

I probably didn’t make my intensions clear in my post. My intent was to describe pitfalls I’ve encountered with the Raspberry Pi 3 B+ when interfacing the status LED off the UART on the RP3 B+ because it is a software UART and not a hardware UART in the hopes that it will help others and so that I have a detailed description of what I did so that I can resolve it when I encounter it again and have forgotten this chapter :upside_down_face:

I’ve got a small arsenal of RaspBerry Pi boards ranging from RP1 to RP2 and now I’ve been experimenting with the RP 3 B+ boards which have blown me away in terms of performance and responsiveness. Since my existing Volumio players are mostly RP 1, the RP3 is an astounding leap.

Anyway, all of my boards are outfitted with Status LED’s and a power button. To toggle the power I use one of the Volumio plugins called “GPIO Buttons” to recognize GPIO pin 4 as the signal to shut down. By default GPIO pin 3 will start it up. My Status LED is connected to the UART on GPIO pin 14 as detailed in the diagram below.

The issue is that because RP3 uses a software UART, it only energizes the LED briefly. The fix is to “enable_uart=1” which I described in point #1 but that causes a kernel panic so you must apply the #2 fix I detailed in my first post.

Anyway, thanks for the response. I have indeed seen those articles.

Cheers,
Andrew

This is my wiring diagram:

My latest streamer looks like this
(The silver push button does on/off and the status LED is built in):

Hello agian @digbyf, I just noted your suggestion about seeing the comments in the articles. I see they indeed ran into the same issue that I did. I’m still reading the comment threads so I’m not sure that they discovered the problem with kgdboc in the cmdline.txt file or whether they came up with a better solution.