Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Race Coordinator Arduino Uno Clone Set-up with Deadstrip
#1

I have to say I am a bit of a late adopter when it comes to Race Coordinator. But armed with a £5 Arduino Uno clone (eg at Bitsbox here) and a track in need of some lap timing, I thought I'd give it a go. The Race Coordinator site is: www.racecoordinator.net

Race Coordinator is a fully-featured and very popular piece of slot car race management software that will run on Windows computers (XP to Windows 10). The program is 'donationware' with donations going to the developer's charity to support sick children.

1. Hardware

There are a number of different ways you can connect track sensors to your computer to function with Race Coordinator - including DIY options, ready-made hardware produced and sold by ViaSue, the Trackmate interface and DS lap timers.

A good value and very reliable DIY method is using an Arduino Uno board - or specifically a cheaper clone, like this one I bought from Bitsbox for £5...

   

The Arduino Uno will work with Race Coordinator to count laps on up to four lanes - and control the track power via relays. Track call buttons and start light LEDs can be added very simply. For this, you will need a PC running Windows 7 or above and have an available USB port (ideally powered).

There is an extremely clear guide (with photos rather than circuit diagrams) included as a pdf in the Race Coordinator zip file (download page here: www.racecoordinator.net/download). Once the files are extracted, you are looking for Race Coordinator > data > arduino > lap counter - and then in that folder are the pdf guide and the 'sketch' that is the program you upload to the Arduino board so it works with Race Coordinator.

The pdf document walks you through how to wire up the Arduino board with various sensors - phototransistors, reed switches, slotted sensors and dead strip. The dead strip instructions are incomplete - but I'll add to those in a minute (it's what I used). The diagrams also show how to add a power relay for each lane, a track call button and external LED start lights. It is very straightforward.

The dead strip option is more problematic and you don't really want to wire the dead strip direct to the Arduino input. A dead strip can create spikes of current that can damage a board. The pdf simply states "It’s important that steps are taken to ensure that no more than 5v can ever reach the Arduino input." The easiest way of doing this is to route the signal via a single channel opto-isolated relay board (eg Bitsbox here). The optocoupler circuit isolates the relay from the input signal and the output from the relay triggers the Arduino input perfectly safely. This is what my set-up looks like...

   

I did add 150-ohm resistors to each of the cables coming from the dead strip. Probably not essential, but it's added protection.

