Originally Posted by GGG:
John/Stan Thank you. The offset will be carried over track AC so up to 18VAC. The signal will be the Whistle +5VDC.
The signal inputs will be DC up to 12-15VDC. It also needs to with stand a power disruption (changing engine direction) but keep the last state.
Operating voltage for the chips could be regulated down to 5VDC or use a higher 15-18VDC.
The signal inputs would be DC motor voltages. The logic being that when the engine was in neutral, I could sound a whistle signal and get a switching action. So if I could rectify track AC to drive the circuit and use motor DC voltages and the 3-5VDC over track AC as the signals, this would work as long as it can handle the direction changes (short loss of power) with out changing state. George
So the thick plottens. The circuit I showed will immediately clear/disable the output if the signal inputs are not matched. Based on above, this is not what you want. In other words, once you toggle the output to the state you want (by pressing the whistle button), you want that state to be remembered irrespective of changing signal inputs. Is that correct? After all, when you press DIRECTION button, the motors might stop at different times or maybe not stop at all if there's enough momentum in the flywheel. This means the signal inputs might momentarily mismatch which you want to allow.
Now it's not clear why you want the whistle button to toggle the flip-flop when both signal inputs are 1 (when both motors are being driven). Aren't you saying above that you want the whistle button to work when the engine is in neutral?
Are you using some simple whistle detector circuit (like a R-C filter with a non-polarized C)? If so, you definitely want a circuit with hysteresis so you only get one edge for each button press. That is, you never get rid of all the line ripple so you might get the flip-flop toggling at 60 Hz when pressing or releasing the whistle button. So if this is the case, a Schmitt trigger gate or a comparator IC with hysteresis will solve that for 25 cents.
Power loss is no problem. It would just be a "large" capacitor on the power supply like 100uF. The power loss memory is one reason to use a 2N3904 or whatever to buffer the drive to the MOC. That is, if you directly drive the MOC from flip-flop output, then that power-loss capacitor would drive the MOC LED current during power loss which would drain it more quickly. That is, for the type of circuit I think you need that MOC LED draws more than 10x the current of the logic circuit meaning the capacitor would be 10x larger and to no end since you wouldn't have AC power anyway to drive the MOC load.
You probably need to filter the DC motor voltages. Share more specifics if you wish, but many motor drives as you well know are pulse-modulated. Given the speed of logic circuits, you might happen to press the whistle button in the microsecond or whatever that both motor drive pulses are "OFF" or 0 and falsely allow the flip-flop to toggle. But this is just a R-C so no worries there.
Also, it appears there's a reversing unit circuit involved. Shouldn't you be able to pick off a signal that indicates the circuit is in the neutral position? Likewise, if it's a logic-chip based circuit, then it must have the power loss ride-through capability and since your tack-on logic circuit draws negligible power (using CMOS ICs), then couldn't you use that power source?