Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
ground test 
Author Message

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post ground test
Hey,

is it possible to test ppm radio signal with the help of the GCS? I mean if the values are correct while moving sticks in on direction...

Thnx,

David


Wed Sep 05, 2012 4:08 pm
Profile

Joined: Tue Jun 21, 2011 7:34 pm
Posts: 116
Post Re: ground test
Hey David,
Yes, after you startup Paparazzi center (cd paparazzi; ./paparazzi), please make sure the datalink, server and messages tools are running (they can be started from the Tools section of the main menu).
Within messages, there should be a section called BOOZ2_RADIO_CONTROL that shows up on the left column. Clicking on it will show you inputs that the Lia is receiving when any of the sticks are moved.


Wed Sep 05, 2012 7:50 pm
Profile

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: ground test
Hey,
i did notice that, but those values are actually scaled digital conversion of the pwm pulse.
I was hoping more of an absolute time (in useconds) information.
Regards,

David


Wed Sep 05, 2012 8:18 pm
Profile

Joined: Wed Sep 05, 2012 11:01 pm
Posts: 1
Post Re: ground test
Hello,

Not 100% sure because I didn't verify this myself, but you could try looking at the PPM message. To do this, you will need to change the telemetry mode to "ppm" which can be done from a dropdown menu in one of the tabs of the Settings part of the Notebook in the paparazzi GCS. Again, not sure if those values are in uS.

-Stephen


Wed Sep 05, 2012 11:17 pm
Profile

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: ground test
scdwyer wrote:
Hello,

Not 100% sure because I didn't verify this myself, but you could try looking at the PPM message. To do this, you will need to change the telemetry mode to "ppm" which can be done from a dropdown menu in one of the tabs of the Settings part of the Notebook in the paparazzi GCS. Again, not sure if those values are in uS.

-Stephen


Hey stephen

yes i checked that ppm option , but the unit is a "tick". As far as i know, tick is one clock cycle with with prescaler.
still trying to figure out the correlation between tick and microsecond in lisam :)
Does anybody know?
Regards,
David


Thu Sep 06, 2012 4:21 pm
Profile

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: ground test
Hey,

i checked paparazi page for ppm signal and it says that it can be possible to get information about ppm signal with the PPM messages and after a certain version of GSC software, it should display information in microseconds. Typical values that i see in this PPM messages are from 7000 to 12000 and these are no microseconds, because ppm signal for one channel is from around 1000 to 1800.
So does anybody knows the exact correlation of ticks and microseconds?
Thnx,
David

david.erzen wrote:
scdwyer wrote:
Hello,

Not 100% sure because I didn't verify this myself, but you could try looking at the PPM message. To do this, you will need to change the telemetry mode to "ppm" which can be done from a dropdown menu in one of the tabs of the Settings part of the Notebook in the paparazzi GCS. Again, not sure if those values are in uS.

-Stephen


Hey stephen

yes i checked that ppm option , but the unit is a "tick". As far as i know, tick is one clock cycle with with prescaler.
still trying to figure out the correlation between tick and microsecond in lisam :)
Does anybody know?
Regards,
David


Fri Sep 07, 2012 8:37 am
Profile
Site Admin
User avatar

Joined: Tue Jun 21, 2011 7:09 pm
Posts: 69
Post Re: ground test
Hi,

The timer for the ppm aquisition is running at 9MHz. (TIM1 running from APB2 clock rail of the STM32 running at 72MHz divided by 8) The conversion to usec is just division by 9. You can see this here:

sw/airborne/arch/stm32/subsystems/radio_control/ppm_arch.h

Code:
#define RC_PPM_TICKS_OF_USEC(_v)        CPU_TICKS_OF_USEC((_v)/9)
#define RC_PPM_SIGNED_TICKS_OF_USEC(_v) SIGNED_CPU_TICKS_OF_USEC((_v)/9)
#define USEC_OF_RC_PPM_TICKS(_v)        USEC_OF_CPU_TICKS((_v)*9)


as well as here:

sw/airborne/arch/stm32/subsystems/radio_control/ppm_arch.c

Code:
TIM_TimeBaseStructure.TIM_Prescaler     = 0x8;


So the range you are seeing is:

7000 -> 777.77us
12000 -> 1333.33us

This looks a bit low to me to be honest. Because looking at the code it measures the time between two rising edges of the signal.

Code:
TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising;


So assuming the pulse is 1000us and the low time between channels is 300us would result in a time from rising to rising edge of 1300us which in turn will result in 11700 timer tick period.

I hope this makes sense and I did not miss anything. :)

(just because I have it open: the conversion to the ppm signal array is done in DecodePpmFrame macro found in sw/airborne/subsystems/radio_control/ppm.h :) )

