Project Slot Car Controller
Group Members:
- Bruce Mortimer, Engineering Acoustics Inc.
- Garrick Orchard, Johns Hopkins University
- Michael Pfeiffer, Institute of Neuroinformatics, UZH and ETHZ
- Raphael Juston, Biorobotics/Institute of Movement Sciences
- Tobi Delbruck, Instiute of Neuroinformatics
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 embeddingFor 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.
Results
shows the speed controller running with the GUI.
shows the first speed controller response.
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.
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.
Attachments
-
DVS128-2010-06-29T21-59-47+0200-0 first recording.aedat
(1.8 MB) - added by tobi
23 months ago.
sample data #1
-
DVS128-2010-06-29T22-00-49+0200-0 2nd recording.aedat
(10.0 MB) - added by tobi
23 months ago.
sample data #2
-
SlotCarRacer-2010-07-06T22-40-46+0200.txt
(0.8 MB) - added by tobi
23 months ago.
first log of simple speed controller
-
DVS128-2010-07-06T22-40-44+0200-0 with controller #1 const speed.aedat
(4.6 MB) - added by tobi
23 months ago.
controlling speed #1, goes with first log of speed controller
-
SlotCarRacer-2010-07-06T22-40-46+0200.mat
(379.5 KB) - added by tobi
23 months ago.
slot car log data as matlab data file
-
plotSlotCarRacerData.m
(367 bytes) - added by tobi
23 months ago.
plots the slot car racer log data for measured vs desired speed
-
speedControllerData1.png
(7.0 KB) - added by tobi
23 months ago.
plot of speed controller data
-
speedControllerData1zoomed.png
(6.1 KB) - added by tobi
23 months ago.
plot of speed controller data zoomed up to show single laps
-
jaerScreenshot1.PNG
(150.8 KB) - added by tobi
23 months ago.
shows jaer with speed controller GUI
-
DVS128-2010-07-13T06-40-07+0200-0 calib #2 blue car intermed.aedat
(6.7 MB) - added by tobi
23 months ago.
raw data from retain for throttle calibration with blue car intermediate power
-
SlotCarRacer-2010-07-13T06-40-14+0200 calib #2 blue car intermed.txt
(279.5 KB) - added by tobi
23 months ago.
throttle logging pos (xy) and speed and throttle data from retina for throttle calibration with blue car intermediate power
-
SlotCarRacer-2010-07-13T06-40-14+0200 calib #2 blue car intermed.3.txt
(279.6 KB) - added by rjuston
23 months ago.
throttle logging pos (xy) and speed and throttle data from retina for throttle calibration with blue car intermediate power with header
-
SlotCarRacer-2010-07-13T06-40-14+0200 calib #2 blue car intermed.4.txt
(279.6 KB) - added by rjuston
23 months ago.
throttle logging pos (xy) and speed and throttle data from retina for throttle calibration with blue car intermediate power with header
-
plotSlotCarRacerData.2.m
(0.7 KB) - added by rjuston
23 months ago.
plots the slot car racer log data
-
slotCarRacingTelluride2010b.wmv
(30.9 MB) - added by tobi
22 months ago.
final video for presentation
-
punishmentplot.png
(6.6 KB) - added by rjuston
22 months ago.
Gaussian function for punishment
-
P1020374-1.JPG
(71.2 KB) - added by tobi
22 months ago.
final circuit diagram for slot interface

