MWC 2.1 brushed motor spin up half sec during power on.

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
redhunter168
Posts: 2
Joined: Wed Aug 22, 2012 4:46 am

MWC 2.1 brushed motor spin up half sec during power on.

Post by redhunter168 »

Dear all,

First would like to Thank You Alex and all other developers who worked on multiwii.

I am very new to multiwii and able to build a brushed QUADX using MWC 2.1 after search through the posts here.

Hardware:
Promini, mpu6050 and spektrum 6ch receiver.
Connect a N-MOS to pin 3,9,10,11 as brushed ESC.

Software MWC2.1 :
1. Set ESC as for brushed motor by un comment //#define EXT_MOTOR_RANGE
viewtopic.php?f=6&t=1853&p=19207&hilit=EXT_MOTOR_RANGE#p19207

2. Alexinparis avoid any power on the brushed motor.
viewtopic.php?f=8&t=2277&p=21404&hilit=brushed#p21404


Problem:
But currently all the 4 brushed motor spin up for half sec and stop each time I plug in the power.
This is very annoying and risky for me.
If after power on and in unarm mode(motor stop), press reset button will not spin up the motor.

Anyone who success build brushed mwc 2.1 and solve this, please help.
Just can't find the solution after searched through the posts.

Thanks
David

redhunter168
Posts: 2
Joined: Wed Aug 22, 2012 4:46 am

Re: MWC 2.1 brushed motor spin up half sec during power on.

Post by redhunter168 »

Update:
I install a pull-down resistor 10M ohms on the output pin 3,9,10,11.
The spin up problem on power up go away.
But flying become very unstable. Still need to look into it.

Any help are welcome.

itain
Posts: 75
Joined: Tue Aug 23, 2011 10:32 pm

Re: MWC 2.1 brushed motor spin up half sec during power on.

Post by itain »

The spin-up time after power up is probably because the outputs are still in 3-rd state until the arduino leaves the bootloader and lets MultiWii initialize the I/O. Using pulldowns is probably the best solution. I do not see how it could affect stability.... except if you are not using logic-level mosfets.
Also, you did not mention any protection diodes across the motors. Switching inductive loads (motor, relay...) without protection diodes may harm your circuit!
What's the battery voltage? Is the arduino running on 5V/16MHz? can you provide schematics of a motor driver?

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: MWC 2.1 brushed motor spin up half sec during power on.

Post by Alexinparis »

1) At the boot time, there is no PWM generation on the OUTPUT PINs.
2) It's only done when the hardware PWM generation is setup via initOutput() (always MINCOMMAND value at the beginning).

So the motor spin up can only be explained by the 1) case.
If it happens during the arduino boot time, nothing can be really done in the code.
The board I'm using on my ladybird was created by Ulix and works fine with no motor spin up at the beginning,
but I only use it, I don't know exactly what is the hardware choice about FET/NMOS/...

Post Reply