rrTV-PHOTO   New HD TV
HOME   rrTV-PHOTO   GALLERIES   MY GALLERY   HELP-FAQ
myHOME PM pmRR MEMBERS 833 ONLINE 21 EVENTS SEARCH REGISTER  START HERE
 
9 pages [ <<    <     1      2     ( 3 )     4      5     NEXT    >> ]14493 viewsPOST REPLY
Gyro Hobbies . E-flite . Next D

.
.
Radio - Servo - Gyro - Gov - Batt > Starting a Home-Brewed PCM Receiver Project
 
 
Coert
Heliman
Location: Amsterdam, The Netherlands

RF issue

Angelos,

OK, I assumed you stay with the currently used RF modules.
You guys really throw out the old industries rules.
I think Futaba has set its goals for PCM1024 to be used with standard (cheap!) RF techniques.
But if you are so to say stacking bits as done in QPSK, you'll need Forward Error correction and ACK, NAK handshaking to prevent that to many Servo-Packets get disqualified. Hence grading-up the radio link with a PSK component, error sensitivity has to be compensated making the use of a additional Radio Protocol necessary.

Coert
10-15-2003 Over year old.
HOMEPAGE  
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Coert!

While your concerns are certainly understandable, they are unfounded. The use of QPSK will not increase channel bandwidth requirements, will increase usable Signal/Noise Ratio with the use of a coherent decoding scheme (which I plan on using), will not require the use of FEC [Forward Error Correction], and will not require ACK/NAK [Acknowledge/Not Acknowledge] handshaking! There will be no increase in interference to adjacent channels, either!

The only downside to QPSK is that it increases cost, since it needs A/D and D/A converters, needs more processing power, and needs linear RF sections. However, that's the only downside!

Cheers!
MarkF
10-15-2003 Over year old.
HOMEPAGE  
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Coert!

Well, to be complete, it is true that using QPSK will need higher power consumption - somebody's got to power those additional components. However, given the advances in semiconductors in general, there's a very good chance that we can implement a QPSK-based scheme with less power consumption than present-day equipment! Really, QPSK is Good Stuff!

Best Regards!
MarkF
10-15-2003 Over year old.
HOMEPAGE  
 
 
Coert
Heliman
Location: Amsterdam, The Netherlands

Hi Mark,

As you see, I assumed the use of the regular RF sections as they are now used by Futaba and others. So my bitrate / bandwidth issue was related to that. Not knowing you want to change the RF section too.

Off coarse, using QPSK changes all, regarding that I did't mention bandwidth.

Bye bye, I have to go sleep now!
Coert
10-15-2003 Over year old.
HOMEPAGE  
 
 
Danny R
Heliman
Location: Atlanta, GA

Just curious, but is there any reason this future receiver project couldn't be a combination receiver/gov/gyro/co-pilot?

Governors, gyro's and co-pilots basically put themselves between the receiver and the servo's. Seems to me that if you are driving servo's with the receiver, it makes sense for that to be the only source of information going to the servos.

Thus you would only have external sensors feeding position information to the receiver instead of separate processors. The receiver takes the sensor information and corrects the servo's accordingly.

With the speed you are talking about on this chip, it seems it could handle it, and the weight reduction would probably make it worthwhile.
10-15-2003 Over year old.
 
 
Optech
Key Veteran
Location: Vista/Oceanside, CA.

Danny,

I wasn't going to intrude on Marks thread but I was also thinking along your train of thought. However, the biggest problem I see is that everytime a new gyro technology came out, for example, you'd need to buy a whole new "gizmo".

On the other hand, I remember this thread from some time back; http://www.runryder.com/helicopter/...transmit+scheme

In it they talked about a LAN type system. Maybe something like this could be incorporated into Marks new receiver design. Say make the components modular, or peripherals. If they're there the receiver uses them and if not so be it. What the hey, were talking a whole new system so go for it.

It'll be interesting to hear what Mark thinks about something like this.

Mike

Viva La Airtronics!
10-15-2003 Over year old.
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi!

