jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
PID tuning for WLToys v977
« on: April 21, 2017, 10:58:27 pm »
I use the stock ESC for main rotor and a TIP120 2-stage transistor to drive the tail, as attached pictures. The stock BEC is too weak to power Revo board, and I have to add an additional 3 gram battery in parallel to power the board. The PWM range for the tail is set to 0us to 15000us in outputchannelform.cpp . I have not set any PID , I use the GCS's default settings.

It takes off while the tail oscillates violently, then the heli tumbles to the left.

Thanks if any suggestion.

I am thinking about adding TCP/IP over serial modem to the oplink because some people say that the ARM32F4 is only utilized 2% of its power. Eventually I want to add MQTT to the vehicle.
« Last Edit: May 05, 2017, 10:57:25 pm by jcg1541 »

Re: PID tuning for WLToys v977
« Reply #1 on: April 25, 2017, 08:49:07 am »
It sounds like your main problem is yaw PIDs too high.  Cut stabilisation page inner loop yaw PIDs (all numbers) in half (repeat if needed).

jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
Re: PID tuning for WLToys v977
« Reply #2 on: April 29, 2017, 05:50:25 am »
Thanks. I have fixed it by doing almost nothing.

I started from scratch, reinstall my PC , reinstall librepilot ubuntu apt, erase board, install firmware.

It takes off up to my eye level now. The only problem now is that I use a joystick to control it, and the
half second delay makes it hard to fly indoors because when I try to correct any thing, it is still doing
my previous command. So, always ends up on the walls.

It is very surprising to see it hover relatively stable in the air. It is almost eerie.

Attached are my control settings that flies. On my attempt to perfect it, it flies worse and worse.
So, I will start from scratch some time later. I am mostly here to add TCP/IP to the modem .
Ultimate goal is to have MQTT to jack up the 2% utilized power of the arm32f4 .

The tail motor ESC is from ebay seller bigdotunclercstore , model number 012R , 2A 1S. The tail
motor esc and 3 servos are all powered by the stock BEC. So, there is a wire loom to tie the 4 ends.
Main rotor ESC is stock. Revo is powered by a separate 150mAH battery. 2 batteries parallel
share the same ground at the BEC ground.

It sounds like your main problem is yaw PIDs too high.  Cut stabilisation page inner loop yaw PIDs (all numbers) in half (repeat if needed).
« Last Edit: April 29, 2017, 06:22:46 am by jcg1541 »

Re: PID tuning for WLToys v977
« Reply #3 on: April 29, 2017, 07:38:15 am »
You should be able to get that control latency reduced.  I would increase the OpLink baud on both sides and increase the data rates (play with metadata) (decrease the period) on the controlling UAVOs.

daveapplemotors

  • *
  • 245
  • Helis rule
Re: PID tuning for WLToys v977
« Reply #4 on: April 29, 2017, 12:04:54 pm »
This is interesting.

BTW
Is the tail motor ESC Silabs or Atmel? Flashed?
Happy Landings!

jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
Re: PID tuning for WLToys v977
« Reply #5 on: April 29, 2017, 05:28:04 pm »
I can't tell what the tail ESC is made with. The maker scratches out the controller surface marks.
It has 2 8-pin chip, each on either side of the strip. When Pwm width is between 1000 and 1500us, prop pushes to the wrong direction for heli. When width is between 1500 and 1900us, it pushes correctly. 1900 seems to be overloading tail motor. 1800 seems OK. I am going to go back to use tip120 2-stage transistor.

This is interesting.

BTW
Is the tail motor ESC Silabs or Atmel? Flashed?

Re: PID tuning for WLToys v977
« Reply #6 on: April 29, 2017, 06:15:25 pm »
You can set output page min/neutral/max to something like 1500/1650/1800 to avoid needing to change hardware.  :)

jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
Re: PID tuning for WLToys v977
« Reply #7 on: April 29, 2017, 08:07:55 pm »
Yes. The only reason I want to change hardware is to avoid the closed source controller.

You can set output page min/neutral/max to something like 1500/1650/1800 to avoid needing to change hardware.  :)

jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
Re: PID tuning for WLToys v977
« Reply #8 on: April 30, 2017, 09:02:30 am »
OK, I have changed back to tip120 transistor for tail motor.

I have not modified the OPLink data intervals. Attached are the configuration that can take off, for my own record.

Right now, the rubber band ties the transistor to the panel. And the ground pin of the transistor stands up the board and bares the banding of the board upon impacts. So, after a numerous impacts on the walls, the transistor ground pin breaks. I am thinking about using some standoff pillar on the lower 2 corners of the board to stand up the board.

Yes. The only reason I want to change hardware is to avoid the closed source controller.

You can set output page min/neutral/max to something like 1500/1650/1800 to avoid needing to change hardware.  :)
« Last Edit: May 03, 2017, 07:40:46 pm by jcg1541 »

jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
Re: PID tuning for WLToys v977
« Reply #9 on: May 05, 2017, 10:54:09 pm »
OK, I got the pillar. Now the final version is as attached.

OK, I have changed back to tip120 transistor for tail motor.

I have not modified the OPLink data intervals. Attached are the configuration that can take off, for my own record.

Right now, the rubber band ties the transistor to the panel. And the ground pin of the transistor stands up the board and bares the banding of the board upon impacts. So, after a numerous impacts on the walls, the transistor ground pin breaks. I am thinking about using some standoff pillar on the lower 2 corners of the board to stand up the board.



jcg1541

  • **
  • 98
    • Phones, Networks, And The Red Pill
Re: PID tuning for WLToys v977
« Reply #10 on: May 07, 2017, 05:31:09 am »
Sorry, TIP120 transistor is not working out. It almost works, but the tail only holds good for descending landing when rotor is soft. The take off is all pirouette.

I back track to the 1S ESC. And the entire setup, gcs, parameters, etc, is in my blog
https://nocomputerbutphone.blogspot.com/2017/05/joystick-control-cc3d-revolution-on.html
« Last Edit: May 20, 2017, 07:21:43 am by jcg1541 »