0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

I'd like to actuate a relay using a controller output that is already in use by another part of my system. This output is supposed to stay true during normal operation, but I can flash it to false then back to true without affecting the function of anything else.

So my idea is to use the quick turn-off/turn-on of this output from my controller to actuate a bistable relay for another output, as I am running out of outputs on my controller. I've tried using a flip-flop in toggle configuration but the low-high transition of the clock signal is not affecting the outputs in any way.

Could this be because I am leaving the signal high and not actually giving it a "pulse"? Is there a maximum width associated with clock pulses?

I selected the SN74HC109 from TI and, according to the truth table, if I drive /PRE, /CLR and J high (5 V) and drive K low (0 V) then when CLK goes from 0 V to 5 V, it should swap the states of Q and /Q. But I am not seeing any changes to Q and /Q on the rising edge at all.

The datasheet is listed here: http://www.ti.com/lit/ds/symlink/sn54hc109.pdf

\$\endgroup\$
  • 2
    \$\begingroup\$ Welcome to the site. It's a confusing text without a schematic there. Please can you edit your question and add a schematic. The schematic editor here is a breeze to use. The better the quality of your question, the better the quality of the answers you will attract. Again, a warm welcome to the site. \$\endgroup\$ – TonyM Jul 17 '19 at 22:27
  • \$\begingroup\$ Which controller? \$\endgroup\$ – Bruce Abbott Jul 18 '19 at 1:37
  • \$\begingroup\$ Hi, thanks for your response, I added a schematic but it's not complete because the actual IC has more pins than the component in the schematic editor. Also my component has a /K while this one has a K. In the datasheet, I have pins 1, 2, and 5 held to 5V, and pins 3 and 8 held to GND. I did some more research and thought maybe the signal was too unstable and had some bounce, so I've added R2 and C1 since asking the question. Now I am able to toggle successfully on rising edge, but it also toggles on falling edge, which defeats the purpose for me. \$\endgroup\$ – weezull Jul 18 '19 at 16:50
  • \$\begingroup\$ If you need more outputs on a micro, a multiplexer might be a good way to go. \$\endgroup\$ – Voltage Spike Jul 18 '19 at 17:01
  • \$\begingroup\$ Any idea why it's triggering on falling edge now as well? \$\endgroup\$ – weezull Jul 19 '19 at 17:14
-1
\$\begingroup\$

I'd recommend adding a simple inverting buffer. First, it will toggle on falling edge of your output. And second, it will condition unstable signal to some extent. Inverting Schmitt trigger will do even better in that respect.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks I have a comparator lying around I will try a Schmitt trigger, but why inverting? I want it to toggle on rising edge rather than falling edge, so in that case non-inverting would be better, no? \$\endgroup\$ – weezull Jul 18 '19 at 17:30
  • \$\begingroup\$ Why, though? An inverter won't do anything here, it's input is the same as that on the TFF. The edge polarity can be changed by moving the switch from CLK-5V to CLK-GND and moving the R's and C. A Schmitt trigger can be beneficial with the right input circuit but that's not your main point. Downvoting until improved, I'm afraid. \$\endgroup\$ – TonyM Jul 18 '19 at 22:07
  • \$\begingroup\$ @weezull as I understand your question, your control signal is normally high ("true"), and you want to use quick low ("false") pulse to control trigger. The inverter will convert this into normal low with quick positive pulse, triggering SN74HC10 on rising edge and keeping it there afterwards. This just better conforms to the chip logic. \$\endgroup\$ – Maple Jul 19 '19 at 20:54
  • \$\begingroup\$ @TonyM if you read question and comments under it carefully, there is no actual "switch". The schematics in the question is merely approximation of the actual circuit, using different flip-flop IC, by the way. The actual circuit apparently has some kind of normally-high "signal" which the OP tries to use to control toggle. The Schmitt trigger will condition signal and inverter will make it normally-low, which is better for positive-edge-triggered flip-flop. Since there are chips that combine both functions it makes sense IMHO to use one. \$\endgroup\$ – Maple Jul 19 '19 at 21:03
  • \$\begingroup\$ The question says normally high, active low, fair point. But he comment under it says, "I did some more research and thought maybe the signal was too unstable and had some bounce", so it sounds like mechanical contacts to me. An inverter will pass on bounce and you show no example circuit for filtering that along with a detailed description, just a couple of sentences. Sorry but that doesn't consitute an answer, should be a comment. \$\endgroup\$ – TonyM Jul 23 '19 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.