Cheers Esden


Fri Sep 07, 2012 7:22 pm
Profile

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: ground test
Hey Esden,
thanks for helping me. i did as you wrote for converting the ppm info to useconds and here is the result, saved in the cockpitSX,xml

<!DOCTYPE radio SYSTEM "radio.dtd">
<radio name="cockpitSX (David)" data_min="900" data_max="2100" sync_min ="5000" sync_max ="15000" pulse_type="NEGATIVE">
<channel ctl="D" function="ROLL" min="984" neutral="1351" max="1717" average="0"/>
<channel ctl="C" function="PITCH" min="981" neutral="1346" max="1717" average="0"/>
<channel ctl="B" function="THROTTLE" min="981" neutral="981" max="1716" average="0"/>
<channel ctl="A" function="YAW" min="981" neutral="1348" max="1716" average="0"/>
<channel ctl="PHAUX2" function="MODE" min="1841" neutral="1349" max="856" average="1"/> <!-- Top right switch -->
<channel ctl="E" function="EXPO" min="858" neutral="1340" max="1841" average="1"/> <!-- top right slider -->
<channel ctl="G" function="UNUSED" min="1716" neutral="1340" max="950" average="1"/> <!-- center slider -->
<channel ctl="H" function="UNUSED" min="1716" neutral="1340" max="950" average="1"/> <!-- center slider -->
</radio>

I did "make AIRCRAFT....." upload and leds started to blink as the throttle was not at minimum. Ok, I did some throttle trimming but the the leds started to blink as the roll was not in the center. Well, it was.
I checked also the BOOZ2_RADIO_CONTROL in Messages window and the numbers are as following:
roll 5420
pitch 5410
yaw 4720
throttle 230
mode -9593
aux3(I assume this is Expo) 6000

All of the values are "osillating" in +-50 interval.
I guess the values should be 0, yes?

Of course, first of all I did a checkout:
git remote add tri git://github.com/transition-robotics/paparazzi.git
git fetch tri
git checkout -b toytronics tri/toytronics

then
~$ cd paparazzi
~/paparazzi$ make clean; make
~/paparazzi$ cd conf
~/paparazzi/conf$ cp conf.xml.tri conf.xml

the all of the said above and at the end using usb
make AIRCRAFT=QS4_M2A2 clean_ac ap.upload

(the upload goes without a problem every time)

So :), any idea?
I don't understand also the line in cockpitSX.xml that says
<radio name="cockpitSX (David)" data_min="900" data_max="2100" sync_min ="5000" sync_max ="15000" pulse_type="NEGATIVE">
What are those numbers? How can I measure the signal with oscilloscope to get the numbers?
I was checking the paparazzi wiki and it says that sync_min and sync_max is for synchronization pulse which my radio doesn't have.
The radio seems to work well. I can see on my oscilloscope data pulses (nine, so it is 8 channel radio) with pulse width of 500us.

Looking forward to hearing from you again because I would really like to fly this thing.
Regards,

David


Sat Sep 08, 2012 7:12 pm
Profile

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: ground test
Hey Esden,

I tried wtih 9 for ticks to useconds conversion but when sticks were centered the BOOZ2_RADIO_CONTROL gave me values around 4500 instead of 0.
Therefore I used 8 for conversion as it is written in code

TIM_TimeBaseStructure.TIM_Prescaler = 0x8;

This gave me BOOZ2_RADIO_CONTROL numbers that are make much much more sense and they are consistent with the measurements that I made with my oscilloscope.

Still i quite dont get the numbers in line: <radio name="cockpitSX (David)" data_min="900" data_max="2100" sync_min ="5000" sync_max ="15000" pulse_type="NEGATIVE">

But it seems it works.

The bright side of this problem solving is that I am getting used to the code.:)

So: next questions :)
How important is that the motors start to spin at the same time when throttle is applied? I have totally flat surface under my QS and I manage to get motors spining in two to three throttle "clicks".
is this difference due to the bad accelerometer sensor calibration?

Regards,
David


Sun Sep 09, 2012 2:03 pm
Profile

Joined: Mon Sep 05, 2011 10:26 pm
Posts: 66
Post Re: ground test
One more question :)
i want to be 100% sure that everything is ok before I go to the field.
After a successful initialization when powered up, the leds on QS are nicely switched on. After I apply some throttle, they start to blink. They are periodically switched off four times, meanwhile they stay switched on.
So:
-switched on
-four blinks (off on, off on, off on, off on)
-switched on for one second
-repeat everything....

if I reduce the throttle to zero, leds stay switched on.

Any comment? :)
Regards,
David


Sun Sep 09, 2012 2:12 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.