SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Apr 27, 2009, 08:32 AM
Registered User
Panama', RP
Joined Aug 2004
65 Posts
Quote:
Originally Posted by SteveRoss
Chris and others,
...
Thanks. I append the radio config file (slighted modified from T7CAP) in the end.

<?xml version="1.0"?>

<!DOCTYPE radio SYSTEM "radio.dtd">
<radio name="OSAMT7cap" data_min="900" data_max="2100" sync_min="5500" sync_max="13500">
<channel ctl="right_stick_horiz" function="ROLL" min="1930" neutral="1500" max="1100" average="0"/>
<channel ctl="right_stick_vert" function="PITCH" min="1100" neutral="1500" max="1930" average="0"/>
<channel ctl="left_stick_vert" function="THROTTLE" min="1100" neutral="1500" max="1930" average="0"/>
<channel ctl="left_stick_horiz" function="YAW" min="1100" neutral="1500" max="1930" average="0"/>
<channel ctl="switch_D" function="CALIB" min="1100" neutral="1500" max="1930" average="10"/>
<channel ctl="dial1" function="GAIN1" min="1100" neutral="1500" max="1930" average="10"/>
<channel ctl="switch_G" function="MODE" min="1100" neutral="1500" max="1930" average="10"/>
</radio>
I have been following this discussion from the outset and unless I am missing something this Radio .xml file is missing a channel. In the instructions as I read them the radio config file needs 8.
Here is a quote from the "User Manual" provided with my PPM encoder:
"3) You must use a "radio.xml" file with 8 channels no mater how many channels your receiver has.
The ppm encoder now dictates the number of channels and the ppm timing.
..."

Joe
joekadet is offline Find More Posts by joekadet
Reply With Quote
Sign up now
to remove ads between posts
Old Apr 27, 2009, 09:15 AM
Registered User
Greece, Attica, Piraeus
Joined Jun 2004
1,133 Posts
You are right!
I am in a very tight situation with my new born baby and i didn't noticed that.
Of course the radio file must have 8 channels if you use the ppm encoder.
It doesn't matter what this channel will be but it is needed to be declared.
Chris
hendrix is offline Find More Posts by hendrix
Reply With Quote
Old Apr 27, 2009, 09:20 AM
Registered User
Panama', RP
Joined Aug 2004
65 Posts
New baby

Hello Chris,

Congratulations on the new addition to the family. I was surprised at the depth of your involvment in working this problem. We understand and thanks for your work.

Joe
joekadet is offline Find More Posts by joekadet
Reply With Quote
Old Apr 27, 2009, 09:26 AM
Moa
Registered User
NewZealand
Joined Feb 2004
23 Posts
Quote:
Originally Posted by hendrix
Moa i just finished writing a version where during bootup the throttle channel
is checked and if it is above 1800 microseconds then it reads the throttle channel 3 times in order to take the average value and store it in the eeprom as the threshold for the throttle channel.
Then all you have to do is move the throttle stick during bootup to the required
position and if this position is above 1800 to 2200 microseconds this value is stored until you alter it again using the same method.
If you never set it the default value of 2010 microseconds will be used.
I will come back when i finish testing it.
What do you think?
Chris
Chris

This is a good idea but I'm thinking a little different to your description.

It caters for the many different RC sets that may use the ppm Encoder. It takes away needing to know the various pulse widths over 2mS that can be set by various RC sets.

I would reduce the 3 sample average a little as the Rx may not repeat that precise pulse length in fail-safe when the battery charge state is different to when it was set. After all, one of those 3 samples was lower than the resulting average.

Users should be warned that the process of setting it should be from the Rx in the failed state and not from a fully functioning link when you turn on the ppm encoder. That way you avoid the sticks being held slightly greater than the actual failsafe setting in the Tx and subsequently the Rx.

So the process would be:
1. Set up the fail-safe position for the throttle servo.
2. Wait the amount of time suggested in the RC manual for the setting to be sent to the Rx
3. Turn off the Tx (Rx goes fail-safe)
4. Turn on PPM Encoder

There is an consideration with powering the Rx and ppm encoder. The power has to be on the Rx for it to be outputting the fail-safe condition. Then the ppm encoder gets powered up to measure and store the throttle pulse size, if it is over 1800uS. So some thought is needed regarding how the Rx and ppm encoder are powered during this time.

