Page 1 of 1

3v3 and GPIO output is only 1.75v

Posted: Sun Apr 10, 2016 12:33 am
by Sparky_Robot
Hello everyone. I am working through the book called "Hello Raspberry Pi" By Ryan Heitz. I have been doing well with the code till chapter 6 the blinking LED. Here is a list of my parts.
RPi 3
2 amp P/S
Adafruit T-Cobbler Plus
jumper wires
180 ohm resistor
LED
14x64 breadboard.

So I set up the led off pin 21 and the negative side of the led to the resistor from there to a gnd pin. as for the code

Code: Select all

import RPi.GPIO as GPIO
import time

# Variable for the GPIO pin number
LED_pin_red = 21

# Tell the Pi we are using the breakout board pin numbering
GPIO.setmode(GPIO.BCM)

# Set up the GPIO pin for output
GPIO.setup(LED_pin_red, GPIO.OUT)

# Loop to blink our LED
while True:
    GPIO.output(LED_pin_red, GPIO.HIGH)
    print ("ON")
    time.sleep(1)
    GPIO.output(LED_pin_red, GPIO.LOW)
    print ("OFF")
    time.sleep(1)
Now as the print in idle shows it works. But the Led would not turn on at all.
I took my meter and at pin 21 to gnd pin and I read -1.75 volts. I have read lead on 21 and black on gnd. Then I tested 3v3 to gnd. and it bounces from -5v to -1.75 when the program is running. I read 5v to gnd. it also is -5v. I'm at a loss for the readings. Any help would greatly appreciated.

Thank you.

Re: 3v3 and GPIO output is only 1.75v

Posted: Sun Apr 10, 2016 4:45 pm
by mahjongg
your multimeter is defective, and/or you don't know how to connect it. :shock:

in other words, what you are claiming is simply impossible!

your PI would not work when it was powered with 1.75 volt, and certainly not with any negative voltages, which could not even be generated! the high level voltage from a PIO is simply the power supply voltage of the GPIO logic, nothing less nothing more. negative power would simply blow up the PI, with smoke coming out of it!

try turning over your LED, or try connecting it directly (with series resistor of course) to 3V3.
check if you are counting the GPIO pin right, and are using the correct GPIO pin.

check if you have not reversed the orientation of your flat cable.

Re: 3v3 and GPIO output is only 1.75v

Posted: Sun Apr 10, 2016 4:49 pm
by jojopi
1.75V is suspiciously close to 5V - 3.3V. Usually when people measure incorrect or negative voltages, they are not connecting to the pins they think they are.

Make sure your ribbon cable is probably aligned and has the coloured stripe in the pin 1 corner at both ends.

Re: 3v3 and GPIO output is only 1.75v

Posted: Sun Apr 10, 2016 4:54 pm
by Burngate
GPIO-B+.png
GPIO-B+.png (21.83 KiB) Viewed 827 times
It's possible that you've got the ribbon cable twisted so that pin 1 is going to pin 40, and vice versa.
The Cobbler-end can't go wrong, but the Pi-end can.

That will put 3v3 where you're expecting GPIO 21, 5v where you expect ground, and so on.

Re: 3v3 and GPIO output is only 1.75v

Posted: Sun Apr 10, 2016 5:04 pm
by Sparky_Robot
Yep that was it. The ribbon cable was backwards.Dang I feel dumb on that one. Anyway Thank you very much