I was asked if I could help with designing a tally light. I had never heard of a tally light before, so I first had to inform what it was and what it should do.
The tally light is a red indicator light that is mounted at the front side of a video camera above the lens. The tally light indicates if the camera currently is active and recording. In television studios where multiple cameras are used, the tally light indicates to the one that is filmed which camera is active at that moment. The operator selects the camera that he wants to route to the main video channel by pressing the button corresponding with the desired camera. At the same moment, the red tally light on the selected camera lights up.
The buttons are momentary switches that are pressed shortly to activate a camera. When one of the buttons is pressed shortly, the corresponding LED is switched on and stays on until another button is pressed. When pressing multiple buttons, still only one LED should be switched on. There is also a RESET button that is used to switch all LED (thus camera's) off. After power on, all LEDs should be off.
The circuit should be designed without using a microcontroller and with easy obtainable components, so anyone could make the circuit without needing knowledge about embedded software and programming. I realized that designing this circuit purely in hardware would be more challenging than just using an Arduino and 10 lines of code.
The power supply for the circuit should be in the range of 5V to 12V, so it could be used with a wide range of voltages. Well, this didn't seem like a complex task at first. So I started digging around on the internet using keywords like tally light, tally switch, radio button, interlocking switches. But to my surprise, I didn't find many useful circuits that matched the required specifications. Some circuits were build around a reset button that had to be pressed before you could make select another LED with one of the buttons of the radio button. Some circuits could not be expanded when you would need f.e. 8 buttons instead of 4. So I started my own design adventure. It was not a one-night adventure, because my first idea's didn't work properly and had some undesired visible glitches. After trying out some ideas, I found a way that worked pretty well and could easily be expanded. But the circuit needed more components than I expected. So the next step was trying to optimize the circuit to save components without compromising the functionality and expand ability.
Principle
To design a radio button, you need a memory element that is bi-stable or self-latching, so it keeps the current state until you unlatch or trigger it to toggle to the other state. This memory element can be a set/reset flip-flop (bi-stable multi-vibrator) or a D-flip-flop with a set and reset. The D-flip-flop needs a clock-pulse to latch the data, that is present at the moment that the clock pulse comes, to the output
A set/reset flip-flop can be made of transistors, logic ports (NAND, NOR, Inverting buffer) or even with an OPAMP.
The number of flip-flops that you need is equal to the number of momentary buttons that your radio button needs. The output of every flip-flop is connected to a LED (or to a transistor that controls a relay or LED). Next you need to find a way to reset all outputs at the moment that a button is pressed and at the same time set the output that corresponds with the button that is pressed. Even when 2 buttons are pressed simultaneous, only one output should win the battle. F.e. the one that was pressed first. This adds some extra complexity to the circuit because now timing is becoming a factor.
The diagram below shows the concept that I used for the radio button switch circuit. A circuit with 3 buttons is shown, but the circuit can easily be expanded for more buttons and outputs.
All 3 elements of the circuit above are equal. Let's focus on one of the elements to see how it behaves.
One terminal of the momentary button is connected to the positive power supply. When the button is pressed, a positive voltage appears at the other terminal of the switch. This positive voltage is present as long as the button is pressed. This rising edge of this positive voltage is delayed by a passive integrator (low pass filter) and is then send to the SET input of the flip-flop. The LED that indicates which button is pressed is connected to the output of the flip-flop. So when the button is pressed, the flip-flop is set after a short delay and the LED will light. At the same time that the button is pressed, the positive voltage also goes into a passive differentiator (high pass filter). This differentiator turns the rising edge of the positive voltage into a short pulse. This short pulse is then sent to the reset input of the other flip-flops and will reset all the flip-flops simultaneous. We needed to delay the set pulse to make sure that the reset pulse comes first and resets all flip-flops before the flip-flop, that corresponds with the button, is set.
So far, so good.
But when we press 2 buttons simultaneous, we will still end up with 2 LEDs lighting up. To prevent that from happening, we connect the inverting output of each flip-flop via a diode to each of the buttons of the other flip-flops. The polarity of the diode is so that when the inverting output of a flip-flop is low, it will pull down the button "output" of all the other channels low. When a flip-flop becomes set, it will disable all the other buttons, so only one output can be active at the same time. When multiple buttons are pressed simultaneous, the one that was pressed first will block all other buttons.
At power on, all flip-flops are reset via an additional differentiator that generates a short pulse on the reset input of all the flip-flops. This power-on-reset circuit is not shown in the concept diagram above. Also, the additional reset button, that can be used to reset all flip-flops, is not shown in the concept diagram. More on that later.
Note :
What happens when you make the SET and RESET input of the D-flip-flop high at the same moment ?
Well, the D-flip-flop that is used here will set the output when the SET and RESET input are both high simultaneous. The SET input has priority over the RESET input. That is why we need to delay the rising edge of the SET input and give a short pulse on the RESET. When a button is pressed, the RESET pulse will always come first to reset all the flip-flops before setting the flip-flop that corresponds with the button.
When the RESET pulse would come while the SET input was already high, the SET signal would override the RESET pulse. This would cause false triggers in certain situations:
Suppose the RESET is not a short pulse, but just stays high as long as the button is pressed. In that case, when f.e. pressing button 1, LED 1 will light and at the same time the RESET line would go high and stay high as long as button 1 is pressed. When you would press a second button, f.e. button 2, while holding down the first button, LED 2 would then also light together with LED 1. This is because the SET and RESET inputs of both flip-flops would then both be high simultaneous, resulting in the output going high (SET overrides RESET). LED 2 would go off at the moment that button 2 is released again, because the RESET input is still high (since button 1 is still pressed) while the SET input of flip-flop 2 goes low.
We don't want any situation where 2 LEDs can be on at the same time, no matter how many buttons we press simultaneous.
So that is why we need to make sure that the RESET pulse to all the flip-flops always comes before the SET signal when a button is pressed. That way, all flip-flops are reset before any of the flip-flops is set, so no 2 outputs can be high at the same moment.
Click here to download the schematic : Radio button circuit schematic
To protect the circuit against reverse polarity, a 200mA Schottky diode is placed in series with the power supply of the circuit. The power supply range for the circuit is +5V to +12V. A transistor is connected to the flip-flop outputs, so the output can drive a relais and the LEDs. Each of the transistors is protected against the inductive kick-back of the relais with a diode that is placed parallel over the relais-coils.
The power-on reset circuit is implemented using a passive differentiator that is connected to the power supply. When the power supply is switched on, this differentiator will generate a short pulse on the reset input of all the Flip-flops. The diode in series with the differentiator decouples the differentiator from the rest of the circuit, so it does not influence the reset pulses that are generated on the same reset line when a button is pressed. For the same reason, each of the differentiators that are connected to the buttons have a diode in series before connecting them together to the common reset of the Flip-flops.
I wondered if I could make the radio button using OPAMPs instead of digital chips. When using positive feedback with an OPAMP you can make a Schmitt trigger, but you can also make a self-latching circuit that stays in a certain state until it is triggered.
****** Under construction ******