Community
Wiki Posts
Search
Like Tree8Likes

Lap Timing Decoder

Thread Tools
 
Search this Thread
 
Old 05-06-2013 | 08:52 AM
  #211  
cdwilliams1's Avatar
Tech Master
iTrader: (38)
 
Joined: Jun 2011
Posts: 1,056
From: Central MN
Default

Originally Posted by howardcano
The first pass at software for calculating the transponder crossing times inside the decoder is done! I found the code to be fairly challenging given the small amount of RAM and processing power, but it certainly does eliminate the timing bottleneck of sending every transponder message to the PC; now the decoder sends only one message per transponder after it crosses the timing loop.

So now we are ready for all of you software enthusiasts to write your own scoring software on the PC. Several of our readers have already expressed an interest in doing so.

The communication from decoder to PC is similar to what I have already described in this thread, so please forgive me if some of this seems repetitious:

The decoder sends a message to the PC every time each “verified” transponder has passed through the loop. (The decoder verifies each transponder as it passes individually through the loop; the criteria for verification are three consecutive identical messages received from the transponder. No input from the scoring PC is required for this to occur.)

The decoder messages are logic-level asynchronous serial “RS232” at 115200 baud, 8 data bits, no parity, 1 stop bit, and no flow control. This may be converted to USB using an adapter cable. (I’m using a Sabrent SBT-USC6M USB to Serial Adapter Cable from Walmart.) Each message consists of 16 bytes: The first 6 bytes are ASCII hexadecimal characters representing the first 24 bits of each transponder transmission after the preamble, which we will use for the transponder ID. The next 8 ASCII hexadecimal characters are the timestamp, MSB first, in increments of 1/4 millisecond. (Zero time is when the decoder was powered-up.) The string is terminated with a carriage return and line feed. Here is a typical example:

CDFD4C00FFB6DA

And here is a message for the same transponder ID, but with the timestamp incremented by 10 seconds (a typical lap time):

CDFD4C0100531A

Here’s a synopsis of what the PC must do:

Before starting a race, all cars must individually cross the loop so that the decoder will recognize/verify their transponder IDs and send messages to the scoring PC. The PC then verifies that all of the correct cars are present. (This usually happens in the race “warm-up”.) Then all cars line up behind the starting loop, and the PC sounds a tone to start the race.

The PC receives messages from the decoder as each transponder crosses the loop, and stores the messages. When a second message is received for any given transponder ID, the PC examines all the timestamps it has received since the tone sounded, and determines which has the lowest value. The PC then calculates the finishing time for the race by adding the race length to this timestamp.

As each new message for any given transponder is received, the PC subtracts the current and previous timestamps for that transponder to get the lap time. The race ends when the timestamp for each transponder exceeds the calculated finishing time for the race (or manually if some cars have dropped out of the race).

Due to the separate tasks running inside the decoder, the message for each transponder may not show up at the PC in correct chronological order, but this is immaterial since the timestamps for each transponder will be correct.
I've been working occasionally on a Mac version of some scoring software. I always wanted to learn objective-c so this has been my project. It sort of translates, coming from Java - at least in the object methodology sense, but there's still a learning curve. I definitely want to incorporate support for your decoder though!

Thanks for the info!
cdwilliams1 is offline  
Old 05-06-2013 | 11:31 AM
  #212  
Tech Initiate
 
Joined: Apr 2013
Posts: 46
Default

perfect, you can use an FTDI 232, it's an USB to RS232 TTL converter.
h_ttp://w_ww.ftdichip.com/Products/Cables/USBTTLSerial.htm
You win the 7805 regulator, U62 and the RS232 adaptator.
With FTDI 232 cable you plug directly your decoder with 1 plug to your PC.

For the 40 MHZ, you can use an oscillator with TTL output directly like MERCURY 5H8ET-40.000.
You don't need capacitors and logic gate, only 5V.
luluFRA is offline  
Old 05-08-2013 | 11:48 AM
  #213  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default

I have ordered a small number of prototype decoder PC boards. They should arrive in about 2 weeks.

I have also finished a layout for the loop amplifier. It's single-sided and measures 0.8" x 1.4", so it should cost much less than the decoder board.

