8

I am a programmer facing an electronic question, so I thought here is the place to ask!

  • I have a magnetic field sensor which provides me with magnetic field values (XYZ axis) 250 times a second.
  • An electronic circuit with a programmable microprocessor controls a coil, which can change the magnetic field close enough to this sensor. Yet, the two devices are not strictly positioned, so I cannot relay on positioning measurement.
  • I wish to send 2 different types of signals from the circuit to the sensor, which can withstand strong noises on the magnetic field, and be shorter than half a second (Yes, seconds - we are in 250 Hz !)

Current solution is to transmit a 17Hz square wave, then 12Hz, then 17Hz for signal A, reversing the order for signal B. But in order to detect these signals it is needed to send long enough waves, which brings the signals to length around 1.5 seconds.

So, my question here is: Is there a way, let's say a pattern, like musical pattern that can be used to signal faster, and still be reliable?

hazzey
  • 10,730
  • 11
  • 46
  • 96
rubmz
  • 183
  • 3

1 Answers1

7

With a sample rate of 250 Hz, you could easily send 100 bits/second or more. In 0.5 second, that would be on the order of 50-60 bits.

The question is, what bit patterns should you select that are readily distinguishable from each other and also from outside noise and interference? A common solution is to use pseudorandom bit sequences, also known as Barker Codes, that have the desired low cross-correlation.

A DSP technique known as "matched filter" can be used to detect the codes.

Dave Tweed
  • 7,273
  • 1
  • 22
  • 41