medmison690
Posts: 4
Joined: Sun Aug 02, 2020 11:01 pm

Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Sun Aug 02, 2020 11:12 pm

Hi,

So I am working on my first pi project and I had a bit of a wire mix up (pin1 3.3v and 39 ground) - these connections come from a 10k ohm potentiometer.

So after powering off the Pi and fixing the connection mistakes. The Pi no longer will boot up -screen stays black as if not input is connected, keyboard doesn't light, the red and green LEDs stay solid. The led display connected via GPIO however will light up and stay lit.

When I unplug all connections from the GPIO board, the pi powers up fine.

I have tested the GPIO using gpiotest and there are not problems flagged but I also noticed that this particular script does not test gpio pins 1 and 39 (the pins in which the connections are flipped).

Note after the initial mix and fix, I replaced the potentiometer and the other part that was apart of this circuit (lcd display) and the pi will still not boot when these parts are connected to the GPIO. It should also be noted that the lcd worked as expected on a previous test and the pi booted up.

Kind of pulling my hair out here. Can anyone help me out? Did I kill my pi?

Here is the full gpio connection list if this helps
```
Potentiometer pin 1 to GPIO pin 1
Potentiometer pin 2 to GPIO pin 39
Potentiometer pin 3 to LCD pin 3
LCD pin 1 to GPIO pin 6
LCD pin 2 to GPIO pin 2
LCD pin 3 to Potentiometer pin 3
LCD pin 4 to GPIO pin 37
LCD pin 5 to GPIO pin 34
LCD pin 6 to GPIO pin 35
LCD pin 11 to GPIO pin 33
LCD pin 12 to GPIO pin 31
LCD pin 13 to GPIO pin 29
LCD pin 14 to GPIO pin 23
LCD pin 15 to GPIO pin 17
LCD pin 16 to GPIO pin 25

```

sparkyhall
Posts: 168
Joined: Mon Aug 27, 2012 9:14 am

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Mon Aug 03, 2020 6:50 am

If the Pi works OK with nothing connected to the GPIO then this suggests that the Pi is fine and the problem is with the items you are connecting to the GPIO. A picture of your connections and a link to the LCD and potentiometer would be helpful here otherwise we are just guessing.

If you are using a standard potentiometer like this:
pot.jpg
pot.jpg (13.61 KiB) Viewed 423 times
Then your potentiometer connections are wrong and should be:

Potentiometer pin 1 to GPIO pin 1
Potentiometer pin 2 to LCD pin 3
Potentiometer pin 3 to GPIO pin 39

But as I said, without pictures, I am guessing.

P.S. strictly speaking the Pi GPIO connector pin 1 and pin 39 are not GPIO (General Purpose Input or Output), they are power (3V3) and ground (0V).

User avatar
DougieLawson
Posts: 40167
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Mon Aug 03, 2020 7:37 am

medmison690 wrote:
Sun Aug 02, 2020 11:12 pm

Potentiometer pin 1 to GPIO pin 1
Potentiometer pin 2 to GPIO pin 39
Potentiometer pin 3 to LCD pin 3
LCD pin 1 to GPIO pin 6
LCD pin 2 to GPIO pin 2
LCD pin 3 to Potentiometer pin 3
LCD pin 4 to GPIO pin 37
LCD pin 5 to GPIO pin 34
LCD pin 6 to GPIO pin 35
LCD pin 11 to GPIO pin 33
LCD pin 12 to GPIO pin 31
LCD pin 13 to GPIO pin 29
LCD pin 14 to GPIO pin 23
LCD pin 15 to GPIO pin 17
LCD pin 16 to GPIO pin 25
The GND, 3.3V and 5V are NOT GPIO pins - you can't control those.

LCD pin#1 (GND) to RPI pin#6, pin#9, pin#14, pin#20, pin#25, pin#30, pin#34 or pin#39 https://pinout.xyz/pinout/ground
LCD pin#2 (Vcc) to RPI pin#2 or pin#4 https://pinout.xyz/pinout/pin2_5v_power (most LCDs need 5V to drive the controller)
LCD pin#3 (Contrast) to the wiper of a 10K pot with the ends connected to LCD pin#1 (GND) and pin#2 (5V) respectively
LCD pin#4 (RS) to GPIO26 (pin#37)
LCD pin#5 (R/W) to any GND (all grounds are common)
LCD pin#6 (EN) to GPIO19 (pin#35)
LCD pin#7,8,9,10 no connection
LCD pin#11 (D4) to GPIO13 (pin#33)
LCD pin#12 (D5) to GPIO06 (pin#31)
LCD pin#13 (D6) to GPIO05 (pin#29)
LCD pin#14 (D7) to GPIO11 (pin#23)
LCD pin#15 (backlight A+) to 3.3V (pin#17) - I'd wire it through a 100ohm to 560ohm current limiting resistor (depending how bright you want the LCD). You can connect this to a GPIO pin if you want to be able to turn the backlight on and off with software control.
LCD pin#16 (backlight K-) to any GND

While you're testing, build this on a solderless breadboard it's easier than wiring a rats nest from the RPI header pins. When you're done build it on veroboard (strip board).
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

drgeoff
Posts: 11232
Joined: Wed Jan 25, 2012 6:39 pm

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Mon Aug 03, 2020 8:08 am

medmison690 wrote:
Sun Aug 02, 2020 11:12 pm
Hi,

So I am working on my first pi project and I had a bit of a wire mix up (pin1 3.3v and 39 ground) - these connections come from a 10k ohm potentiometer.

So after powering off the Pi and fixing the connection mistakes. The Pi no longer will boot up -screen stays black as if not input is connected, keyboard doesn't light, the red and green LEDs stay solid. The led display connected via GPIO however will light up and stay lit.

