honzys
Posts: 1
Joined: Fri Jan 26, 2018 1:48 am

GPIO not producing power but gpio readall says it should

Fri Jan 26, 2018 1:50 am

I have Raspberry Pi 3 model B, running RaspbianOS.

I was trying to work with GPIO, but the pins were not producing power.

I was using RPi.GPIO library in python to turn on and off the pins. I tried all GPIO user pins, but with no luck.

I can be sure it's not problem of the components I try to connect, because when I plug it to 5V power supply, it works properly.

The weird thing is, that if I execute gpio readall command, it produces the correct states for what I try to achieve, but there's no voltage on the GPIO pin, but the gpio readall says, there should be:

Code: Select all

 +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     |
 |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 0 |  7 || 8  | 0 | IN   | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | IN   | 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 |   IN | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK |   IN | 0 | 23 || 24 | 0 | IN   | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 0 | IN   | CE1     | 11  | 7   |
 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
 |   5 |  21 | GPIO.21 |   IN | 0 | 29 || 30 |   |      | 0v      |     |     | 
 |   6 |  22 | GPIO.22 |   IN | 0 | 31 || 32 | 1 | OUT  | GPIO.26 | 26  | 12  |
 |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |
 |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |
 |  26 |  25 | GPIO.25 |  OUT | 1 | 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 |
 +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
GPIO.26 is in mode OUT and V is 1, but when I try to plug my cooler in this, it doesn't work (again, I checked the cooler, it works when I plug it to 5V/3V power supply pin).

Is there anything I am forgetting, or doing wrongly?

I have also ran gpio pintest, and no error reported.

Thanks in advance!

tenochtitlanuk
Posts: 156
Joined: Fri Jul 06, 2012 8:51 pm
Location: Taunton, Somerset, UK
Contact: Website

Re: GPIO not producing power but gpio readall says it should

Fri Jan 26, 2018 7:51 pm

Are you connecting the cooler ( ?fan?) directly to the GPIO pin and expecting it to deliver enough powere? Or are you using the necessary bipolar/mosfet/IC driver? Have you tried a LED and resistor of say 470 ohms from the GPIO to earth, being careful to get polarity right??

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

Re: GPIO not producing power but gpio readall says it should

Fri Jan 26, 2018 8:09 pm

A gpio output can supply 3.3V at a maximum of 16mA if you try to draw more than that you risk damaging you pi.

To drive your fan (cooler) you need to use a transistor who's base is connected to the gpio pin, to provide a ground for the fan that is connected to one of the 5V pins on the gpio header.

Try searching the forum there are plenty of past posts about controlling fans using the gpio output and transistors.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Troubleshooting”