Shop OBEX P1 Docs P2 Docs Learn Events
Shiftregisters and lightning. — Parallax Forums

Shiftregisters and lightning.

Hi all.
Long time since I`ve been writing something here, but I`m reading at the forum almost every day. Thought I could ask you guys if you have som experience with the shiftregisters, 74HC165 and 74HC595. I`m using those registers for inputs and outputs in my Propeller 1 controller for my hydro power station. Been running for about 3 years now, but almost everytime we have thunderstorms and lightning in the area, some of the shiftregisters brake down and has to be replaced.
I`m running the registers at 3,3v. At the 165-registers (inputs), all inputs are pulled up to 3,3v by 10k. Grounding the input = activate the input. All inputs are mainly from the switches in the front of the controller box, abt 0,7m cable.
At the 595-registers (outputs), each output goes to the base of a transistor (via 2k2) that drives the relay.
I`ve also sometimes seen broke transistor and relay coil afther a lightning stroke. But it seems like the registers itself brake down first.
So, my main question is: Do you know about similar shiftregisters (same funktion and layout) that can resist high voltage spikes better than the 74HC165 and 595 ?
I`ve attached the schematic for the project. (expressPCB)
Here is the link to the project: arnevik1.no/Kraftverket.htm
Maybe this is a dumb question at the forum, but I will appreciate some thoughts from you about what to do.
One strange thing; the main board with the Propeller onboard is never ruined by the lightning. It survive every time.

Comments

  • All I can say is that 595's are notorious for being sensitive to any kind of noise. We had a ground loop issue on a machine causing issues with a 595 that was traced down to the machine chassis that was earth grounded and a face plate that was connected to power ground... the only difference between the Earth ground and the power ground was a diode drop. Removing the diode drop and bringing the Earth ground to the same potential as the Power ground solved the issue.
  • jmgjmg Posts: 15,173
    edited 2018-08-19 20:56
    LA6WNA wrote: »
    .... Been running for about 3 years now, but almost everytime we have thunderstorms and lightning in the area, some of the shiftregisters brake down and has to be replaced.
    I`m running the registers at 3,3v. At the 165-registers (inputs), all inputs are pulled up to 3,3v by 10k. Grounding the input = activate the input. All inputs are mainly from the switches in the front of the controller box, abt 0,7m cable.
    At the 595-registers (outputs), each output goes to the base of a transistor (via 2k2) that drives the relay.
    I`ve also sometimes seen broke transistor and relay coil afther a lightning stroke. But it seems like the registers itself brake down first.
    So, my main question is: Do you know about similar shiftregisters (same funktion and layout) that can resist high voltage spikes better than the 74HC165 and 595 ?
    I`ve attached the schematic for the project. (expressPCB)
    Here is the link to the project: arnevik1.no/Kraftverket.htm
    Maybe this is a dumb question at the forum, but I will appreciate some thoughts from you about what to do.
    One strange thing; the main board with the Propeller onboard is never ruined by the lightning. It survive every time.

    Hmm, if you have enough energy to kill multiple parts, it's unlikely any simple swap is going to help.

    Serious Gas Discharge Arresters on the power(mains) side can also give a pathway, that is not via your electronics.

    What do the relays switch ?

    You may need to upgrade those to higher isolation voltages, if the energy is getting across them, as it sounds like it may be.
    Or, if you cannot easily upgrade the relays, another way to gain isolation mm, is provide local floating coil power and drive via a Photorelay like TLP241 (5kV rated)

    There are '595' variants like STPIC6D595,(/A595/B595/C595) which have 20V rated outputs, but they are open-drain pull downs.

    Do you have both HC165 & HC595 failures, and on what pins ?


    Also add TVS diode clamps and series R's and ferrite beads, and maybe change to shielded cable ?
    Opto isolators can help break signal paths, but you still need to power things somehow...

    In extreme discharge cases, I've even seen PCB changes to give a specific ground 'spark gap' type pathway, help diverts the energy from the more delicate stuff....
    but best to do that as well as adding that external pathway...
  • kwinnkwinn Posts: 8,697
    I have a greenhouse installation that uses TPIC6595's for switching solenoids and 74HC597's for inputs. That unit has been working for almost 5 years now with no failures even though it is in a lightning prone area (near the shore of Lake Huron). They are installed in a well grounded metal box with with shielded I/O cables, a backup battery, and an isolated switching regulator/battery charger. The battery powers the Propeller board and the I/O boards that have on board regulators.
  • What do the relays switch ?

    Some relay switches 230v ac contactor coil current and some of them switches 12vDC LED`s etc.

    Do you have both HC165 & HC595 failures, and on what pins ?

    Yes, both of them has failed. No spesific pins. It can differ from time to time. Always input or output pins that fails, never the data or clock pins. Seems like communication with the Prop still runs afther they fails. Just that ruined inputs or outputs don`t respond. I can say that cause I can see the state of all the inputs and the outputs in realtime at the monitor.

    I`ve added some TVS diodes at certain Places , but not directly at the in/out pins at the registers. Maybe I should try that..??
    I have a greenhouse installation that uses TPIC6595's for switching solenoids and 74HC597's for inputs. That unit has been working for almost 5 years now with no failures even though it is in a lightning prone area (near the shore of Lake Huron). They are installed in a well grounded metal box with with shielded I/O cables, a backup battery, and an isolated switching regulator/battery charger. The battery powers the Propeller board and the I/O boards that have on board regulators.

    Interesting. Maybe the TPIC6595 and 74HC597 are a little better than those I use? My system is also installed in a grounded metall Box. I also have the Power ground well Connected to Earth ground. No ground loops to measure. In the beginning, I didn`t have this connection and I had serious trouble With the communication between the cards. That`s never an issue afther I Connected PWR ground and Earth ground.
    My system also runs at 12v battery With a constant charger from mains. Charger is at the type With transformer, so 230v AC and 12v DC are galvanic splitted.
    My inputs and outputs Boards With the registers on, are Powered from the main processor Board. 3,3v (same as Prop) Powers the registers and 12v Powers the relays. All daughterboards (input, output, analog, voltage measure) are Connected to main Board through flat ribbon cables at abt 20cm.

    Well, I Guess I have to investigate this Things futher on. In the meantime I`ll keep on buy cheap 74HC-registers from China. Anyway, its still meaningfull to hear what others has experied of Lightning / overvoltage troubble.
  • kwinnkwinn Posts: 8,697
    Your setup sounds very similar to mine, particularly as far as power in and grounding goes. The 120V line and neutral connect to the transformer primary but the ground is not connected to the enclosure, only at the AC receptacle. The enclosure is connected to a copper pipe that goes 4 feet into the ground and several feet horizontally before connecting to the plastic water supply system.

    I am pretty sure the TPICs are quite a bit more rugged than the74HC595's are since they are used to drive solenoids and relay coils directly. Not as sure about the 74HC597's, although being a later design they might be a bit better.
  • kwinn wrote: »
    Your setup sounds very similar to mine, particularly as far as power in and grounding goes. The 120V line and neutral connect to the transformer primary but the ground is not connected to the enclosure, only at the AC receptacle. The enclosure is connected to a copper pipe that goes 4 feet into the ground and several feet horizontally before connecting to the plastic water supply system.

    I am pretty sure the TPICs are quite a bit more rugged than the74HC595's are since they are used to drive solenoids and relay coils directly. Not as sure about the 74HC597's, although being a later design they might be a bit better.

    Have to check out those registers that you use. I may build New input and output daughterboards for the system. The P1 Controls the powerstation very well when all Components are up running, so I`ll try some more to get the system as stable as possible. Won`t give up the P1, you know...
  • jmgjmg Posts: 15,173
    kwinn wrote: »
    I am pretty sure the TPICs are quite a bit more rugged than the74HC595's are since they are used to drive solenoids and relay coils directly. Not as sure about the 74HC597's, although being a later design they might be a bit better.
    I'd expect HC595 to be identical to HC597, given identical process FABs.

    There are HEF4094, HEF4021 which are higher voltage, but I cannot find specific ESD ratings on those.

    LA6WNA wrote: »
    Do you have both HC165 & HC595 failures, and on what pins ?

    Yes, both of them has failed. No spesific pins. It can differ from time to time. Always input or output pins that fails, never the data or clock pins. Seems like communication with the Prop still runs afther they fails. Just that ruined inputs or outputs don`t respond. I can say that cause I can see the state of all the inputs and the outputs in realtime at the monitor.

    I`ve added some TVS diodes at certain Places , but not directly at the in/out pins at the registers. Maybe I should try that..??
    Is it usually the same pins ? ( if your sample size is large enough now :) )

    Series resistors on all pins, can help reduce the currents that do flow, usually the inputs can tolerate quite high values, & TVS clamps help too.

    Do you have serious arresters on the mains-side, to a solid GND stake ?
  • Even series resistors will help since you can put quite high values on inputs to limit current. Outputs need protection too but since you are driving at low speeds you can distribute that series resistance between the output and input. There are plenty of methods of transient suppression but it's important that you limit the current that will flow from transient voltages in the first place.

    However I don't think I've ever bothered to run shift registers over long distances except maybe once I ran a slow I2C over about 100 meters! (many many years ago) :) But typically I will just communicate over RS485 and maybe use a small PIC or 8051 type (normally Silabs) micro on the other end, or even a Prop if it's a one-off type project. Even though the RS485 chips are more rugged I still use TVS diodes on the line and maybe along with tiny gas suppressors, polyfuses, and ferrite beads etc. There is the occasional unit that has been blown to bits but you can't protect much against those times when you get a severe strike.

    The great thing about RS485 is that it is very simple and you can multidrop over long distances.
  • kwinnkwinn Posts: 8,697
    I missed the link to your project before, but now that I have taken a close look at what you have built I must say that I am impressed. Very well organized and nicely done.

    One question though. When you had lightning strikes that caused some circuit damage did you make note of the pins, chips, and boards that were damaged? That information may provide a clue as to where to modify the circuit. At the moment the only thing that I can add to the suggestions Peter and JMG made would be to add a good filter to the main power in to the cabinet.
  • Thanks for nice words abt the project, kwinn. No spesific pins brake down. Its all random. But it is always the digital input and the relay output boards and their respective shiftregisters. Analog inputs with ADC0838 is damaged only one time in the 3 years the system been running. That was in a VERY nerby lightning stroke.
  • Add full protection to all pins, this means schottky clamps to gnd and Vcc, and series resistors before those,
    as much capacitance as bandwidth dictates before that. Everything shielded into the box, ideally using
    feed-through capacitors so its fully RF-tight.

    Goes without saying full RF screening for all logic-level signals - lightning is not forgiving, like welders (in fact
    if your circuitry survives close proximity to a welder that's an indication it will be robust to lightning discharge too
    (within limits of course)
Sign In or Register to comment.