Skip to content

Protective circuitry

Giovanni Blu Mitolo edited this page Apr 11, 2019 · 21 revisions

While building a bus using SoftwareBitBang extreme care must be taken to avoid any risk. A lightning strike nearby, heavy equipment wired up to the same power supply or other sources may induce on the bus sudden and destructive voltage spikes that can cause damage to the input-output pins, magic smoke or even fire.

Avoid ground loop

If you don't know about the ground loop study it carefully. It is extremely important to design the wiring in such a way that grounds, in any point of the bus, have no potential between them. Ground loop and induced AC on the bus can be destructive. Use a single ground connection and carry it along with the bus line, keep as much distance as possible between the wiring and AC appliances, do not use the same electrical conduit where AC wiring is placed and apply also the protective circuitry described below.

Current limiting resistor

Pins can be protected against overload adding a current limiting resistor to each connected pin. The resistor value can be obtained solving the following equation R = (operating voltage / pin max current drain), for example to obtain the current limiting resistor value for an Arduino Uno simply substitute its characteristics: R = (5v / 0.030A) = 166.66Ω.

                               ______
                              |      |
                              |DEVICE|
                              |______|
                                 |
PJDL SINGLE WIRE BUS ____/\/\/\__| IO PIN
                        110-180 Ω

Transient voltage suppressor

A transient-voltage-suppression (TVS) diode can be used to protect input-output pins from voltage spikes induced on the bus and can respond to over-voltages faster than other common over-voltage protection components such as varistors.

                               ______
                              |      |
                              |DEVICE|
                              |______|
PJDL SINGLE WIRE BUS ____________| |
                            |      |
                           TVS     |
            GND      _______|______|