Danny: This is definitely possible! While I'd need to spend more time thinking about the "cycle budget" before reaching a firm conclusion, I'll take a quick SWAG at it. As a very rough estimate, this is probably doable on the Philips chip without any additional compute power, as long as I don't do QPSK. If QPSK were to be computed on the same chip, it will absorb enough of the compute cycles that I'd want to use a faster ARM9 or XScale core with a better multiplier for the gyro, etc. So-called "servo loop" feedback systems (which aren't the same as our servos, but are the types of algorithms employed in control systems like gyros) can have some fairly hefty math needs. However, that's really not a big deal.

As Optech suggests, the real question is one of costs, from a BOM [Bill of Materials] cost perspective, but also from a development cost perspective! When a single device performs multiple functions, especially in a "real-time" performance-sensitive environment, development costs can start going up nearly exponentially! The reason is that each application will have its own "critical section" that's difficult to get right, and the more functions that are included, it gets much harder to satisfy all the conflicting performance requirements. Just as expensive is the complex process of testing the device for production, which is literally an exponentially increasing function.

Nonetheless, your idea is definitely doable! I'd estimate the development cost to be between $500K and $1M, depending on how sophisticated you wanted the control algorithms to be / the degree of precision you were looking for. It can be done!

Optech: The LAN is a very interesting idea, indeed! In fact, the perfect standard already exists. It's formally called CAN, the Controller Area Network, but you might as well think of it as the Car Area Network! Automobile manufacturers face the same problems of exponentially increasing costs, and their solution was to devise an in-automobile network for communication between devices. There are actually two CANs. Low speed/fault tolerant CAN runs at 125K bps, and is used for general signalling applications like reading sensors, turning lights on and off, etc. High speed CAN runs at 1M bps, and is used for critical engine and powertrain controls.

It's a very intriguing idea to incorporate CAN into a next-gen receiver - that could open up all kinds of interesting possibilities! Not only could it enable the kinds of applications Danny suggests, it'd ultimately even be a fine basis for communicating to the servos, too! Hmmm... At this stage, CAN-enabled CPUs are hitting the market, but I haven't looked into the costs to know if it's the right choice yet. Even if CAN-enabled parts are still at a price premium, though, those prices ought to fall rapidly thanks to the volume in the automotive market.

I will definitely keep this in mind as I move forwards - good thinking!

Have Fun!
MarkF
10-16-2003 Over year old.
HOMEPAGE  
 
 
Angelos
Key Veteran
Location: nr Oxford, OX11, UK

Stick with something that can be realised by year 2005. You are already talking for developments that will take more man hours than one persons available free time by 2005. If there are data at the receiver end you can use them any way you like at later projects.

Funny enough Futaba seems to follow stupid ways of doing things even at their very late developments. The S9251 digital servo can only be used with GY601 so there could be a data comm between the two. Still they went for the old pulse technique reducing the pulse width and increasing repetition frequency.

I am in favour of a simple 3 wire bus with Vcc, Vdd, data and intelligent servos that will listen to a specific ID. You can set the ID of each servo via jumpers (least favourable way), or alternatively plug them on the bus one at a time and send a special packet via the TX to configure the servo. Once they are all setup individually then you may connect them all on the bus. There is no need for CAN which is overcomplicated for this application and we don’t need long cable runs anyway.
10-16-2003 Over year old.
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Angelos!

Indeed, the challenge is trying to limit this to a project that'll actually get done! Still, note that talking about other possibilities doesn't reflect what I've committed to, which is completing the design for a fast baseband receiver, and publishing the source code to it!

As far as what else I might do, I'm getting closer to deciding whether I'll tackle the QPSK development, including the RF section. If I do decide to develop QPSK, then that will definitely set the limits of development of this project! This would require major H/W design and debugging, major DSP-style S/W design and debugging, lots of RF tweaking and testing, etc. It won't be cheap, either.

I have, however, been doing some thinking about how I'd approach the QPSK development. I've come across a more suitable family of CPUs that would make it possible to perform QPSK reception on the same CPU as the receiver. Atmel has a family of ARM parts in the same performance regime as the Philips chip that have on-board synchronous serial controllers with DMA. This DMA controller would allow the CPU to continuously receive QPSK data from the A/D [Analog/Digital] converters even while executing the servo-driving critical section of code.

This controller would make it possible to interface to a stereo A/D such as the Cirrus CS5333 from Cirrus Logic. The A/D would digitize the I & Q quadrature signals from a QPSK demodulator chip - most likely, I'd use the Maxim MAX2450, which would carry the signal from IF down through baseband. It is extremely tempting to simplify development by making this a single-conversion receiver, since that would allow the MAX2450 to handle most of the RF work on its own. Unfortunately, I haven't yet found a decent dual-conversion solution that runs in this frequency range: the only dual-conversion QPSK stuff I can find is designed for 900 MHz+, so it would be necessary to do this the hard way, with discretes. At this stage, that's the critical issue as far as deciding whether to proceed with the RF goes. I'll keep thinking about this...

By the way, note that CAN is entirely independent of the physical layer specification, and short-distance CAN is used quite commonly for other types of applications. CAN does add some complexity, so I wouldn't be incorporating this initially. Once the first-generation prototype's completed, though, I think it's a worthy item to keep in mind as a possible next-generation addition. Let's see how things go...

Have Fun!
MarkF
10-16-2003 Over year old.
HOMEPAGE  
 
 
Angelos
Key Veteran
Location: nr Oxford, OX11, UK

Mark,
As you have noticed I decided to go with PCM1024Z for the time being. This will allow me to skip all complexities involved with the RF design and go for the increased software functionality together with the reliability of the Futaba receivers and TX modules. This also means that people from all over the world will be able to use the system at the correct frequency for their country. I have finally made up my mind to use a second CPU for generating the protocol which will allow easy future migration to a different modulation technique. I will use I2C for now which is not as fast as SPI but will not cause any significant propagation delay. One of the reasons is that the ARM9 CPU I use has multiplexed pins between SPI and I2C and the Single Board Computer that I use already has a EEPROM chip connected there. Also Futaba’s synthesised TX module has a I2C interface to it’s internal EEPROM memory which hold information about the available channels and their frequencies. I will start working on a PCM encoder next week. If you find it useful for your work then I can send you a pre-programmed PIC microcontroller that you can directly interface from your CPU and produce PCM and PPM at both shifts and at the precise Futaba spec for servo pulses.

-Angelos
10-16-2003 Over year old.
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Gang!

Angelos: Thank you very much for the generous offer!!! Unfortunately, all my work so far has been structured around the 16-channel data format, so I'd have to rewrite the code for the Futaba standard to be able to take advantage of your chip. Since my real interest is working on a next-generation solution, I am certainly very tempted to take you up on your offer, but it probably makes more sense for me not to waste your time, and to continue along the path I'm on. Again, though, I really appreciate the extremely kind offer! Thanks again - that was a totally cool thing to do!

In addition to the data channel format, I'm at a major decision point as to how to proceed with the next stage of development. As I'd mentioned earlier, the code as written needs about 1.2 mS of "dead time" between transmit frames (thanks to that critical section while its driving the servo pulses), which was just a simplifying assumption for initial development. To fix this, I'll need to decide what actual communications sampling format we'll be using. While the data structure's been described above, I want to eliminate the need for dead air, in order to achieve maximum data rate transmission, hence the lowest system latencies.

There's no question how the work would be done for QPSK: as mentioned earlier, we'd continuously DMA incoming analog data. The QPSK data would be transmitted at 16K bps, which is 8K symbols/second thanks to having 2 bits/symbol. In order to recover the data most efficiently, the receiver would oversample the incoming analog stream at four times the symbol rate, meaning that we'd have 32K samples/second, where each sample is comprised of an I-component and a Q-component. While we'd only need ~6-8 bits/sample to recover the incoming data, the Crystal A/D would be sending out 24 bits each for the I & Q components, leading to a total incoming data rate of 32K * 2 * 3 * 8 = 1.5M bits/second. Quite a lot of work to be done there!

Anyway, back to the point, for FSK, we'd ideally like to do something similar, that is, have a continuous oversampling of the incoming data stream that would be dumped into memory. This would allow "voting"-based reception, where instead of having to make a single decision whether a bit is high or low, we could decide that, say, if 5 samples out of 8 were high, then the result is a '1', or if 5 samples out of 8 were low the result would be a '0'. If we wound up with 4 samples out of 8 being high, we'd call this a bit error. This kind of approach would significantly increase the usable Signal/Noise Ratio. Just as important, it would be a much closer match to the architecture of the QPSK version.

Unfortunately, the chip that I'm using doesn't support these kinds of capabilities, so it'll be necessary to go to the Atmel chip to fix it. In the mean time, the question is whether to just publish the code as-is, with the requirement for the dead air, or whether to move on to the Atmel, develop a longer-term solution on that part, and then publish the code. Or maybe do both?

I guess the question is this: is anyone interested enough in what's been done so far to merit the effort of publishing the code in the next week or two, or would you rather wait until I move on to the next-generation chip, completely eliminate the deadtime, and publish it then? Any and all opinions would be greatly appreciated!

Thanks again, Angelos!!!

Cheers!
MarkF
10-16-2003 Over year old.
HOMEPAGE  
 
 
Optech
Key Veteran
Location: Vista/Oceanside, CA.

My answer would be if you are going to move on then I'd just as soon wait until the next gen.


Mike

Viva La Airtronics!
10-16-2003 Over year old.
 
 
Angelos
Key Veteran
Location: nr Oxford, OX11, UK

Mark,
I had quite a few beer tonight with my colleagues so I am not in the best mood to write a long reply. I will re-read your message tomorrow and see if there is anything else that I would like to respond too. All I want to say for now is that I am also working on a larger number of channels. My aim is to let the user choose how many he wants to use and how many bits he wants to allocate to each channel. He therefore chooses the resolution of the channel. Perhaps this is too complicated for some modellers to understand so I may settle for a 16 channel system too. In any case the only reason I want to use PCM 1024Z for now is to keep backward compatibility and to fly a model through my TX as soon as possible. The RF design would take me substantial development time otherwise. It doesn’t matter if I compute 16 or more channels I could still use just the first 10 channels for my early tests. I only need to do minor modifications in the firmware to switch to a higher channel number later.

-Angelos
10-16-2003 Over year old.
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Now this is getting really interesting...

Hi,Gang!

Holy cow! I’ve just thought of another potential solution, and it’s interesting enough that if I were in the R/C business, I’d definitely be applying for a patent on it! While this is a little complicated, I’ll walk through how we can avoid the critical section without any additional hardware, on the existing Philips chip! Note that this approach only applies to PCM-FSK, but it’s still interesting enough to merit discussion.

I mentioned earlier that my receiver works by building an event list that’s sorted in ascending order of time (that is, later events follow earlier events in the list). The problem is that we spend nearly a millisecond locked into the output_events routine, and any RF inputs that arrive while we’re outputting the servo values are lost. If the transmitter were to continue sending at 8K bps, then we’d lose somewhere around 9-10 bits of information while we were sending the output pulses.

However, let’s imagine that we added an event_type field to each event. One type would be for Output events, and one type would be for Input events. Now, after all the Output events have been added as before, it’d be possible to add eight input events to the list – these input events would say to sample the RF input at the proper point in time!

The downside is that if the output routine were to take more than one microsecond per event, then things would get really complicated – it’d be necessary to move the input events around in the list in such a manner that they wouldn’t be within, say, 10 uS of an output event. This would get so complicated that it’s just not worth the effort. On the other hand, I’m pretty sure that I could incorporate this capability, and still meet the 1 uS loop time, if I were to recode the event handler routine in assembly language. By adding, say, a predetermined 10 bits worth of input events, we could guarantee that RF could be transmitted continuously without losing any data, and all with perfect timings!

This changes things, and is cool enough that it might just be worth implementing on this pass. I’ll keep thinking this over, and will decide what to do soon. Darn, this is a fun project!

Angelos: I hope that you recover soon! Once you’re back, I’m definitely interested in your further thoughts!

Have Fun!
MarkF
10-16-2003 Over year old.
HOMEPAGE  
 
 
Danny R
Heliman
Location: Atlanta, GA

Just curious, but are you folks familiar with the autopilot work already underway? This is what prompted me to ask about a combo receiver/gov/gyro/autopilot. Looks like they've got the gyro/autopilot already down in their own standard receiver with a JR/Futaba PPM signal decoder library, 10 channel standard-speed servo driver (@11bits of resolution) and 1 channel high-speed servo driver(JR/Futaba)


http://autopilot.sourceforge.net/
10-17-2003 Over year old.
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Danny!

Great link - that's quite interesting! These guys have a very intriguing project, and have been going at it for a couple of years already. They're also using quite a bit more horsepower than we are here. Their main CPU is a StrongARM, which is in fact the predecessor of the XScale chip I'd mentioned earlier! Indeed, with that kind of horsepower (the StrongARM has a much nicer 12-bit/cycle Booth's multiplier), you certainly can tackle more work! Still, note that they're running multiple CPUs to accomplish all of the functionality.

This is definitely something I'll keep an eye on. While their control precision is in a completely different league (they appear to be converting PCM1024 to PCM64 [Correction: this was just a 6B/10B decoder], with looser timings, to boot), the project still shows a lot of good work.


Cramming Ten Pounds of Crap into a Five Pound Bag

That point I mentioned before about trying to get multiple real-time tasks running on the same CPU with high precision is showing up in my own project. Making the conversion to completely eliminate the deadtime between frames is quite a bit harder than just making the servo pulses themselves highly accurate. By making the move to assembly language, which is needed for true timing accuracy, I get about 1/10th the productivity. On top of that, trying to merge the input (receive) timebase with the output (servo driving) timebase is taking a fair bit of effort. As a consequence, this is moving out the first code drop by a week or so.

I am going to continue along this path for now, even if we do decide to move to the Atmel part later on in order to do QPSK: I'd like the first deliverable to show no-compromises high-performance! After all, one nice side-effect of this project would be if it were to help convince the R/C manufacturers to start delivering higher performance products!


Ultimate Speed?

While I'm implementing the previous method of using an inner assembly language event driver to support Input, Output, and Input/Output events, there's an even faster way to go. While this would take yet another week or two, I'll mention it just in case anyone's interested. It's possible to actually change the event setup routine to become an event compiler!

