R/C Tech Forums

R/C Tech Forums (https://www.rctech.net/forum/)
-   Radio and Electronics (https://www.rctech.net/forum/radio-electronics-137/)
-   -   Lap Timing Decoder (https://www.rctech.net/forum/radio-electronics/688671-lap-timing-decoder.html)

irome 03-11-2013 12:54 PM

WoW , i´m very impresed , Howard and Payalneg are my idols
very very good work,
i´m spanish and i have a rc club in my country but for lap count used zround and manual push in keyboard f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 .... for car 1 , 2 ,3 etc
amb decoder is very expensive
im very interested in this Project

thanks

howardcano 03-12-2013 07:02 AM


Originally Posted by kjrell (Post 11913788)
I dont know how it is in USA, but in Europe, and mainly France (my country) there is many tracks that cant afford an AMB system, transponder is not the problem, but the crazily overpriced decoder is. National/regional federation lend their ones for events, but this means no timing for everyday racers...

We have a similar situation here in the USA. There’s a good market for used AMB decoders, since the new ones are very expensive.


Originally Posted by kjrell (Post 11913788)
About transponders, I've read here on R/C Tech that AMB ones should cost less then 25$ based on components used (bought by one, not hundreds like AMB).

The parts cost for my transponder design is about $5 in small quantities, without the PC board. I paid $10 per raw PC board in quantities of 10. That would be much lower for larger quantities.

As I have pointed out in my transponder thread, the price of the transponders has little to do with their manufacturing cost. All the myriad expenses of running a business--salaries, rent, utilities, government approvals, and product support, to name a few-- contribute much more to the cost than the parts and assembly labor do.

howardcano 03-12-2013 07:03 AM


Originally Posted by Skruger (Post 11914293)
From the Internet because it is true.

When I ran this test, the setup was with one computer, so I ran
Autoscore with USB and the terminal program on RS232. The first
results shows that the AMBrc will send AMB20 data on the RS232 and
AMBrc data on the USB port at the same time. To get the AMBrc to send
the full data on the RS232 port, you need to "enable" the AMBrc mode
via the serial port. Once enabled, it will continue to send data in
AMBrc mode, and the scoring program can be either RS232 or USB. This
means that you don't need a Y cable, but an initialization string from
the communication program (or something else to start the serial data
in AMBrc mode).

OK. Now here is the data in "raw" format from the communication
program. The # records are status, the @ are transponders.

^A@ 237 213 5479698 80.619 130 119 2 x6D70
237 is the decoder ID. 213 is the sequence number, then transponder
number (5479698), time (80.619) in seconds, number of hits (130),
signal strength (119), Loop and battery indicator (2) and then
checksum. The delimiter (character between fields) is a tab.

^A# 237 212 0 x38E0
^A@ 237 213 5479698 80.619 130 119 2 x6D70
^A@ 237 214 2395327 80.792 119 135 2 x2CC1
^A# 237 215 0 xA177
^A@ 237 216 2395327 85.434 34 88 2 x2779
^A@ 237 217 5479698 85.626 172 164 2 x7A44
^A# 237 218 0 xD72B
^A@ 237 219 2395327 90.262 62 75 2 xFC1
^A@ 237 220 5479698 90.48 170 155 2 xE6E6
^A# 237 221 0 x34E3
^A@ 237 222 5479698 94.301 185 138 2 x56C3
^A@ 237 223 2395327 94.408 173 135 2 x9F89
^A# 237 224 0 xCB16
^A@ 237 225 5479698 98.448 131 117 2 xC7F2
^A@ 237 226 2395327 98.46 122 115 2 x4744
^A# 237 227 0 x9E45

After sorting by transponder number and then time...

^A# 237 221 0 x34E3
^A# 237 212 0 x38E0
^A# 237 227 0 x9E45
^A# 237 215 0 xA177
^A# 237 224 0 xCB16
^A# 237 218 0 xD72B
^A@ 237 214 2395327 80.792 119 135 2 x2CC1
^A@ 237 216 2395327 85.434 34 88 2 x2779
^A@ 237 219 2395327 90.262 62 75 2 xFC1
^A@ 237 223 2395327 94.408 173 135 2 x9F89
^A@ 237 226 2395327 98.46 122 115 2 x4744
^A@ 237 213 5479698 80.619 130 119 2 x6D70
^A@ 237 217 5479698 85.626 172 164 2 x7A44
^A@ 237 220 5479698 90.48 170 155 2 xE6E6
^A@ 237 222 5479698 94.301 185 138 2 x56C3
^A@ 237 225 5479698 98.448 131 117 2 xC7F2

After an excel computation (and less columns)...
0 x34E3
0 x38E0
0 x9E45
0 xA177
0 xCB16
0 xD72B
2395327 80.792 119 135 2 x2CC1
2395327 85.434 34 88 2 x2779 4.642
2395327 90.262 62 75 2 xFC1 4.828
2395327 94.408 173 135 2 x9F89 4.146
2395327 98.46 122 115 2 x4744 4.052
5479698 80.619 130 119 2 x6D70
5479698 85.626 172 164 2 x7A44 5.007
5479698 90.48 170 155 2 xE6E6 4.854
5479698 94.301 185 138 2 x56C3 3.821
5479698 98.448 131 117 2 xC7F2 4.147

You can easily count the laps and check split times.

Many thanks for this information!

howardcano 03-12-2013 07:03 AM


Originally Posted by irome (Post 11917689)
WoW , i´m very impresed , Howard and Payalneg are my idols
very very good work,
i´m spanish and i have a rc club in my country but for lap count used zround and manual push in keyboard f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 .... for car 1 , 2 ,3 etc
amb decoder is very expensive
im very interested in this Project

I remember making tick marks on paper, with columns for each car! Getting a computer, a program, and using the function keys was a godsend!


Originally Posted by kjrell (Post 11913788)
You guys are doing an amazing job :D

Thanks to both of you for the encouragement. We are fortunate to have many talented people reading and contributing to this thread. I am constantly amazed at the abilities of Payalneg and others. They seem capable of doing in their sleep what would take me weeks of labor!

We have reached several important milestones, but there is much work yet to be done to reach the final goal of a “generic” lap timing system.

wazee 03-12-2013 09:48 AM


Originally Posted by howardcano (Post 11921028)
We have reached several important milestones, but there is much work yet to be done to reach the final goal of a “generic” lap timing system.

Payalneg's setup seems to be working pretty good, what problems (explained for non-electric skilled persons) are there?

Oh and before I forget... :lol:

http://www.scubaboard.com/forums/att...my-money11.jpg

edit:What about a donation? Would that help with the development? I'm super excited about this...

MiTaller-RC 03-12-2013 11:55 AM

Hi,

I'm software programmer, I'm very interested on this thread and maybe make a simple/free lap timing software.

Please let me know the comm properties to read data from RS232 or USB Comm port (BaudRate,DataBits,Parity,StopBits,FlowControl)

Thanks



Originally Posted by Skruger (Post 11914293)
...

OK. Now here is the data in "raw" format from the communication
program. The # records are status, the @ are transponders.

^A@ 237 213 5479698 80.619 130 119 2 x6D70
237 is the decoder ID. 213 is the sequence number, then transponder
number (5479698), time (80.619) in seconds, number of hits (130),
signal strength (119), Loop and battery indicator (2) and then
checksum. The delimiter (character between fields) is a tab.
...


Skruger 03-12-2013 02:30 PM


Originally Posted by MiTaller-RC (Post 11921987)
Hi,

I'm software programmer, I'm very interested on this thread and maybe make a simple/free lap timing software.

Please let me know the comm properties to read data from RS232 or USB Comm port (BaudRate,DataBits,Parity,StopBits,FlowControl)

Thanks

9600,8,N,1,hardware flow control

I will post the spec's tonight 7pm PST and a raw HEX dump of the serial port of my IR system that works with the free programs including RCScoringPro (not free)

There are lots of free programs out on the web.
I will post the ones I have and use for Family racing.

howardcano 03-12-2013 03:33 PM


Originally Posted by wazee (Post 11921568)
Payalneg's setup seems to be working pretty good, what problems (explained for non-electric skilled persons) are there?

What about a donation? Would that help with the development? I'm super excited about this...

Perhaps Payalneg can let us know more details on his system, and how far along he is on development.

Money is always welcome, but I'll feel better when I can send you something in return! When the design is stable, I'll probably be offering programmed microprocessors, and maybe bare circuit boards (or assembled and tested, depending on how they are affected by FCC regulations).

howardcano 03-12-2013 03:34 PM


Originally Posted by MiTaller-RC (Post 11921987)
Hi,

I'm software programmer, I'm very interested on this thread and maybe make a simple/free lap timing software.

Please let me know the comm properties to read data from RS232 or USB Comm port (BaudRate,DataBits,Parity,StopBits,FlowControl)

If you want to create software to work with the decoder we are presenting, here are the details:

The data string is currently sent from the decoder via RS232 at 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control. The first 6 hex ASCII characters are the first 24 bits of each transponder transmission after the preamble. (I am assuming that these 24 bits are unique enough to use as an ID, as they are different for each of the 30 or so transponders I have examined so far. We can always include more bits if we start to find different transponders with the same first 24 bits.) The next 8 hex ASCII characters are the timestamp, MSB first, in increments of 1/4 millisecond. (This is different than shown in post #116, where the LSB was first.) The string is terminated with a carriage return and line feed.

To keep the decoder hardware expense as small as possible, it will not do any calculations, but will simply receive all of the transponder transmissions, timestamp them, and send them to the scoring PC. The PC must sort them, determine when each transponder passed over the center of the timing loop (we'll call this the "crossing time"), calculate the lap time for each transponder, and pass the result off to the scoring program. These tasks could also be integral to the scoring program.

The transponder sends its ID at least three times consecutively, then sends some type of status message on the next transmission. This means that the PC needs to determine whether the message is for ID or status. Since we have no way of knowing what the message means, the PC can determine if the message is for ID by keeping a list in memory of, say, the newest 20 messages that have been received at least 3 times consecutively. If the message matches one in this list, then it is for ID. If there is no match, then the message should be ignored.

The PC must determine the loop crossing time for each transponder by averaging the timestamps of the first and last ID messages for a given transponder within a certain time window (for instance, after no messages have been received from the transponder for, let's say, 0.1 second).

Then the PC must then calculate the lap time for each transponder by subtracting the previous crossing time from the latest crossing time.

Skruger 03-12-2013 07:23 PM


Originally Posted by howardcano (Post 11922853)

The PC must determine the loop crossing time for each transponder by averaging the timestamps of the first and last ID messages for a given transponder within a certain time window (for instance, after no messages have been received from the transponder for, let's say, 0.1 second).

Then the PC must then calculate the lap time for each transponder by subtracting the previous crossing time from the latest crossing time.

I think the decoder should determine the loop crossing it is not to hard to do and gives the pc more time to run other task.
to determin the crossing time my IR decoder counts the passing HIT's (up to 255 max) then uses the center 2 hits and adds thenthen devide by 2 giving center of the loop. It is not perfect but it is within .01 sec.

having more then 5 cars pass within one half second under the loop causes problems (lost hits)

on average my 20mph real speed test shows 30 to 40 hits per car
at mod speeds fo 43mph I get 15 to 20 hits
if 5 cars go under the loop at the same time then expect only 4 to 7 hits per car at 43mph.

if a car sits under the loop then it counts up to 255 hits and waits for the car to exit the loop for a minimum of 1sec before starting a new hit count. otherwise all you have to do is sit under the loop to win the race:lol:

Skruger 03-12-2013 08:17 PM


Originally Posted by Skruger (Post 11922618)
9600,8,N,1,hardware flow control

I will post the spec's tonight 7pm PST and a raw HEX dump of the serial port of my IR system that works with the free programs including RCScoringPro (not free)

There are lots of free programs out on the web.
I will post the ones I have and use for Family racing.

time stamps in HEX from My IR Decoder
it is not quite 100% amb compatable but it works with
Free programs already out there

theses programs simply ignore the Csum at the end
Iridium ( the maker of the IR system I use)
alycat/lapsFree/jlaps/

it does not work with B&B's autoscore (Autoscore needs csums to be correct) and I am lousy at figuring out 16bit csums

Can any body help me with the 16bit csum's ?


this HEX does not include the ^A at the begining instead it uses the older (SOH) Ox01 and (CR,LF)
sh = start of heading
@ = transponder
# = unit status (sent every 4 seconds)
09 = tab used as a delimeter
device id = 202 for my unit
frame = 0 to ~ prolly used to keep track of lap times after a race
transponder number 7 digit cannot use 3000000 to 3999999 <-house transponder numbers only that i know of
time in seconds . hundreths seconds <-- could use of hit counts and average time to get thousands calculated
hun = Hundreths of a second
thousands of a second possible or even tenths of thousands but not used on my decoder unit
hits = how many times the transponder war counted under the loop per pass <--Max 255 and must leave the loop for one second before restarting hit count
Dummy = normaly used for rf signal strenth <- not used so for compatibility set to 111db
0 = loop and battery indicator <-- I have not played with this one yet
x = end of data field or start of Csum or both
checksum displayed in ascii format <-- I have not figured out how to compute for other programs to work with (autoscore/RCtimer/ect)
checksum is not used by most Timing Software

sh_@_|_devicID___|__frame #_|__transponder number_|__time____.__hun___|__hits__|_dummy__|__0_ |__x checksum in ascii (cr,lf)
01 40 09 32 30 32 09 31 35 39 09 31 30 30 33 30 39 34 09 33 32 37 2E 36 35 09 31 39 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A
01 40 09 32 30 32 09 31 36 30 09 31 30 30 33 30 39 34 09 33 32 37 2E 39 35 09 33 30 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A
01 40 09 32 30 32 09 31 36 31 09 31 30 30 33 30 39 34 09 33 32 38 2E 32 36 09 33 31 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A
01 40 09 32 30 32 09 31 36 32 09 31 30 30 33 30 39 34 09 33 32 38 2E 38 35 09 35 37 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A
01 40 09 32 30 32 09 31 36 33 09 31 30 30 33 30 39 34 09 33 32 39 2E 31 33 09 31 36 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A
01 40 09 32 30 32 09 31 36 34 09 31 30 30 33 30 39 34 09 33 32 39 2E 34 32 09 31 33 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A
01 40 09 32 30 32 09 31 36 35 09 31 30 30 33 30 39 34 09 33 32 39 2E 37 36 09 32 36 09 31 31 31 09 30 09 78 35 37 32 34 0D 0A

These strings sent once every 4 seconds indicating the decoder is alive ,kinda like a watch dog timer
lets the pc know it is connected and working properly
01 23 09 32 30 32 09 31 36 36 09 30 09 78 43 32 34 39 0D 0A

01 23 09 32 30 32 09 32 34 30 09 30 09 78 43 32 34 39 0D 0A

Payalneg 03-13-2013 08:08 AM


Originally Posted by howardcano (Post 11922851)
Perhaps Payalneg can let us know more details on his system, and how far along he is on development.

Money is always welcome, but I'll feel better when I can send you something in return! When the design is stable, I'll probably be offering programmed microprocessors, and maybe bare circuit boards (or assembled and tested, depending on how they are affected by FCC regulations).

I am working at this project since december 2012.
Transponder very simple:
h_ttp://cs407731.vk.me/v407731346/726b/-Wo4gFwpM_E.jpg
Its ATTINY25 (in future will be ATTINY85) clocking by an external crystal 20Mhz.
5Mhz carrier is making by internal Timer with PWM.
100p capacitor and 15 turns of of copper wire as transmiting antenna.

thanks Howard for loop amplifiers.
Decoder based on Attiny2313 on 20Mhz. This mcu transmit decoded ID to ATMEGA128 via SPI.

Main unit (ATMEGA128) have 2 functions: counting laps and web server.
In external SRAM 32kb storing pilots results. In internal eeprom storing information ID-Name.
Ethernet is maked by microchip ENC28J60. Its simple MCU with very large errata.
Main unit now have one setup button to store client MAC as Admin MAC

Lcd is hd44780 20x2.

h_ttp://cs419517.vk.me/v419517346/3f30/FDJe9Cjpo1I.jpg

My ten little frends:
h_ttp://cs407816.vk.me/v407816346/9905/v23CFrNzcd4.jpg

howardcano 03-13-2013 08:45 AM

Payalneg, it looks like you have been quite busy!

Is the software to run races complete?

Photos from the last post:

http://cs407731.vk.me/v407731346/726b/-Wo4gFwpM_E.jpg

http://cs419517.vk.me/v419517346/3f30/FDJe9Cjpo1I.jpg

http://cs407816.vk.me/v407816346/9905/v23CFrNzcd4.jpg

howardcano 03-13-2013 08:58 AM


Originally Posted by Payalneg (Post 11925535)
Ethernet is maked by microchip ENC28J60. Its simple MCU with very large errata.

The Mark of Microchip!

howardcano 03-13-2013 09:19 AM


Originally Posted by howardcano (Post 11922853)
The data string is currently sent from the decoder via RS232 at 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control. The first 6 hex ASCII characters are the first 24 bits of each transponder transmission after the preamble... The next 8 hex ASCII characters are the timestamp, MSB first, in increments of 1/4 millisecond... The string is terminated with a carriage return and line feed.

The transponder sends its ID at least three times consecutively, then sends some type of status message on the next transmission.

Here is an example of the data from the decoder, with a single transponder sitting in the loop:

B96CB700FFB6CE
CDFD4C00FFB6DA
CDFD4C00FFB6EA
CDFD4C00FFB6F9
CD8E2A00FFB706
CDFD4C00FFB70F
CDFD4C00FFB71A
CDFD4C00FFB728
749AA700FFB733
CDFD4C00FFB741
CDFD4C00FFB74D
CDFD4C00FFB75C
CABFB600FFB768
CDFD4C00FFB771
CDFD4C00FFB77B
CDFD4C00FFB785
73D37900FFB792
CDFD4C00FFB79A
CDFD4C00FFB7A4
CDFD4C00FFB7AE
0073D800FFB7BC
CDFD4C00FFB7C6
CDFD4C00FFB7D1
CDFD4C00FFB7E0
73D89700FFB7EF
CDFD4C00FFB7FA
CDFD4C00FFB80A
CDFD4C00FFB818
B96CB700FFB824
CDFD4C00FFB833
CDFD4C00FFB841
CDFD4C00FFB84C
CD8E2A00FFB85A


All times are GMT -7. It is currently 04:20 AM.

Powered By: vBulletin v3.9.3.9 Patch Level 3
Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.