While I was ordering components to populate the boards, I noticed that the price listed in the BOM was wrong for one component, the SN74HC74N. The BOM has $16, which is a bit more than the actual price of $0.49. Those of you that have received a BOM from me might want to make that correction, as it reduces the total cost substantially! (I also noticed that the CD74HC74E is even cheaper, at $0.33.)
howardcano is offline  
Old 05-14-2013 | 08:03 AM
  #214  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default Club / Handout Transponders

I have created some new special code for the transponders to facilitate club use. These programs will be usable only on the Cano decoder. Hopefully that will help keep them from disappearing!

In other news, loop amplifier boards are now on order.

Last edited by howardcano; 07-17-2013 at 04:55 AM. Reason: Removed ID numbers.
howardcano is offline  
Old 05-14-2013 | 12:54 PM
  #215  
Lolok33Fr's Avatar
Tech Rookie
 
Joined: May 2013
Posts: 3
Default

Hello,
I'm french and i'm a software developer.
HowardCano and Payalneg, I want to congratulate you for this very good work !
I'm interesting by your decoder for my club (little club) because Mylap decoder is overpriced for it.
Could you confirm me that your decoder could decode mylap transponder ? RC4 ?

The solution of Payalneg to use decoder with an ethernet wifi interface is very interesting to communicate with a smartphone.

I have seen that you don't want to release source or hex files. I understand
So i would like to know what are yours conditions to obtain more informations or programmed component to assemble a decoder ? Could you send me a pm ?

Thank you
Laurent
Lolok33Fr is offline  
Old 05-14-2013 | 01:41 PM
  #216  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default

Originally Posted by Lolok33Fr
Hello,
I'm french and i'm a software developer.
HowardCano and Payalneg, I want to congratulate you for this very good work !
I'm interesting by your decoder for my club (little club) because Mylap decoder is overpriced for it.
Could you confirm me that your decoder could decode mylap transponder ? RC4 ?

The solution of Payalneg to use decoder with an ethernet wifi interface is very interesting to communicate with a smartphone.

I have seen that you don't want to release source or hex files. I understand
So i would like to know what are yours conditions to obtain more informations or programmed component to assemble a decoder ? Could you send me a pm ?

Thank you
Laurent
This decoder will work with AMB, MRT, and Cano personal transponders. It does not support the new MyLaps RC4.

PM sent.
howardcano is offline  
Old 05-21-2013 | 12:54 PM
  #217  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default CPLD

For entertainment, and to satiate my curiosity, I have downloaded the Quartus II design software from Altera and entered a first pass of the decoder design to see how it fits into a CPLD. Reader Payalneg is correct, the design does go nicely into the Altera EPM3064, filling it to about 89% capacity.

While the CPLD would be a logical choice for producing the decoder in large quantities, I believe the 74HC logic is still best for our readers. It is available from multiple manufacturers and in most countries; it’s easy to troubleshoot and repair; it doesn’t require programming; and it’s all available in through-hole format, making construction much easier.
howardcano is offline  
Old 05-21-2013 | 01:24 PM
  #218  
mingoglia's Avatar
Tech Regular
iTrader: (3)
 
Joined: Sep 2012
Posts: 444
From: Gilbert, AZ
Default

Originally Posted by howardcano
For entertainment, and to satiate my curiosity, I have downloaded the Quartus II design software from Altera and entered a first pass of the decoder design to see how it fits into a CPLD. Reader Payalneg is correct, the design does go nicely into the Altera EPM3064, filling it to about 89% capacity.

While the CPLD would be a logical choice for producing the decoder in large quantities, I believe the 74HC logic is still best for our readers. It is available from multiple manufacturers and in most countries; it’s easy to troubleshoot and repair; it doesn’t require programming; and it’s all available in through-hole format, making construction much easier.
I'm still very intrigued by this project. My father was an electrical engineer for DEC years ago and passed some knowledge on to me as a small child, before he passed away unexpectedly. Although I ended up going down the path of network engineering, I'm trying to teach those lessons, as well as others to my now 9 yo son. We've done simple projects like the DIY AM/FM radio and things like that. At some point I would love to do these transponder project with him. Would make it fun for him to do a project that's relevant to R/C racing since we race twice a week.

