Amateur Racing Timing

It all started with the fact that I became interested in car racing, watching how the organizers are tormented with time measurements (when in a circle at the same time 4 cars you have to use 4 stopwatch and not get confused where whose time is), I offered my help. It was also interesting to practice in unfamiliar technologies. What came of it - read on.

All sources and the scheme are available at the end of the article.

The tasks were as follows:
- maximum simplicity, minimum connections and wires;
- speed of installation;
- in a circle there can be several cars at the same time;
- cars go in strict sequence; they cannot overtake and change the order;
- start by crossing the line.

Since I had little experience using Arduino, I took it as a basis. I also decided to abandon the laptop and for mobility to replace it with an Android application, we will master the early Java language that is unfamiliar to me.

Parts selection


Line crossing sensor . At first I wanted to realize everything with one block, which would be attached on one side at the start / finish and determine the intersection with an ultrasonic distance sensor. It even worked at home, but everything turned out differently on the street. The sensor readings constantly jumped and reacted to the wind and to everything except the car. It was decided to dig in the direction of infrared rays.

In order to accurately distinguish the light of the infrared diode from the car headlights or the sun, you need to select a receiver with frequency modulation, which I did not want to do. The choice fell on the finished sensors ABT-30m. Everything was already implemented in them, for example, glass transmitted only infrared light and cut off the light of headlights and the sun. There were focusing lenses, it was only necessary to connect to the corresponding output of the sensor. As I understand it, such sensors are used to guard the perimeter in home alarms. Looking ahead, I will say that the choice was successful.



Battery. Since the ABT-30m is powered by 12v and the Arduino mini can be powered by a 12v battery, it was decided to use 12v. I wanted to find the minimum size so that it fits inside the device case, and not be an additional unit from the outside. In the market, we managed to find only a car battery, which did not fit in at all, and a battery from the UPS, which was also quite large: but in extreme cases, both could be suitable.

In the end, I was lucky and I found a 12v and 4000mAh battery in the size of two matchboxes in a Chinese store, which was very good. Later it turned out that these are “batteries from Nokia”, connected in series in heat shrink:



LEDs . Ordinary 12v rgb 10w:



Bluetooth . Standard HC-06 Modules:



Assembly


Here is a scheme. Arduino connects to bluetooth on 5 and 6 legs and works through Software Serial. RGB LEDs are connected to the 9,10,11 legs through transistors, since the LEDs are powered by 12v, and the arduino produces 5v. The signal from the intersection sensor is wound up on 2 legs, it works through interruptions:




As a result, it turned out like this. One unit is a receiver (with a bunch of wires inside), the second is a transmitter (only a battery inside) and a traffic light made from some kind of fixprise flashlight (inside there are 3 color LEDs and a diffuser from some paper). The traffic light is attached with a crocodile, and connected to the main module with an ordinary patch cord:






Mobile app


Instead of a computer, I decided to display the results and control the start from a mobile phone on Android. It was also the first development experience for this platform and the first experience with Java. As a result, we got such an application:





It works as follows. A transmitter and a receiver are placed from different sides of the road, a traffic light is connected and hung up at a convenient place (installation is very fast). In the application, we establish a connection with Arduino, add participants - in the order that they will start. We launch them in the application.

After pressing the “start” button, the traffic light turns green, and at the intersection of the line, the countdown begins. Arduino sends to the application the number of milliseconds since its launch and so with each crossing of the line. Then, based on the difference between these values, the arrival time is calculated. Data transfer delays become unimportant.

Future plans


Make synchronization to the cloud so that you can see the results in real time on a large monitor or without leaving your home on the site (it is very interesting to try Meteor.JS). It is also necessary to fix minor bugs and make the device modular so that you can use it for different track configurations (start and finish in different places, for example). Still need to make an indication of the participant (probably rfid tags ...)

approximate cost


Infrared sensors ABT-30m (1350р)
Arduino mini (135р)
Bluetooth HC-05 (270р) IRF530
transistors with N-channel (40p * 3pcs)
2 batteries 12V 4000mAh (820p * 2pcs)
10w rgb LEDs (160p * ​​3pcs)
Wires, case, connectors

Total: ~ 4000r - 5000r

All sources are open and available in Bitbucket .

Also popular now: