Error checking/correction - Small packs

Thread Starter

atferrari

Joined Jan 6, 2004
4,764
I am linking two micros via IR, one way only, thus repetition can not be asked to the emitter.

I am using the Sony's SIRC protocol. Speed is the same used for remote controls for domestic appliances.

Whatever is received altered should be discarded or corrected (?).

I've been reading a lot starting with parity check, checksum, Hamming code, FEC, SECDEC and more.

My concern: what should be the balance between the small size of the message (one, eventually two packs with commands) and eventually robust but long and complex routines that could delay (?) a lot the process.

While I want to keep all simple, I also want it roubust enough.

It's just a robot but I want it running properly. Any rule of thumb?

Repeating the packs three or five times for majority voting, is it an option?

Changing the order and quantity of packs sent may be done any time but my problem is not there.

Sorry if I sound vague but have no previous experience.

Comments / suggestions anyone? Muchas gracias.
 

Brandon

Joined Dec 14, 2004
306
Originally posted by atferrari@Sep 21 2005, 04:17 AM
I am linking two micros via IR, one way only, thus repetition can not be asked to the emitter.

I am using the Sony's SIRC protocol. Speed is the same used for remote controls for domestic appliances.

Whatever is received altered should be discarded or corrected (?).

I've been reading a lot starting with parity check, checksum, Hamming code, FEC, SECDEC and more.

My concern: what should be the balance between the small size of the message (one, eventually two packs with commands) and eventually robust but long and complex routines that could delay (?) a lot the process.

While I want to keep all simple, I also want it roubust enough.

It's just a robot but I want it running properly. Any rule of thumb?

Repeating the packs three or five times for majority voting, is it an option?

Changing the order and quantity of packs sent may be done any time but my problem is not there.

Sorry if I sound vague but have no previous experience.

Comments / suggestions anyone? Muchas gracias.
[post=10496]Quoted post[/post]​
You could use the hamming error correction code. When used with large enough words, (you need to determine what its too large for your application), the overhead of the error bits drops making the transmission more efficient.

Word size Check Bits Total Size Error Bit Overhead
8 4 12 50%
16 5 21 31%
32 6 38 19%
64 7 71 11%

and so on...

based on what the parity bits are set at, you will be able to determine if there is an error, WHERE the error is and possibly correct it without retransmission.
 

Thread Starter

atferrari

Joined Jan 6, 2004
4,764
Basically I will be dealing with four or, maximum, sixteen bits of data per pack.

In no more than 48 hrs I expecte to be testing something.

Sure I will come back with the outturn.

Gracias for replying.
 

Brandon

Joined Dec 14, 2004
306
Originally posted by atferrari@Sep 22 2005, 02:58 PM
Basically I will be dealing with four or, maximum, sixteen bits of data per pack.

In no more than 48 hrs I expecte to be testing something.

Sure I will come back with the outturn.

Gracias for replying.
[post=10528]Quoted post[/post]​
You could pad the rest of the word with 0s, or double transmit and do an xor and see how many off bits you get comparing the 2 words received.

Honestly, you need to just test and see what starts to work for you. You may need little if any error checking. Then again you may need multi-sends and correction code as well. Depends on how far you want to transmit, how vital the data is to your application, etc.
 

Thread Starter

atferrari

Joined Jan 6, 2004
4,764
I really don't know how "vital" is data. I am not trying to save anybody's life but I want my robot running properly if that is what you ask :)

Motors of two legs starting and one standing still is something I don't want to happen.

I've already wrote 36 lines of code that generates a 12-bits Hamming 8,4 code.

Tonight will start with the decoder. As I see it from the flow diagram it's going to be simpler than I expected. (Resdicovered the beauties of XOR).

Later, when back at my office (where the bench is) I will do extensive testing and then will go for repeats, ANDs and compares.
 
Top