Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:00 28 Apr 2024 Privacy Policy
Jump to

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 : 5v into 3v3 Micromite inputs....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 08:34pm 29 Dec 2014
Copy link to clipboard 
Print this post

Manual on page 9 mentions that you can use 5v TTL converters with the uM's 3v3 console input:

  Quote  
If you have a serial converter that operates at 5V you can still use it with the Micromite. All you need do is place a 1K resistor in series with the transmit signal from the converter. The protection diodes inside the PIC32 will clip the input signal to the supply voltage and the 1K resistor will limit the current to a safe level.


Can I assume that this is safe to extend to the other IO pins too?

IE - If I put a series resistor on the likes of pin-10(COM2 RXD), can I feed in 5v TTL logic? Or for the likes of any other 3v3 pin, can I put a 1k in series with it and feed it a 5v logic level?

I need to check that this is kosher or only applicable to the console, before I blow anything up......
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 10:08pm 29 Dec 2014
Copy link to clipboard 
Print this post

Yes, all inputs (with the exception of 5V tolerant inputs) have diodes clamping the input to Vss and Vdd. These diodes can take a few miliamps so a resistor will limit the current to a safe level. Any resistor from 1K to 100K would be fine for normal low speed signals.

Geoff
Geoff Graham - http://geoffg.net
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 10:23pm 29 Dec 2014
Copy link to clipboard 
Print this post

DIL resistor packs such as Bourns 4116R-1-103LF are great for this
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 10:50pm 29 Dec 2014
Copy link to clipboard 
Print this post

@ Geoff - great, thanks.

@ matherp - Yep, great minds think alike. I will be using some SOIC resistor packs.
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 11:40pm 29 Dec 2014
Copy link to clipboard 
Print this post

just be a teensy bit careful of accidentally supplying power to the micromite through an input pin. if the micromite is running at the lowest clock speed and drawing only a few milliamps (or is asleep and drawing even less), then it is possible that current can flow through your series resistor, through the clamping diode to Vcc, and lift Vcc up.

this is something that is unlikely to happen in most configurations, but one should still keep it in mind. it is in fact possible to deliberately power a small PIC this way when designing your own RFID tags. in the RFID case, the Vcc pin of the PIC is left unattached.

cheers,
rob :-)Edited by robert.rozee 2014-12-31
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 01:15am 30 Dec 2014
Copy link to clipboard 
Print this post

Thanks Rob.

In this project, the circuit is always powered and the Micromite is permanently awake, so this should be a non-issue.

...should be...

The inputs are also powered by the same PSU(albeit the 5v side of things), so the inputs cannot go high if the main power is off, nor can an idle-high serial port power the PIC kind of thing.

I do know what you mean though - I did run into that problem of self-powering via the input pins with another project.
Smoke makes things work. When the smoke gets out, it stops!
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 04:59pm 01 Jan 2015
Copy link to clipboard 
Print this post

  Geoffg said   Yes, all inputs (with the exception of 5V tolerant inputs) have diodes clamping the input to Vss and Vdd. These diodes can take a few miliamps so a resistor will limit the current to a safe level. Any resistor from 1K to 100K would be fine for normal low speed signals.

Geoff

Hi Geoff;

I have search hi and low and can't seem to find the specifications for the protection diodes. 2mA seems a bit hi? The propeller specifies .5mA max.

Do you know of a link where I can find this spec?
And one for the 5V pins also.

redrok
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 03:41am 02 Jan 2015
Copy link to clipboard 
Print this post

Sorry, but I have never seen a spec either. But I have driven over 5mA into them in testing and they survived.

Geoff
Geoff Graham - http://geoffg.net
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 03:59am 02 Jan 2015
Copy link to clipboard 
Print this post

I was wondering what a safe max current per each of these might be, too.

Are they plain diodes or what and what sort of voltage drop will be across them (inside the chip) before they conduct?

It's not that I want to drive bad voltages into them as a habit but I'm curious to have a rule of thumb for what a chip is likely to tolerate when accidents happen or during testing.

5mA sounds a lot!

JohnEdited by JohnS 2015-01-03
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 12:33pm 03 Jan 2015
Copy link to clipboard 
Print this post

Hi All;
I still haven't found the specks for the ESD protection diodes.
However, I have found some info. See:
TB3013 , AN521

TB3013 pretty much says not to use 3.3V input's ESD Parasitic Diodes. While different, the Vee diodes should also be avoided.

AN521 is for older chip families, the ones that specify Vdd + 0.6V limits.

