Electronic – arduino – How to ensure an off-before-on transition for an H-bridge

arduinoh-bridgelogic-gates

I want to control a H-bridge using an ATMega2560. The goal is to produce output with +-18V for driving a Merklin H0 digital train set.

Given the voltage and current needed for the trains it is crucial that the H-bridge never ever goes into a shortcut state. And since software is always buggy I don't want to rely on the ATMega to switch the pins correctly. Instead I want to add some hardware between the ATMega and the H-bridge that does the following:

  1. turn the H-bridge off on illegal inputs
  2. when transitioning from one state to another ensure that the H-bridge first gets an off signal before an on signal for the opposite switch.

I have a lot of 74HTCxx chips around so I can implement logic functions with them.

My question now is: How do I make the H-bridge foolproof? How do I ensure the off-before-on transition for the output signals? Can I use gate switch times to delay on signals sufficiently? Or do I need a clock signal and flip-flops to implement discrete transitions from one state to another?

Best Answer

Try this: -

enter image description here

From here based on my answer here. Diagrams modified to correct a defect.

And now with another simplification to remove the inverters: -

enter image description here

Both AND and NOR should be schmitt trigger types.