Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : RP2040 is somewhat 5 Volt tolerant
Page 1 of 2 | |||||
Author | Message | ||||
LucV Regular Member Joined: 19/02/2023 Location: NetherlandsPosts: 62 |
On Hackaday there was a story today saying that RP2040 is "somewhat 5V tolerant" There are some caveats: - It is 5 Volt and not 5.5 Volt that is why it is not specified in the docs - you shouldn’t feed the GPIOs 5V when the RP2040’s VDDIO is not powered up - ADC's certainly are NOT 5 Volt tolerant - The IO's are 5Volt INPUT tolerant NOT OUTPUT tolerant. Nevertheless this makes some hardware designs much easier. It was on Hackaday today: Hackaday article and confirmed by Eben Upton himself: Eben Uptons comment Food for thoughts. Edited 2023-04-06 18:02 by LucV Luc's tech Blog |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
I think the key word is "tolerant". In other words it will withstand 5V - usually. That doesn't mean that you can assume that it's life won't be shortened by continual use at 4V5 on the inputs. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
LucV Regular Member Joined: 19/02/2023 Location: NetherlandsPosts: 62 |
Well this quote from the article surely sets my mind to ease Luc's tech Blog |
||||
ville56 Regular Member Joined: 08/06/2022 Location: AustriaPosts: 96 |
Made a similar experiance with a Pico-W board. Connected a DS3231 board to Vbus for supply and forgot to solder in the level shifters ... OMG. No, it worked without any issue, so i left it just to see what happens. And it's working since many weeks so far in the project "kitchen clock", synced via NTP. An analog I/O is used with Vref, so i havn't destroyed the Pico this way yet ... For development the Pico was supplied via USB, now it is supplied with 5V directly to Vbus and the DS3231. Luck or voltage tolerance, i don't know. Regards, Gerald 73 de OE1HGA, Gerald |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
Well said. 3v3 seems to be the accepted standard for the RP2040, so pushing it out to 5v is dangerous IMHO, and should not be done. Under ANY circumstances. But, that is just me. 3v3 to 5v bi-directional conversion is easy and cheap, so why not use it? This seems to me somewhat similar to the red-line of an engine. If it red-lines at 7,000RPM, then YES - you SHOULD be able to push it up to that, but is it wise to do so? Probably not. Smoke makes things work. When the smoke gets out, it stops! |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
TBH I'm not too bothered about 5V stuff now. I just look for stuff that will work at 3V3 and use that. Level shifting is cheap and easy unless you have a lot of pins to do, in which case you are probably working with the wrong stuff. :) I can see the argument for wanting to interface with old 5V computer stuff, but that's a specialised field and shouldn't be an issue for any current designs. You still need to level shift on RP2040 output pins anyway. It's not likely to handle more than 3V6 applied to any pin in output mode. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 396 |
Even if most of you (including me) will do the level shifting anyway - because it is the proper thing to do - It is good to know that it can tolerate 5V under some circumstances! So thank you for this article! @ Mick Hm I do have A LOT of sensors and things which operate at 5V logic! Half of my "Arduino" stuff is 5V logic only. Some sensors accept both. Greetings Daniel Edited 2023-04-06 19:56 by Amnesie |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
I know some (if not all) of the PIC chips can handle silly voltages on their inputs providing that you limit any possible current to a very low level. Microchip published a design for zero voltage crossing detection using an ordinary PIC with its input connected to mains voltage via a very high resistance (2M2 springs to mind but I can't remember for certain). You have to watch the voltage rating of the resistor to do things like that! The point is, the ESD protection diodes on the die will protect the inputs against low level static discharges but are not designed to carry continuous current. In my first version of the PicoMite mini I used a simple resistor-diode network for connecting the keyboard. The resistor limited any current and the diode was in parallel with the ESD protection diode up to 3V3. I got that circuit from HP, who probably know a bit about keyboards. It worked well. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
There are many things that only come in 5V logic options. And many other boards are actually 3.3V things with onboard 5V to 3.3V shifters installed. So were are still in a world that tries to straddle 5V and 3.3V in a mixed environment instead of having a fully 3.3V world. I find it interesting that RTL logic chips from 1963 also used 3V logic levels, not 5V. These were used in the Apollo missions I may just test my retro interfacing project *without* using my 74LVC245s. |
||||
circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 245 |
I had the same thought about connecting up 5v keyboards, but I got the idea from Geoff in the MicroMite Manual - he shows a schematic for connecting 12 volts to the Micromite for RS232 comms using a 10K resistor in series and a couple of IN4001s to V+ and Gnd. (see Low Cost RS232 Interface in the Micromite Manual.) |
||||
DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 76 |
I'v recently done an industrial job: 5v PIC, 24v sourcing sensor. Simply used a potential divider, 10k in series, 2 x parallel 4k7 to ground worked well. I can't exactly remember the Volts on the input pin, but it was a little bit above zero, or a tidgy bit below 5v. (Values could be adjusted to give volts in the 3v3 domain.) Old PICs all seemed to have proper clamping diodes anyway, I read that the 2040 has a kind of FET that is not a self- respecting diode. Too complicated for me. Another approach is using a 3v3 Zener, to clamp i/p. and maybe 10k series resistor, you can't go wrong. (best if your input voltage is not precise) perhaps easier than reading through all the noise. (some of which I am responsible for!) |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
Just bear in mind - Voltage regulators often have a tolerance of 5% so a 5V regulator could be supplying 5.25V, which is above the maximum 5V tolerance for a RP2040. If you are going to push things then you need to work to tight tolerances. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3152 |
My first thought regarding 5V tolerance on the Pico was: This would be perfect for the keyboard. But as I thought further about the circuit, I realized that the keyboard isn't driving either CLK or DATA to 5V--the high voltage is controlled by the pullups, and if the keyboard recognized 3V3 as high, as it should, then nothing is needed other than the 5V supply for the keyboard, and 10K pullups to 3V3. I've now wired up a little module and connected it to a picomite with flying wires, and it works (at least for my HP PS/2 keyboard). I don't know enough about the electronics of PS/2 keyboards to know when this might be a bad idea, so what are the circumstances which would cause it to fail to work or to harm the pico? ~ Edited 2023-04-08 04:37 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4255 |
A car is also somewhat crash resistant. But I don't try it. An Iphone can be destroyed in a blender. But I don't try it. The pico is somewhat 5V tolerant. Don't try it. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
If the keyboard will work when powered from 3V3 then there's no problem as that's the highest voltage you can get. The problem comes with keyboards that need 5V to power them. In theory a slave device such as a keyboard doesn't have pullups so it's ok, but they don't all follow that rule and some have pullups to 5V internally. Knowing what we know now, if you can guarantee that the keyboard can't give 5V (power it from the 5V supply via a diode so it actually has 4V4 for example) then it should, in theory, be ok. I'd much rather put some form of level shifting in though. I'd rather be safe than sorry. Incidentally, for some obscure reason PS2 mice usually have pullups. Edited 2023-04-08 05:27 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3152 |
Sorry, but I already tried it, and thus far it is working. The question I had was whether there was reason to believe that the keyboard would be applying 5V rather than acting in I2C mode and just pulling the line down from whatever voltage it got from the pullups on my little wired-up module (which in this case are 3V3). It turns out that at least for this keyboard, it is pulling up the 5V being supplied from the PicoMite, and the voltage reading on these lines is 4V75. I'll continue to work with this module. If it harms the PicoMite, I'll just consider that I've taken one for the team. It may be that using no pullups and inline diodes plus, say, 10K resistor will also work and might be considered safer. I'll try that. Is it the case that the Picomite is passive here, with the keyboard providing both CLK and DAT, or does the Picomite provide the clock with the keyboard asserting DAT within the clock frame? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
In a *true* PS2 system both the computer and the keyboard use open-collector transistors and the computer has pullup resistors to 5V, which it also supplies to the keyboard. As I said before, some keyboards have pullups inside and some don't. I had another think.... Note that the 5V "tolerance" only applies on *digital inputs*. You must still avoid putting more than 3V6 on any pins configured as outputs or on any ADC inputs. The PS2 clock signal is on a pin configured as a *digital output* so you are putting your PicoMite at risk if you have a pullup to anything above 3V6 - and that may or may not be inside the keyboard. Edited 2023-04-08 07:00 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2140 |
Also have a HP PS/2 KB that requires 5V, though this one has no pullups so the Pico has them to 3V3. For keyboards that have their own pullups to 5V use lower value ones at the Pico, say 2k2 to swamp the ones on the keyboard. Another option is high value pulldowns at the Pico to create a voltage divider. If the KB has 10k use 18k or 22k. Or you could install them in the keyboard and keep the Pico standard. It appears some keyboards don't have simple pullup resistors but use constant current sources in the chip. Edited 2023-04-08 07:49 by phil99 |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6812 |
Hacking around with resistors, diodes etc, is fine, but you are only saving pennies to get a half-baked solution. Two cheap mosfets and four resistors (or a single 2-way level shifter module from China) fixes the whole problem for *any* PS2 keyboard. Maybe those pennies are important on a production run of 1000 boards, but not for one or two. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3152 |
It's true--considering the apparent variety of PS/2 powering combinations, the 2-MOSFET plus 4 resistor combination looks like the most robust solution for a PCB. I'm sold. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Page 1 of 2 |
Print this page |