Hello all,
I have a Multiwii Drone setup as -
Arduino Nano with the Multiwii firmware, outputting PWM on D3, D9, D10 and D11 (will be referred as pins 3, 9, 10 and 11 from now). I have a ESP32 next to it which is connected to Wifi and received commands as ip packets. ESP32 parses the ip packets and outputs it to pin 2 of ESP32 which is connected to D2 of Nano. Nano will receive commands for roll, pitch, yaw and throttle as ppm signals in D2. Everything described so far is working perfectly. When armed, the 4 motors get spinning. When applying throttle of 25 to test it, pins 3, 9 and 10 get perfect PWM but pin 11 has no change to its pwm. It is still in its neutral position. But when I increase roll, pitch and yaw values, it gets some thrust, depicting that there is nothing wrong with the motors or esc. But when yaw is max, the pin 11 motor gets thrust but pins 3 and 9 which should have some thrust go to neutral thrust.
Can anybody tell me whether this is a problem with the PIDMIX of the firmware or something else? I've attached the PIDMIX values for my frame QuadX -
#elif defined( QUADX )
motor[0] = PIDMIX(-1,+1,-1); //REAR_R
motor[1] = PIDMIX(-1,-1,+1); //FRONT_R
motor[2] = PIDMIX(+1,+1,+1); //REAR_L
motor[3] = PIDMIX(+1,-1,-1); //FRONT_L
Please let me now. Thank you.
PIDMIX problem?
Re: PIDMIX problem?
does this mean 25%?applying throttle of 25
Can you measure the pwm signal on the 4 outputs?
Does symptom remain if you swap wires to ESCs from pins 3 & 11?
arduino nano is not much of a 32bit system really. Wrong subsection but nevermind, traffic is slow these days
-
- Posts: 5
- Joined: Thu Oct 19, 2023 7:10 pm
Re: PIDMIX problem?
Yes, throttle of 25 means 25% of throttle.
I measured the output of all 4 pins 3, 9, 10 and 11 using oscilloscope. Pins 3, 9 and 10 have the expected PWM but pin 11 doesn't change PWM if throttle is 25% and roll, pitch and yaw are all at 0%.
Also, I changed both the ESC and motor, the symptoms still remain. I also changed the PIDMIX to this -
#elif defined( QUADX )
motor[3] = PIDMIX(-1,+1,-1); //REAR_R
motor[2] = PIDMIX(-1,-1,+1); //FRONT_R
motor[1] = PIDMIX(+1,+1,+1); //REAR_L
motor[0] = PIDMIX(+1,-1,-1); //FRONT_L
Now the front right doesn't receive throttle, rear left is functional. So, all in all, I believe there is a problem with the software itself. If not PIDMIX, but something else.
I measured the output of all 4 pins 3, 9, 10 and 11 using oscilloscope. Pins 3, 9 and 10 have the expected PWM but pin 11 doesn't change PWM if throttle is 25% and roll, pitch and yaw are all at 0%.
Also, I changed both the ESC and motor, the symptoms still remain. I also changed the PIDMIX to this -
#elif defined( QUADX )
motor[3] = PIDMIX(-1,+1,-1); //REAR_R
motor[2] = PIDMIX(-1,-1,+1); //FRONT_R
motor[1] = PIDMIX(+1,+1,+1); //REAR_L
motor[0] = PIDMIX(+1,-1,-1); //FRONT_L
Now the front right doesn't receive throttle, rear left is functional. So, all in all, I believe there is a problem with the software itself. If not PIDMIX, but something else.
Re: PIDMIX problem?
possible but unlikely. Most users built quads and arduino nano or some such was very common at the time. So you can expect this should be a well tested combination.ishanshah474 wrote: ↑Fri Feb 02, 2024 8:45 pmSo, all in all, I believe there is a problem with the software itself. If not PIDMIX, but something else.
I suspect your config.h may contain some unwanted setting.
Your changes to config should be minimal - QUADX and some sensors or sensorboard. In arduino IDE you must select the 328p arduino nano as target.
From there, do compile, upload, run the MultiWiiConfig to reset the sensors and stored values once and observe the output values after arming.
Alternately, define another coptertype (quadp, tri) and check the output signals to narrow your problem down further.
-
- Posts: 5
- Joined: Thu Oct 19, 2023 7:10 pm
Re: PIDMIX problem?
Hello, thanks for your reply. I did check everything you mentioned. I tried to test the drone with a QuadP, Y4 and Tri combination over the weekend but the drone still flips upon throttle. Also, I just uncommented QuadX, GY_521, BMP085 and PPMSumReceiver on the config. I've attached the config file here. Apart from that everything is in the default state. Please let me know what you think.
Re: PIDMIX problem?
OP has crossposted his problem to other places and failed to sync progress.
I am out
I am out