How do you choose the correct components?

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Hello guys. I think I have gotten close to my goal but would like some help with it. I used a online circuit simulator program to develop it. I am not sure how accurate it is, or if it would tell me if something is impossible(it does seem to indicate obvious errors). Here is a picture of it.

Screenshot (40).png

In the online simulator, it seemed to work. I could not tell if there was an issue, the simulator seemed to be bogged down with each lane I added.

I am trying to put together a simple circuit for a three lane pinewood derby track finish line. I have found multiple types of circuits that come close to what I am wanting, but nothing exactly. If you guys could tell me that this looks doable, and help me pick out the components that would make it work, I would be very grateful and so would around 60 or so kids that will be racing their cars.

The idea is there is a main power/reset switch, that will be pushed after each race. I can see where this might need to be located in a different position, or even have one for each separate circuit.

The other three switches will be photo transistors(I just used push button switches in the simulator). Triggered by the car passing over the top and blocking out ambient light.

Then each lane will have two LED's. One is for first place, the other is for second place. The third place lane will have no LED lit.

The idea is that once a car triggers the first place LED, then it "locks" out the other lanes first place LED. Then the next car will trigger the second place LED, and lock out the others.

I needed a way to see first and second, and I only could find circuits that showed first place winners. I have seen cars come very close at the finish line and this will save a lot of arguing I hope.

Please, if you guys could, help me out. I am not sure how to spec out what transistors and mosfets I need. And of course, if there is an easier way, please by all means let me know. Thanks a bunch.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
I'll be honest, I am very new at circuitry. I could write a PLC program(using ladder logic) in a very short time, but when it comes to actual components, I know very little. In fact, I have never messed with a mosfet chip before, just realized it would let me do what I need.

I have worked with some NAND gate logic using CD4093 IC's. I tried using that, but wound up short. One important part of the circuit is that the switch for each lane is a momentary one(as the car passes over the photo-resistor). So the circuit has to latch.

I am all ears if you could give me a direction to look, but to answer the question specifically, I do now know anything about 74 or 4000 series chips.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Well, guess that just goes to show you how illiterate I am. I guess I have indeed thought of 4000 series chip(CD 4093 - duh.....), but I could not figure out how to make it work.

I figured it would be better if I could, if you see a simple way of doing it please please show me an example, I would be very appreciative.
 

blocco a spirale

Joined Jun 18, 2008
1,546
I don't have a ready-made solution but if you forget the hardware for a moment and first solve the logic (and I think you may have already done that to some extent), it would be relatively easy to implement in hardware using logic gates.

I think timings may be tricky because each lane indicator can both read and set the "1st" and "2nd" lines.

The mosfets appear to give an AND function since they are in series.
 

dl324

Joined Mar 30, 2015
16,846
Using IC's would simplify your wiring. You'll need to add some flip flops to latch the LEDs.

Indicating finish order will be an interesting problem.

I know what you mean about arguing over finish order. My Son was "robbed" of a 1st place finish because another child said he finished first and the person recording results took his word for it. That was the tipping point for my Son and he quit Tiger Cubs with my support. I didn't like what I saw going on on numerous occasions, but waited for my Son to decide it wasn't for him.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
I don't have a ready-made solution but if you forget the hardware for a moment and first solve the logic (and I think you may have already done that to some extent), it would be relatively easy to implement in hardware using logic gates.

I think timings may be tricky because each lane indicator can both read and set the "1st" and "2nd" lines.

The mosfets appear to give an AND function since they are in series.
Actually, the mosfets give an OR function. Each one, on the first place LED circuit, is fed from the first place LED circuit from the other two lanes. If you do not separate them then weird stuff starts to happen.

But I suppose I can substitute 2 IC's in place of the 15 mosfets. That does help a lot. As long as I choose the right IC. The two inputs to a OR gate are kept separate correct?
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Tried putting in the OR gate. No go.

The mosfets are used as a permissive switch. I am not sure how to make the logic gates do the same thing. Guess I need to play around with it.

As far as the current circuit goes. Aside from changes that could be made to make it simpler, can anyone suggest actual product numbers for the mosfets, transistors, and LED's? I would like this to run on a 12vdc power supply.
 

dl324

Joined Mar 30, 2015
16,846
can anyone suggest actual product numbers for the mosfets, transistors, and LED's?
N channel MOSFET - 2N7000
NPN BJT - 2N3904
PNP BJT - 2N3906
All about a nickel each in qty 100.

LEDs - What color, intensity, size do you want?

But you're going to need flip flops/latches to save finishing order and steering logic to indicate finishing place.

You could use optical sensors, but you'll need circuitry to compensate for ambient light level.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
Thanks. LED's, white would be fine, or I can make red work. They are just indicative and I'll know which one is first and which one is second. Of course, the brighter the better.

As far as flip flops/latches, the circuit seems to latch as it is? At least it does in the simulator. Here is a link(if it works) to the simulator/project. It is on falstad.com.

As far as the optical sensors, I was wanting to just use them in place of the three switches. I figured I might have to use another switching circuit using another transistor, but if I can make it work without that would be great. I have never played around with them before.

http://www.falstad.com/circuit/circ...64+288+0 w+32+288+32+144+0 w+32+144+80+144+0
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
once you go to the link, you have to hold your mouse over one of the switches and press it to close the circuit. Then to reset you either release the main switch, or push reset in the top right hand corner of the simulator.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
what about using a photocell instead of an ambient light sensor? Would a photocell work in place of the push button switches? May have to play around with resistance values, but I'll have a constant source of light above the track, so the light will remain the same regardless of where its used(it will always be used indoors).
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
I guess to be clear, the mosfets are P channel, not N.

I've played around with it. Still cannot see how to use IC's.
 

Thread Starter

TwoTon

Joined Aug 6, 2015
119
I had, and did again last night just in case I missed something. Unless I am missing something, this is a more involved project than I would like to do. I want a simple 1st and 2nd place indication, no need for run times and such. But, I could see making one like that in the future.

I sat back and thought about it all and realized that the requirements are low. So like was already commented, very basic components will work.

If I could wrap my mind around another circuit design I saw that does use IC's, but only shows first place, and add more to also show second place, I'd go that route. I know IC's would make the board much cleaner.
 

bertz

Joined Nov 11, 2013
327
Actually, the cleanest arrangement is to use a microprocessor (Picaxe or Arduino) but so many people get freaked out when you mention programming. I know, I used to be the same way until I discovered how much easier life can be using microcontrollers. In fact the Arduino turned out to be easier to work with since so much of the heavy lifting is already done for you.

What I discovered when I went through this same exercise was that order of finish was actually more complicated than simply recording the elapsed time.

If you insist on using ICs I have attached a flow chart to help you through your thought process. Good luck!
 

Attachments

AnalogKid

Joined Aug 1, 2013
10,987
I have a solution, but it has three 4013 dual flipflops and at least two gate packages. Seems like a lot of parts, so I'll wait to see if something more simple comes along.

ak
 
Top