Sportiduino. E-mark system for orienteering. Part 2

Part 1

5 months have passed since the writing of the last article, the firmware has been modified since then, and now the stations work even more reliably, and cheap chips contain 92 marks, which is enough to satisfy almost any imagination of directors. Also successfully passed testing of the system at competitions.

When I wrote last time, only 15 stations were collected, the system was tested only in the small sports maze, and the next test task was to be performed at more massive and autonomous competitions, which included the 2nd Moscow Light . This is a two-day competition in tourism orientation with a mandatory overnight stay and full autonomy of participants. A total of 41 control points, a large number of options for movement, the total distance was 55 kilometers straight. About 150 participants participated. All this represented a serious challenge for the marking system.

First of all, it was necessary to solder another 25 stations. No longer wanted to tinker with loot and photoresist on such a scale, so manufacturing was ordered on the side, in China. It turned out to be quite inexpensive and very convenient. With ready-made boards to solder it became much more pleasant, and the marriage to go out less, the scarves came out green and rather neat. True, I still had to tinker and spend a few days off. Now I think about more automation, the use of stencil and solder paste.

The subsequent assembly steps did not change, everything also stuck the boards to the case through the LED and filled it with a compound. It was dry at the competitions, so it wasn’t possible to test the survivability of the station when it rained, but preliminary testing of several stations in nature under different weather conditions has not yet revealed instability to water. On the case, I additionally stick reflective strips and fasten in place with steel cable with clips.

The firmware has undergone several changes. Implemented the ability for stations to record the numbers of the noted chips due to the internal EEPROM of the microcontrol memory. If you assign an address to each bit, enough for 6000 numbers of chips. This is necessary in case of the resolution of any force majeure, for example, the search for a lost participant, and also for the resolution of disputable cases. So far, there is only enough memory to record the fact of the mark, the time of the mark is not recorded. In the future, with the development of the system, I think to add a separate EEPROM memory chip for this purpose.

Since the system is open and all specifications are available to everyone, someone can write any master chip using an NFC device. There is the possibility of vandalism - reprogramming of installed stations. And here, in contrast to the fact that if the station were simply broken, there may be an error in the results that is difficult to notice. To protect against this phenomenon, a password system has been introduced. Also added the ability to configure the station, the use of start and finish stations. In this mode, the launch station will receive only cleaned chips, other stations will only respond to the chip with a mark at the starting station, and after the finish the chip will no longer be checked at other stations until cleared. This will avoid annoying errors and accidents.

The competitions themselves used the old proven version of the firmware with the ability to write to the chips up to 46 marks, which fully satisfied the competition. But since then, the possibility of increasing the recording density has already been tested. The main concern was the need to overwrite data from the previous mark when writing even marks, since writing to the chip is carried out in blocks of 16 bytes. But, testing showed the reliability of the recording, I never managed to catch the error, no matter how crookedly I put the chip. Additionally, the recorded data is encrypted with a Hamming code in two blocks of 4 bytes, which also increases the reliability of the system.

The gateway station has changed significantly since then. It was decided to go in the direction of simplification, now the station consists of Arduino Nano, RFID-module, LED, tweeter and a pair of resistors. He also ordered a handkerchief from China, but did not calculate it a bit with the size, so it got into the case with difficulty.

The option turned out quite convenient. The station is connected to the computer via USB. Data transfer occurs via the COM port. To use, you need to put the chip in the station and send a command depending on the purpose - read the chip, clean the chip, update the time at the station, etc.

To automate the process of working with the system, a program was written in the Processing programming environment. It so happened that the environment was very easy to learn and use after the Arduino, apparently because of their affinity. True, the program was written very messy, everywhere crutches and code so crooked that I myself now hardly understand what is happening. But it works, the interface is quite simple:

The program allows you to customize the station, record, read the results, conduct processing for different types of competitions separately for groups and distances. Setup, input of protocols, distances is carried out in separate csv-files manually. The calculated results are also exported as a csv table. Yes, in this regard, everything is still primitive, but the program copes with the main task. At past competitions, the program allowed real-time calculation of the results that we broadcast on an external monitor for the convenience of participants.

The testing of the system, like the competitions themselves, was successful. All 40 stations worked for two days without error, the results were obtained as soon as the participants arrived. Probably the software at the moment is the narrowest system. Now I’m busy with another project, but I think after the new year I’ll deal with this problem, I want to master Qt as a first approximation and make a more convenient program in it. But if anyone is interested in creating software or supporting sportiduino in an existing one, I will be glad to cooperate.

There is also an alternative opportunity to work with the system through the phone under the android, working with NFC. You can read and write chips, program stations without using a computer, which can be especially convenient in field conditions.

The project exists on the principles of Open Sourse. All firmware schemes are available on Github . The wiki also contains detailed assembly instructions and principles of system design, there is a general guide in pdf format in the root of the repository. Those interested can create their own copy of the system, as well as make changes to the design and software. I would appreciate feedback.

I am going to further develop the project in this direction. First of all, you need to create normal software. As for the circuitry, there are also plans for development, I want to make a more compact device, solder the entire circuit on a single board, add additional memory and power everything from the CR123.

I thank Sergey Titov, Ilya Arkhipovsky and Dmitry Fedotov for a number of valuable ideas and comments. Also, thanks to the community geektimes and all interested. Your comments, ideas and support have played a lot in the development of the project.


All Articles