One fairly unusual property of the ARM processors as compared to most other single-chip microcontrollers is that they don't make distinctions between on-board RAM and on-board FLASH. It's possible to load code into RAM and execute it, just as it is with full-blown PC processors. Consequently, it's possible to automatically transform the event lookup table into an actual instruction sequence in RAM by "compiling" the event table into machine language instructions after each frame is received, then jumping to the generated code to execute the event table. This could reduce the control jitter to +/-1 processor clock, for the most precise timings possible with this CPU chip. The downside of this approach is that it would add about 5 uS latency to the end of the first servo pulse, but may ultimately be worth pursuing, nonetheless.

What makes this doable is that the routine only needs to emit about 12 different instructions, so it's vastly simpler than any traditional compiler. I'm not going to implement this now, but this is another useful approach to add to the future ideas list.

Thanks again, Danny, for the cool link!

Have Fun!
MarkF
10-17-2003 Over year old.
HOMEPAGE  
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Danny!

Thanks again for the link! It turns out that the autopilot group has published their reverse-engineering of the Futaba data encoding scheme. That's certainly good news, for it means that the "PCM64" I mentioned above, was really the output of a 6B/10B decoder!

Anyway, for folks that have been looking for a link to this format, check it out. While it's incomplete, it is a good start!

Cheers!
MarkF
10-17-2003 Over year old.
HOMEPAGE  
 
 
AirWolfRC
rrProfessor
Location: 42½ N, 83½ W

