I participated AWS re:Invent 2018 last year. AWS presented Deepracer, I participated in the workshop and received a DeepRacer. From then on, I trained the DeepRacer, participated in some leagues, and achieved good grades. I won the 9th place at the Seoul Summit and 22nd place at the Tokyo Summit… And I will be able to take part in the finals at AWS re:Invent 2019 since I won the 6th place in the total points of 6 online league seasons.

I gained plenty of information from the DeepRacer community, among which was a picture of a user making a DeepRacer timer and checking the lap time with a laser sensor. However, if the laser sensor tower (?) is put on the track, I thought it could crash with the DeepRacer. So, a desire to solve this problem and make a timer myself arose.
Meanwhile, I moved my job to MegazoneCloud, and I supported the league as a PitBoss at the DeepRacer league sponsored by MegazoneCloud. I made a DeepRacer timer and a leaderboard, and connected the pressure sensor to Raspberry Pi with GPIO.

And test…
At the end of the video, my MacBook… 😱
However, when I directly connected the sensor with Raspberry Pi, there were times when it was caught in the rear wheel or when it wasn’t, as shown in the third attempt of the video.

The lap time wasn’t recorded even though the front wheel stepped on the sensor.
I had to measure the sensitivity of the pressure sensor, and for that, I thought it would be good to have an analog-to-digital converter. So I took the microphone off the Sound Sensor and connected the pressure sensor to it.

The result was successful then I’ve decided to apply it to the actual competition.
However, two more problems occurred. First, the DeepRacer track width is 60 cm, but the sensor was only 40 cm, so I had to connect two sensors. Also, it didn’t work when the distance between the sensor and converter was too far. So I kept the sensor-to-converter distance within 1 meter and connected the converter to the Raspberry Pi using an RJ45 cable.
On October 30, 2019, I installed and tested it at the AWS Startup DeepRacer League.

Two sensors attached to the start line with double-sided tape.
Even though I used a 20m RJ45 LAN cable, it worked very well.
This is the way how to connect the DeepRacer timer to the sensor.


Soldering for the first time in years.
The converter has 4 pins, VCC, GND, AOUT, and DOUT. VCC was connected to Raspberry Pi’s 3V, and GND to GND. AOUT was not used, and DOUT was connected to pins 11 and 13 of Raspberry Pi, respectively. Then, I accessed to Raspberry Pi with SSH, cloned the DeepRacer timer source, and ran the start shell.
git clone https://github.com/nalbam/deepracer-timer
./deepracer-timer/run.sh init
You can now access http://localhost:3000 in your RaspberryPi’s browser.
It can be controlled by clicking the button at the top of the screen with the mouse or keyboard. The keys, Q, W, E, R, and T on the keyboard are mapped to the Start, Pause, Passed, Reset and Clear buttons. The hidden key, Y, adds the last lap time to the current time. It is to resolve the problem when all four wheels of the DeepRacer get detached and the sensor is operated without stopping.
You can test the DeepRacer Timer online here, excluding the sensor functionality.
Listed below are the leaderboards of the league, sponsored by MegazoneCloud and supported by me as a PitBoss.
Also, listed below are some of the codes that I have created while doing the DeepRacer. I hope these will help you when you try participating in the DeepRacer training or DeepRacer leagues.
DeepRacer timer and leaderboard