Jump to content
Sign in to follow this  
Bushman

Decoding the Hobbyzone X Port signals

Recommended Posts

I just got my Fire Bird Freedom yesterday and I've got all sorts of fun ideas for the X Port. I was hoping it output simple high/low logic signals but that doesn't seem quite the case. This makes projects much more difficult but maybe opens up a few possibilities as well.

I put the lines on my ancient o-scope last night and did some poking around. I also did some searching on the net. I've seen projects that use the X port, but most involved hacking apart purchased X-Port modules. I'm still unclear how Mr RC Cam is getting his PIC project to work. If he's already decoded the signal it would be nice and save me lots of time if he could share his info.

I'll be posting all my findings here for those who are interested. If you have seen places where the outputs have been figured out, please let me know. My scope is an old analog piece of crud that I pulled out of a dumpster, so this will not be easy for me. :)

- Bushman

http://www.pasqualy.com

Edited by Bushman

Share this post


Link to post
Share on other sites

Ok here is the deal so far.

The Pins coming from the aircraft's electronics are as follows

1. Ground

2. Demodulated controller output

3. Throttle signal

4. Battery V+

Pin 2 and 3 are what we are all interested in.

Pin 3 is easy:

Pin 3 is about a 1kHz square wave from 0 to 4Volts. The duty cycle of this square wave is proportional to the throttle position.

At max throttle its 100% high, or a steady 4V.

At no throttle it is 0% high, or 0 Volts.

At 50% throttle its 50% high, etc...

Now this must also be the pin that the Sonic Combat module uses to kill the engine. I'm guessing that the Sonic Combat simply shorts this pin to ground and so the speed controller sees 0% throttle. If someone could confirm this for me I'd appreciate it. I'm wary about shorting it to ground myself even through a resistor.

Pin 2 is the real bugbear....

It is clear that it is sending out the signal received by the aircraft after it has been demodulated. It is a 0 to 3Volt square wave.

With the ACT switch on, the wave signal repeats every 25ms.

With the X Port unactivated There are 4 positive pulses that last about .35ms long. The distance between the start of these pulses represents the output of the controller.

All times are from the start of the previous pulse, to the start of the following pulse.

Throttle:

The time between pulse 1 and 2 represents the throttle.

0 throttle = 1ms

100% throttle = 2ms

Pitch:

The time between pulse 2 and 3 represents the pitch control

Down Stick / Up Elevator = `1ms

Up Stick / Down Elevator = 2ms

Roll:

The time between pulse 3 and 4 represents the roll control

Left Stick/Roll = 1ms

Right Stick/Roll = 2ms

Next I'm gonna try my best to figure out what its spitting out when the X-Port button gets pressed. Also, ACT off timings coming up.

Share this post


Link to post
Share on other sites

With ACT off, the overall period of the pulse train coming from port 2 is about 18ms.

With ACT on, the overall period of the pulse train coming from port 2 is about 24ms.

On thing I just realized is that when you press the X Port button you totally lose control of the aircraft (what kind of crud design is that?). The output of port 2 totally changes and is obviously not just a modified version of what was coming out before.

Trying to figure it out right now.

Share this post


Link to post
Share on other sites

Pin-3 is the throttle kill input. Actually, your pinouts are reversed from mine, so on my schematics it is Pin-2.

Share this post


Link to post
Share on other sites

Here is the X Port pulse train.

Again, it is a square wave, 0 to 3 Volts. Each pulse is about 0.16ms long.

Timings from start of one pulse to another start is as follows.

1.00ms

0.68ms

0.48ms

0.80ms

etc etc etc

The total pattern runs 2.96ms

XPortpulse.png

Share this post


Link to post
Share on other sites
Pin-3 is the throttle kill input. Actually, your pinouts are reversed from mine, so on my schematics it is Pin-2.

Well I started with the ground side as pin 1 thus the positive battery voltage is on pin 4, it was an arbitrary decision. The ground pin was on my left towards the aircraft's tail when I started looking at them :)

Do you get no output from the throttle pin at all? I'm getting a very obvious 1kHz PWM signal that corresponds to my throttle position.

Share this post


Link to post
Share on other sites
I'm getting a very obvious 1kHz PWM signal that corresponds to my throttle position.

That sounds reasonable.

Share this post


Link to post
Share on other sites
That sounds reasonable.

You are such a tease :P

Any insight on the X Port signal, I can deal with what I am seeing and use it as something the PIC can watch for, but is there some rhyme or reason to it that I'm missing?

Share this post


Link to post
Share on other sites
... but is there some rhyme or reason to it that I'm missing?

I know what you mean. The Xport signal method is a horrible mess.

Timing wise, it is not consistent across the various HZ/PZ models. To make things more interesting, their lowest end transmitters (the 1-axis stick versions) are simple-minded analog designs; They are based on discrete component encoders that have a wide tolerance to the absolute timing (no two seem to be the same!).

My best advice is to keep poking the signal with the o-scope. Identify something that is unique to your model's Xport command and trigger on a unique signal event. If you intend to make something that is compatible with all PZ/HZ models, then keep a large supply of medication nearby.

Share this post


Link to post
Share on other sites

Success!!

I followed the KISS principle and just made the PIC watch for a high pulse that was between 150 and 170us, it ignores everything else.

Here is my lovely assistant Alyssa demonstrating how easy it is to press the X-Port button and get the LCD to report a HIT and light up an LED.

100_3715sml.jpg

Next step: Design a Air to Ground rocket launcher :ph34r:

Edited by Bushman

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×