Introduction: Cheap USB Slotcar Timer Interface V3.0 Working!
This continues and finishes my quest for a working USB-Gamepad-Slotcar-Timer-Interface.
My first trials and the basics can be found here:
This is v3.0, now the sensor triggers a timer and you can set the time for the signal to make USB detect it reliably.
Step 1: Parts You Need
To prolong the signal I use a Monostable Multivibrator (MonoFlop) which once triggered keeps the unstable state for a set time.
The heart of this is the NE555 timer IC.
- 3x 1kOhm resistors
- 3x 10kOhm resistors (I actually use 1x10k and 2x9k. You could use 2x10k and 1x10k poti)
- 1x LED (I use a "5V LED" with an integrated resistor.) (optional and not in the drawing...just place it parallel to the reed relay and diode)
- 1x diode
- NE555 timer IC
- Some kind of sensor or aluminium foil/copper tape for a "deadstrip" (I use an IR-slot sensor TCST2103, a 4mm gap would probably be better than the 3.1mm of the 2103).
- 100nF (0,1uF) capacitor
- 1uF capacitor
- BD679 Darlington transistor
- 5V power supply (old USB charger)
- A breadboard, some wires or whatever you choose to built the circuit.
- USB Gamepad (wired or 2.4Ghz)
The parts will cost you around 6€/slot or less if you use the deadstrip, buy cheaper than me, and/or salvage most of the electronics from some other stuff.
I bought a wired Gamepad at Aliexpress for 3.71€, the wireless Gamepad for 13€.
Step 2: Setting the Time.
The first picture shows my last sensor circuit on the lover right...only the relay and the diode are working here on the lower breadboard.
The second picture shows the whole v3 circuit. I accidentally swapped C1 and C2...this has an effect on the time. I now needed 100 times more resistance...something like 186kOhm. A good thing I had these odd resistors around :).
I realised the mistake later and now I use 2x9k resistors. C2 and R4 will set your time!
Here is a tool to calculate the values to use.
The formular would be
t = 1,1 × R × C.
My values are
R (Ω)18000 * C (µF) 1 * 1.1 = 0,0198 seconds
My unstable state will last 0,0198 seconds.
USB is polling with 200Hz that is every 0.005 Second. If you use a 10kOhm poti you can trim down the time ans see if your PC can still detect the signal. I swiped a thin wire through the sensor and was not able to trick it with this settings. Laptimer can be set to detect the rising or the falling signal...when the car hits the sensor or when the signal is going to 0 again. I have no way to find out what the absolute minimum signal length would be. Laptimer2000 can only be retriggered every 100ms to avoid double detection.
I am guessing that the range of USB detection is at around 0,005-0.001s resolution. Sometimes you will be lucky to hit the USB polling, sometimes the signal will run for 0.0499s before it is detected by USB.
I do not count delay introduced by the system because it is a constant.
Step 3: The Deadstrip Modification.
When using a deadstrip like in my first Timer (shortcut the circuit to trigger) you will have to use a 10kOhm resistor from +5Vcc to pin2 and the deadstrip between pin2 and GND.
Shorting the deadstrip will pull pin2 to 0 and trigger the timer.
The deadstrip can be very short now...3mm would probably suffice...I would still keep some dead track (just tape the rails) around the deadstrip so that no current can run into your circuit.
A split rail deadstrip on both rails would be even more sensitive or likely to get triggered.
I added my deadstrip test setup, shown on the left breadboard.
The stripboard I used is only 1/2mm thick,,,I sanded it down on the beltsander. It is under 1cm long and triggers perfectly.
The yellow Carrera Go!!! F1 is probably one of my fastest cars (beside a tuned car that is missing capacitors on the motor and won't work with the deadstrip).
The inner lane of this track is 5571cm done in 1,592 seconds.
3.499371859296482m/s or 12.59773869346733477km/h
You can only use motors with capacitors used as RFI filters. Motors without capacitors will randomly/constantly trigger your deadstrip sensor all over the track.
I also wanted to try a reed switch under the track today but broke my only one when I tried to insert it into the tracks power rail. It would not trigger just glued under the track. Maybe I had the wrong reed switch.
Another possibility would be to use an optocoupler to (galvanically) isolate your deadstrip from your circuit.
Another trigger you can use with cars with magnets is the reed switch. Just glue it under or in the track and it will close when the magnet runs over it.
A laser and photodiode would be another neat solution. Here is the only one I know off.
This could also be used for RC timing.
A photo reflective sensor would probably also work (those are not cheap I fear). Edit...could try something like this.
I also want to try proximity sensors one day.
If you got a digital track you will also have to find some solution to identify the car you are timing.
Step 4: Conclusion
USB is not great for timing slotcars but it can be made reliable and will probably satisfy most homeusers (It works for me).
I just got an old Raspberry Pi B from my cousin (she didn't get to use it) so this will probably be my next try to create some precise timing solution.
Uploading results to an html server would also be great to use any device (I am thinking Tablet PC) for displaying results.
The next step would probably be slotcars over internet. Today there are Proxy races where you can sent a car that will be driven by someone else, it would be so nice to drive it yourself. Old dudes would get obsessed over pingtimes like gamers :)))
Here is the final circuit (with the caps on the right spot and the two 9k resistors) in picture and a video (minimum time set in the software was 200ms hence the fastest time you will see is 0.201sec).
I hope you liked that one.
Yes it is kind of ugly now and I will have to find a way to switch it from sensor to deathstrip operation. I also want to built a nice casing and use plugs to connect the sensors/track to the USB-box.
Power over Micro USB would also be great.
Need a nice layout to move this away from the breadboard...just got no idea how to do that :)))