EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: Seekonk on February 25, 2017, 11:41:11 am
-
This is a discussion elsewhere, a variation of Dave's powering a micro with an input pin. In this case an external device identifies itself by the value of a resistor connected to a onewire type buss. Besides a digital input, the master has an A/D connected and another pull down resistor that can be switched in and out. When switched in a voltage divider forms and by the A/D reading, one of four possible devices can be identified. three of the four resistor values will make the master work. A 2.7K pullup connected to a 3V3 supply is the normal configuration.
This isn't hard to replicate. Instead it has been suggested to just put a 47K resistor to 24V and letting the substrate clamp the voltage to the chips supply. It is assumed that the extra current will be tolerated by the supply. Is this just bad form or can one in a million chips be damaged be damaged by this method?
-
It is a valid electrical protection method. In your case you are limiting input pin current draw to .5ma.
However one would have to verify the datasheet maximum allowed specification with the specific device. A better solution is to use a dual fet voltage level translator circuit for each pin needing such protection.
-
This may be a bad idea.
Many power supplies will not tolerate reverse current from the higher voltage (they can only source current, not sink it).
You may end up charging the 3.3V power supply rail to 24V or blowing up the pass transistor in the supply :)
-
You haven't said what MCU. Devices with analog features can have their operation seriously disturbed by substrate current injection - even at currents far less than their specified abs. max. clamping current. Other ADC inputs are likely to be affected, and there may be worse problems than that. e.g. there have been cases of PIC MCU internal oscillator frequency being shifted by over 50%, and shifts in the BOR threshold leading to unexpected resets are also possible. Other makes may have different vulnerabilities so YMMV.
Assuming the 3.3V rail can always tolerate half a mA lifting it, an external Schottky diode to clamp the pin without significantly forward biassing the substrate diode would be advisable if you intend to use a pullup to above the rail voltage.
-
The commercial device's internal MCU and circuitry are unknown, valued at $800. The A/D is likely part of the MCU. It seems a little risky just to save an extra resistor and some small regulator (even a LED as a shunt). Just curious at others experience and potential pitfalls
-
If the 24V supply is reasonably stable, you can get there with a potential divider using E48 series resistors: Upper arm 19.6K, lower arm 3.16K. That gives you a Thevenin equivalent resistance of 2.72K from an equivalent voltage of 3.33V
-
But you forget, the voltage measurement is made after about 4K is placed in parallel with that 3.16K. This second voltage divider is made from a switched in unknown lower resistor and the 2.7K as is described in the patent.
voltage value may be detected by the analog to digital con
verter 608 . A protection resistor 612 may be utilized to protect
the A-D converter.
[0055] For example, if the pull-up resistor represents the
type of power supply, a detection of 3.9 K ohms may be
interpreted by a master controller that the power supply is an
in?nite supply (mains). A detection of 2.7K ohms may be
interpreted as a 90 Watt power supply. A detection of 1.8K
ohms may be interpreted as a 60 Watt power supply. A detec
tion of 1.0K ohms may be interpreted as a 30 Watt power
supply. Other voltage levels and coding schemes may also be
utilized to code information about the power supply unit in
this analog manner. Optionally, digital messaging may also
be utilized to detect information about the power supply unit
or other components of the bus. In such a case, a data message
with information from circuits or memory of the power sup
ply unit or based on signals from the detectors or sensors of
the power supply unit may be sent from a processor of the
power supply unit to a system level controller or processor.
-
You cant tell the difference between a single 2.7K resistor to 3.3V and the potential divider fed with 24V I described. The Thevenin equivalent resistance and Thevenin equivalent voltage are both within 1%.
Load it with whatever switched pull-down resistor you like and it behaves the same.
DO THE MATHS! :horse:
-
If overvoltage is the normal operation mode I'd add a proper interface circuit and don't rely on the MCU's clamping diodes which are more like a limited protection of last resort. Staying with the 3V3 regulator (a Zener could do that job also) is the better way. Saving a few cents vs. reliability & liability issues for $800 devices is a no-brainer.
-
Just add a 3V zener between the ADC input pin and the ground. The zener will do the clamping and your MCU will be happy.
-
Another solution if you do not have a suitable zener: Place a 1 Megohm resistor between the ADC input and the 3V3 power rail as a pull-up resistor. Place a 1N4148 in series with the ADC input pin and the 24V pull-up resistor so that the diode's anode is connected to ADC pin and cathode is connected to 24V pull-up resistor. When the external sense resistor is not connected, the diode is reverse-biased and the ADC will read 3V3. When the external sense resistor is connected, the diode will be forward-biased and the ADC will be able to measure the voltage of the resistor divider. The diode will provide approx. 400 mV - 600 mV voltage drop which is also temperature dependent, though. If the resistor divider provides distinctly different voltages, the tempco and the voltage drop may not be an issue.
-
Is this just bad form or can one in a million chips be damaged be damaged by this method?
If the chip has clamping diodes on the inputs then it should be fine.
Some people even connect directly to the mains like this:
http://www.atmel.com/Images/Atmel-2508-Zero-Cross-Detector_ApplicationNote_AVR182.pdf (http://www.atmel.com/Images/Atmel-2508-Zero-Cross-Detector_ApplicationNote_AVR182.pdf)