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 ZealandPosts: 9063 |
Manual on page 9 mentions that you can use 5v TTL converters with the uM's 3v3 console input: 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: AustraliaPosts: 3165 |
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 KingdomPosts: 8582 |
DIL resistor packs such as Bourns 4116R-1-103LF are great for this |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
@ 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 ZealandPosts: 2289 |
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 :-) |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9063 |
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 StatesPosts: 209 |
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: AustraliaPosts: 3165 |
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 KingdomPosts: 3659 |
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! John |
||||
redrok Senior Member Joined: 15/09/2014 Location: United StatesPosts: 209 |
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 ZealandPosts: 9063 |
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: Does this not justify application of 5v so long as you make sure you use a current-limiting resistor? Smoke makes things work. When the smoke gets out, it stops! |
||||
redrok Senior Member Joined: 15/09/2014 Location: United StatesPosts: 209 |
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 ZealandPosts: 9063 |
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 |