I don't remember exactly but within the past 2 years, I think one of the model magazines had an article on the data stream of the Futaba systems. Maybe someone else rembers better than me ?? But it could have ben the magazine "Nuts & Volts"

Wolfgang
10-18-2003 Over year old.
HOMEPAGE  
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Howdy!

Wolfgang: I don't know if it's been published before, but it sure seems like Angelos is the expert on the Futaba PCM format!

Angelos: Have you ever considered publishing the full format? It would sure be helpful to other folks that are considering building compatible products!

Have Fun!
MarkF
10-18-2003 Over year old.
HOMEPAGE  
 
 
MarkF
Senior Heliman
Location: Palo Alto, CA

Hi, Gang!

Well, I took a break from the receiver project to take a look at the Airtronics transmission format. I'm blown away by the result, but even with the 92185 PCM receiver, my RD 8000 doesn't use differential encoding at all - it's just a simple two subframe format which sends channels 1-4, then 5-8! I'm guessing that perhaps the high-end Airtronics Stylus may use differential encoding, and the RD 8000 may just send the equivalent of 0s in the differential code fields. However, this is a test that I'm going to have to perform before long.


Plugging Away

I'm making solid progress on the receiver, and have completed the assembly language event loop driver. It's just 34 instructions long, but boy, those were sure time-consuming instructions to write. This was my first experience with ARM assembler - what a bizarre/neat little chip!

