In this experiment, we connect the Raspberry Pi’s GPIO pin 17 to the anode (long pin) of the LED, then the cathode (short pin) of the LED to a resistor, and then connect the other end of the resistor to the GND pin on the Raspberry Pi. To switch on the LED we need to set GPIO17 to high (3.3V). We can get this phenomenon by programming.
The only way I can get the LED to light up is to hook the cathode to pin 17 and the anode to the resistor…
And then, when I attempt to run the code for the program, it fails to blink on and off. I double checked to make sure everything is connected properly, that I am using the right resistor and that the GPIO plug is actually connected correctly to the rpi 5.
The strange thing is, nowhere on the page does the tutorial address the part of the instructions that mentions, “To switch on the LED we need to set GPIO17 to high (3.3V). We can get this phenomenon by programming.” I noticed in the rpi 4 version of this experiment, there is a wire connected to 3v3.
Summary: I think you’ve accidentally connected the end of the resistor to 3V3 not GND
My rationale:
Both circuit diagrams are correct.
The RPI4 circuit uses the 3V3 as a current source and the GPIO as a current sink. Whereas, the RPI5 circuit uses the GPIO as the current source and the GND as the sink.
Therefore:
Setting the GPIO high on RPI4 should turn the LED off, setting it low should turn it on
Setting the GPIO high on RPI5 should turn the LED on, setting it low should turn it off.
Quote: “The only way I can get the LED to light up is to hook the cathode to pin 17 and the anode to the resistor…”
This is then the same as the RPI4 wiring: If your LED lights in this case, then the “other end” of your resistor must be connected to the 3V3 as per the RPI4 schematic, but for the RPI5 variant it needs to be connected to gnd.
In the following I always have the current flowing from left to right
RPI4
3V3 → Resistor → Anode → cathode → GPIO
RPI5
GPIO → Anode → cathode → Resistor → Gnd
Your “debug” wiring with “lighting LED” as quoted above
3V3 → Resistor → Anode → Cathode → GPIO
So the GPIO is providing the GND as per RPI4, and lights up
So I thnik that your wiring with “non lighting LED” must then be like this
GPIO → Anode → cathode → Resistor → 3V3 (current would have to flow from Cathode to anode for LED to light, but it cannot through a diode)
but it should be this
GPIO → Anode → cathode → Resistor → Gnd
Hopefully I’ve interpreted this correctly and it can help you!
wow! That was thorough! I had to disassemble what I had wired so I will try it again, this time paying more attention to where I connect the resistor. I have a new pi 4 to try on. I got it because more of the kit works with pi 4 and it doesn’t hurt to have a spare pi for when I get into making projects with them. Thank you so much for your diagnosis! I will let you know if I have more problems
Doesn’t this indicate the resistor is supposed to be connected to 3V3? I’m sorry if this is a stupid question but that’s what it looks like to me. I’m BRAND new to this. So I apologize.
Also, why does the diagram have a line going horizontally from 3V3 and then one jutting out to the right? Am I supposed to stick another cable in that one hole where they meet? I tried and it doesn’t seem possible. So I must be misinterpreting the diagram. I’m referring to the left circle in the diagram that I circled.
I tried to upload a picture of my breadboard but it won’t let me post more than one picture at a time.
Again, I’m confused by the second part of your question, I don’t own this board so I can’t check, but there is no hole at the wires junction, so I’m not sure where you are trying to connect your wires
Just to confirm… EITHER wiring sequence should work for both the Pi 4 and the Pi 5 (or the Pi 3 for that matter). Correct?
For Lesson 1.1.1 for the Pi 4, specifically, if you choose the wiring that attaches the Anode to GPIO17, then in the python code for Lesson 4 version you would need to switch the GPIO.HIGH and GPIO.LOW settings but… they make more sense to me this way with HIGH being ON and LOW being OFF.
Even this SHOULD work with either Pi, correct? Putting the resister BEFORE the component rather than AFTER.
GPIO → Resister → Anode → cathode → Gnd
To clarify: placing the resistor in front of or behind the LED makes no difference, because in a series circuit, the same current flows through all components.
The basic principle for lighting an LED is:
Power positive → LED anode → LED cathode → Power negative, with a current-limiting resistor placed anywhere in between.
Based on this, there are two common control methods:
Signal pin → LED anode → LED cathode → GND
The LED lights when the signal pin is HIGH.
Power positive → LED anode → LED cathode → Signal pin
The LED lights when the signal pin is LOW (sinking current).
Both configurations are valid – which one you use depends on whether you want the LED to turn on with a HIGH or LOW signal from your GPIO pin.
If you have any further questions, feel free to ask.
Just want to point out that the lessons 1.1.1 through 1.1.3 for the Pi 5 are consistent in that they are always connecting the annode to the GPIO pin (and HIGH = on)
BUT the same lessons for the Pi 4,3,etc, go back and forth
specifically
Lesson 1.1.1 Cathode connected to GPIO (HIGH turns it off)
Lesson 1.1.2 Anode connected to GPIO (HIGH turns it on)
Lesson 1.1.3 Cathode connected to GPIO (HIGH turns it off)
I think this can be VERY confusing for newbies (ask me how I know ). It would be helpful if the lessons for the Pi 4,3 were consistent (and HIGH = on seems much more intuitive as well).
The breadboard that I received in the Raphael Ultimate Kit has the power bars reversed from your lesson photos. If it is turned horizontally as it is in your photos (with the row numbers facing to the left) then the BOTTOM power rail section has NEG as the outside rail and POS as the inside rail.
Again, this can screw newbies up if they are trying to match the photos on the lessons.
Thank you for your constructive feedback – it’s very helpful for us.
You are absolutely right: our arrangement of the LED circuit tutorials has been inconsistent across different lessons and Pi models, which can indeed be confusing for beginners. We will refine these details in our next content update to make the tutorials more consistent and beginner‑friendly.
Regarding the breadboard orientation – we used generic illustrations for the circuit diagrams and did not notice that they did not match the actual physical layout. We will review how to improve this so that the visuals align better with the real hardware.
Thank you again for taking the time to share your thoughts. It helps us make our learning materials better for everyone.