If the encoder is powered from the RX side you can use the jumper as a switch.
Powered from the PPZ side the jumper would not be in use. The RX would have its own battery and the switching of power to the encoder could be done with the ppm connector or powering the Tiny On/Off.

Pre Flight testing can be achieved:
If the throttle trim is used neutral(50%) for flight, and 80% trim plus full throttle is set as the fail-safe setting, you can pre-flight test the fail-safe with full throttle and full trim (100%)

Looks good
Warren
Moa is offline Find More Posts by Moa
Reply With Quote
Old Apr 27, 2009, 10:03 AM
Registered User
Greece, Attica, Piraeus
Joined Jun 2004
1,133 Posts
I just finished testing it, it work very well as usual
The procedure now is:
Disconnect the throttle channel from the ppm encoder.
Connect a servo to the throttle channel of the receiver and set the failsafe at the rx side.
Power down the whole system including the rc transmitter.
Re connect the throttle channel of the receiver to the ppm encoder
and power up the receiver and the ppm encoder at least.
Now the throttle position has been memorized and of course i included Hysteresis so there will be no problem with uncertainty.
I could also make the system look for a grounded pin much like the bootloader activation method during normal operation so someone could do it in real time.
I am still reading your suggestions and thinking.
Btw the new throttle threshold is checked after the rx is operational by default.
The ppm encoder waits until the receiver starts generating servo pulses
and then it does whatever else needed.
Chris
hendrix is offline Find More Posts by hendrix
Reply With Quote
Old Apr 27, 2009, 10:04 AM
Registered User
Redwood City, CA
Joined Mar 2009
58 Posts
Quote:
Originally Posted by Moa
Steve

1. Forget about the practice of turning off the transmitter to induce the failsafe setting for the throttle channel, that's an added complication. I would simply program the throttle stick for maximum high and maximum low percentage so you cover the bases. You must then be generating the widest and narrowest pulse your system can.


