baseband communication

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's this project that ive never got around to finish of.

Its my "model plane remote control system".....

Basicly its just a set of human inputs devices going into the ADC of an suitable AVR, which then poops out a protocol modulated with some baseband like modulation then transmitted , and picked up again by an identical device but with outputs instead of adc inputs.

Yay simple.... maybe not.

Well I've got the most of the idea on paper, but what has been bothering me is the serial modulation scheme.

I know from experience, just using UART codes for pulse keying modulation transmission is asking for trouble, ive tried... certain uart combo's always flunk out with bad weather conditions. (due too long logical 1 or 0)
Today ive hit the subject 'manchester' encoding,, would the AVR be like doable with an avr already buzzy creating all sorts of time critical waveforms for servo's and logging other pwm modulated signals (gyro's and crud)

So, my question is, do I can get simple way of implementing manchester on the AVR without hogging time critical routines?

MY MICROCONTROLLER CAN BEAT THE HELL OUT OF YOUR MICROCONTROLLER /ATMEL

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All manchester state transitions occur at specific time points set by the bit rate. What I have done is set up a timer interval equal to the bit rate. I have the next transition pre-computed. As soon as the interrupt occurs, I output the next bit state (which might or might not be the same as the previous), then compute the next bit state. This is done to minimize the time jitter due to variation in the computation time if you have to recompute between the interrupt and the bit output.

The success of this depends on ALWAYS being able to service the interrupt immediately. As I recall, the TI MSP430 processors have a way that you can preload a register and output a bit on timer timeout in background without software interruption. Then, you only have to compute the next bit before the timer interval runs out.

Some processors have a "shift-register" mode and I don't recall exactly how the AVR runs in this way. I think it is "synchronous" mode but that may not be exactly what I am thinking of. You MIGHT be able to use this if that bypasses the startbit/stopbit business.

Manchester can tolerate some time jitter, but how much depends on your decoding scheme.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With one xor gate you could xor the sck and mosi and get a biphase mark encoded signal (floppy single density fm I think) and transmit that. So how did they do the fm data separator back in the old days? Same thing? xor the encoded stream with a local oscillator?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, it was usually done by xor-ing with a clock recovered from the stream and fed to a PLL.
At least, that's how it was done on my Nascom-2 for the casette interface ;-)

/Jesper
http://www.yampp.com
The quick black AVR jumped over the lazy PIC.
What boots up, must come down.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds very interresting!

the problem is that weight is very important to be absent.
Adding a single gate xor is possible though.

How is such 'thing' called, when using a Xor gate to mould the serial clock and data out into something like a fm modulated signal.

Adding a physical PLL solution doesn't really seem to be the right way in size/weight wise.

what ive got at this moment is a simple mega8, 4 servo headers, 1 programmer header and a few caps / resistors. oh and a 7805L. thats it. It fits on a single sided 1x2" circuitboard.

MY MICROCONTROLLER CAN BEAT THE HELL OUT OF YOUR MICROCONTROLLER /ATMEL

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How you choose your modulation depends greatly on what your radio looks like. While manchester looks nice at first glance, it does require twice the bandwidth with no benefits other than no DC.
If your radio output is already sliced (digital), you have three main directions to go in: manchester (or similar straight coding), scrambler, or my favorite, mapping codewords.
If, for example, you decide to transmit 4 bits per 8 bit word, you can choose the 16 (or 17) symbols that have the lowest DC component and the best hamming distance. With a 8 bit word for 4 bits, you can correct any single bit error in the word, and still have DC balance. And it's just a table lookup for decoding. The reason I'm saying 17 is that you might want to have a special start marker.
While one might think '8 bits - hey, I'll use the uart', that's a bad idea from a reliability standpoint. The start and stop bits will then be far more sensitive than the data bits and are likely to cause loss of synchronization. Therefore, while implementing a soft synchronous receiver with phaselock in software is annoying, the result is worlds apart from the uart solution.

If you don't have the radio yet, and are attempting to build it yourself from discretes (which is likely going to violate the minimum weight rule), the AVR has performance enough to drive both servos and an I/Q demodulator, that is, a partial soft radio.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

>How is such 'thing' called?
======================
xoring data and clock gives 'biphase mark', also called FM, also called 'single density'. and I guess these are a flavor of manchecter... I think manchecter has a reversal in the middle if its a one, and fm has a zero to one transition in the middle if its a one, so I dont know if fm has the much sought DC balance, which you might not need with you receiver anyway. I hope KKP tells us how to use our IQ to program a softreceiver using I/Q (inphase and quadrature?)

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, ive think ive come up with something that's fairly straigh forward:

here's a picture ive made to visualize how id utilize 'FM' baseband modulation.

this is the 'right' way right guy's?

Attachment(s): 

MY MICROCONTROLLER CAN BEAT THE HELL OUT OF YOUR MICROCONTROLLER /ATMEL