Derby Timer, servo, led readout

I am new to working with Arduino. I’ve seen videos online of what I would like to do but never all off the same Arduino Uno. I was wondering what all is possible off of one of these micro controllers.

Servo- start Gate
Timer- auto start - led light /photo shut off
LED - Display read out of time

If someone could point me in the direction of how to best go about this and what all would be needed besides the hardware noted above.

Thank you in advance for any help.

It is very unlikely that you will find a project exactly like yours to copy. You can find the parts and play with them until you understand each one. Then it is much easier to put the parts together to realize the final project.

Servo- start Gate

Search for "arduino servo" almost 20 million hits.

Timer- auto start - led light /photo shut off

Explain what that means in more detail.
For timing use millis() or micros(). Delay stops execution so is to be avoided.
Non-blocking timing tutorials:
Several things at a time.
Beginner's guide to millis().
Blink without delay().

LED - Display read out of time

What kind of LED display? Number of digits? Type of interface? Size? Why not an LCD?
Again need more detail needed.

Thanks for the reply Ground.
Again new to this so thanks for baring with me.

So I have a Arduino Uno R3

Starting gate

  • I am looking to run off a SG90 Servo
  • Simple short movement to move starting device out of the way and allow cars to roll.

Stop watch/timing

  • looking for Millis
  • would like it to start on servo action
  • Thinking of using an LED/IR/photoresister to see car roll by and stop timer. (Please let me know if you have a preference on this)

LCD Screen.

  • LCD screen not LED.
  • type LCD1602

I also have a breadboard etc to get me going.

Hope this helps you understand a little better. Thank you

Can you make the Servo move using the example code in the Servo library?

Photoresistors are slow. Photo diodes and photo transistors are way faster.

When the car starts, save the start time using millis. When the car goes by the finish, save millis() to end time. The elapsed time is end - start.

In my opinion the hd4780 library is the best library for those displays. Install the library through the library manager of the IDE. I would recommend a LCD with an I2C interface. Much easier and uses only 2 pins.

Ok so I have all of my parts and pieces.
Arduino uno R3
LCD1602 + I2C
Photo diodes

Not so worried about the starting gate at this time but a good head start on getting this lcd track time to work would be a great help.

I am in need of some help in regards to a sketch and code for a photo resistor stop watch on both ends.

Materials I will be using
Arduino Uno
1602 LCD w/ i2c To display time. In milli.
Photo resistors
Other parts needed if needed I have a few things

Yes, that looks nice. What help do You need? Forum helpers seldomly have the same sences as mothers have.

I know in theory what they are all to do and how to hook it up. More looking for the code and copy a wiring plan.

Start timer. End timer. Photo resistor

Timing things going about 15-20seconds each. Want a break down.

You create the code not us. Just get into it and learn. You can use different example codes and learn from them.

It's pretty simple, thanks to millis(). Just record the value of millis() when the first cell triggers, wait for the second trigger and record millis() again. Subtract. Go for coffee...

Start timer. End timer. Photo resistor

You need to consider much more carefully the detail you put into descriptions so they are unambiguous.

The piece I have quoted suggests to me that the timer starts, the time ends and then something is done with the photo resistor.

Taking the time and expending the effort to write a full project description at the beginning saves a huge amount of time later on. We are now about 12 hours after your Original Post without any sign of progress whereas if you had written a full description at the start you could well have most of the solution now.


Thanks for the feedback.
You actually were able to pick up my project from my post.

I’m not looking for someone to do the work. Moreso I’ve seen a lot of these online with hotwheel/derby tracks and no one really breaking one down. Especially using photo resistors instead of buttons to start/stop. I have a very general understanding and wanted to see a similar set up on a breadboard to make sure I’m on the right path and now just looking to get this thing working.

I have a photo resister to start time.
Photo resistor to end time.
I would like to display these times on my lcd1602
“Time 0.000”

Thank you for taking the time and any direction you can point me is appreciated.

The lovely Lady Ada has a useful tut on ldrs here.

You might want to look at the state change detect tutorial: in principle, an ldr going from whatever reading is "light" for you, to "dark" for you, is no different than a button being pressed.

So when the start ldr sees a change from light to dark, capture the start time; same at the other end for finish.

Best lcd library is hd44780 by Bill Perry: install that from the ide at Sketch, Include library, Manage libraries and get your lcd working with a "hello world" before trying to print the times.

The lovely Lady Ada has a useful tut on ldrs here.

If the OP just wants to detect an ON or OFF signal the LDR can be wired like in the Adafruit analog example and read using digitalRead(). With a suitable choice of fixed resistor it should give a very reliable HIGH or LOW depending on whether it is covered or not. I have found a 68k resistor to be a good choice. IIRC high values make it work better in lower ambient light.



Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

GRR also duplicate topic MERGED.

After the merge I'm now confused.

Reason is, the thread I answered had an ldr at the start which in my mind captured the time at which the runner or car or block on a conveyor or whatever went past. But the other thread had a servo as a start gate to allow cars to cross the start line: in my mind that would need a start-person to press a button to open the gate and there would be no need for an ldr at the start.

So it could be that the OP is actually working on two projects. OP might like to clarify if it is two projects, or if it's one how it works with a start ldr and a start gate at the start.