Then moving the throttle stick full up and full down, including trims you must generate your largest possible pulse. (I read somewhere that Futaba reverse the throttle so maybe full throttle is the smallest pulse.
Warren
Warren and Chris,

Thank you very much. It's now become more clear. I just used the methods from Warren and found out that the max pulse width for Futaba T7c's Throttle channel happens when the stick is at the lowest position. I then used the 140% on the low side of the throttle stick to set the fail-safe value and saved it in the Receiver, and change the up and down side sticks' EPA as 100% later and tested the alt1 firmware and Ver 3.9 again.

In alt1, the GCS change the Navigation mode from Manual to Auto2 when I switch off the Transmitter during the manual mode and the LED continued to blink at 3Hz after that. At the same time, the throttle servo made a small turn toward a neutral position then finally made a turn in the opposite direction and stopped at the fail-safe position (140% in the lower side).

In version 3.9, the LED's frequency changed from 3Hz to 1Hz after I switched off the transmitter during the manual mode. In GCS the navigation mode did not change from manual into Auto2 (in spite of the modification to airframe file), but the RC command Status showed "Lost".

Chris, congratulation to the new baby. Thank you for the great efforts during your busy schedule. It's closer to the target.
SteveRoss is offline Find More Posts by SteveRoss
Last edited by SteveRoss; Apr 27, 2009 at 11:29 AM.
Reply With Quote
Old Apr 27, 2009, 10:17 AM
Registered User
Greece, Attica, Piraeus
Joined Jun 2004
1,133 Posts
Quote:
In version 3.9, the LED's frequency changed from 3Hz to 1Hz after I switched off the transmitter during the manual mode. In GCS the navigation mode did not change from manual into Auto2 (in spite of the modification to airframe file), but the RC command Status showed "Lost".
Great!!!
That is the idea to cut the signal as it would happen with a traditional ppm receiver but i don't know how to put the autopilot in AUTO2 when the signal is lost either
With all that mess i forgot what Moa found, that the Futaba transmitters have the throttle channel reversed compared to the other brands.
I think i will make the code look for a jumper and then set the throttle
threshold 50 microseconds lower or higher of the recorded value depending on what side of the 1500 mark the servo pulse is.
Quote:
At the same time, the throttle servo made a small turn toward a neutral position then finally made a turn in the opposite direction and stopped at the fail-safe position (140% in the lower side).
That is because i included a command to set the throttle to 950 microsecond when the failsafe kicks in.
I think i will remove it so the servo will stay where it was before the failsafe
thus remove the added movement you observed.
Chris
hendrix is offline Find More Posts by hendrix
Last edited by hendrix; Apr 27, 2009 at 10:31 AM.
Reply With Quote
Old Apr 27, 2009, 11:36 AM
Registered User
Redwood City, CA
Joined Mar 2009
58 Posts
Quote:
Originally Posted by Moa
If the encoder is powered from the RX side you can use the jumper as a switch.
Powered from the PPZ side the jumper would not be in use. The RX would have its own battery and the switching of power to the encoder could be done with the ppm connector or powering the Tiny On/Off.


Warren
Chris and Warren:

In my Futaba T7c, there might be a problem for the encoder to be powered from the Rx side in Warren's procedure. The 7channel Receiver R617FS has only 7 connectors, with channel 7 and Battery share the same connector. Channel 7 will be used as the "Mode Channel" for my system and might need to be connected during Warren's initialization procedure?.
SteveRoss is offline Find More Posts by SteveRoss
Last edited by SteveRoss; Apr 27, 2009 at 11:54 AM.
Reply With Quote
Old Apr 27, 2009, 11:39 AM
Registered User
Redwood City, CA
Joined Mar 2009
58 Posts
Deleted.
SteveRoss is offline Find More Posts by SteveRoss
Reply With Quote
Old Apr 27, 2009, 12:05 PM
Registered User
Greece, Attica, Piraeus
Joined Jun 2004
1,133 Posts
The new system is operational
The user with the ppm board powered down must place a jumper on pin 1 of the ISP header and ground and then power up the rc transmitter using normal operating EPA limits and position the stick at the end point he wants.
Then he must power up the ppm board.
The ppm board will memorize the present position-50 microseconds if it is on the 1000 microsecond side or present position+50 if the throttle stick is on the 2000 microseconds side.
Then the ppm board led will flash with a 10HZ rate indicating that the throttle stick position + or - 50 microseconds is stored in the eeprom and stay there for ever.
Then the user must power down the ppm board, remove the jumper
and power up again.
Finally he now can set the rc transmitter to exceed the threshold
(the led will blink slowly when the throttle threshold is exceeded)
and save this value as the throttle failsafe in his receiver.
Moa what do you think?
Chris
hendrix is offline Find More Posts by hendrix
Reply With Quote
Old Apr 27, 2009, 01:57 PM
Registered User
Redwood City, CA
Joined Mar 2009
58 Posts
Quote:
Originally Posted by hendrix
The new system is operational
The user with the ppm board powered down must place a jumper on pin 1 of the ISP header and ground and then power up the rc transmitter using normal operating EPA limits and position the stick at the end point he wants.
Then he must power up the ppm board.

Chris
Chris,

The ideas seemed to be almost perfect. I have some questions in the above procedure. Should the user connect the receiver to the ppm encoder in at least throttle channel and connect the battery in either ppm encoder or receiver (after connecting the pin 1 of the ISP header and the ground with a jumper)?
SteveRoss is offline Find More Posts by SteveRoss
Reply With Quote
Old Apr 27, 2009, 02:35 PM
Registered User
Greece, Attica, Piraeus
Joined Jun 2004
1,133 Posts
Hi
You are correct the only things needed are to connect the receiver's throttle channel to the ppm board and a 5v source from either a battery
or the paparazzi.
It can be done while the ppm board is on the plane or as i prefer remove the ppm board and connect the receiver's throttle channel to channel 3 of the ppm board.
Then i would somehow ground pin 1 of the ISP header
and then connect a battery to the ppm output header of the ppm board
with the rc transmitter already on and with the throttle stick moved either to the max or to the low position (whatever suit's me better)
Chris
hendrix is offline Find More Posts by hendrix
Reply With Quote
Old Apr 27, 2009, 05:18 PM
Moa
Registered User
NewZealand
Joined Feb 2004
23 Posts
Quote:
Originally Posted by hendrix
The new system is operational
The user with the ppm board powered down must place a jumper on pin 1 of the ISP header and ground and then power up the rc transmitter using normal operating EPA limits and position the stick at the end point he wants.
Then he must power up the ppm board.
The ppm board will memorize the present position-50 microseconds if it is on the 1000 microsecond side or present position+50 if the throttle stick is on the 2000 microseconds side.
Then the ppm board led will flash with a 10HZ rate indicating that the throttle stick position + or - 50 microseconds is stored in the eeprom and stay there for ever.
Then the user must power down the ppm board, remove the jumper
and power up again.
Finally he now can set the rc transmitter to exceed the threshold
(the led will blink slowly when the throttle threshold is exceeded)
and save this value as the throttle failsafe in his receiver.
Moa what do you think?
Chris
A lot of good work has been done while I have been sleeping.

Chris your procedure for setting the fail-safe value seems sound and I have no changes to recommend.

The user will need to be wary of adjusting their Throttle dynamics at a later date without considering weather they now exceed the failsafe value and should reset it.

My pre-flight testing suggestion earlier may not work for some configurations but turning off the Tx will be just as good a test pre-flight.

Steve
Your concern about the Rx power being on Ch7 wont be a problem as we don't care what the Tiny sees coming out the Mode Channel while setting up the encoder board.

Chris
This way of setting the value is good for the following which I have yet to confirm and suspect I am going to be shown wrong but maybe its chance (or you new already) that Steve got his to work on the older versions.
The 7c manual says 100% gives 40 degrees of servo motion for Ch1-4 and I expect this is one side of neutral so 80 degrees total. I figure this to mean that 100%=1725 microseconds (40/90) and 140%=1811 microseconds,just over the 1800 threshold in the alternate software. Do you see where I'm going with this? I need to research this a bit more.

Back to the other baby now
Moa is offline Find More Posts by Moa
Reply With Quote
Old Apr 27, 2009, 06:25 PM
Moa
Registered User
NewZealand
Joined Feb 2004
23 Posts
Quote:
Originally Posted by hendrix
Great!!!
That is the idea to cut the signal as it would happen with a traditional ppm receiver but i don't know how to put the autopilot in AUTO2 when the signal is lost either

Chris

OK, I'm confused. Does the encoder now make the Tiny2 go AUTO2 when the encoder goes Fail-safe?

Ahhh! maybe the fail-safe pulse widths exceed the Tiny2 maximums and the Tiny2 sees this as bad communications=lost Signal and thus goes HOME.

Alternately the RX may stop sending a channel pulse instead of pulsing the last known good pulse (not a likely scenario) and this is being seen by Tiny2 as a bad signal so it goes HOME

If Chris makes all Channels go 1500 microseconds (or last known good) except the MODE channel which goes 2000 microseconds, during fail-safe then the Tiny2 will think normal flight but there is a request to go into AUTO2. Assuming Tiny2 does not monitor for to fast a change in signal width then the only time Tiny2 should detect a lost/bad signal when there is an ppm encoder or wiring fault.

The only time ppm Encoder should drop the ppm pulse to Tiny2 is when there is a lost of a channel compared with what was determined at power on.

Chris what do you think, have we been focused on the detail and missed the operational difference the encoder introduces

Warren
Moa is offline Find More Posts by Moa
Reply With Quote
Old Apr 27, 2009, 07:45 PM
Registered User
Redwood City, CA
Joined Mar 2009
58 Posts
Warren.

Quote:
Originally Posted by Moa
OK, I'm confused. Does the encoder now make the Tiny2 go AUTO2 when the encoder goes Fail-safe?
Warren
For the two alternative firmware alt1 and alt2 I tried, alt1 (continue to drive the ppm output with pulse width >= 2000 ms after the Tx signal is lost) will make the GCS to show Auto2 in the navigation mode; alt2 (cut off the ppm output after the Tx signal is lost) will not make GCS to show the Auto2 in the navigation mode. I am not very sure whether or not this implies the alt1 will really make Tiny to have a successful transition into Auto2 mode after Tx signal is lost. I guess in both cases, the Paparazzi's source codes can be modified to have the correct and successful transition into Auto2 (Antonk will be much more knowledgeable on this).


Warren,

Could you please explain how do you obtain the value 1811 from 1725, 140%, and (40/90)?

Quote:
Originally Posted by Moa
The 7c manual says 100% gives 40 degrees of servo motion for Ch1-4 and I expect this is one side of neutral so 80 degrees total. I figure this to mean that 100%=1725 microseconds (40/90) and 140%=1811 microseconds,just over the 1800 threshold in the alternate software. Do you see where I'm going with this? I need to research this a bit more.


Thanks.
SteveRoss is offline Find More Posts by SteveRoss
Reply With Quote
Reply


Thread Tools