Phase shift keying and Goertzel
To reduce the number of required pins on expensive industrial connectors I'd like to use only one pin pair for the power supply of a "smart sensor" and its data transmission. This should work with simple passive low- and high-pass filters as the supply current is DC and for data transmission something in the MHz range could be used.
I think, the Goertzel feature of the P2 could be used so no external modulation/de-modulation chips should be required. I need at least 1MBd bandwidth. So I'd use something in the 10..20MHz range as carrier. This keeps the filter components small and should not cause too much aliasing and EMI problems.
My idea is to use binary phase shift keying (BPSK). The sender encodes 0 bits as a 0° phase signal and 1 bits as 180°. The receiver uses the Goertzel streamer mode to decode the signal. Lets assume sender and receiver are perfectly synchronized at the beginning. This would result in two spots in the phase diagram with the amplitude (radius) depending on line length and damping.
As the two clocks of sender and receiver have tolerances the two spots for 0/1-bits will start to move and rotate over time. This can be compensated by calculating the angle of the delta vector with QVECTOR and rotating all future inputs in the reverse direction.
Or can anybody think of a better method? Quadrature phase shift keying allows to transmit two bits per time slice but is a bit more sensitive to noise. For example, using a 10MHz carrier and 1MBd data rate BPSK needs to switch phase every 10 periods and QPSK every 20 periods. The latter would allow for more time to accumulate the Goertzel result and more instructions for the software loop. But synchronization is a bit more complicated, I think.