Project Slot Car Controller

Group Members:

  • Garrick Orchard, Singapore Institute for Neurotechnology SINAPSE
  • Michael Pfeiffer, Institute of Neuroinformatics, UZH and ETHZ
  • Tobi Delbruck, Institute of Neuroinformatics, UZH/ETH Zurich

The slot car code is in  jAER in the package ch.unizh.ini.jaer.projects.virtualslotcar

Final video

The video linked below shows the final state of the slot car project. Because of the problems with not having a good throttle model, the reinforcement learning methods were most effective. They achieved lap times of about 1.30s, comparable to a good human driver.

See this video from Manu Rastogi and Tobi Delbruck's 2008 ZipZap controller project -  http://www.youtube.com/watch?v=1FOTGC25ha4 . Results from that year are at https://neuromorphs.net/ws2008/wiki/zipZapDriver.

Test html embedding

For this year's project, controlling a slot car, Tobi Delbruck ordered following from towerhobbies.com. There are two slot car sets and total of 4 cars to burn up. The two chasis types have slightly different magnets and wheel widths and share the same 2-pole DC brushed motor type.

Stock Number 	Product Description 	Stock Status/Quantity 	Extended Price
The following items will ship from Champaign, Illinois
Estimate of when you will receive your shipment: 25-Jun-2010 – 29-Jun-2010
LXVKB0 	AFX Mega-G Tune-Up Kit 	In stock, shipping 1 	$6.69
LXYCS7 	AFX Super Coupes 	In stock, shipping 1 	$79.99
LXRLV4 	AFX Long Beach Grand Prix Set 	In stock, shipping 1 	$164.97
LXUMS8 	AFX Tri-Power Module Transformer 	In stock, shipping 1 	$33.99
LXVKA6 	AFX Track Clip (100) 	In stock, shipping 1 	$28.99
LXVSR6 	EMS Heavy Duty Extension 30" JR/Hitec/Z 	In stock, shipping 2 	$9.98

Useful site is  http://www.jaygeeracing.com/index.html .

The slot car throttle controller is be based on the USBServo board with external proto board circuit using MOSFET PWM circuit.


shows jaer with speed controller GUI shows the speed controller running with the GUI.

plot of speed controller data shows the first speed controller response.

plot of speed controller data zoomed up to show single laps zooms up to show single laps and the step response to desired speed.

The slot car is control by the throttle (a PWM output of the microcontroller). We have also a silicone retina which send spikes (events) for each pixel change of light magnitude. This fast camera was placed above the racetrack in order to track the slot car and to know it position. The objective of this project is to control the car by high speed and to do the best time lap.

Different strategies were adopted :

- Control of the car considering the curvature,

- Control by reinforcement learning,

- Control by Evolutionary method.

Control by reinforcement learning : As we know the car position and the track, we know in which segment is the slot car. For each segment a throttle and it number of crash are affected. Until there is no crash, the throttle of each segment increases. Then, when the throttle become to high, the slot car gets out of the track. Several segment before the crash are also punished by increasing their number of crash and by decreasing their throttle. For each segment which have a affected crash, the throttle wont increase anymore. Besides the punishment depend on the segment position against the crash position (cf. figure below). The magnitude of the punishment is Gaussian-shaped. The crash is often detected after the effective getting out of the car, it is why the throttle is not as much reduced than for preview segment.

Gaussian function for punishment

Results : The reinforcement learning methods have good results. After a 5-minutes learning session the best noticed time lap is 1.24 seconds for several laps. The human best noticed time is 1.26 seconds for one lap.

Slot car interface

The physical interface to the slot car consisted of the circuit shown next. The power MOSFET was driven in triode mode to act like a resistor. The optoisolator was essential to avoid noise coming back to the USB controller which would cause it to freeze up. A heatsink on the MOSFET was necessary to sink the considerable power dissipated in the MOSFET.

final circuit diagram for slot interface