# A riddle involves designing a circuit

#### puzzle

Joined Oct 30, 2016
53
Hi,

I'v been asked this riddle :
"Three horses are having a race. at the finish line of each lane there is a detector which gives a logical '1' when a horse crosses the line. design a circuit which will let you know which horse won the race"

I have a direction to solve this question but I'm not quite sure It's the best solution or the appropriate one so I would like to hear you suggestions.
My thought was to connect the 3 detectors (at the end of each lane) into the input of a decoder so by the output of the decoder we will know which horse won.

Thanks!

#### AlbertHall

Joined Jun 4, 2014
10,070
The first logic '1' has to latch which of the three it was and also disable the other two sensor inputs.

#### puzzle

Joined Oct 30, 2016
53
1. Can you please attach a plot of the circuit (schematic) ?
2. Does my approach (using a decoder) is wrong ?

Last edited:

#### AlbertHall

Joined Jun 4, 2014
10,070
This circuit works from phototransistors but the principle is the same:

#### puzzle

Joined Oct 30, 2016
53
I intended to a block diagram circuit and not a full detailed circuit. Just in order to get a big concept of how the circuit should look like and not in too detail...

#### AlbertHall

Joined Jun 4, 2014
10,070
You'll have to give more details for an answer to that question.

#### puzzle

Joined Oct 30, 2016
53
This what I meant :

#### AlbertHall

Joined Jun 4, 2014
10,070
What happens if lane 1 signal arrives first and then 1mS later the horse in lane 2 crosses the line?

#### puzzle

Joined Oct 30, 2016
53
OK, so what you say that after 1mS the decoder will set the wrong D3 to '1' because both lane1 & lane 2 has the logical value of '1' ?

#### AlbertHall

Joined Jun 4, 2014
10,070
Yup
In the circuit I posted, once one of the latches ('556) is triggered the diodes and the transistor disable all the inputs so the first output remains unchanged.

#### puzzle

Joined Oct 30, 2016
53
So can you please help me find the solution with a simple circuit ? I'm not looking for a detailed one with resistors etc... It has to be simple. How do you approach to this kind of a question ?

#### AlbertHall

Joined Jun 4, 2014
10,070
So is this homework help or are you actually designing a circuit?

#### puzzle

Joined Oct 30, 2016
53
Actually it's a question from an interview that I'm trying to figure out how to do.
I'm sure they are not expecting for a detailed circuit but to an approach, a way of thinking...
I was trying to understand what did you mean by :
The first logic '1' has to latch which of the three it was and also disable the other two sensor inputs.
and to draw a simple digital circuit but I didn't understand that...

#### GopherT

Joined Nov 23, 2012
8,012
I don't know of any horse races where each stays in their own lane.

@AlbertHall 's circuit is detailed, yes, but anyone applying for an electrical engineering job should be able to read from left to right and see exactly what is happening. In 5 blocks (6 if you include the manual reset).
The notes at the bottom add any clarity needed.

#### atferrari

Joined Jan 6, 2004
4,020
Alberto provided what you need. Understanding the functions would allow to move back to the function blocks you seem to need.

You are being lazy. You could be arriving the third in your race...

#### AnalogKid

Joined Aug 1, 2013
8,493
If you search for "game show circuit" you will get many designs ranging from neon bulbs to microprocessors. A common aspect of all game show circuits is feedback. Whichever lane trips first must be fed back to the other lanes to disable them. An example of this is the four 1N4148 diodes down the right side of the post #4 schematic.

ak

#### crutschow

Joined Mar 14, 2008
25,133
Basically your circuit needs some type of latch to detect and remember the winner, and then some additional circuitry to block the other lane latches from operating after the first one is latched.

#### hp1729

Joined Nov 23, 2015
2,304
This circuit works from phototransistors but the principle is the same:
View attachment 114460
It only locks out the other inputs for the pulse width of the timer. The timer needs to be a latch. But the idea is right. The first pulse in inhibits following pulses.

#### WBahn

Joined Mar 31, 2012
25,927
Actually it's a question from an interview that I'm trying to figure out how to do.
I'm sure they are not expecting for a detailed circuit but to an approach, a way of thinking...
Why wouldn't they be expecting a detailed circuit? It's a simple problem that you should be able to solve in less than five minutes. If they had had a small pile (only a half a dozen or so) of 7400 NAND gates and a few resistors and LEDs you should have been able to build it and demonstrate it in about the same amount of additional time.