Ground pin not working?


10 posts
by dplows » Tue Jun 19, 2012 1:38 am
As my first test with the GPIO pins, I'm trying to use a ribbon cable to light up an LED. To avoid frying my pi... first, I made sure I knew which hole went with which hole on the other end of the ribbon cable. Being familiar with Arduino, I verified this by connecting one end of the ribbon cable to 5V and Ground my Arduino (which is connected to a power source) and the other end to a LED and 330 ohm resistor. It worked nicely.

Then I kept the LED grounded to my Arduino but hooked the positive to the 5V pin on the Raspberry Pi. Still worked.

Then the last step, to take the Arduino out of the mix, hook the ground wire up to the 0V pin on the Raspberry Pi. Nothing. It doesn't light up. Unplug it and ground it back to the Arduino, works again.

Can't figure out why the ground pin isn't working on the Pi. I'm using this diagram http://elinux.org/File:GPIOs.png. Any ideas?
Posts: 6
Joined: Fri Jun 08, 2012 10:00 pm
by mahjongg » Tue Jun 19, 2012 11:39 pm
I'm not sure I can follow what you are trying to do, but I do hope that you realise that even though both the arduino, and the RPI are calling a pin "GND" doesn't mean they are actually connected to earth, or to each other in any way. GND is just a label.

If you are using a flatcable with female connectors on both ends, and the cable is made correctly, each connector hole of one of the connectors should be connected to the same hole in its twin connector,
User avatar
Forum Moderator
Forum Moderator
Posts: 5577
Joined: Sun Mar 11, 2012 12:19 am
by Grumpy Mike » Wed Jun 20, 2012 9:44 pm
TP2 on the Pi is ground.
Disconnect everything and with a meter measure continuity or resistance between TP2 and the ground on the connector, you should see it connects. Then measure between TP2 and the other end of your ribbon cable and you will probably find that you have misidentified the wires.

If you haven't got a meter then get one, you can't hope to do any electronics without any test equipment. You can get them at less than £5.00 at a cheap shop.
User avatar
Posts: 784
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
by dplows » Fri Jun 22, 2012 11:13 am
@Grumpy Mike, where is TP2 on this diagram? http://elinux.org/RPi_Low-level_periphe ... .28GPIO.29
Posts: 6
Joined: Fri Jun 08, 2012 10:00 pm
by Burngate » Fri Jun 22, 2012 11:46 am
TP2 isn't on that diagram - it's a little hole between the GPIO plug and the RCA video connector. And actually you could measure to any of the connector cases - USB, network, HDMI, power - or to the outside of the RCA socket, they're all connected together to the incoming negative power rail.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2842
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by dplows » Fri Jun 22, 2012 11:55 am
Ooooh okay. I'll try that. Thank you.
Posts: 6
Joined: Fri Jun 08, 2012 10:00 pm
by Burngate » Fri Jun 22, 2012 12:16 pm
It's not easy to trouble-shoot over the forum - worse than doing over the phone.
So as far as I can see, your LED+resistor works connected to the Arduino.
So current flows happily PSU(positive) -> Arduino(pinX) -> ribbon(wireX) -> LED -> resistor -> ribbon(wireY) -> Arduino(pinY) -> PSU(negative) -> through the PSU circuitry back to the positive - a full circuit! (where X & Y are numbers I don't know, not having an Arduino)
Then you seem to say your LED works when you connect it thus:
RPi-PSU(positive) -> RPi(pin P1-02) -> ?ribbon? -> LED -> resistor -> ?ribbon? -> Arduino(pinY) -> Arduino-PSU(negative) ----- it can't get back! No Circuit!
So Are you using the same PSU for both? And how is the ribbon connected to both Arduino and RPi, as well as the LED-resistor? I guess I'm not understanding your explanation!
Just to remove all extranious bits, if your LED-resistor is soldered together with long enough leads, can you hold one end on the metal outer of the RCA, and carefully touch the other end on the 5v pin of the GPIO? (end pin, furthest from the RCA, outer edge) (And try it the other way round as well - I've spent many a happy hour with LEDs not working 'cos I've mixed up + & -. Same with transistors - they almost work if you swap collector and emitter!)
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2842
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by Grumpy Mike » Fri Jun 22, 2012 10:49 pm
Same with transistors - they almost work if you swap collector and emitter!)

Not quite, they actually still work but the gain is very much reduced.

I once got a job in an interview for knowing that fact as a raw graduate. They said "it's not the sort of thing they teach so you must have real practical experience".
User avatar
Posts: 784
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
by Burngate » Sat Jun 23, 2012 11:06 am
Grumpy Mike wrote:
Same with transistors - they almost work if you swap collector and emitter!)

Not quite, they actually still work but the gain is very much reduced.

I once got a job in an interview for knowing that fact as a raw graduate. They said "it's not the sort of thing they teach so you must have real practical experience".

And the Vce is a lot lower - down to about 5v, which is a bummer if you're wanting to use 24v

I was asked at an interview to draw a diagram of a nand gate. So i thought a bit and drew out the insides of a 7400. Turned out they only wanted the symbol.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2842
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by dplows » Sat Jun 23, 2012 5:34 pm
It worked! I'm able to light up an LED solely using the pi. Thanks for your help, Grumpy Mike.

Next up is to control the digital pins with code in similar fashion as my Arduino. I'll be following this tutorial: http://log.liminastudio.com/writing/tut ... an-arduino
Posts: 6
Joined: Fri Jun 08, 2012 10:00 pm