Input clamping diode 5v to 3.3 volt: Max and Min resistors?
prof_braino
Posts: 4,313
This question is an off shoot of this http://forums.parallax.com/showthread.php/148489-SR04-5-volt-to-3.3-volt
The question is: What are the max and min values for a resistor from a 5 volt sensor to a 3.3volt prop input pin?
A) Minimum: Below this value, the prop pin's clamping diode risks damage.
Maximum: Above this value the signal won't get through.
I used 330 ohm. I think I was supposed to use 3300 ohm, but now that doesn't work. I want to figure out if the diode is burned or what.
As stated in the other thread, a voltage divider using 1.7 k ohms and 3.3 k ohms does work on that pin.
So, I want to answer: Don't go below this value, and don't go above this value.
Thanks!
-ANSWERS-
Recommended: At least 4.6k, the official value from AN#10
Easy to find and still works: 10K
Minimum:
2.2k is the absolute minimum, which drives the input at absolute max, so is risky.
3.3k is the minimum SAFE (calculated by various unofficial parties) resistor value, and its easier to find
Maximum: Up to the mega ohm range. The higher values will affect the max frequency that can get thru, dues to the RC time constant from the capacitance of the input (whatever that happens to be). So there is no strict upper limit, it depends on the frequency and the sensor, but could be in mega ohm or tens of mega ohms before the signal stops getting through.
EDIT from Sandy-
Parallax appnote (#10) "Low-cost Bidirectional Mixed-voltage Interfacing" - interfacing 5V signals to the Prop using a resistor.
They calculate 4.6k as the minimum resistor value for 5 volt signals.
100k resistors on 5V inputs from operator buttons. The frequencies aren't very high...
Edit from Phil -
How can we test if the protection diode is damaged?
Apply 5V through a 3.3K resistor and measure the voltage on the pin. It should be around 3.9V if the diode is intact and functioning properly.
The question is: What are the max and min values for a resistor from a 5 volt sensor to a 3.3volt prop input pin?
A) Minimum: Below this value, the prop pin's clamping diode risks damage.
Maximum: Above this value the signal won't get through.
I used 330 ohm. I think I was supposed to use 3300 ohm, but now that doesn't work. I want to figure out if the diode is burned or what.
As stated in the other thread, a voltage divider using 1.7 k ohms and 3.3 k ohms does work on that pin.
So, I want to answer: Don't go below this value, and don't go above this value.
Thanks!
-ANSWERS-
Recommended: At least 4.6k, the official value from AN#10
Easy to find and still works: 10K
Minimum:
2.2k is the absolute minimum, which drives the input at absolute max, so is risky.
3.3k is the minimum SAFE (calculated by various unofficial parties) resistor value, and its easier to find
Maximum: Up to the mega ohm range. The higher values will affect the max frequency that can get thru, dues to the RC time constant from the capacitance of the input (whatever that happens to be). So there is no strict upper limit, it depends on the frequency and the sensor, but could be in mega ohm or tens of mega ohms before the signal stops getting through.
EDIT from Sandy-
Parallax appnote (#10) "Low-cost Bidirectional Mixed-voltage Interfacing" - interfacing 5V signals to the Prop using a resistor.
They calculate 4.6k as the minimum resistor value for 5 volt signals.
100k resistors on 5V inputs from operator buttons. The frequencies aren't very high...
Edit from Phil -
How can we test if the protection diode is damaged?
Apply 5V through a 3.3K resistor and measure the voltage on the pin. It should be around 3.9V if the diode is intact and functioning properly.
Comments
You have a voltage source of 5 volts with an (undefined) source resistance R1. You connect it through R2 to an input pin that has (varying) resistance R3, and want to know R2 minimum and maximum, exactly.
Because it's current that will kill the diode, you have the voltage (5V), but need the total resistance (R1 plus R2 plus input pin resistance R3). The problem is that R1 is hard to define (it's not even a set number if it's coming from a transistor driver circuit, it's usually an equation that depends on the resistance it's encountering). In other words R1 could be anything, depending on what it exactly is.
So we don't know R1, and you want to know definitively what R2 should be... no wonder you're experiencing frustration.
I think the answers are going to always be "if you use this, then R2 should be this" type answers. That's about the best that can be done, unfortunately.
Person A has sensor F and says that value R2 "totally works and won't break anything".
Then Person B has sensor G, and uses value R2, and says "that didn't work! That actually broke something!"
Finally, Person C has sensor H and says that value R2 is not enough, "The signal is too weak. It needs to be smaller!"
Who's right?
Well, they all are.
-Phil
-Phil
So the protection diode forward voltage is 5v-1.1- 3.3 = 0.6v ?
How can we test if the protection diode is damaged?
In my case the SR04 on the pin that had 330 ohm resistor does not function after a long reading using 3.3k resistor. Using a 1.7k and 3.3k ohm voltage divider, the same prop pin with the same SR04 works just fine. Is this enough to tell me that the prop pin protection diode is damaged, or do I still need to keep looking?
Also, does the protection diode cover a single pin, or a group of pins? On the Quickstart, the input was on pin 17, and I saw pin 18 flashing when nothing was connected. So I figure at least pins 17 and 18 are ruined. Could the other pins be undamaged?
Apply 5V through a 3.3K resistor and measure the voltage on the pin. It should be around 3.9V if the diode is intact and functioning properly.
-Phil
And if one used voltage dividers and there were more than maybe 4, the PCB real estate might be smaller with LVC packages.
If the voltage drop across the protection diode is 0.6V the minimum safe resistance value for this worst case scenario would be (2.115 – 0.6) / 0.0005 = 3.03K.
-Phil
I don't think that any diode is damaged at all. There are two thresholds that should be considered. The limit for safe operation should be something like 0.5 or 1mA. (I don't now where the 0.5mA value comes from, IMHO the data sheet says nothing about that). The problem you get when exceeding this value is not damage to the diode but influence on other pins and eventually latch up. The protection diode is part of a parasitic bipolar transistor that injects current into the substrate. This will disturb other inputs and may cause latch up in extreme cases.
I know little about the CMOS process of the propeller but, for example, the data sheets of 74HCxx parts usually state +/- 20mA absolute maximum clamping current. However, proper functioning of the device is not guaranteed at that level. It only says, don't exceed or you risk damage.
They calculate 4.6k as the minimum resistor value for 5 volt signals. I use 4.7k resistors on all lines going to/from an ADC including the clock line which is at 400 kHz. The ADC produces reliable readings so I'm thinking 4.7k is an appropriate value.
I haven't had any problems using 100k resistors on 5V inputs from operator buttons. The frequencies aren't very high and it makes life easy for the protection diodes.
Sandy
-Phil
I've updated the first post with my results. I still need to do the test Phil suggested.
Here's my updates calculations:
I found that the 44 AA batteriy pack with fresh alkaline batteries was 6.13 volts.
The prop 3.3v could be as low as 3.135 volts.
The clamping diode provides 0.6 voltage drop.
Max curent we want is 5 micro amps or or .5 milliamps or 0.0005 amps
6.13v - 3.135v = 2.995 volts difference
2.995v - 0.6 = 2.395v
2.395 / 0.0005 = 4790 ohms.
So, this would just to be safe with the batteries were in the fully charged state, I don't know how long this would last, I'll test if I'm in this situation. However, this significantly over volts the SR04 sensor (what started the investigation) so I'm going to avoid four fresh alkalines. Maybe I'll just test the motors till the batteries run down a little.
Becasue of all this, I've started using 10k, this seems to work so far.
Also, I broke down and got some NiMH AA from Harbor Frieght. Cheap, but too expensive to include in the kit. I'll just have to state "batteries not included".
Oh, yes. I checked and found out that was stil working with version 1.2 of the datasheet. V1.4 is the latest.
I did as directed. The pins all read 3.9 volts, so I did not burn the prop. WOW. Talk about idiot proof!
Also I noticed that the when I tested pins 16 through 23 on the quickstart, at least one LED on both sides also lit. So this replacates the condition I saw.
Is it safe to say when the clamping diode functions, the neighboring pins also get clamped?
I think this is just leakage current. The buffer driving the LEDs on pins 16-23 is very sensitive. If the prop isn't driving those pins, I can easily make the LEDs light and flash by rubbing those pins with my finger.
Lawson
Ah! the buffer, I forgot about that. I don't even know what a buffer is, I better go look that up on wiki
...later...
So, is this a "unity gain buffer"? is it voltage or current buffer (can it be both current and voltage?)
Whoa! How much to i need to know about these?
Is the leakage just from one buffer input to the next, and not so much from one prop pin to the next?
Actually the "buffer" is a 74HC541 logic buffer. (ok, technically you could call it a current buffer) It senses the logic level on it's inputs and outputs the same logic level with a lot more power. Very useful for cases like the Quick-start where you want to drive LED's from an IO pin without adding a significant load. (i.e. the buffer adds ~6pf and a pA or two of leakage at room temperature) Because the buffer input adds an insignificant load, insignificant things can effect it. For instance, skin conduction to nearby power pins and traces. (even through solder mask!) Or the movement of a charged object nearby. (like a finger bearing a small static charge)
Lawson