choosing the right GPIO

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

choosing the right GPIO

#1 Post by giorgino » 08 Nov 2024, 22:18

Hi, my project is growing up, connecting more I/O but I'm not sure if I've got the right pins
Can you look if I'm wrong?
I have 8 GPIO:
  • 1 - Victron VE (Battery monitor) -- HWserial 0 --- GPIO 38
    2 - Vicron VE (Solar charger) -- HWserial 1 --- GPIO 13
    3 - pulse counter --- GPIO 15
    4 - DHT 22 --- GPIO 17
    5 - TX by GPS -- HWserial 2 --- GPIO 19
    6 - TX by NEXTION display -- HWserial from I2C --- GPIO 10 by I2C
    7 - RX by NEXTION display -- HWserial from I2C --- GPIO 11 by I2C
    8 - module relais -- GPIO 40
4 (with 4k7 pulldown)
Attachments
Screenshot_20241108_221207_Drive.jpg
Screenshot_20241108_221207_Drive.jpg (352.05 KiB) Viewed 1422 times
2024-11-08_21-48-24.png
2024-11-08_21-48-24.png (122.01 KiB) Viewed 1422 times

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: choosing the right GPIO

#2 Post by TD-er » 08 Nov 2024, 22:24

The S3 doesn't have a lot of limitations.
However there is a number of GPIO pins you may want to leave alone.
See: https://espeasy.readthedocs.io/en/lates ... n-esp32-s3

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: choosing the right GPIO

#3 Post by Ath » 08 Nov 2024, 22:26

We have some documentation on what pins (better) not to use in certain situations: https://espeasy.readthedocs.io/en/lates ... /GPIO.html
That could guide you in the right direction :)
/Ton (PayPal.me)

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#4 Post by giorgino » 08 Nov 2024, 22:48

aaaah, I hadn't seen it before
thanks alot - as always :D

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#5 Post by giorgino » 11 Nov 2024, 22:42

using the ESP32-s3 in the above pinout I guess if i could power it by two pin instead of USB connecor.
I try to connect 0 to gnd and 5v to "5v in" but the unit doesn't boot. It appen only if I press the RST button on the unit
How can I power (and boot) it without USB ?

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: choosing the right GPIO

#6 Post by TD-er » 11 Nov 2024, 23:07

The 5V is not always on all boards an input.
Also on some boards having the ESPEasy console writing to the USB port may cause issues when no computer is connected.

You can try to disable sending the ESPEasy console to HW CDC on the tools->Advanced page.
Then try to boot the ESP only powered via 5V.
Maybe also try to measure the resistance between each GND pin to see if those are actually connected.

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#7 Post by giorgino » 11 Nov 2024, 23:17

nothing: I connect different gnd too:
When powering I geto only red led lights on
then i press RST ( or BOOT) and green led lights on and espeasy goes online

Since i don't press the unit stay idle with red led waiting

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: choosing the right GPIO

#8 Post by TD-er » 11 Nov 2024, 23:23

Hmm sounds like GPIO-0 is pulled to GND a bit too long.
Maybe you can add some capacitor between RST and GND to keep it a bit longer in RST to let the power supply stabilize first.

No idea what value. Could be 1uF is enough, but maybe you need a bit more.
And maybe a 10k resistor between 3V3 and GPIO-0 to pull it up slightly faster.

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#9 Post by giorgino » 11 Nov 2024, 23:37

in effect sometimes when I connect 5v the green led lights on too, but sometimes no

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#10 Post by giorgino » 21 Nov 2024, 22:13

connected a capacitor 4.7uF (the lowest available in my lab) and seems work (first boot not, the other in short sequence everyone boots ok)
About the resistor between GPIO 0 and GND: I don't have any GPIO-0, I start from 1
:?:

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: choosing the right GPIO

#11 Post by Ath » 21 Nov 2024, 22:34

giorgino wrote: 21 Nov 2024, 22:13 About the resistor between GPIO 0 and GND: I don't have any GPIO-0, I start from 1
Your schematics show GPIO0 between GPIO35 and GPIO45... (close to the BOOT button on the board-image)
/Ton (PayPal.me)

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#12 Post by giorgino » 21 Nov 2024, 22:54

ops, sorry

Anyway, with 10k between gpio0 and gnd it's worst: never boot! pushing button the green blinks but remain off
Reset Pin
GPIO ← Switch:
- None -
is this ok?

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: choosing the right GPIO

#13 Post by Ath » 21 Nov 2024, 23:04

The pull-up resistor should be from 3.3V to GPIO-0, not from GND, as keeping GPIO-0 to GND will boot it into flash-mode, instead of run mode. :o
/Ton (PayPal.me)

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: choosing the right GPIO

#14 Post by giorgino » 21 Nov 2024, 23:12

IT WORKS !
thanks


better (for me) going bed early tonight :roll:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest