How do you choose the correct components?

I have an idea that uses this https://www.google.com/url?sa=t&rct...g2X5QB5FavtRAflYA&sig2=7dHHmLOowieXYo91M7Ez5A as a basis.

One, I'd probably square up the inputs with schmidtt trigger and essentially remove the enable.

(A) 1st create a counter (FF) that starts at zero; so 0, 1 and 2

Create two sets of latches instead of 1. The enable for the latch would come from the counter.

OR all of the outputs to clock the input to the counter on an edge and strobe the latch.

In the simplest implementation, you can use LED colors to indicate places. e.g. GREEN #1, YEL #2, RED #3. LEDS are cheap and drivers are cheap. The ULN2803 or ULN2003 or similar parts can drive a LED. So can an open collector inverter.

For a little fancyness you can use 7 segment LEDS to indicate 1, 2nd and third place by lane #.

The basic idea again is 2 or three sets of latches (1st, 2nd and third place) and a counter for place #. You effectively latch the lane # and increment the place #.

What you end up with is a bunch of latched signals for 1st, second and third place.

The number of places and number of lanes changes the complexity.

Or you might be able to use somehting like:
1) 1st place was found, enable the second place
2) Second place was found, enable the 3rd place.

So, the circuit is pretty similar.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
I have an idea that uses this https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0ahUKEwjK8ZOWo4zMAhXMFJoKHce9CrwQFggqMAQ&url=http://www.zen22142.zen.co.uk/Circuits/Misc/quiz.htm&usg=AFQjCNFCJIqTNGlw9g2X5QB5FavtRAflYA&sig2=7dHHmLOowieXYo91M7Ez5A as a basis.

One, I'd probably square up the inputs with schmidtt trigger and essentially remove the enable.

(A) 1st create a counter (FF) that starts at zero; so 0, 1 and 2

Create two sets of latches instead of 1. The enable for the latch would come from the counter.

OR all of the outputs to clock the input to the counter on an edge and strobe the latch.

In the simplest implementation, you can use LED colors to indicate places. e.g. GREEN #1, YEL #2, RED #3. LEDS are cheap and drivers are cheap. The ULN2803 or ULN2003 or similar parts can drive a LED. So can an open collector inverter.

For a little fancyness you can use 7 segment LEDS to indicate 1, 2nd and third place by lane #.

The basic idea again is 2 or three sets of latches (1st, 2nd and third place) and a counter for place #. You effectively latch the lane # and increment the place #.

What you end up with is a bunch of latched signals for 1st, second and third place.

The number of places and number of lanes changes the complexity.

Or you might be able to use somehting like:
1) 1st place was found, enable the second place
2) Second place was found, enable the 3rd place.

So, the circuit is pretty similar.

This one looks very simple also. Interesting. I only have 3 lanes, so I wonder if it would have to have 4 to complete the run?

I have never worked with flip flops. I understand the basic principle, but it would be new to me for sure.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Think I'll go the Mr. Chip circuit route.

I should not have waited so long to try and put this together so I could play around with it more. I guess if all else fails I can just borrow a PLC from work and write a simple program for it.

Thanks a bunch guys.
 
This one looks very simple also. Interesting. I only have 3 lanes, so I wonder if it would have to have 4 to complete the run?

I have never worked with flip flops. I understand the basic principle, but it would be new to me for sure.
That circuit was a quiz show deal. Who is first. No second, third or fourth.

It just has some of the very basics of doing multiple lanes. I'm sure everyone would really like to have the times.

Flip flops care a lot about "edges" of the signal. In order for the "edge" to work they need to be fast rising or falling.

There are three basic types:
D - this is a simple latch
S/R or set-reset
and then the
J-K

These have a Q and ~Q output and have an independent Set and Reset input. The other inputs called J and K and a clock. So J turns on Q on the edge of the clock and similarly for K and ~Q (Not Q). If J and K are both the same the output Toggles.

So, I was suggesting the LED color to indicate 1, 2 3, 4. So you would mount 4 LEDS for each track. So, both color and position would indicate 1, 2 3 and 4. Or you could stick to position or use 70segment LED's to indicate 1, 2 3 and 4 with a little more logic.

The way you indicate who wins and how viewable it is could be important too.

The other chip that would be useful is a "Priority encoder". They usually take 10 inputs and create a BCD number out, but if 2 inputs are on, the lowest number (I think) is output. i.e a line representing 5 and a line representing a 2, only one wins.

A "trick" that can help you with logic uses a data selector/multiplexor. You can use them to directlyimplement a truth table. So, if you had two address lines for a 4 to 1 data selector. The address would be the "inputs". So, if 00 was supposed to output a 1 and 11 was supposed to output a 1 and all the other combinations would output a zero. You just set the 00 and the 11 addressed data to 1's and all the other addresses to zero. So, it's a great way of cheating. You don't have to learn Karnaugh maps etc.

There's an entire design process for Asynchonous machines too which have a lot of previous state/next state and transitions.

The "quiz circuit" just tells you who's first.
 

MrChips

Joined Oct 2, 2009
30,712
Design and construction notes

The design is intended to be used with a standard 9V battery. You could put an ON/OFF switch in the circuit but it isn't a necessity. Just remove the battery from the battery clip when not it use or install the switch if you are going to put every thing in a small case.

Any silicon signal diode will do, e.g. 1N914 or 1N4148
Any NPN small signal silicon transistor such as 2N3904 or 2N2222. Always check the pin-out of the transistor before using.
It is a good idea to use 14-pin DIP sockets for the CD4013 dual D-type flip-flops.

The schematic shows two capacitors, 0.1μF and 10μF, across the battery.
More specifically, you want one 10μF-100μF 16V electrolytic (aluminum will do) across the 9V and GND lines.
Then add one 0.1μF (100nF) ceramic (16 to 50V will do) across pins 7 and 14 of each of the three 4013 dual D-type flip-flops.

The LANE inputs are expected to be positive going signals coming from the collector of photo transistors with suitable pull up resistors (10kΩ - 47kΩ).

I assumed that the unit with LEDs would be mounted on a frame hanging over the tracks so that the LEDS will be directly over the three lanes.
Choose whatever color pleases you for 1st and 2nd place.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Design and construction notes

The design is intended to be used with a standard 9V battery. You could put an ON/OFF switch in the circuit but it isn't a necessity. Just remove the battery from the battery clip when not it use or install the switch if you are going to put every thing in a small case.

Any silicon signal diode will do, e.g. 1N914 or 1N4148
Any NPN small signal silicon transistor such as 2N3904 or 2N2222. Always check the pin-out of the transistor before using.
It is a good idea to use 14-pin DIP sockets for the CD4013 dual D-type flip-flops.

The schematic shows two capacitors, 0.1μF and 10μF, across the battery.
More specifically, you want one 10μF-100μF 16V electrolytic (aluminum will do) across the 9V and GND lines.
Then add one 0.1μF (100nF) ceramic (16 to 50V will do) across pins 7 and 14 of each of the three 4013 dual D-type flip-flops.

The LANE inputs are expected to be positive going signals coming from the collector of photo transistors with suitable pull up resistors (10kΩ - 47kΩ).

I assumed that the unit with LEDs would be mounted on a frame hanging over the tracks so that the LEDS will be directly over the three lanes.
Choose whatever color pleases you for 1st and 2nd place.

Superb. I think I would be hard pressed to find anymore questions that what you have already answered.

I really like the 9v battery part of it. That will make it very handy. I will be putting everything in a box for sure. This will need to stay with the track, and who knows who all will be handling it. Not everyone knows about static electricity and IC's.

Yes, the LED's will be over the track and I had settled on the same colors as you used. I figured they would be distinct enough between which is first and which is second. If I have time, I might cut out the numbers 1 and 2 in some sort of box and mount the LED inside. But color indication will at least get the job done.

I'm ordering parts today. Should have something to show next week.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Ok. Found one question.

I had 'planned' on using ambient light sensors available at Radio Shack. However, I am ordering the rest of the stuff online so I figured I would order it all online.

As I was looking, I got to thinking is using the ambient light sensors best/easiest, or should I go with a true IR photo transistor? The cars will be moving pretty quick across it so it needs to be fast acting. I have seen circuits for this application use ambient light sensors, so I assume they will work?