Our PIC32MX chips specify Vdd + 0.3V limits must either not exceed the voltage rails or use external Schottky diodes to keep the limits less than 0.3V.

On 5V tolerant inputs a low leakage Zener must be use.

TB3013 shows suggested circuits.

I guess the answer is just don't do it!!

redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 01:55pm 03 Jan 2015
Copy link to clipboard 
Print this post

Very interesting reading - thanks for the links to those docs, redrok.

Perhaps it would be wise to feed all my input switches from the 3v3 rail, rather then the 5v rail. The same 10k/1k input arrangement would stay in place, but this would mean that the input voltage would be the same as the supply voltage on all pins.

I have yet to read all of those documents, but I did read TB3013 first, and it does seem to suggest that exceeding the supply by more then 600mV(see conclusion on page 4) is not a good idea in any event, so best to follow the datasheet and application notes, me thinks.

This does mean I have to reconfigure a few things, but at the end of the day, I want the project to last!

EDIT: AN521 mentions that you can apply heaps of voltage to the IO pin if you want:

  Quote  
THEORY OF OPERATION

This application takes advantage of the input static protection circuitry that exists on all I/O pins of a CMOS PIC16C5X. These protection circuits are designed to short the inputs to the power supplies when a large overvoltage is applied, thus protecting the chip from static electricity spikes. On PIC16C5X microcontrollers, this protection circuit is two large P-N diodes on each input (Figure 1). These diodes will short any voltage higher than VDDto the VDDsupply and any voltage less than VSSto the VSSsupply. They can take several milliamps of current without any damage to the chip. High voltages can be applied directly to the chip inputs as long as they are current limited.


Does this not justify application of 5v so long as you make sure you use a current-limiting resistor?Edited by Grogster 2015-01-05
Smoke makes things work. When the smoke gets out, it stops!
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 03:15pm 03 Jan 2015
Copy link to clipboard 
Print this post

  Grogster said   Very interesting reading - thanks for the links to those docs, redrok.

Perhaps it would be wise to feed all my input switches from the 3v3 rail, rather then the 5v rail. The same 10k/1k input arrangement would stay in place, but this would mean that the input voltage would be the same as the supply voltage on all pins.

I have yet to read all of those documents, but I did read TB3013 first, and it does seem to suggest that exceeding the supply by more then 600mV(see conclusion on page 4) is not a good idea in any event, so best to follow the datasheet and application notes, me thinks.

This does mean I have to reconfigure a few things, but at the end of the day, I want the project to last!

EDIT: AN521 mentions that you can apply heaps of voltage to the IO pin if you want:

  Quote  
THEORY OF OPERATION

This application takes advantage of the input static protection circuitry that exists on all I/O pins of a CMOS PIC16C5X. These protection circuits are designed to short the inputs to the power supplies when a large overvoltage is applied, thus protecting the chip from static electricity spikes. On PIC16C5X microcontrollers, this protection circuit is two large P-N diodes on each input (Figure 1). These diodes will short any voltage higher than VDD to the VDD supply and any voltage less than VSS to the VSS supply. They can take several milliamps of current without any damage to the chip. High voltages can be applied directly to the chip inputs as long as they are current limited.


Does this not justify application of 5v so long as you make sure you use a current-limiting resistor?

I don't think so, at least not with PIC32MX devices. These devices have the "-0.3V to (VDD + 0.3V)" and "-0.3V to +5.5V" max ratings.
The problem is the MOSFET on the inputs have a conduction threshold just a bit above +0.3V. Above this the MOSFET starts conducting and apparently can do strange things. TB3013 says, if the PIC pins are "Digital Only", no analog functions, even if turned off, you can use the 0.6V operation described in AN521.

That is how you can tell which ApNote is applicable.
Use AN521 with devices that have "0.6V" inputs.
Use TB3013 with devices that have "0.3V" inputs.

redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 03:30pm 03 Jan 2015
Copy link to clipboard 
Print this post

OK.

I just did a little testing for 3v3.

My input circuitry was designed for 5v operation, so I was unsure if 3v3 would prevent it from working. They are only optocouplers with a transistor buffer output, but to be sure, I hooked one up to 3v3, and it seems to work just fine. The output is 2.7v which should be fine for driving a 3v3 input - the PIC32 should see that as a logic high without any problem, and as there is only a tiny current being passed to drive the PIC32 input, I don't think there will be any issues with that change in concept.

This will mean that all inputs are pulled low with 10k, a 1k in series with the input just for additional protection, and the input is pulled high by the optocoupler when needed. This should still all work, despite the drop from 5v to 3v3.
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024