User avatar
Burngate
Posts: 6188
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 10, 2019 6:58 pm

It did, mostly. My memory's shot - means I can reread those thousand or so books - but what's most annoying was the paramedics destroyed a perfectly good jersey trying to get it off me.

emma1997
Posts: 502
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 10, 2019 7:19 pm

Glad to hear that. BTW I don't need any ambulance to experience the memory thing. lol Gesundheit.

User avatar
PeterO
Posts: 5447
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 10, 2019 7:54 pm

emma1997 wrote:
Tue Dec 10, 2019 6:41 pm
Actually in those diagrams it's after, not before.
Since it isn't show in the diagrams how can you be so sure ?. And if was after the charge/discharge times would be a major limiting factor !
We all know these are models of the input circuitry and all models have limits. If you stay within the limits you can get useful results.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

emma1997
Posts: 502
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 10, 2019 8:13 pm

PeterO wrote:
Tue Dec 10, 2019 7:54 pm
Since it isn't show in the diagrams how can you be so sure ?. And if was after the charge/discharge times would be a major limiting factor !

AFAICS it is shown. Any capacitance would be associated with the 'logic' part, not the pin. Capacitance at the pin (driven) end of this resistor would be of little interest. However even tiny pf on the other (logic) side of 100meg, as shown, would create dramatic delays.

For beginners maybe best to say inputs behave like there's nothing there. Pi outputs, on the other hand, do act like resistors (few hundred ohms) up or down. IMO more useful than scare monger threats that if you go 1 microvolt above 3.3v the board will explode. But like with giggles, apparently just me.

User avatar
PeterO
Posts: 5447
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 10, 2019 8:40 pm

emma1997 wrote:
Tue Dec 10, 2019 8:13 pm
AFAICS it is shown.
Errrrr..... No it isn't. You are imagining a part of the circuit that was not being included in the models.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

emma1997
Posts: 502
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 10, 2019 9:48 pm

Being stuck in real universe, on more than one occasion, I've been accused of being 'pedantic foo...', no wait, that was... lol

Anyway:
emma1997 wrote:
Tue Dec 10, 2019 8:13 pm
capacitance would be associated with the 'logic' part, not the pin.
Attachments
untitled.JPG
untitled.JPG (23.24 KiB) Viewed 520 times

boyoh
Posts: 1399
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Connecting 5V pullup to Pi GPIO

Wed Dec 11, 2019 11:10 pm

I think we will have to knock on Michael Faradays
Coffin and ask him to solve this problem.
I think he will say you have not progressed much
Since I started the ball rolling

I think a straight forward voltage levelling buffer
Stage will do the job, with no guess work
Use a Opto Isolator

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Milliways
Posts: 502
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Connecting 5V pullup to Pi GPIO

Thu Dec 12, 2019 2:48 am

Burngate wrote:
Tue Dec 10, 2019 6:58 pm
It did, mostly. My memory's shot - means I can reread those thousand or so books - but what's most annoying was the paramedics destroyed a perfectly good jersey trying to get it off me.
I experienced something similar 6 years ago - and I lost my favourite shirt.
The real problem is the 100MΩ resistors they inserted in my brain in ICU.

User avatar
davidcoton
Posts: 4536
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Connecting 5V pullup to Pi GPIO

Thu Dec 12, 2019 4:29 pm

Milliways wrote:
Thu Dec 12, 2019 2:48 am
The real problem is the 100MΩ resistors they inserted in my brain in ICU.
Is that on the inputs or the outputs?
Signature retired

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

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 24, 2019 1:28 pm

The 100M resistor is fictitious, I guess it represents the gate leak current of a CMOS input.

Putting a cap behind it is even more fictitious, as the 100M virtual resistor isn't a component.

Never use a pull-up to +5V with any RPI, instead the pull-up should pull-up to 3,3Volt, not 5V.


if you have no choice in the matter, and MUST use a pull-up to 5V, then provide a permanent resistor to GND, so that together with the pull-up it forms a resistor divider that divides the 5V to 3V.

Meaning the resistor to ground should be 1.5 times the value of the pullup.

for example with a 22K pullup, use a 33K resistor to GND (pull-down).

This insures that the GPIO will never get a voltage larger than 3V on it.

emma1997
Posts: 502
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 24, 2019 5:36 pm

mahjongg wrote:
Tue Dec 24, 2019 1:28 pm
The 100M resistor is fictitious, I guess it represents the gate leak current of a CMOS input.
Putting a cap behind it is even more fictitious, as the 100M virtual resistor isn't a component.

Exactly:
emma1997 wrote:
Tue Dec 10, 2019 4:48 pm
Am I the only one giggling at these resistor model representations of bias current? Highly unlikely there is actually any 100meg resistor in series with any logic. Considering gate capacitance it would take a month for the logic to switch. lol
So I guess I wasn't the only one giggling after all Peter. There's a tiny cap there but no series resistor, 100m or otherwise.
Last edited by emma1997 on Tue Dec 24, 2019 5:49 pm, edited 1 time in total.

User avatar
rpdom
Posts: 16099
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 24, 2019 5:43 pm

emma1997 wrote:
Tue Dec 24, 2019 5:36 pm
So I guess I wasn't the only one giggling after all Peter. There's a tiny cap there but no resistor, 100m or otherwise.
It's only a model! (runs away) :lol:

emma1997
Posts: 502
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 24, 2019 5:54 pm

lol

A false model. There is a resistor there but it's orders of magnitude bigger than 100m and not in series. Technically my use of the term 'bias current' was not correct (op amp on the brain syndrome). mahjongg's 'leakage' is the right word. And it's virtually un-measurable with common gear.

As I said earlier, for practical purpose we should imagine there is nothing there at all when configured as input only.

User avatar
PeterO
Posts: 5447
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 24, 2019 6:10 pm

emma1997 wrote:
Tue Dec 24, 2019 5:36 pm
mahjongg wrote:
Tue Dec 24, 2019 1:28 pm
The 100M resistor is fictitious, I guess it represents the gate leak current of a CMOS input.
Putting a cap behind it is even more fictitious, as the 100M virtual resistor isn't a component.

Exactly:
emma1997 wrote:
Tue Dec 10, 2019 4:48 pm
Am I the only one giggling at these resistor model representations of bias current? Highly unlikely there is actually any 100meg resistor in series with any logic. Considering gate capacitance it would take a month for the logic to switch. lol
So I guess I wasn't the only one giggling after all Peter. There's a tiny cap there but no series resistor, 100m or otherwise.
You don't seem to have learned anything from this thread. !
The best model would seem to be to consider a 100MΩ resistor to ground to model the gate leakage (which is real and measurable) and a small capacitor in parallel with it to model the gate capacitance (which is real and measurable).
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

emma1997
Posts: 502
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Connecting 5V pullup to Pi GPIO

Tue Dec 24, 2019 6:38 pm

Well I did learn a few things here but best not to elaborate. lol

Again we will have to agree to disagree on that imaginary resistor. It is not guaranteed to ground at all. Could just as easily be to Vcc. And by 'common gear' I meant something regular humans can afford.

I'll stand by my 'theory' that we should treat Pi inputs as nothing at all there except VERY tiny cap. And I suspect few punters own equipment capable of fraction of a puff too.

Return to “Beginners”