APM2 output #1 is fried, may I change the code to use channel 2-7 ?

Hi all,

It seem that my output # 1 on my new APM2 just fried, I have an hexa and the board has 8 output channnels.

May I change the code with arduino so that I used channel 2-7 instead of 1-6 ?

I'm using Arducopter v. 2.5.5 and I look at the code and did not find any relevant info yet.

Thanks for any advice.

Tags: APM2, arcucopter, fried, output

Views: 383

Reply to This

Replies to This Discussion

how did you fry an output? could it be a bad connection or dry solder joint on the IC?

It was a bad ESC for motor #1 it went crazy and the copter flip and I did not cut the throttle fast enought. I dont know more .... but one thing for sure all my other output are working fine.  If I exchange my output cable the problem is only present on output #1. I even change the output cable but no luck.  All the solder joint seem fine but I'm no expert.

Thanks

Since I'm not the only one with a flip on take off (http://www.diydrones.com/forum/topics/random-flip-on-takeoff?commen...) maybe it is a mix of the flip take off and a bad ESC.?

On APM 2.0, the outputs come directly off of the mega 2560 chip, where in the APM 1.0 there was a multiplexer IC between the mega and the actual outputs 1-4.

Knowing that the main mega has been damaged, I would replace it since you never know if the damage could migrate or lock up the mega mid flight. I know DIY drones can repair the boards or if you had access to a hot air rework station, you could fix it for the cost of the chip.

I would think you could modify the code if you really wanted, but again, I just wouldn't go that route. Further, I think what you want is to leave the rest the same and assign output 1 to channel 7 and not touch the numbering on 2-6. That would be the easiest and most logical change.

 

I didn't have a copy of 2.5.5 handy, but in the zip of 2.5.3 motors_hexa.pde is the config I think you want to change. Not 100% sure but it's a place to look.

Nope, my fault, APM_Config.h is the file to edit.

// Custom channel config - Expert Use Only.

// this for defining your own MOT_n to CH_n mapping.

// Overrides defaults (for APM1 or APM2) found in config_channels.h

// MOT_n variables are used by the Frame mixing code. You must define

// MOT_1 through MOT_m where m is the number of motors on your frame.

// CH_n variables are used for RC output. These can be CH_1 through CH_8,

// and CH_10 or CH_12.

// Sample channel config. Must define all MOT_ chanels used by

// your FRAME_TYPE.

// #define CONFIG_CHANNELS CHANNEL_CONFIG_CUSTOM

// #define MOT_1 CH_6

// #define MOT_2 CH_3

// #define MOT_3 CH_2

// #define MOT_4 CH_5

// #define MOT_5 CH_1

// #define MOT_6 CH_4

// #define MOT_7 CH_7

// #define MOT_8 CH_8

So you would take out the comments and make it:

#define CONFIG_CHANNELS CHANNEL_CONFIG_CUSTOM // this line makes the config override//

#define MOT_1 CH_7  //move motor 1 to good channel 7//

#define MOT_2 CH_2

#define MOT_3 CH_3

#define MOT_4 CH_4

#define MOT_5 CH_5 

#define MOT_6 CH_6

#define MOT_7 CH_1 // Note this was channel 7 now being moved to dead channel 1 //

#define MOT_8 CH_8

I also noticed in the channel_config.h they say:

"DO NOT EDIT"  meaning, according to the developers, modifying APM_Config.h is the correct way.

As with any guesswork YMMV.

Wow great, thanks, I will try this later today.

I will probably get a new APM2 board later but for now I would like to test my hexa kit since it never flown .

Thanks

Again, no garantees, I'm not in any way an expert at this code, but that seems to be the correct change to make. Please let me know if that does work. I'm on travel and don't have access to an APM to test.

Thanks,

One more question, if I may ask.

I have modify the file.

I'm running arduino 1.0.1 from linux,

I have load the code Arducopter.pde,

A check the code compile the code and it updated itselft correctly to my board.

NO error message all seem fine.

Now the board is rebooting continoustly from CLI in arduino I see it.

Init Arducopter v.2.5.5 

....

...

GPS enable

Ground start

init Gyro

It will stay there for 2-3 minutes then will reboot

I must say I have nothnig connected to my APM2 execpt my usb port.

From the tool menu do I need to do something special ?

I have select the correct board type Mega 2560

Prog: AVRISV mkll ( is this ok ? )

Do I need to Burn boot loader or Fix encoding amd reload .....

I have follow this guide http://code.google.com/p/ardupilot-mega/wiki/Code

thanks

I will reconnect everything with no pros and redo all the calibration and report back in a few minutes.

Hi all,

after retrying I have no luck.   I can compile and update the code on the APM2 with no error but it will not work.

The boot process goes until init gyro. after that I dont have the blue and red led ;-(

If I reupdate the original 2.5.5 software with the mission planner all is back to normal I get my blue and red led and I get the arducopter 2.5.5 prompt.

I must be missing a step with arduino 1.0.1, I tried with linux 64 bit and vista 64 bit no more luck,

I even copied my new firwware to mission planner ditectory but the MP check if the firmware is fine and will download the official release and override my ;-(

If we could select our firmware from the mission planner maybe it would work ?

I'm not far but still not working.   I will come back later.

Thanks for any advice.

Well i finally manage to install my own version of the soft on my APM2,

I did it with Mission planner since from arduino on Linux or our Mac or Windows the soft was uploading okay but was not working, Everything was freezing after Init Gyro.... ;-(

For me the only way that the APM boots ok after the upgrade is to use the Mission Planner from My Windows VM.

I copied over my newly compile hax file from arduino called ArduCopter.cpp.hex, if was in one of /tmp/build folder for my linux host.

From My Mission planner directory (C:\Program Files\APM Planner)

I opened up a cmd ( dos windows ) and prepare myself to override the newly downloaded file (because mission planner check the firwmare.hex file and if it is not the correct one it will download the correct copy from internet )

copy ArduCopter.cpp.hex firmware.hex 

I did this just after pressing the update button in the mission planner, and I did it 2-3 times to be sure to override the mission palnner one with my own version of the hex file......

And voila magie the uplaod went fine and now my boart boot normally

Too late to test If the updated APM2 will work fine, but at leat I found a way to update the soft.

Cheer

way to go! one step closer... just hope your code hack will indeed take care of shifting the output by 1 and all will be fine! 

Let us know! 

Dany

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service