1st time dreaming up a logic solution. Check my idea? **UPDATED** - Page 1
Forum section: electronics / projects

author: mkiijam
author_rank: Regular Contributor
timestamp: November 24, 2023, 03:43:25 am
content: This circuit is to "LOCK OUT" the lower switch if the upper switch is on. I've also implemented the function of FLASHING the upper LED when on and the lower switch is pressed.This would ultimately drive relays and as such I would have to separate the LEDs from the actual relay commands as "flashing" the relay will not be good. I have never designed anything with logic chips before, so looking for any and all feedback from any viewpoints, but real world application especially.The Chips in the middle are JK Flip Flops

author: wasedadoc
author_rank: Super Contributor
timestamp: November 24, 2023, 09:27:59 am
content: 1. That looks over-complex for the described functionality.2. What do you mean by 'FLASH'. I don't see anything which allows control of the time of a single pulse or series of pulses.

author: tooki
author_rank: Super Contributor
timestamp: November 24, 2023, 10:11:17 am
content: You can use a logic simulator to test whether it’ll work.With that said, your first step is to create a truth table for your logic states. If it looks complicated for what it is, try using a Karnaugh map to derive the simplest possible equation.I also don’t see a blink generator anywhere. Maybe there’s an oscillator hiding in that schematic, but without any delay elements, it’ll oscillate as fast as the logic supports, which would be invisibly fast.At least from your description, the logic here is so simple you could implement it using relays alone, avoiding the need to interface logic level signals and relays. If you use 12V or 24V, you could even use an automotive flasher module to accomplish the blinking.

author: ArdWar
author_rank: Frequent Contributor
timestamp: November 24, 2023, 11:10:10 am
content: I'm not sure what you're trying to do, but why do you even need a JKFF here? Are the input switches a toggle switch? Or do you want to make momentary contact pushbutton into toggle action?Anyway, feeding flip flop inputs and clock with the same (albeit delayed by one gate propagation) signal is something that may work but I personally won't use in actual product. Check if you can use latches instead of flip flop (after you figure out if you even need them in the first place)

author: mkiijam
author_rank: Regular Contributor
timestamp: November 24, 2023, 06:32:14 pm
content: Thank you all for the feedback so far.Here is the working file for a website / simulator called Circuit Verse. Zipped for upload.The purpose of the circuit is to lock out switch B when switch A is on, and indicate that a lock out situation exists by "flashing" the LED of switch A when B is pressed.The switches are, and need to be, momentary types. The relays are, and need to be, non latching types.I know VERY little about logic chips, so YES, I have no idea if there is a smarter way to do this with different gates or whatever. I played with circuit verse's simulator and the "chips" they offered until I found one (JKFF) that would latch and flip the way I wanted.Trying the simulation for yourself would be best, but I will try to describe it here:SWITCH A is a switch that can be turned on or off without consequence to the device that this will go into. i.e. it won't hurt nothin.SWITCH B, however, will do bad things if it is switched when A is on.Turning A ON will lock B to whichever state it is currently in, ON or OFF.If one tries to switch B when A is on, the the LED for A will "FLASH" with each press of B to indicate there is a lock situation.To solve the lock out "ERROR" one just turns A off, switches B to what they want, and then is free to turn A back on.I hope this makes sense.There are many ways to solve this, and yes, I have dreamed up mechanical ones with just relays(although not yet with the flashing LED idea.)This is a bit academic now, as I would love to learn about LOGIC chips. I find this world facinating.

author: mkiijam
author_rank: Regular Contributor
timestamp: November 24, 2023, 08:09:32 pm
content: Here is a much simpler one with D- Flip Flops. How about this?