1
\$\begingroup\$

I'm new here and the same goes to my electronics "history". I like to understand things I'm dealing with even if I wasn't provided with a sufficient knowledge background at schools.

What I'd like to ask is: is the capacitor a proper element on SDA line between the external sensor and the Raspberry Pi's SDA line?

I want to use a sensor interfacing it with I2C. I supply the voltage from 3V3 Pi's GPIO pin, the sensor works with both 3V3 and 5V levels. So far so good then. But I was told that due to the lack of more than one fuse/protection on Raspberry Pi, it's recommended to put the capacitor on SDA line, as close to the sensor's output pin as possible and of the biggest Voltage I'll find around. An I'd like to understand why, because what I know about the capacitors doesn't make it clear for me. I know that the intention was to prevent unexpected peek (please correct me if I'm wrong) from damaging Pi's SDA pin. But isn't it true that the capacitor will stop as many Volts it has written on it and then it'll let the current go through, to the Pi's SDA input?

I'll be very grateful for some clarification or pointing me to the right directions, maybe topics I should understand on the way to find the answer.

\$\endgroup\$
  • 5
    \$\begingroup\$ That's an odd reccomendation; normally you'd use a clamp diode for that, and I'd expect a capacitor in parallel to impair the SDA rise and fall and potentially corrupt data. \$\endgroup\$ – pjc50 Jan 3 '14 at 13:18
  • 7
    \$\begingroup\$ That recommendation is a nonsense. Forget it. \$\endgroup\$ – Laszlo Valko Jan 3 '14 at 13:34
  • 2
    \$\begingroup\$ Perhaps they mean a capacitor on the 3.3V supply from the GPIO \$\endgroup\$ – geometrikal Jan 3 '14 at 13:54
  • \$\begingroup\$ @geometrikal: it is possible that I got/remembered it wrong since the discussion. In such case, does it mean I should search for 3V3 capacitor? The answer is probably no, after the answer provided by RedGrittyBrick below but I'd like to make sure. And what parameters should have the capacitor if I was wrong in terms of the line? Would it be enough to just put the right one in series, before the sensor's VCC pin? \$\endgroup\$ – user35041 Jan 3 '14 at 14:15
  • \$\begingroup\$ The cap would be a decoupling cap: electronics.stackexchange.com/questions/2272/…. Grab a cap say 0.1uF and put ACROSS Vcc and Gnd near the sensor. Any voltage is fine, e.g. 6V or 10V tantalum would be good. \$\endgroup\$ – geometrikal Jan 3 '14 at 14:32
1
\$\begingroup\$

isn't it true that the capacitor will stop as many Volts it has written on it

No.

Capacitors

It's the opposite of what you want. You want the protection device to pass low voltages and block or attenuate high voltages.

Capacitors are not designed to be used as fuses, therefore you cannot really use one as a substitute for a voltage or current limiting device to protect IC pins.

The voltage rating on a capacitor can't really be relied on in that way. I wouldn't be surprised if a specific 60V capacitor that passes a 60V AC signal also passes a 120V AC signal. The rating only means the manufacturer won't guarantee the cap works above 60 V, they certainly don't guarantee that it fail at exactly 61 V (say).

IO Protection

What you are looking for is a "voltage clamp" or perhaps a polyfuse or similar.

Arduinos also have this problem of unprotected IO. There are variants that include better protection which seem to me to be a useful example

From here

"Every I/O pin is protected by a 5.1V zener diode and 220 ohm 30mA PTC (resettable fuse). The equivalent circuit is shown in this figure" enter image description here

You'd have to adjust component values for a 3.3 V microcontroller or SoC such as the Rpi.


See also Pi GPIO protection - using (sacrificial?) buffers with ESD protection on a daughterboard.

\$\endgroup\$
  • \$\begingroup\$ I've read about PTC polyfuses, starting from wikipedia to get here. Does the schematic above mean that both the Resettable fuse and Zener diode provide protection for the MCU's pin, as a kind of "double protection"? And then to achieve the protection I should get the 3V3 Zener diode and/or a Resettable fuse? \$\endgroup\$ – user35041 Jan 3 '14 at 14:22
  • \$\begingroup\$ A heavy transient will cause the zener to conduct once its breakdown voltage is exceeded. The resettable fuse will limit the zener current and if the zener current becomes too heavy, will go high-impedance and isolate the transient source. You need both for the protection to work. \$\endgroup\$ – Adam Lawrence Jan 3 '14 at 14:28
  • \$\begingroup\$ It's much easier to use schottky diodes to clamp to the power rails then a zener. \$\endgroup\$ – Connor Wolf Jun 3 '14 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.