Anyway, we now get "perfect" input and output timings during the event loop. The next step is to finish integrating the "overlapped" receive data that we get while driving the servos back into the input routine. At the same time, we'll need to come up with a good preamble detection scheme.


A Preamble to Preambles

For those who are wondering what preamble detection is, the first problem a receiver faces is knowing where in time bits actually start and end, and after that, where frames start and end. If you think about it, when the receiver is first turned on, it has no idea of "when" it's supposed to sample the data, it just knows the period of each bit. So, it begins by oversampling the RF input at high speed, building up a pattern of the most recently received samples. When the pattern matches a known good value, the receiver essentially "locks on" to the data at that point, and sets up its receive routine to begin sampling relative to that pattern.

Note, however, that this can't just be done once, since the crystals on the transmitter and the receiver aren't perfectly in phase. As a result, the sample point will wander off the ideal point in time pretty quickly. Instead, it's necessary to recheck the sampling point every frame or subframe. To make that as efficient as possible, the transmitter always sends out a known data pattern which precedes the actual control information in each frame - this data is known as a preamble.

To allow data to continually flow from the transmitter to the receiver in the first version of my receiver, it's very important to oversample the incoming RF data while the servo pulses are being output, for that's exactly when the preamble for the next subframe will arrive! As a result, we're going to have lots more events than I'd initially planned for in that event list!


What's Oversampling?

By the way, oversampling just means reading an input more frequently than one time per symbol. For analog signals, reading a bandwidth-limited signal twice per symbol is sufficient to allow recovery of the signal, if it can be recovered at all (thanks to Nyquist's theorem), but oversampling at 4X/symbol can often reduce the processing workload (we'll get into that later on).

For digital signals, it's a more difficult choice. R/C manufacturers haven't been running their systems anywhere near the bandwidth limit of the channel. To recover the input signal properly, it's better to sample at 4X or more. I'm going to be oversampling at 5X, since this makes it just a little easier to find the center of each bit.


Lessons Learned?

As I'm going through this exercise, there's absolutely no doubt in my mind that having DMA will make this a far simpler task, so I will eventually migrate to another platform like one of the Atmel ARM chips. This was actually pretty obvious up-front, but it's nonetheless been an interesting challenge trying to tackle this without DMA, and without losing timing precision (going with an interrupt-driven scheme would also have made things far easier, but the timing accuracy would be much worse).

Anyway, back to the grind!

Have Fun!
MarkF
10-19-2003 Over year old.
HOMEPAGE  
 
 
9 pages [ <<    <     1      2     ( 3 )     4      5     NEXT    >> ]14493 viewsPOST REPLY
Fast Lad Performance . Ace Hobby . Esprit Model

.
.
Radio - Servo - Gyro - Gov - Batt > Starting a Home-Brewed PCM Receiver Project
 PRINT TOPIC Advertisers 

Subscribe to This Topic

Thursday, December 4 - 10:37 pm - Copyright © 2000 - 2008 runryder.com | email | link to rr | runryder needs cookie