I found one ambient light sensor, but it only had a CE voltage max of 6v. But then I am seeing a bunch of IR receivers, however my plan was just to mount a bright light over the track so I did not have to worry about lining up IR receivers/transmitters (I have tried this once before many years ago with little success).


Any thoughts?
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Maybe a laser diode above the track? Wouldn't this work to trigger a IR photo transistor? It would help tremendously in alignment of the sensor and it would look cool to the kids.

Or am I not thinking correctly on this part?
 

MrChips

Joined Oct 2, 2009
30,712
Hmmm, I hadn't given this much thought.
You will have to experiment with this one.
I would go with a regular photo transistor recessed in the track.
Then use a bright LED above the track, one LED per track.
You want the brightness of the LED and the photo-transistor load resistor adjusted so that you get lower that 3V output with no obstruction and higher than 6V with car over the hole.
Start off with a load resistor of 470kΩ and then measure your two voltages. Adjust the resistance for optimum voltage range.
Time response will be shorter with lower resistance values.

Lasers are not a good idea for safety reasons where youngsters are involved.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Hmmm, I hadn't given this much thought.
You will have to experiment with this one.
I would go with a regular photo transistor recessed in the track.
Then use a bright LED above the track, one LED per track.
You want the brightness of the LED and the photo-transistor load resistor adjusted so that you get lower that 3V output with no obstruction and higher than 6V with car over the hole.
Start off with a load resistor of 470kΩ and then measure your two voltages. Adjust the resistance for optimum voltage range.
Time response will be shorter with lower resistance values.

Lasers are not a good idea for safety reasons where youngsters are involved.
Ok. I wasn't thinking the lasers would be high powered ones, just pointing down into the recess in the track, but I can see where they would reflect off some car surfaces and could be directed into an eye..... Thanks for bringing me back on track. Sometimes what you think would look neat isn't best.

I guess I am just having trouble picking out a photo transistor. There are so many of them online. I have heard some do not work well with ambient light, some have to have a specific type IR emitter paired with them, etc.

I'll keep digging.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Does the color of the LED above the track matter? Just so long as its super bright? I am seeing LED brightness charts and they are showing some yellow LED's as really bright compared to other colors.
 

MrChips

Joined Oct 2, 2009
30,712
The schematic image is missing a few lines, but I get the gist and it is the same thinking.

ak
That's what happened when I tried to apply a transparency. I don't know how to put a watermark on the schematic.
But as it is that is a good thing. I don't want students and other websites to copy the schematic wholesale.
If you follow the rest of the schematic you can get the idea and fill in the blanks.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Got everything ordered. Then, when I went to just double(tripple) check after placing the order, I found out that I left off the 10uf caps. That was the last thing I was looking at so I must not have added it to my cart. I really need to not rush things around.

Anyways, Mr Chips, you said I can use anything from 10-100 uf correct? I have a bunch of electronic stuff laying around I have used in the past for robbing parts off. Just want to make sure that any cap in that range will work.

Thanks.
 

MrChips

Joined Oct 2, 2009
30,712
Got everything ordered. Then, when I went to just double(tripple) check after placing the order, I found out that I left off the 10uf caps. That was the last thing I was looking at so I must not have added it to my cart. I really need to not rush things around.

Anyways, Mr Chips, you said I can use anything from 10-100 uf correct? I have a bunch of electronic stuff laying around I have used in the past for robbing parts off. Just want to make sure that any cap in that range will work.

Thanks.
The power supply filter caps can be left off for now while testing.
Just about anything from 1μF and up will be ok. You will never see the difference. It is there just to make the OCD QA engineers happy :).
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
The power supply filter caps can be left off for now while testing.
Just about anything from 1μF and up will be ok. You will never see the difference. It is there just to make the OCD QA engineers happy :).
I see. I have some of those barrel caps laying around, but I know that they have a positive and negative leg, which is usually indicated on a circuit schematic. Your schematic did not show that, and me being a circuit/engineer dummy, did not know if you can put a cap with pos/neg legs into this type of circuit.

If that all makes sense. I hope that all came out alright.
 
Top