The electronics for the Marsarium took a fair amount of debugging, and I had to phone a friend (Kurt Schoenhoff) to help figure out the last few quirks. Maintaining a reliable and consistent connection to all the I2C components was difficult. Under certain conditions, the BME280 pressure sensor would drop out and it would be difficult for the Intel Edison to reconnect.
It turns out, several of the other components were inducing a bit of voltage ‘noise’. Using the DC motor and large solenoid valves was enough to make the 3.3 volts needed by the pressure sensor to wobble low enough that it would reset. Kurt suggested:
“I would try a bypass capacitor and see if that smooths out the noise”
Bypass or ‘decoupling’ capacitors act like small rechargeable batteries. They pull a little current and ‘charge’ when the voltage to a component is good, when the voltage drops the capacitor kicks in and ‘tops up’ the supplied voltage. This all happens in fractions of a second and this kind of voltage wobble (or noise) is measured in hertz, the higher the frequency of the noise, the smaller the bypass capacitor. That makes sense, I don’t need to store as much charge if I know the blackouts are going to be frequent, but short, so I only need a small capacitor.
Small ceramic capacitors are commonly used, and placed as close as you can to the integrated circuit, preferably with an equal distance between the ground and positive supply. If you are able to identify something as a source of noise (like a DC motor), you can also use a bypass capacitor to smooth out the noise before it has a chance to cause problems elsewhere.
The most common bypass capacitors seem to be around 0.1uF, but sometimes different sized bypass capacitors are wired in parallel to smooth out a variety of noise signatures. If you have measured the noise in your circuit with an oscilloscope, you can use an online calculator or calculate by hand the optimal value for your bypass capacitor.
Become a Patreon to get early and behind-the-scenes access along with email notifications for each new post.
Hi! Subconsciously you already know this, but let's make it obvious. Hopefully this article was helpful. You might also find yourself following a link to Amazon to learn more about parts or equipment. If you end up placing an order, I make a couple of dollarydoos. We aren't talking a rapper lifestyle of supercars and yachts, but it does help pay for the stuff you see here. So to everyone that supports this place - thank you.