When I unplug all connections from the GPIO board, the pi powers up fine.

I have tested the GPIO using gpiotest and there are not problems flagged but I also noticed that this particular script does not test gpio pins 1 and 39 (the pins in which the connections are flipped).

Note after the initial mix and fix, I replaced the potentiometer and the other part that was apart of this circuit (lcd display) and the pi will still not boot when these parts are connected to the GPIO. It should also be noted that the lcd worked as expected on a previous test and the pi booted up.

Kind of pulling my hair out here. Can anyone help me out? Did I kill my pi?

Here is the full gpio connection list if this helps
```
Potentiometer pin 1 to GPIO pin 1
Potentiometer pin 2 to GPIO pin 39
Potentiometer pin 3 to LCD pin 3
LCD pin 1 to GPIO pin 6
LCD pin 2 to GPIO pin 2
LCD pin 3 to Potentiometer pin 3
LCD pin 4 to GPIO pin 37
LCD pin 5 to GPIO pin 34
LCD pin 6 to GPIO pin 35
LCD pin 11 to GPIO pin 33
LCD pin 12 to GPIO pin 31
LCD pin 13 to GPIO pin 29
LCD pin 14 to GPIO pin 23
LCD pin 15 to GPIO pin 17
LCD pin 16 to GPIO pin 25

```
Possibly you are clobbering the 3.3 volt rail of the RPi by connecting it to the backlight LED without a series resistor.
Quis custodiet ipsos custodes?

medmison690
Posts: 4
Joined: Sun Aug 02, 2020 11:01 pm

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Tue Aug 04, 2020 3:05 am

Thanks for the replies! A lot of good stuff here.

I am using a potentiometer like the one on the left here:
https://images.app.goo.gl/3YHevSDhaoZiG9e5A

Hm, interesting that it sounds like the pi is OK and something is wrong with my connections.

medmison690
Posts: 4
Joined: Sun Aug 02, 2020 11:01 pm

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Tue Aug 04, 2020 3:43 am

Also, here are pics of the lcd display I am using.

https://drive.google.com/file/d/1at_xDt ... sp=sharing
https://drive.google.com/file/d/15buATg ... sp=sharing


There actually also looks to be a potentiometer on the back of the lcd itself. Should I use this rather than the external potentiometer perhaps?

If so, there are 4 connections, GND, VCC, SDA, SCL. Do I need to hook up each and all of these to GPIO.

I tried again to hook up the unit to the pi and still no boot. Note this is using the external potentiometer 10k ohms.

sparkyhall
Posts: 168
Joined: Mon Aug 27, 2012 9:14 am

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Tue Aug 04, 2020 7:29 am

The LCD in the pictures includes a parallel to I2C converter board, the board with the potentiometer. You cannot connect this variant of the LCD to the Pi the way you have as the LCD is intended to be connected using the 4 pins on the converter board.

I believe that this LCD is designed to be powered from 5V, not 3V3. The Pi GPIO pins can only work with voltage levels up to 3V3, going beyond this will damage the Pi. To overcome this you will need to connect the LCD through a level shifter, like the one shown in this tutorial:

https://www.raspberrypi-spy.co.uk/2015/ ... pberry-pi/

Note: This was the first tutorial I came across and is a little old so may not work. Your best bet is to try and find something more recent.

User avatar
DougieLawson
Posts: 40167
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Tue Aug 04, 2020 7:30 am

It's got a pcf8574 backpack. Why are you trying to wire it directly to the GPIO.

The backpack is an I²C device.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

drgeoff
Posts: 11232
Joined: Wed Jan 25, 2012 6:39 pm

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Tue Aug 04, 2020 7:34 am

You should be connecting to ONLY those 4 pins of the daughterboard. Use a sesrch engine to find instructions and code for using the version of display that has an added I2C interface.
Quis custodiet ipsos custodes?

medmison690
Posts: 4
Joined: Sun Aug 02, 2020 11:01 pm

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Sat Aug 08, 2020 4:08 pm

Thanks for the great replies all. Just ordered a i2c level shifter today so that I can connect the lcd display using the backpack.

Will post result when I get things hooked up.

Thanks again.

User avatar
DougieLawson
Posts: 40167
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Sat Aug 08, 2020 9:56 pm

medmison690 wrote:
Sat Aug 08, 2020 4:08 pm
Thanks for the great replies all. Just ordered a i2c level shifter today so that I can connect the lcd display using the backpack.
You don't need that.

You can connect it to GPIO02/pin#3 and GPIO03/pin#5 without any problems.
https://pinout.xyz/pinout/i2c
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

LTolledo
Posts: 4106
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Pi4 won't boot with GPIO connections (lcd display) after wire mix up

Sun Aug 09, 2020 1:26 am

DougieLawson wrote:
medmison690 wrote:
Sat Aug 08, 2020 4:08 pm
Thanks for the great replies all. Just ordered a i2c level shifter today so that I can connect the lcd display using the backpack.
You don't need that.

You can connect it to GPIO02/pin#3 and GPIO03/pin#5 without any problems.
https://pinout.xyz/pinout/i2c
I can confirm this
digging around I found my old pics of that setup
RPi1A+ I2C PCF8574 LCD display.jpg
RPi1A+ I2C PCF8574 LCD display.jpg (146.28 KiB) Viewed 116 times
the VCC (Red) is connected to GPIO header pin 2, Gnd (Gray) is connected to GPIO header pin 6, and the rest (Yellow and Orange) as described by DougieLawson above

the setup above was also sharing the same bus with a group of MCP23017 I/O expander ICs

no level shifter was used in this setup (was not aware of its existence then)... :D
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “General discussion”