Mike
mingoglia is offline  
Old 05-21-2013 | 02:29 PM
  #219  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default

Originally Posted by mingoglia
I'm still very intrigued by this project. My father was an electrical engineer for DEC years ago and passed some knowledge on to me as a small child, before he passed away unexpectedly. Although I ended up going down the path of network engineering, I'm trying to teach those lessons, as well as others to my now 9 yo son. We've done simple projects like the DIY AM/FM radio and things like that. At some point I would love to do these transponder project with him. Would make it fun for him to do a project that's relevant to R/C racing since we race twice a week.

Mike
Hi Mike,

I'm happy to hear you are interested! The number of views of this thread is way beyond what one would expect based on the number of people who have posted here, so I know there's a silent majority out there.

(Although you don't fit into the category, I also get many private messages from people with ZERO posts. Maybe they signed up on RCTech just for this thread!)

You sound a bit like me. My Dad worked for Bell Labs for 32 years before he died, and built many home projects too. When I was in high school, he was working on a design for a PWM controller for a neighbor's model train layout. His design was having some problems, so I designed an alternate arrangement that worked great. He was so proud, he brought it to work to show the guys! Good memories.

Sharing your interests with your son is wonderful!
howardcano is offline  
Old 05-22-2013 | 09:45 AM
  #220  
Tech Initiate
 
Joined: Apr 2013
Posts: 46
Default

I also used quartus 2 web edition, but on a FPGA development board.
I think it is easier to use the card rather than make a 4-layer PCB, and it's cheaper.
You need only a programming probe.
luluFRA is offline  
Old 05-24-2013 | 07:52 AM
  #221  
Tech Rookie
 
Joined: Mar 2013
Posts: 8
Default

Originally Posted by howardcano
I have ordered a small number of prototype decoder PC boards. They should arrive in about 2 weeks.

I have also finished a layout for the loop amplifier. It's single-sided and measures 0.8" x 1.4", so it should cost much less than the decoder board.

While I was ordering components to populate the boards, I noticed that the price listed in the BOM was wrong for one component, the SN74HC74N. The BOM has $16, which is a bit more than the actual price of $0.49. Those of you that have received a BOM from me might want to make that correction, as it reduces the total cost substantially! (I also noticed that the CD74HC74E is even cheaper, at $0.33.)
thanks Howard

i yet change in bom
irome is offline  
Old 05-24-2013 | 12:37 PM
  #222  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default

The decoder PC boards arrived yesterday, and I now have two of them running. The following corrections must be made:

Omit C25 and C26 (22pF).

The 1uF capacitor on U2 (the 7805 regulator) was mislabeled on the schematic (duplicated “C4” reference designators), and consequentially was not included on the board. The cap should be soldered directly to U2. I’ll correct the reference designator to C5 on the schematic.

The node label “3D” was misplaced on the schematic at U20A pin 3, causing the connection to be ignored. A jumper must be soldered from U20A pin 3 to U21 pin 4. I’ll fix this on the schematic also.

J1 is shown incorrectly on the schematic. The outer shield should connect to ground, and the inner conductor to R1. Edit: This has been corrected on rev C and later of the schematic.


Last edited by howardcano; 11-01-2014 at 03:14 PM.
howardcano is offline  
Old 05-25-2013 | 12:47 PM
  #223  
howardcano's Avatar
Thread Starter
Tech Elite
iTrader: (37)
 
Joined: Jan 2012
Posts: 3,783
From: Olathe, KS
Default The Completed Decoder!!!

Finally, the decoder at home in its Radio Shack aluminum box:





howardcano is offline  
Old 05-25-2013 | 07:55 PM
  #224  
Tech Master
iTrader: (39)
 
Joined: Oct 2011
Posts: 1,293
From: Henderson, NV
Default

Looks great! My local track is impatiently waiting to order one!
ufoDziner is offline  
Old 05-26-2013 | 09:16 PM
  #225  
Tech Adept
 
Joined: Feb 2003
Posts: 147
Default

Excellent progress, Howard. Looks really nice. Keep up the awesome work.
Shiloh is offline  


Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.