1

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.

user35041
  • 11
  • 1
  • 5
    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. – pjc50 Jan 03 '14 at 13:18
  • 7
    That recommendation is a nonsense. Forget it. – Laszlo Valko Jan 03 '14 at 13:34
  • 2
    Perhaps they mean a capacitor on the 3.3V supply from the GPIO – geometrikal Jan 03 '14 at 13:54
  • @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? – user35041 Jan 03 '14 at 14:15
  • The cap would be a decoupling cap: http://electronics.stackexchange.com/questions/2272/what-is-a-decoupling-capacitor-and-how-do-i-know-if-i-need-one. 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. – geometrikal Jan 03 '14 at 14:32
  • @geometrikal:Thanks to the link you've posted I've finally understood the intention of the person who advised me, I'd like to thank you for taking an effort of extracting this from my question :) Right now I have only 1uF, 50V available around, does it mean that it'll be 10 times slower providing the necessary voltage at the drooping moment than the 0.1uF in terms of capacity? I'm not sure about the cap's nominal voltage, to what degree and in what way is the difference relevant. And the cap between VCC & GND will prevent SDA output going above desired 3V3 level the best with the parameters? – user35041 Jan 03 '14 at 22:04
  • The first answer in this question shows the frequency response of different value caps http://electronics.stackexchange.com/questions/59325/whats-the-use-of-a-decoupling-capacitor-near-a-reservoir-capacitor/59330#59330 ... What is the sensor? The capacitor voltage is what voltage it can handle before breaking down. Larger values are typically larger physically. The cap won't prevent SDA going above 3.3v, it prevents noise on the Vcc (and thus SDA) lines by supplying current when necessary faster than the GPIO pin can. – geometrikal Jan 03 '14 at 22:19
  • Unless there is a chance of some external power getting through the sensor, I don't think it is possible for SDA to go above Vcc. – geometrikal Jan 03 '14 at 22:21
  • @geometrikal: But when the only protection between Raspberry Pi's power input (which is, if I'm not wrong, just one single cap on the way from microUSB/input lines) and the "rest" of the board, the uP and GPIO - if this cap would get destroyed, there'd be no other obstacles to drive the 3V3 Pi's output with 5V, is that a correct way of reasoning? And if yes, could be the cap useful as a protection measure? – user35041 Jan 04 '14 at 14:18
  • The raspberry pi has a voltage regulator to provide 3.3V from the 5v USB source. Any caps are just to 'smooth' the voltage. Caps play no part in setting the value of the voltage. – geometrikal Jan 04 '14 at 20:45
  • What kind of sensor is this? How long is wiring? – Kamil May 03 '14 at 23:48

1 Answers1

1

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.

RedGrittyBrick
  • 14,602
  • 5
  • 37
  • 77
  • I've read about PTC polyfuses, starting from [wikipedia](http://en.wikipedia.org/wiki/Resettable_fuse) to get [here](http://www.allaboutcircuits.com/vol_3/chpt_3/7.html). 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? – user35041 Jan 03 '14 at 14:22
  • 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. – Adam Lawrence Jan 03 '14 at 14:28
  • It's much easier to use schottky diodes to clamp to the power rails then a zener. – Connor Wolf Jun 03 '14 at 00:22