SlotRacer Forum
Arduino expertise needed, please - Printable Version

+- SlotRacer Forum (https://slotracer.online/community)
+-- Forum: Racing (https://slotracer.online/community/forumdisplay.php?fid=27)
+--- Forum: Race Control (https://slotracer.online/community/forumdisplay.php?fid=37)
+--- Thread: Arduino expertise needed, please (/showthread.php?tid=4041)

Pages: 1 2 3


Arduino expertise needed, please - StuBeeDoo - 29th-Nov-23

My rally loop is controlled by an SCX Rally Chrono.  As you may be aware, the Chrono has limitations on the number of laps - 1, 5, 10, 15, or 20.  I can't remember what the limitation is on individual lap time, but I think it might be 9'59.99".  It would be nice to be able to have some track action a little different to what the Chrono allows.

I have an Arduino R3 Starter Kit that has sat unopened for at least 5 years and I would like to be able to use it to build a timer that would count-up to 20+ minutes with seconds to 2 decimal places.  I would want it to be powered from the track (ie, start when the track becomes live, and stop when the power from the Chrono is cut), but the actual feed for that I can work-out myself, utilising the existing track power taps.

But I've not got the foggiest idea how to assemble it and program it to do what I want.  I know I could trawl the 'net and, most probably, find instructions to do something broadly similar to what I'm after............

But has anyone here any experience with building Arduino timers??

Thanks in advance.


RE: Arduino expertise needed, please - Scuderia_Turini - 29th-Nov-23

Hello Stu,
Working with an Arduino can be tiresome but once it is working it should last a long time. The challenge is to get the code (aka Sketch) loaded in to the Arduino. Soldering up the sensors, switches and screen are straightforward.  I used the code created by SlingshotX  (Kevin) on the old forum. His package only does Lap limited timing so that may not suit you but its as simple as switching on the unit  then pressing a button to set the number of laps then pressing the Start button. 
For my purposes (Rally) I only wanted one lane so I crudely hacked Kevin's code to operate appropriately. 

Links to Kevin's and my post are below - you might remember them. 

First move is to load up the Arduino software to your PC then plug in the Arduino to a USB socket.  The Arduino package needs to be set to match your Arduino and the relevant USB Port.  This is where the fun starts because o lot of Arduinos are "compatibles" and finding the appropriate Windows Driver package might be difficult. With luck Windows will detect the relevant  driver software and install it but it may not appear in the list.  
The test is to see if you can load up the "Blink" example code <File>  >>   <Examples>>  >>  <Basics>   >>   <Blink>  again with luck you will get a blinking led on the Arduino.
Once you have the upload working you can try uploading Kevin's Sketch although it will probably fail due to the related "library" of code that matches the display screen (Kevin's recommendation) .  Other screens can be used but then you are on your own!

I like the SCX Chrono units but the reed-switch car detection can be unreliable if cars do not have a traction magnet so whilst it would be possible to use that I use Infra-Red Diode sensors and LED Light-bridge type arrangement or a proximity sensor (in the van). 

Leo

Kevin's Topic -  https://www.slotforum.com/threads/single-or-2-lane-lap-timer-for-%C2%9D20.78638
Scuderia_Turini Topic - https://www.slotforum.com/threads/slot-rally-timing-unit.79571/#post-892715

A stand-alone unit built as a shed (the pair of black dots are the proximity sensor):

[attachment=32724]

[attachment=32723]


RE: Arduino expertise needed, please - StuBeeDoo - 30th-Nov-23

Leo, thank you for your input.   Thumbup

With regard to the reed switch, I ditched mine and modified a Scalex. Sport lap counter.

I'll take a look at the links you posted, but I've found a book called Arduino for Dummies.  I think a copy would come-in handy...........


RE: Arduino expertise needed, please - Scuderia_Turini - 30th-Nov-23

Ultimately, using the Race Coordinator software is what I would recommend. Using an Arduino to provide the interface to the track sensors and relays works well. The more simple arrangement of using a Parallel Port interface still works if you have an older PC with such an port.

Recently I found "sideways looking" infra-red detectors that work very well and fit nicely below the track surface.  
Ebay Linky:  https://www.ebay.co.uk/itm/225484518933    These need an overhead light source but provide a silent car detection arrangement !!

Leo


RE: Arduino expertise needed, please - StuBeeDoo - 30th-Nov-23

Hhhmmmmmmm.  I will look into ^^^ that, if the spare laptop I have has a parallel port.

I had totally forgotten that I had read, and commented on, the posts you linked to on SFI.  Mind, it was back in 2017!


RE: Arduino expertise needed, please - dazee - 1st-Dec-23

For coding on the arduino I would recommend using chatgpt if you start from scratch. Just make sure you are specific with your requirements and you will get not only some really efficient code back, but also explanations on each section as to what it is doing.

Of course it won't help with the wiring, but is very good for the code.


RE: Arduino expertise needed, please - StuBeeDoo - 5th-Dec-23

(29th-Nov-23, 05:18 PM)StuBeeDoo Wrote:  ............SCX Rally Chrono.  As you may be aware, the Chrono has limitations on the number of laps - 1, 5, 10, 15, or 20.  I can't remember what the limitation is on individual lap time, but I think it might be 9'59.99".

Well, to satisfy my curiosity, I left it running today and it ran past 23mins.  My Arduino may well be gathering dust for a while longer.  I can get creative with the existing wiring and switching, plus a Scalex Sport lap counter, to make the Chrono think it's running a single 14-ish minute lap.

The only thing I did wonder about is how accurate the Chrono might be over that length of time.  But, at the end of the day, it's only me and my OCD that ever uses the track - so as long as it's consistent.................


RE: Arduino expertise needed, please - Scuderia_Turini - 7th-Dec-23

What controller are you using with the Chrono? 
I posted a video showing how to connect a Scalextric Sport unit so that the dynamic braking works.  Other resistor controllers could be connected in a similar way.  

Leo




RE: Arduino expertise needed, please - StuBeeDoo - 7th-Dec-23

(7th-Dec-23, 12:11 AM)Scuderia_Turini Wrote:  What controller are you using with the Chrono? 

I'm currently using a DS 45ohm, connected with a jack plug, Leo.   Yes  But thanks for posting the video.  Cool  It explains better than I could.

My Arduino book arrived yesterday.  I will get 'round to reading it sometime.  At the moment I'm in the process of fitting carpet on the parts of the attic floor I walk on, and the decal sheet for my latest batch of repaints arrived from Colin yesterday as well, so they are my next project.
Oh, and I checked the laptop I keep in the attic - it does have a parallel port.


RE: Arduino expertise needed, please - CMOTD - 7th-Dec-23

Use the parallel port, it is a hundred times simpler than Arduino set ups. You don't get the extra bells and whistles but you appear to only need something very basic.