pfaure
Posts: 7
Joined: Sun Mar 12, 2017 12:41 pm

gpio only 1v. output

Sun Mar 12, 2017 1:43 pm

Hello,

I have a new raspberry pi. I checked the output voltage of the pins and found that they are only 1 volt, and not the 3.3 that all document seem to allude to.

3.3 volt line is correct. Is this a faulty board? Something that can be fixed?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12021
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: gpio only 1v. output

Sun Mar 12, 2017 2:03 pm

did you program the GPIO as output, and programmed it to output a high ?
Otherwise it is still an input, and what you are measuring is a tiny current from a weak (about 50K) pullup resistor.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: gpio only 1v. output

Sun Mar 12, 2017 8:24 pm

pfaure wrote:Hello,

I have a new raspberry pi. I checked the output voltage of the pins and found that they are only 1 volt, and not the 3.3 that all document seem to allude to.

3.3 volt line is correct. Is this a faulty board? Something that can be fixed?
Confused, the 3.3v line is the only that is supposed to be 3.3 volts, unless you set others to output and bring them high.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

pfaure
Posts: 7
Joined: Sun Mar 12, 2017 12:41 pm

Re: gpio only 1v. output

Sun Mar 12, 2017 8:32 pm

Yes I programmed the GPIO as an output. I am able to cycle from high to low (every three sections) and on. I can watch on the multimeter as the voltage changes from 0V (low state), and 0.9V in the high state. I was expecting 3.3 volts. I checked the 3.3V output line and it is 3.3V, 5.0V is measured as 5.0V.

I have tried multiple GPIO pins, all with the same result. Below is the code that I am using. Is there something that I am missing, or does this Raspberry Pi have an issue?

Code: Select all

import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BOARD)

Motor1A = 19  #GPIO pin 25

GPIO.setup(Motor1A, GPIO.OUT)

print "Turning on"
GPIO.setup(Motor1A, GPIO.HIGH)
sleep (3)
print "low"
GPIO.setup(Motor1A, GPIO.LOW)
sleep (3)
print "Turning on"
GPIO.setup(Motor1A, GPIO.HIGH)
sleep (3)
print "low"
GPIO.setup(Motor1A, GPIO.LOW)
sleep (3)
GPIO.cleanup()

Heater
Posts: 12969
Joined: Tue Jul 17, 2012 3:02 pm

Re: gpio only 1v. output

Sun Mar 12, 2017 10:42 pm

Do you have anything connected to those pins when you make those measurements? Apart from the meter that is.

pfaure
Posts: 7
Joined: Sun Mar 12, 2017 12:41 pm

Re: gpio only 1v. output

Sun Mar 12, 2017 10:54 pm

Nothing else is connected to the pin that I am measuring.

dave j
Posts: 116
Joined: Mon Mar 05, 2012 2:19 pm

Re: gpio only 1v. output

Sun Mar 12, 2017 11:08 pm

Are you sure you're using RPi.GPIO correctly? This documentation is inconsistent with the code you've posted.

GPIO.setup() is used to define whether a pin is an input or and output.
GPIO.output() is used to set it high or low.

pfaure
Posts: 7
Joined: Sun Mar 12, 2017 12:41 pm

Re: gpio only 1v. output

Sun Mar 12, 2017 11:37 pm

dave j wrote:Are you sure you're using RPi.GPIO correctly? This documentation is inconsistent with the code you've posted.

GPIO.setup() is used to define whether a pin is an input or and output.
GPIO.output() is used to set it high or low.
THANK YOU
1- for providing me this documentation guide. It fixed the problem.
2- for pointing the error in my coding. This is the first time I have used a raspberry PI.
:D

It works, I now get 3.3V for a high, and 0V for a low.

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: gpio only 1v. output

Wed Mar 15, 2017 9:51 am

pfaure wrote:
dave j wrote:Are you sure you're using RPi.GPIO correctly? This documentation is inconsistent with the code you've posted.

GPIO.setup() is used to define whether a pin is an input or and output.
GPIO.output() is used to set it high or low.
THANK YOU
1- for providing me this documentation guide. It fixed the problem.
2- for pointing the error in my coding. This is the first time I have used a raspberry PI.
:D

It works, I now get 3.3V for a high, and 0V for a low.
Just to add to this - even though you're using Python, there are command-line tools to help you do this sort of thing before writing a line of code - if you install the wiringPi package (installed with Raspbian by default, but not raspbian-lite), then you have the gpio command, so:

Code: Select all

gpio -g mode 25 out # the -g flag means use bcm_gpio pin 25 which is physical pin No. 22
gpio -g write 25 1 # Output high, 3.3v
gpio -g write 25 0 # Output low, 0v
Also, if you use

Code: Select all

gpio readall
then you get a printout of the GPIO connector with all the different pin numbering schemes.

-Gordon
--
Gordons projects: https://projects.drogon.net/

pfaure
Posts: 7
Joined: Sun Mar 12, 2017 12:41 pm

Re: gpio only 1v. output

Wed Mar 15, 2017 12:35 pm

Thank you Gordon, that is a very useful bit of information.

Return to “Troubleshooting”