Question about 5V tolerant pins.

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
SkG
Posts: 18
Joined: Mon Mar 10, 2014 2:57 pm

Question about 5V tolerant pins.

Post by SkG » Mon Jun 16, 2014 3:47 pm

Hi,

I'm using a ultrasonic sensor that gives back a 5V pulse. In other micro controllers that don't allow 5V I use a 1k resistor so I went to the Pyboard schematics and I found this: "All pins are 5V tolerant except PA4 & PA5" (and those are X5 and X6).

So as far as I understand there is no need of resistor in I dont use PA4-X5/PA5-X6, sure?

Regards.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Question about 5V tolerant pins.

Post by dhylands » Mon Jun 16, 2014 5:47 pm

That's my understanding.

Page 45 thru 57 of the datasheet has a table with all of the pins.

The IO structure column has FT for the 5v tolerant pins.

Note that FT pins are NOT 5v tolerant when in analog mode, only when in a digital mode (Note 4 on page 57)

Mr.Nordheim
Posts: 14
Joined: Wed May 07, 2014 7:32 pm
Location: Norway

Re: Question about 5V tolerant pins.

Post by Mr.Nordheim » Sat Jun 21, 2014 9:29 am

Anyone tested? Does one of the adc tolerate 5v?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Question about 5V tolerant pins.

Post by dhylands » Mon Jun 23, 2014 1:13 am

Mr.Nordheim wrote:Anyone tested? Does one of the adc tolerate 5v?
The docs are quite clear that the ADCs only work from 0v to 3.3v.

You'll either need to use a resistor divider network, like this:
http://en.wikipedia.org/wiki/Voltage_divider
Vin would be your 0 to 5V signal.
Vout would be the scaled signal (0 to 3.3v)

Using Z1 = 47K and Z2 = 91K seem like reasonable values.

The resistor divider only works with some types of analog signals. For others you may need to use an op-amp instead.
Something like this: http://www.daycounter.com/Circuits/OpAm ... fter.phtml
Disclaimer: I haven't actually tested the above opamp circuit.

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: Question about 5V tolerant pins.

Post by chrismas9 » Wed Jun 25, 2014 10:10 am

Pins X9 & X10 are probably not 5V tolerant. They are connected to the on board accelerometer. The MMA7660 datasheet does not have an absolute maximum voltage spec for IO pins, only supply pins, but it is unlikely to be 5V tolerant.

User avatar
JonHylands
Posts: 69
Joined: Sun Dec 29, 2013 1:33 am

Re: Question about 5V tolerant pins.

Post by JonHylands » Wed Jun 25, 2014 1:04 pm

chrismas9 wrote:Pins X9 & X10 are probably not 5V tolerant. They are connected to the on board accelerometer. The MMA7660 datasheet does not have an absolute maximum voltage spec for IO pins, only supply pins, but it is unlikely to be 5V tolerant.
Actually, the MMA7660 datasheet has a table on page 7 (Table 2. Maximum Ratings) that lists those values, and the max is 3.6 volts.

- Jon

Post Reply