PROBLEM SOLVER NEEDED: How can I create a slot car pit stop counter and timer??? Novice

Mark Swasey

Joined Sep 22, 2019
6
Hello,

I have a 1/32 scale analog 2-lane slot car track. It has a pit lane, power is 12-18 volts dc.

I want to create a circuit that counts how many times a car stops in its pit box and counts how much time
the car remains stationary in the pits.

The circuit is will be independent by itself. Except for input voltage.

The driver needs to be able to select pre-race how many pit stops he does before the race, 0-5, each lane may
select different options. It cannot change after race starts. This setting will change each race based on handicap.

Each driver needs to be able to select how many seconds he spends in the pit box stopped cumulative time
between 0-60 seconds.This setting will change each race based on handicap.

Single photocell in each pit box to trigger counter and timer.

For each lane, LED display for stops still required based on pre-race selected pit stops. Counts down.

For each lane, LED display for how much time still required to be stationary in pit box from pre-race time selection.
Counts down.

EXAMPLE: Red Lane pre-race selects 3 pit stops, Blue Lane selects 2 pit stops. Based on car handicaps, Red lane car
needs to spend 16.5 seconds stationary in pit box during race, Blue lane car needs to spend 9.2 seconds stationary in pit
box during race.

Mark

Sensacell

Joined Jun 19, 2012
2,933
Sounds like a job for a microcontroller.

You could do it with discrete logic chips- but the end result will be a complex circuit to match your functional requirements.
Doing this in software is much simpler and more flexible.

Consider an Arduino and a compatible display module- available off the shelf.

Mark Swasey

Joined Sep 22, 2019
6
Sensacell,

Thank you, I have been just learning about Arduino, I think aabout buying a kit online to place
with it. Could you suggest a link to something that would work for me?

Thank you!
Mark

dl324

Joined Mar 30, 2015
13,846
with it. Could you suggest a link to something that would work for me?
I've been buying Arduino Uno clones from Ali Express for around $3. They all use a cheaper chip for serial, and you'll probably have to download the driver. This one is$2.65 shipped. I just received two of them today and did a quick test to make sure they weren't DOA.
https://www.aliexpress.com/item/33009726379.html?spm=a2g0s.9042311.0.0.63ef4c4dmfK73v

I find the IDE to be the least reliable part of Arduino...

Mark Swasey

Joined Sep 22, 2019
6
What about touch screen display so I can set pre-race options? How does that work? Ali Express option?

Sensacell

Joined Jun 19, 2012
2,933
Unless you are a really skilled programmer, avoid being tempted by touch-screens and fancy graphics.

The sad truth is that the coding for a touch screen is about 100X harder than the entire logic of the counter you want to implement.
Keep it simple, use a 7-segment LED display and some switches.

Mark Swasey

Joined Sep 22, 2019
6
OK, thank you Sensacell, I do want to keep it very simple. lets chat about that, just push
a button 0, 1, 2, 3 , 4, 5 to change required pit stops on LED display, push to save for lane 1???
Then repeat for for lane 2.
Now for time stationary in pit lane, with handicap, IT WILL always be in seconds, with tenths,
15.2 seconds for one lane, 13.1 seconds for second lane, next race may be 14.1 seconds for
one lane, 9.7 seconds for second lane. Two rotary switches to set time, then press save
somehow?
Another common race is between computer controlled car and human driven car.
Computer driver pre-selected settings: 0 required pit stops, 0 required time in the pits,
Human driver, pre-selects 2 pit-stops, and 10.4 second required in the pits.

I preferred physical switches vs touch screen is to accomplish this! Settings cannot
be changed after race starts.

Thanks again,
Mark

Picbuster

Joined Dec 2, 2013
1,027
Hello,

I have a 1/32 scale analog 2-lane slot car track. It has a pit lane, power is 12-18 volts dc.

I want to create a circuit that counts how many times a car stops in its pit box and counts how much time
the car remains stationary in the pits.

The circuit is will be independent by itself. Except for input voltage.

The driver needs to be able to select pre-race how many pit stops he does before the race, 0-5, each lane may
select different options. It cannot change after race starts. This setting will change each race based on handicap.

Each driver needs to be able to select how many seconds he spends in the pit box stopped cumulative time
between 0-60 seconds.This setting will change each race based on handicap.

Single photocell in each pit box to trigger counter and timer.

