Strange Behaviour on DIGITAL5 PIN on multiwii pro , how to solve / change pin

Blu-Vector

Junior Member
I have bought a used multiwii pro. I plugged everything fine, calibrated esc, reflashed the firmware and since i had a problem reloaded the bootloader too just in case, the gui show regular throttle gain.

The Digital 5 pin is not working on the esc plugged on it.
If i switch the esc on other pin it works, if i swap working esc's to d5 they stop running, so it's rather software or board related problem.

I'v uploaded fade sketch on the board, plugged a led trough d5, ground, and it works.
D5 connections to the chip 2560 is also fine.

The only thing remained is the software.
I use a fresh version of multiwii pro.

The board is this http://www.hobbyking.com/hobbyking/...i_PRO_Flight_Controller_w_MTK_GPS_Module.html


I uncommented
//#define QUADX
//#define FFIMUv2

#define GPS_SERIAL 2
#define GPS_BAUD 57600
#define NMEA
#define INIT_MTK_GPS

notthing else

here you can find the whole config file


If you can't find out the problem, how can i use another pin instead the d5?

In fact if i set the quadcopter to 8copter, every pin works excep d5.

Any suggestions?
 
Last edited:

Blu-Vector

Junior Member
a7903452-159-badpwm.jpg Due to bad esc initialization , odd throttle management on D5 with ALL the motors/esc i have .. i decided to make some hard investigation using a diy oscilloscope to mesure the D5 output. Here is the result. Somehow the previous owner fried/corruptet the D5 output for PWM and now i cant use this output for esc use in fact, even if the pwm is generated, the calibration is impossible at that point. As you can see from the output the left pwm is the bad one, for all the others pin the pwm is the same as the right one.



Since every configuration uses pin5 i would like to know if i can use some software solution to override this hardware problem.

Before you ask, i allready reflashed esc , calibrated , uploaded the bootloader of the atmega, checked if the internal interrupt run fine, tryed the software on another atmega2560 ( it works on every pin ) and tried to put different esc's on different positions, i am sure , the only problem is d5 of the multiwii pro .


https://youtu.be/P6bfmR8rPqs
 
Last edited:

jhitesma

Some guy in the desert
Mentor
Should be an easy software workaround. The pin definitions are in def.h for the default boards. You should be able to just re-assign it to another pin.

You could also probably put it on like motor 5 and then customize the mixer to use motor 5 instead of whichever is on the bad pin.
 

Blu-Vector

Junior Member
Should be an easy software workaround. The pin definitions are in def.h for the default boards. You should be able to just re-assign it to another pin.

You could also probably put it on like motor 5 and then customize the mixer to use motor 5 instead of whichever is on the bad pin.
i allready checked the file, and the problem is that i think they use some kind of math to declare pins. But it's too complicated to do a reverse engeneering of the code. I'm asking in multiwii forum but no one answers...