The relay is powered directly from the Arduino Uno (so you'll want a 5 volt relay board) and the Arduino is powered via the same USB data cable that links to your computer. If you're using a laptop, a separate 5v DC supply might be better if the USB ports aren't putting out the full 500mA.

I created the dead strip by removing the rails from the track, then made two cuts - 1-inch apart and either side of a tab - using a cutting disc on my Dremel. I tidied up and smoothed the cut edges with a file. When reinstalled, this gave an isolated 1-inch 'dead strip' on each lane...

   

I then used some contact adhesive to glue the rail to the track and tightened the tabs underneath. I also clamped a piece of mdf on the top to make sure everything was flat as the glue set. Gluing ensures the cut edges of the rails do not lift and catch the guide or braids of a car. It also maintains the isolating gap. Finally, I soldered some thin wires (I used a Cat5e twisted pair) to the tab of each dead strip rail underneath the track. These wires attached - via a 150-ohm resistor - to the input of the opto-isolated relay board. When a car crosses the dead strip, it both closes the circuit and creates a current which triggers the relay board to signal the Arduino input for that lane. The Uno has inputs for up to four lanes using Race Coordinator.

2. Software

To program your Arduino Uno with the Race Coordinator 'sketch', you'll need to install the Arduino Integrated Development Environment (IDE) program on your computer. This is available free via the Arduino website (here) or as an app from the Microsoft Store. You'll need to be running Windows 7 or later.

If you go back to the folder on your computer containing the pdf and the Arduino sketch (Race Coordinator > data > arduino > lap counter) and click on the lapCounter INO file, it will upload into the IDE window. To upload onto your Arduino Uno clone, you'll need to do a few more things...

   

  • Most Uno clones use the CH340 chip for USB communication and the driver must be installed to your computer (chip manufacturer's site here).
  • Attach your Arduino Uno clone to the USB port on your computer you will be routinely using. It should power up and be recognised via the CH340 driver.
  • Check in the IDE window that your Uno clone is recognised (tools> Board> "Arduino Uno") and linked with a port (tools > port> COM).
  • Check in Device Manager (settings> devices in Windows 10) on your computer that the Uno is showing as "USB-SERIAL CH340 (COM_)" where the COM port matches that in the IDE tools menu.
Next, we need to add a 'library' file to the IDE that will handle the LED instructions in the Race Coordinator sketch...

  • Install the FastLED library into the IDE via tools> manage libraries (this launches a new window)> search for FastLED and install (current version 3.4.0, author Daniel Garcia)
And now we are ready to upload the sketch to the Uno...

  • Back in the main IDE window, hover over the right-pointing arrow on the menu bar - "upload" should show to the right. Click the arrow and the Race Coordinator 'sketch' will upload to your Arduino Uno clone (together with the Fast LED library).
If you follow these steps in order, the sketch should upload without any errors and you'll have a working interface.

When you open Race Coordinator (install it now if you haven't already), go to Track Setup from the menu bar. This opens the Track Manager window. Stay on the 'General' tab, click on the Arduino option in the Track Interface list. Then click the 'Configure' button. In the new window, select the 'Uno' option in Arduino Hardware box. The COM port your Uno is attached to by USB should be shown on the left. Click on this and the light next to 'Connection' should show green. Then click the 'Accept' button. You should now have a functioning lap timer.

There are plenty of tutorials on the Race Coordinator site (here) to help you set up the program exactly as you want it. There are also quick start menus to get up and running straight away. However, the above steps do fill in a few gaps to use a cheap Arduino Uno clone with a dead strip.

Here's my Uno ready to go on my 'work-in-progress' single-lane hill climb rally stage...

   
[+] 9 members Like woodcote's post
Quote
#2

One question after finding this thread.......are the opto-coupler relays used in place of the "standard" 4-relay board as shown in the Race Coordinator instructions, or in addition to......I'm a bit unclear on that....
[+] 1 member Likes Goggles Paisano's post
Quote
#3

Hi Goggles. I don't know if the Race Coordinator documentation has been updated - I was using the 'Race Coordinator Arduino Interface rev 1.2.0' document.

In that document, relays are only being used to turn the track power on and off (eg for a dead start and at the end of the race). The deadstrip paragraph hadn't been completed. Maybe it has now?

In my single-lane rally loop set-up I'm using the relay to separate the rather fiesty signal from the deadstrip from the delicate Arduino input. For a four-lane deadstrip, a four-relay module would be required, going to pins 4-7 on the Arduino.

I don't use an additional relay to switch the track power, but a four-lane module would be controlled by pins 8-11 on the Arduino.

I hope that helps.
Quote
#4

Woodcote,
I appreciate the information you provided in your initial post.  Being an electronics neophyte, I still have some questions.   You mention a dead strip diagram that you used, is it posted or am I miss reading your comment.  From what I understand from what you built, you added a single channel opto-isolated relay board for each dead strip.  I did find this diragam which has some issues, but helps as a starting point.  Reading your post, I would need to add the optocoupler to the dead strip connections to limit any potential damage to the Arduino board.   Do you have a diagram on how you wired those.
Thanks

[Image: RCcontroller.jpg]
[+] 1 member Likes jJuniorHRW's post
Quote
#5

@jJuniorHRW

The diagram you posted shows how to connect the Arduino into a four-lane track (using UK slot car club standard 3-pin plug controller hook-ups), where the relay board is being used to control the track power on each lane - eg a dead start, end of timed race or track call (using the button).

There are also connections shown from each lane to inputs 4-7 on the Arduino. I presume this is a sort of shorthand for “sensor signal from this lane” - as simply attaching a wire from the lane to the Ardino input won’t work, as 1. it makes no functional sense and 2. anything input above 5V will damage the board.

So if you wanted to use a deadstrip to create your sensor signal, search a wiring diagram for a deadstrip (the BSCRA site is my go-to resource). You can then use diagram you posted to see what inputs on the Arduino each lane needs to go, BUT to wire directly into the Arduino inputs will risk serious damage to the board. 

You could use a hefty resistor to modulate the signal, but I think the only completely safe way to protect the board is to completely de-couple the deadstrip output from the Arduino input - and that’s what the optocoupler does. You will need one optocoupler relay per lane - they are available in 1,2 and 4 relay modules.

BTW, I think one of us probably needs to download the latest version of Race Coordinator and see if the interface document has been updated for a deadstrip.
Quote
#6

Woodcote,
Thanks for the response and information.  I did download the latest version of RC and the instructions still do not include any updated diagrams for dead strips.  I also contacted RC directly and he replied that he didn't have any information and to search various forums to for any wiring diagrams.  
The search continues, my next step is to learn about optocoupler and how to wire them.  As I said I am an electronic neophyte, so I am learning to crawl
Thanks for your help
[+] 1 member Likes jJuniorHRW's post
Quote
#7

I will attempt to dig this out and photograph it for you - maybe a diagram. Everything is dismantled and boxed, although I'd love to resurrect the project as a portable, modular rally stage at some point.

In the meantime, these are the clearest images I can find from the archives...

First, the relay being tested with a 5V DC power input and output going to drive a motor

   

Where the blue & white pair (top right) is coming in from the deadstrip...

   

And then hooked up to the Arduino...

   

With power coming from the Arduino itself (red & black) and 'lap sensing' output to the Arduino (orange and yellow).
[+] 2 members Like woodcote's post
Quote


Possibly Related Threads...
Thread / Author Replies Views Last Post
Last Post by Shezza55
19th-Jan-24, 08:22 PM
Last Post by rinkrat99
22nd-Jul-22, 09:28 PM
Last Post by autoavia
17th-Jun-21, 10:24 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)