tonythegiraffe
Posts: 2
Joined: Fri Jun 02, 2017 5:50 am

LEDs already on?

Fri Jun 02, 2017 5:59 am

Just started using my Raspberry Pi now that school is out. I connected the T-shaped cobbler and I was following a few different tutorials to get used to the GPIO set up. I began to notice that when ever the LED was connected to ground and certain pins it began to glow (some times faintly other times very brightly depending on the pin) not sure exactly what is going on. I was using a 470Ω resistor.

This is one tutorial I was following:
https://shkspr.mobi/blog/2015/05/idiots ... gpio-pins/

I also set up and started (I think) wiringPi because one of the projects I initially tried said it was necessary and I was following the steps.
https://projects.drogon.net/raspberry-p ... d-install/

I am new to all of this so any help is appreciated I am trying to learn and tinker as much as possible with my time off.
Thank you in advance for any help!

pcmanbob
Posts: 7060
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: LEDs already on?

Fri Jun 02, 2017 9:31 am

Hi.

It might be a good idea to post a list of which pins cause the LED to glow faintly and which brightly.
some GPIO pins have other uses to that can affect things that are connected to them.
it also makes a difference on how you connect the LEDS, you should be connecting them GPIO pin > Ground, if you connect 3.3v > GPIO pin things work in reverse so when you expect OFF you will have ON.
also make sure you have the cobbler cable connected the right way round on the Pi end , lots of people fall foul of this error and it can produce all sorts strange errors then things are connected.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

alphanumeric
Posts: 2100
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: LEDs already on?

Fri Jun 02, 2017 12:05 pm

Yeah, if the opposite end of the chain is ground, GPIO > resistor > LED > Ground , a logic high lights up the LED.
If the opposite end is 3.3V though, GPIO > resistor > LED > +3.3V. A logic low lights up the LED.
In either case, if the LED never lights up, it's likely plugged in the wrong way, the polarity is backwards for the circuit in use.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: LEDs already on?

Fri Jun 02, 2017 2:09 pm

GPIOs 0 through to 8 have weak (~50k) pullups enabled by default at boot - enough to feebly light your grounded LED.

Additionally, GPIOs 2&3 have strong (~2k) pullups soldered in place for i2c use on those pins - those pins will light your LED brightly.

GPIOs 9-27 have weak pull-downs, so your grounded LED will stay unlit on all of those.

tonythegiraffe
Posts: 2
Joined: Fri Jun 02, 2017 5:50 am

Re: LEDs already on?

Fri Jun 02, 2017 9:02 pm

pcmanbob wrote:Hi.

It might be a good idea to post a list of which pins cause the LED to glow faintly and which brightly.
some GPIO pins have other uses to that can affect things that are connected to them.
it also makes a difference on how you connect the LEDS, you should be connecting them GPIO pin > Ground, if you connect 3.3v > GPIO pin things work in reverse so when you expect OFF you will have ON.
also make sure you have the cobbler cable connected the right way round on the Pi end , lots of people fall foul of this error and it can produce all sorts strange errors then things are connected.
Thank you for the help! Turns out I had the Cobbler connected backwards on the raspberry pi. It works great now!

Return to “General discussion”