element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum Raspberry Pi I/O pins.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 21 replies
  • Subscribers 507 subscribers
  • Views 512 views
  • Users 0 members are here
Related

Raspberry Pi I/O pins.

DAB
DAB over 6 years ago

Hi all,

 

I was doing some testing yesterday and discovered that the I/O pins on the RPi come up with interesting voltages on powerup.

 

I had just assumed that they would all come up at ground state, but we measured several pins and found them at 0.7, 1.2, 1.7, and 2.7 volts output.

 

We were trying to debug a driver circuit I designed, but noticed the default was at 1.2 volts and thought we might have a defective board. So we installed a brand new RPi 3 and found the pins at the above stated levels.

 

I am VERY disappointed in the RPi designers for not defaulting the pins to ground state until they are accessed by software.

 

Hopefully, they will correct this oversight in the next version.

 

Having random output levels could really do some damage to external circuits wired into an RPi.

 

DAB

  • Sign in to reply
  • Cancel

Top Replies

  • Jan Cumps
    Jan Cumps over 6 years ago +5
    This article shows the electronic setup of the Pi’s pins, and has the voltages documented. GPIO Electrical Specifications, Raspberry Pi Input and Output Pin Voltage and Current Capability
  • colporteur
    colporteur over 6 years ago in reply to Jan Cumps +3
    Awesome resource Jan! I program GPIO but my electronic technology background is a constant undercurrent to understand the why something works. Pull up and pull down functions on GPIO pins, which I have…
  • DAB
    DAB over 6 years ago in reply to Jan Cumps +2
    Thanks Jan. Yes the potential voltages on the pin matches my measurements so that means I was not doing anything unusual. I was just not expecting that level of variance. Now that I know, I can look at…
  • genebren
    genebren over 6 years ago

    DAB,

     

    Not that this relates directly with your experiences with the RPi, but I have noticed a similar thing with a lot of microprocessors.  The default on power-up is to set all GPIO to Tri-State (High-Z) inputs.  This may be what you are seeing here.  This is, in the most general of cases, the safest state for the board (hopefully nothing enabled or driven, but not always the case).

     

    Gene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Gough Lui
    Gough Lui over 6 years ago

    I personally would expect high impedance as preferable to prevent any risk of damage (e.g. shorting). If the line must be low or high when not driven by the MCU, then an external pull-up or pull-down resistor should do the trick. I suspect some of the voltages you see might be stray voltages capacitively coupled due to the close trace/pin spacing and high impedance of the meter. If not, and lines are driven with strange voltages, that would be rather surprising but may be able to be worked around.

     

    - Gough

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • jomoenginer
    jomoenginer over 6 years ago

    I believe the issue is how the gpio pins on the Raspberry Pi  are set at boot.   You could write a script that ran at boot that changes the states so they are the same.  There might be a better way but you would want to be cautious that you don't affect any of the on board devices.

     

    You can view the states of the GPIO pins on your RasPi by running 'gpio readall'

     

    Ex:

    $ gpio readall
    linedata: processor : 0
    
    
    linedata: model name : ARMv6-compatible processor rev 7 (v6l)
    
    
    linedata: BogoMIPS : 697.95
    
    
    linedata: Features : half thumb fastmult vfp edsp java tls 
    
    
    linedata: CPU implementer : 0x41
    
    
    linedata: CPU architecture: 7
    
    
    linedata: CPU variant : 0x0
    
    
    linedata: CPU part : 0xb76
    
    
    linedata: CPU revision : 7
    
    
    linedata: 
    
    
    linedata: Hardware : BCM2835
    
    
    linedata: Revision : 0010
    
    
    Revision got: Revision : 0010
    
    
     +-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+
     | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
     +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
     |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
     |   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5V      |     |     |
     |   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |
     |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |
     |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |
     |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
     |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
     |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
     |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
     |  10 |  12 |    MOSI | ALT0 | 0 | 19 || 20 |   |      | 0v      |     |     |
     |   9 |  13 |    MISO | ALT0 | 0 | 21 || 22 | 1 | IN   | GPIO. 6 | 6   | 25  |
     |  11 |  14 |    SCLK | ALT0 | 0 | 23 || 24 | 1 | OUT  | CE0     | 10  | 8   |
     |     |     |      0v |      |   | 25 || 26 | 1 | OUT  | CE1     | 11  | 7   |
     |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
     |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
     |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  |
     |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |
     |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 1 | OUT  | GPIO.27 | 27  | 16  |
     |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |
     |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |
     +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
     | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
     +-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 6 years ago in reply to jomoenginer

    We had the pin set to low, but I still saw about 1.1v drop across my transistor driver from the base to the emitter.

     

    I was expecting there to be no voltage across the junction with the base at ground level.

     

    If you cannot expect the I/O pin to be grounded under that kind of small load, then something is very wrong with their design.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 6 years ago in reply to Gough Lui

    That was my initial thought, but we were trying to drive the pin low across a transistor base connection.

    Even at high impedance, you expect the output to be 0 volts with the pin set to a logic zero.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 6 years ago in reply to genebren

    Agreed, but we were trying to drive the pin low across a base-emitter junction of a transistor with a 1k ohm resistor from the pin to the base.

     

    I expected zero volts under those conditions.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • jomoenginer
    jomoenginer over 6 years ago in reply to DAB

    Well, low does not necessarily mean off.  A low could mean just low current or low voltage such as 1.1v as you had experienced. You might want to contact the Raspberry Pi folks to see if it is possible to completely disable the pin you are working with.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • jomoenginer
    jomoenginer over 6 years ago in reply to DAB

    Have you tried to put a pull-down resistor to ground on the pin in question? 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 6 years ago in reply to jomoenginer

    We had a couple of  the pins pulled down to ground through 1 k ohm resistors, but I do not recall if they were still at ground or not.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 6 years ago

    This article shows the electronic setup of the Pi’s pins, and has the voltages documented.

    GPIO Electrical Specifications, Raspberry Pi Input and Output Pin Voltage and Current Capability

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube