2

I am trying to make a T-flip-flop circuit with a relay, which would:

  • toggle on a button press (12 V) [default state: off]
  • allow control from an external micro-controller (optocouplers)
  • allow switching between standalone button control and external control [if possible by signal rather than an SPDT switch]
  • allow the button to be read by the micro-controller
  • have very low-power consumption
  • bonus: after switching external->standalone, the status is remembered
  • bonus: simple, cheap, circuit with a n-MOSFET for driving the relay, embeddable many times on a PCB

However, I am having trouble with designing a real-life working circuit.


The first version I worked with didn't have the button connected to 12 V on one side, as it switched the two sides of the flip-flop.

My modified second version does work in theory in the simulator, however, it does not work in reality, which, I suppose is the result of non-ideal and complex workings of transistors.


I am also considering usage of IC flip-flops, however, I also had trouble designing something which would fulfill all the points.


For referring to the components:

circuit design

Note: this is a WIP drawing, the button and the relay will not be located on the PCB, etc...

Null
  • 7,448
  • 17
  • 36
  • 48
  • 1
    Where is the problem with D flip-flop like 7474 connected with negative feedback (Q_neg to D input)? It leads to nice one chip solution + NPN/NMOS for driving relay. Do not forget on RC button debouncing on Clk input for adding reliability. –  Nov 07 '21 at 00:38
  • There is 2 flip-flops in 7474. Use the remaining other for "debouncing switch". Use CMOS parts. – Antonio51 Nov 07 '21 at 09:48

1 Answers1

1

schematic

simulate this circuit – Schematic created using CircuitLab

Falstad's Relay T flop, my version.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182