For each lane, LED display for stops still required based on pre-race selected pit stops. Counts down.

For each lane, LED display for how much time still required to be stationary in pit box from pre-race time selection.
Counts down.

EXAMPLE: Red Lane pre-race selects 3 pit stops, Blue Lane selects 2 pit stops. Based on car handicaps, Red lane car
needs to spend 16.5 seconds stationary in pit box during race, Blue lane car needs to spend 9.2 seconds stationary in pit
box during race.

Mark
Please correct me if I did not understand it well
You want a number of counters
Each counter will append pit time associated with the car and lane involved.

[Car number] [sum of Pit stop times] [lane]
If this is true no problem so far.
questions;
How accurate mS/ Second/ minutes?
How to detect the Car number (automatic)?
When is the counter to start ( when it stops or enter the pit at a certain point )?
Same question for departure.
Error recovery and data integrity question.
maybe more questions to come.
Please don't get me wrong but no solid help possible without sufficient information provided.

If this application fails a winner might lose and a loser might get the glory ( a war is born)

Picbuster

Sensacell

Joined Jun 19, 2012
2,933
Drawing a system diagram is always a good start.
Define your user interface very carefully and document how it's supposed to work.

Then list out all/any other design parameters you require.

Mark Swasey

Joined Sep 22, 2019
6
Hello helpers, I drew out a sketch of the project and made some notes. I am thinking Arduino
Again thank you for your help! The novice.

Sensacell

Joined Jun 19, 2012
2,933
A start...

Can you refine and organize the ideas a little more clearly?
Bullet point list of features...
Write it into a word document, include pictures or drawings. You cannot begin any design until this is sorted.
Keep updating this document with every detail of the design.

Looks like you need 2 identical units? do they interact at all?

2 Separate displays each? 1 X 7 segment and 5 X 7 segments?
How large? what color?
Rotary switch?
How do you reset it?

Create a flow chart of how it's supposed to work.

Mark Swasey

Joined Sep 22, 2019
6
>Sensacell, Yes I am steal sneaking up on the project, thank you for your refinement questions!
See some answers and responses below. Mark

A start...

Can you refine and organize the ideas a little more clearly?
Bullet point list of features...
White it into a word document, include pictures or drawings. You cannot begin any design until this is sorted.
Keep updating this document with every detail of the design.

Looks like you need 2 identical units? do they interact at all? >Yes 2 identical units, no interaction between
the two except that they share the same dc power source.

>I will answer the following questions below based on 1 unit. Knowing I will be building and using 2 identical units that don't interact.
2 Separate displays each? 1 X 7 segment and 5 X 7 segments? >Yes, as shown on sketch above, from left to right, rotatory switch with 6 positions, then a display about 1/2" wide by 1" tall, red letters, black background, this display shows the number selected on the rotary switch and counts down each time the car covers the photo cell in the track for more then 1/2 second.

ERROR ON MY PART IN THE SKETCH: See Green Rotatory Switch on update sketch. This rotatory pre-race sets total time car
needs to stay stationary in the pits, its counts down and makes a tick sound every second, the maximum time it can be set is 0:0:59.999 seconds (59.999 second, minimum time is 0 seconds), it s display will be 1/2" wide x 1" for each didget, white letter on black back ground.

How large? what color? Answer included above

Create a flow chart of how it's supposed to work.
Great advice, I will work on that and point it in the next day or two. Mark

BobaMosfet

Joined Jul 1, 2009
1,917
Mark,

Great idea. If you look at mouser.com (or digikey.com) you an find rotary switches that will do what you need-

I would strongly recommend determining the best method for telling if a car is going over, or is stopped in the pit. You can use infrared led & sensor for pass over, at start and beginning of pit zone, or possibly a hall-sensor for magnetic to register body of car going over if there is metal (like the contacts or a magnetic field from the motor), or you might even be able to do some sort of capacitive sensor, such that not only can you tell when in the pit, you can tell where in the pit they are.

Display-wise, keep it simple. 7-segment displays:

Plus, they have that race-track look. You can get assorted colors (yellow, green, red, blue, etc). Or you can go with dot-matrix types of LED displays and scroll and create your own letter patters. If you use RGB LEDs, you can control color as well.

It really depends on the level of complexity you want to go for. You can multiplex using shift registers which also have the advantages of being able to hold a steady state, depending on which you use.