Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Buffering off-board signals: IC vs. resistor

Status
Not open for further replies.

Rusttree

Member
In the past, I've always buffered digital signals from the outside world coming into my circuit with a typical inverting or non-inverting buffer IC. I'd then wire the output of the buffer directly to a digital input pin on my uC. I'm speaking only about digital signals, not analog.

I'm trying to justify why the buffer IC is better than, say, an appropriately sized resistor. Even for transient voltage spikes (negative or positive), a large enough resistor will prevent any real current spikes from damaging the microcontroller. So what's the argument for using buffer IC's and not just a resistor?

Note: I'm excluding special cases, like high-speed switching.

Thanks!
-Dan
 
hi Dan,
I would normally use a resistor or a resistor divider depending upon the external voltage input.

Do you have an example of the external signals you are expecting.?
 
Thanks for the reply, Eric. I'm mostly speaking in general terms, but the project I'm working on right now is interfacing with an automobile system. There are a couple of status signals from the car's computer that I'm monitoring, like whether a door or the trunk is open. Stuff like that.

I'm considering "cheating" with the voltage conversion as well. My logic voltage is 3.3V and the car's voltage is, obviously, 12V. Instead of using a voltage divider, I'm relying on the protection diodes of the uC pin to clamp the voltage. The series resistor is large enough that only a milliamp or two will flow through the diodes, which is well within the electrical spec in the datasheet.
 
I'm considering "cheating" with the voltage conversion as well. My logic voltage is 3.3V and the car's voltage is, obviously, 12V. Instead of using a voltage divider, I'm relying on the protection diodes of the uC pin to clamp the voltage. The series resistor is large enough that only a milliamp or two will flow through the diodes, which is well within the electrical spec in the datasheet.

If your only consideration is protection from over-voltage, transient spikes etc then I don't think you necessarily need an actual buffer IC. However I would not rely on the internal protection diodes in that way, instead use the series resistor that you have and two diodes externally. Alternatively if it's a SMD design then use a BAV99 diode which combines both diodes in a 3 pin package. It's easy to replace those if needed, rather than frying a pin on the uC.

You might like to calculate whether this provides enough protection from very high potential transients such as when the engine is turned on. However if you don't need fast digital edges then you can afford to use a large resistor (it seems like you are after on/off sensing rather than logic conversion).
 
If designed properly a buffer IC is also a Schmitt trigger (comparator with hysteresis). Using a buffer IC is also a good modular design (you can choose the input impedance). You can actually change the natural frequency of a sensor if needed (as the reading circuit sees it). And if somebody decides to change the sensor, there is a good chance that the circuit can handle it without modification.

EDIT: If you are sure that a simple resistor does the job and low cost is important, then go for the simplest solution. Designing for "all purpose" and "fool proof" is expensive.
 
Last edited:
However I would not rely on the internal protection diodes in that way, instead use the series resistor that you have and two diodes externally.

Hola edeca, could show how exactly, please?
 
Remember that one of the issues that you might be dealing with is that your power supply might be off, when the automobiles is on. That might cause you some grief.
 
Thanks here as well. I'll have to peruse Digikey's articles in the future. Looks like good stuff.

The topic actually leads me to another question that's bothered me before. As was demonstrated in this thread and in the Digikey link, most people advise not relying on the internal protection diodes as the primary means of voltage clamping. Now I understand that if the internal diodes of a pin on a microcontroller burn up, it could bring down the entire circuit. But still, those diodes have a rating like any other diode. If the datasheet says not to exceed 20mA, then I feel confident the diode won't burn up unless I exceed that current rating (within reason, obviously). Is there any reason that an internal protection diode will fail before an equivalent external diode?

I also understand the argument that if the internal diodes burn up, you can't replace them. It's much easier to replace external diodes than the whole microcontroller. But that assumes there's any impetus to troubleshoot and identify the bad component on a PCB. As is most often the case, the entire circuit board is replaced as soon as it's determined something on it has gone bad.

So really, my question is, what are the technical reasons for preferring external protection diodes over relying on the internal ones?

Thanks!
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top