Atmega328 with fet output for motor brushed
Atmega328 with fet output for motor brushed
Hello my friend,I am Ivan,i am new to multiwii,I am interested to biuld my tiny quadcopter for small brushed motor.I am interested to design a board with atmega328 and fet output for drive small brushed motor.Can you give me the link or info on software to use?Thanks Ivan
I don' t know how to mod multiwii 2.2 for have direct output for fet(si2302).If you can explain i am very happy.
I don' t know how to mod multiwii 2.2 for have direct output for fet(si2302).If you can explain i am very happy.
Re: Atmega328 with fet output for motor brushed
Attached file should give you an idea how i do brushed motors. do a
#define EXT_MOTOR_4KHZ
somewhere. Note the 328 limits to 1,4,32 khz, while with 32u4 you get the full blast.
#define EXT_MOTOR_4KHZ
somewhere. Note the 328 limits to 1,4,32 khz, while with 32u4 you get the full blast.
Last edited by Plüschi on Mon Dec 02, 2013 12:20 pm, edited 1 time in total.
Re: Atmega328 with fet output for motor brushed
Thanks, so i have to change the output file in multiwii 2.2 and recompile?
Re: Atmega328 with fet output for motor brushed
You have to find your way, yes.
I have a whole project for a brushed microquad, but it is made for 32u4 proc, spek sat and 6050 sensor. You have a different proc, no spektrum sat, and i dont know what sensor, so my project might be of little use.
I have a whole project for a brushed microquad, but it is made for 32u4 proc, spek sat and 6050 sensor. You have a different proc, no spektrum sat, and i dont know what sensor, so my project might be of little use.
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Atmega328 with fet output for motor brushed
Ivan2280 wrote:Hello my friend,I am Ivan,i am new to multiwii,I am interested to biuld my tiny quadcopter for small brushed motor.I am interested to design a board with atmega328 and fet output for drive small brushed motor.Can you give me the link or info on software to use?Thanks Ivan
I don' t know how to mod multiwii 2.2 for have direct output for fet(si2302).If you can explain i am very happy.
If you look at the predefined LADYBIRD board,
it's already included in 2.2
What is not included is the possibility to drive brushed motors with a 32u4 board. but it's off topic.
Re: Atmega328 with fet output for motor brushed
Alex, TY for implementing my high-freq brushed output in 2.3 shared. It DOES make brushed quads fly much better. 490hz is brutal on low inductance coreless mini motors.
Why only for the 328 and not for 32u4 as well? There is a whole community using the 32u4 brushed on the "PocketQuad".
Store:
http://www.hobbyking.com/hobbyking/stor ... _PNF_.html
Rcgroups:
http://www.rcgroups.com/forums/showthread.php?t=1885026
I attach my output.cpp for 328 and 32u4 brushed.
Why only for the 328 and not for 32u4 as well? There is a whole community using the 32u4 brushed on the "PocketQuad".
Store:
http://www.hobbyking.com/hobbyking/stor ... _PNF_.html
Rcgroups:
http://www.rcgroups.com/forums/showthread.php?t=1885026
I attach my output.cpp for 328 and 32u4 brushed.
- Attachments
-
- Output.zip
- (5.54 KiB) Downloaded 869 times
Re: Atmega328 with fet output for motor brushed
+1 Plüschi, this code makes wonder with at32u4 + brushed motors, that's what I'm using on the HK pocketquad and frankemQx
Re: Atmega328 with fet output for motor brushed
+1 I've got a few 32u4 boards as well, only one is on a brushed system so far, but looking at sticking a nano board into a custom brushed setup.
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Atmega328 with fet output for motor brushed
Plüschi wrote:Alex, TY for implementing my high-freq brushed output in 2.3 shared. It DOES make brushed quads fly much better. 490hz is brutal on low inductance coreless mini motors.
Why only for the 328 and not for 32u4 as well? There is a whole community using the 32u4 brushed on the "PocketQuad".
I attach my output.cpp for 328 and 32u4 brushed.
Hi,
On my side, I have only some 328p brushed boards made by Ulix.
On a genuine ladybird from Walkera, 490Hz with those boards gives already good results and the motors stay cold.
To test new things, I tried the mod for 4kHz and 32kHz. not tried 1kHz.
It's hard to see the difference in stability (still excellent by default, and I can even more increase PID), but I noticed the motors make less noise (especially high tones noise).
At 32kHz, they are absolutely quiet running at idle pace.
It can't be a bad thing, I understand it can improve things for some setups based on other motor-FET combos and I definitely adopt it for my ladybird

Thank you (and Greg) for this mod. I will add it also for 32u4 proc.
Re: Atmega328 with fet output for motor brushed
Anyone got a link to a small setup like ladybird running multiwii. Build log type thing covering what props / batteries etc...
Sounds like a nice way to have a small cheap dev copter
Sounds like a nice way to have a small cheap dev copter
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Atmega328 with fet output for motor brushed
Plüschi wrote:Alex, TY for implementing my high-freq brushed output in 2.3 shared. It DOES make brushed quads fly much better. 490hz is brutal on low inductance coreless mini motors.
Why only for the 328 and not for 32u4 as well? There is a whole community using the 32u4 brushed on the "PocketQuad".
Store:
http://www.hobbyking.com/hobbyking/stor ... _PNF_.html
Rcgroups:
http://www.rcgroups.com/forums/showthread.php?t=1885026
I attach my output.cpp for 328 and 32u4 brushed.
Hi,
Now done for 32u4.
could you please check if it's ok as I don't have such a board to test ?
Re: Atmega328 with fet output for motor brushed
First 2 channels are OK, last 2 are not. Tested 8khz on nanowii.
Motor 3 will go 50% throttle even disarmed, Motor 4 will do 0 to 50% only.
The code you did take is a quite old version. New version has other PWM mode which allows 2 times the resolution. This is only relevant for 32khz and 64khz. Btw no-one uses 1,2 or 64 khz.
Channel 3 works only if HWPWM6 is NOT defined. Same thing as in my code, but a probably a source of future problems.
Edit: I did delete the "Sat Jun 01" attachment and left only new "Wed Nov 27" one.
Motor 3 will go 50% throttle even disarmed, Motor 4 will do 0 to 50% only.
The code you did take is a quite old version. New version has other PWM mode which allows 2 times the resolution. This is only relevant for 32khz and 64khz. Btw no-one uses 1,2 or 64 khz.
Channel 3 works only if HWPWM6 is NOT defined. Same thing as in my code, but a probably a source of future problems.
Edit: I did delete the "Sat Jun 01" attachment and left only new "Wed Nov 27" one.
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Atmega328 with fet output for motor brushed
Plüschi wrote:First 2 channels are OK, last 2 are not. Tested 8khz on nanowii.
Motor 3 will go 50% throttle even disarmed, Motor 4 will do 0 to 50% only.
The code you did take is a quite old version. New version has other PWM mode which allows 2 times the resolution. This is only relevant for 32khz and 64khz. Btw no-one uses 1,2 or 64 khz.
Channel 3 works only if HWPWM6 is NOT defined. Same thing as in my code, but a probably a source of future problems.
Edit: I did delete the "Sat Jun 01" attachment and left only new "Wed Nov 27" one.
Ok, second try just committed. The integration is less clean, but it should work.
Re: Atmega328 with fet output for motor brushed
Seems to be working if HWPWM6 is defined 
TY from the 32u4 community. I hope some will chime in and test the dev version.

TY from the 32u4 community. I hope some will chime in and test the dev version.
Code: Select all
#if defined(HK_POCKETQUAD)
// use speksat 1024 or 2048 receiver
#define HWPWM6
#define MPU6050
#define ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = -X; imu.accADC[PITCH] = -Y; imu.accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}
#endif
#if defined(HK_MICRO_MWC)
// use ppm_sum spek type max 6 channels
#define MPU6050
#define ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = -X; imu.accADC[PITCH] = -Y; imu.accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = Y; imu.gyroADC[PITCH] = -X; imu.gyroADC[YAW] = -Z;}
#define VBATSCALE 54 // (*) (**) change this value if readed Battery voltage is different than real voltage
#define V_BATPIN A2 // Analog PIN 2
#endif
Re: Atmega328 with fet output for motor brushed
How do I connect 32u4 board to fet and brushed motor to test this code?
Re: Atmega328 with fet output for motor brushed
Plüschi, do you know if the at32u4 (or m328) could output 6 or 8 high frequency PWM signals for brushed hexa or octo ?
Re: Atmega328 with fet output for motor brushed
- 10k to 20k gate resistance on your fet design is a little bit much.
- 328 is limited to 4 outputs. Except you throw out arduino timing and use timer 0 for pwm.
- 32u4 does have more. I dont know exact numbers. While the chip spec is good, real life is not. Some of the OCXXX are not available on pins, and some are combined. Maybe 6 outputs are possible, but not 8. You will have to research that yourself. Count the OCxx except the OC0x ones in the atmega32u4.pdf
- 328 is limited to 4 outputs. Except you throw out arduino timing and use timer 0 for pwm.
- 32u4 does have more. I dont know exact numbers. While the chip spec is good, real life is not. Some of the OCXXX are not available on pins, and some are combined. Maybe 6 outputs are possible, but not 8. You will have to research that yourself. Count the OCxx except the OC0x ones in the atmega32u4.pdf
Re: Atmega328 with fet output for motor brushed
Thanks,
20k resistor on fet gate is what is used on the HK pocket quad
I'll have a look at the at32u4 datasheet.
20k resistor on fet gate is what is used on the HK pocket quad

I'll have a look at the at32u4 datasheet.
Re: Atmega328 with fet output for motor brushed
goebish wrote:20k resistor on fet gate is what is used on the HK pocket quad
GKE did post the fet drivers of 4 microquads somewhere in the pocketquad thread. Very useful.
A big gate resistor will make the fet switch slowly. As example lets say it takes 1ms to switch. At 10hz pwm, 100ms per cycle, it will be 1% of time in resistor mode, 99% in switch mode (on or off). At 100hz its 10% in resistor mode. At 1000hz its 100% resistor. Resistor mode is bad, generates heat, destroys efficiency. A big gate resistor will not allow high pwm frequencies.
Re: Atmega328 with fet output for motor brushed
Thanks for the explanation.
Re: Atmega328 with fet output for motor brushed
Hi, I just wanted to post that there sellers online that sell motor drivers, specifically for this purpose See http://www.pial.net/store/.
Hobbyking has multiwii boards with integrated brushed moror drivers, needs a dsm2 compatible transmitter. See http://www.hobbyking.com/hobbyking/store/__42255__Micro_MWC_Flight_Control_Board_DSM2_ESC_39_s_X4_Brushed_Integrated.html. It can provide up to 2a in 1s attery.
I am not in anyway affiliated with any of these sellers. I just wanted to point people in this thread because i thought it might interest them.
Hobbyking has multiwii boards with integrated brushed moror drivers, needs a dsm2 compatible transmitter. See http://www.hobbyking.com/hobbyking/store/__42255__Micro_MWC_Flight_Control_Board_DSM2_ESC_39_s_X4_Brushed_Integrated.html. It can provide up to 2a in 1s attery.
I am not in anyway affiliated with any of these sellers. I just wanted to point people in this thread because i thought it might interest them.
Re: Atmega328 with fet output for motor brushed
Thanks for the schematic goebish. I think I am starting to understand. So I need a mosfet a resistor and a diode that goes across the motor terminals. Now to find the correct parts and sources for the parts
Thanks rgotera for the info. That DSM2 integrated board looks interesting.
Thanks rgotera for the info. That DSM2 integrated board looks interesting.
Re: Atmega328 with fet output for motor brushed
Hi all,
I'm starting to build a microquad and I've a question:
I will use a Pro mini 328 processor, can I use a "normal" 4 channels Rx instead of DSM2 Sat Rx?
Then, may I use MWii 2.3 "official" code (of course after setting it up with config.h)?
With official MWii 2.3 code, how will be the output freq. to fet/motors?
Thanks
Carlo
I'm starting to build a microquad and I've a question:
I will use a Pro mini 328 processor, can I use a "normal" 4 channels Rx instead of DSM2 Sat Rx?
Then, may I use MWii 2.3 "official" code (of course after setting it up with config.h)?
With official MWii 2.3 code, how will be the output freq. to fet/motors?
Thanks
Carlo
Re: Atmega328 with fet output for motor brushed
The 328 isnt any good for DSM2 Sat Rx anyway. The micro MWC uses dsm2 PPM-SUM. You may use your 4 "normal" channels instead.
Newest 2.3 "official dev" version does it
Search config.h to set motor pwm frequency.
Newest 2.3 "official dev" version does it

Search config.h to set motor pwm frequency.
Re: Atmega328 with fet output for motor brushed
Plüschi wrote:The 328 isnt any good for DSM2 Sat Rx anyway. The micro MWC uses dsm2 PPM-SUM. You may use your 4 "normal" channels instead.
Newest 2.3 "official dev" version does it
Search config.h to set motor pwm frequency.
Tanks Pluschi,
Yes, I know that Micro MWC uses dsm2 PPM-SUM, infact i asked for a confirmation about using a 4 "normal" RX as I don't have a dsm2 RX

But in config.h MWii vers. 2.3 I haven't seen the motor output freq setup...
I will look better
Cheers
carlo
Re: Atmega328 with fet output for motor brushed
Dev version r1648 is here:
https://code.google.com/p/multiwii/down ... p&can=2&q=
https://code.google.com/p/multiwii/down ... p&can=2&q=
-
- Posts: 244
- Joined: Sat Mar 23, 2013 12:34 am
- Location: Australia
Re: Atmega328 with fet output for motor brushed
Plüschi wrote:- 10k to 20k gate resistance on your fet design is a little bit much.
- 328 is limited to 4 outputs. Except you throw out arduino timing and use timer 0 for pwm.
- 32u4 does have more. I dont know exact numbers. While the chip spec is good, real life is not. Some of the OCXXX are not available on pins, and some are combined. Maybe 6 outputs are possible, but not 8. You will have to research that yourself. Count the OCxx except the OC0x ones in the atmega32u4.pdf
Hi Plüschi!
I don't see any comments beside the config.h in current build stating what the limitations are. So am I correct in understanding that any of the higher EXT_MOTOR_xKHz defines won't work on a hex quad utilising 328p? So just stick with the EXT_MOTOR_RANGE. Also, EXT_MOTOR_RANGE is mutually exclusive with the other EXT_MOTOR_xKHz defines?
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Atmega328 with fet output for motor brushed
felixrising wrote:Plüschi wrote:- 10k to 20k gate resistance on your fet design is a little bit much.
- 328 is limited to 4 outputs. Except you throw out arduino timing and use timer 0 for pwm.
- 32u4 does have more. I dont know exact numbers. While the chip spec is good, real life is not. Some of the OCXXX are not available on pins, and some are combined. Maybe 6 outputs are possible, but not 8. You will have to research that yourself. Count the OCxx except the OC0x ones in the atmega32u4.pdf
Hi Plüschi!
I don't see any comments beside the config.h in current build stating what the limitations are. So am I correct in understanding that any of the higher EXT_MOTOR_xKHz defines won't work on a hex quad utilising 328p? So just stick with the EXT_MOTOR_RANGE. Also, EXT_MOTOR_RANGE is mutually exclusive with the other EXT_MOTOR_xKHz defines?
Hi,
On 328p,
EXT_MOTOR_xKHz is valid only for 4 motors.
EXT_MOTOR_RANGE can also be used for 4 motors, but EXT_MOTOR_xKHz will give a better result (less noise ans higher PID for me)
Currently you can use EXT_MOTOR_RANGE for 6 motors (mutually exclusive with the other EXT_MOTOR_xKHz)
exemple here:
http://www.youtube.com/watch?v=NqVz4Bve4ko
I even made a version for 8 brushed motors on a 328p if you want to test (no code for the moment in any repository)
http://www.youtube.com/watch?v=a8sVT7EBh58
Re: Atmega328 with fet output for motor brushed
Thanks Alex.
I'll have a look to see if it's possible to have EXT_MOTOR_xKHz for 6 motors on the 32u4.
I'll have a look to see if it's possible to have EXT_MOTOR_xKHz for 6 motors on the 32u4.
-
- Posts: 4
- Joined: Fri Feb 07, 2014 2:55 am
Re: atmega32u4 with fet output for motor brushed
I'm currently trying to use EXT_MOTOR_8KHz for 6 motors on the 32u4. I've had a look at the code, but can't seem to get it right. I've added the following to output.cpp
But still can't seem to get motors/fets 5 and 6 on pin 11 and 13 to work. Maybe someone has had success with 6 motors using EXT_MOTOR_xKHz, and would be willing to point me in the right direction?
Code: Select all
#if (NUMBER_MOTOR > 4)
#if defined(EXT_MOTOR_8KHZ)
OCR1C = (motor[4]-1000) << 1;
TC4H = (motor[5]-1000) << 1; // pin 13
...
But still can't seem to get motors/fets 5 and 6 on pin 11 and 13 to work. Maybe someone has had success with 6 motors using EXT_MOTOR_xKHz, and would be willing to point me in the right direction?

Re: Atmega328 with fet output for motor brushed
I'm also quite interested in a brushed FC for Hexa- and Octocopters. I think using an STM32 based design will provide 8 Hardware PWM motor outputs out of the box. Even there is the Baseflight and Cleanflight firmware already available wich already works. I’m flying already an Hexacopter with such a configuration and have a Octocopter on my bench. Soldering two cables directly to the controller pins fro the Octocopter is actually challenging me. I already killed the first controller in my soldering trials. Please see my posts here:
viewtopic.php?f=12&t=4893#p53226
Baseflight and Cleanflight is also ported to this brushed CJMCU controller. The schematics is also available in this tread:
viewtopic.php?f=22&t=5177
Actually I’m thinking about combining all components used for my Hexa and Quadcopter into a single board with 8 brused ESC’s 6A as a winter project. Already checked with Deltang and David could provide preprogrammed Rx31 receiver chips to integrate at the FC. Another solution could to use cheap spectrum sats like the AlienWii controller is doing or using external mini sumPPM RX like the various available Deltang receivers.
viewtopic.php?f=12&t=4893#p53226
Baseflight and Cleanflight is also ported to this brushed CJMCU controller. The schematics is also available in this tread:
viewtopic.php?f=22&t=5177
Actually I’m thinking about combining all components used for my Hexa and Quadcopter into a single board with 8 brused ESC’s 6A as a winter project. Already checked with Deltang and David could provide preprogrammed Rx31 receiver chips to integrate at the FC. Another solution could to use cheap spectrum sats like the AlienWii controller is doing or using external mini sumPPM RX like the various available Deltang receivers.
-
- Posts: 4
- Joined: Fri Feb 07, 2014 2:55 am
Re: atmega32u4 with fet output for motor brushed
I see what was missing. Forgot to connect the pins to the timers (in case anyone else is interested).
pins 11 and 13 and related motors are working now.
Code: Select all
TCCR1A |= _BV(COM1C1); // connect pin 11 to timer 1 channel C
TCCR4A |= (1<<COM4A1)|(1<<PWM4A); // connect pin 13 to timer 4 channel A
pins 11 and 13 and related motors are working now.
Re: Atmega328 with fet output for motor brushed
@alienquads
What FC you are actually using for a brushed hexacopter?
What FC you are actually using for a brushed hexacopter?
-
- Posts: 4
- Joined: Fri Feb 07, 2014 2:55 am
Re: Atmega328 with fet output for motor brushed
@mj666
I am using a prototype board featuring an "atmega32u4" so your baseflight/cleanflight suggestions are not compatible.
I do have the hexacopter setup working with multiwii on EXT_MOTOR_8KHz. However, I do not think my code is quite right for the two additional motor pins as the hexacopter tends to drift quite a bit. With no other changes the hexacopter doesn't drift using 490Hz EXT_MOTOR_RANGE. However I don't want to run 490Hz for several reasons.
I am using a prototype board featuring an "atmega32u4" so your baseflight/cleanflight suggestions are not compatible.
I do have the hexacopter setup working with multiwii on EXT_MOTOR_8KHz. However, I do not think my code is quite right for the two additional motor pins as the hexacopter tends to drift quite a bit. With no other changes the hexacopter doesn't drift using 490Hz EXT_MOTOR_RANGE. However I don't want to run 490Hz for several reasons.
-
- Posts: 4
- Joined: Fri Feb 07, 2014 2:55 am
Re: atmega32u4 with fet output for motor brushed
I've finally managed to get my brushed 32u4 hexacopter to fly fairly well.
For anyone else who might be interested in trying an 32u4 brushed hexacopter, here is the EXT_MOTOR_8KHz code I am using in output.cpp.
I'd really appreciate if one of the devs could take a peek to see if the PWM timers look correct.
I also needed to change the motor pin order for PROMICRO as follows to make this work.
And add the following code to connect the pins to the timers:
For anyone else who might be interested in trying an 32u4 brushed hexacopter, here is the EXT_MOTOR_8KHz code I am using in output.cpp.
Code: Select all
#if defined (EXT_MOTOR_8KHZ)
OCR1A = (motor[0] - 1000) << 1; // pin 9
OCR1B = (motor[1] - 1000) << 1; // pin 10
OCR3A = (motor[2] - 1000) << 1; // pin 5
TC4H = (motor[3] - 1000)>>8; OCR4D = ((((motor[3]-1000)<<1))&0xFF); // pin 6
OCR1C = (motor[4] - 1000) << 1; // pin 11
TC4H = (motor[5] - 1000)>>8; OCR4A = ((((motor[5]-1000)<<1))&0xFF); // pin 13
#endif
I'd really appreciate if one of the devs could take a peek to see if the PWM timers look correct.
I also needed to change the motor pin order for PROMICRO as follows to make this work.
Code: Select all
//uint8_t PWM_PIN[8] = {9,10,5,6,4,A2,SW_PWM_P3,SW_PWM_P4}; //for a quad+: rear,right,left,front
uint8_t PWM_PIN[8] = {9,10,5,6,11,13};
And add the following code to connect the pins to the timers:
Code: Select all
TCCR1A |= _BV(COM1C1); // connect pin 11 to timer 1 channel C
TCCR4A |= (1<<COM4A1)|(1<<PWM4A); // connect pin 13 to timer 4 channel A
Re: Atmega328 with fet output for motor brushed
i´m a little confused. is it possible to run 6 brushed motors on 328? if yes, would someone share his mwii sketch? i have build a nano spider hex with a pro mini 

Re: Atmega328 with fet output for motor brushed
Sandrail wrote:i´m a little confused. is it possible to run 6 brushed motors on 328? if yes, would someone share his mwii sketch? i have build a nano spider hex with a pro mini
I'm also confused and would like to know too

My project is to use a Mini MWC board (328p from HK with DSM rx) to control the built-in brushed ESCs of another FC board (Revell Hexatron, 6X, 2S).
I'm actually a bit lost. This is what I did :
Soldered 1pin cables to the G leg of the 9926B MOSFETS (http://aosmd.com/pdfs/datasheet/AO9926B.pdf).
Flashed the Mini MWC with 2.4.
Uncommented #define MINTHROTTLE 1050 // for brushed ESCs like ladybird
Uncommented and tried different values for #define EXT_MOTOR_xxKHZ
But I'm still getting nothing from the motors. The best I have is the motor buzzing with #define EXT_MOTOR_1KHZ
Also tested with the short made between the husban chip and the resistors before the Mosfet.
Dumb question because I'm new to MultiWii really: although I tested all ports on the FC, is it right to assume the motors number shown in the GUI match the numbers on the board?
I'm not sure what to do next and where to look at. I'm definitely lacking knowledge. I'm posting a pic of the Hexatron board on which I followed (unless wrong

Maybe cut all the traces feeding the husban chip? Any suggestion is welcome

I'd like to have at least have one motor run first before trying to have the Mini MWC run all 6 motors/ESCs which I believe according to a previous post is not yet possible with the current code.
Thank you!
Re: Atmega328 with fet output for motor brushed
Sandrail wrote:i´m a little confused. is it possible to run 6 brushed motors on 328? if yes, would someone share his mwii sketch? i have build a nano spider hex with a pro mini
Yes it should be possible. Since i have no hexa i cant test it.
It should be easy if you use 1khz pwm.
You dont have to change much, just connect the 2 timer0 pwm outputs and write the values into the compare regs. Output pins will be pin5 and pin6.
See attached sketch. You "should" be able to fly it, let ext_pwm be 1khz, and use ppmsum receiver.
- Attachments
-
- MultiWii_2_2_micro_328.zip
- (22.55 KiB) Downloaded 627 times
-
- Posts: 9
- Joined: Mon Jul 28, 2014 10:28 am
Re: Atmega328 with fet output for motor brushed
Hi
I built a brushed quadcopter with multiwii 2.3 and si2302 fet. Somebody tell me What I have to do for ESC's step by step???? when I arm it the motors spin and I can't stop it?With radio control They work same(%50 and up).how can I change pwm output to 0 to 2000 in MWC 2.3 ???What part of source code should be change???
Please answer if you know.
Thanks alot.
I built a brushed quadcopter with multiwii 2.3 and si2302 fet. Somebody tell me What I have to do for ESC's step by step???? when I arm it the motors spin and I can't stop it?With radio control They work same(%50 and up).how can I change pwm output to 0 to 2000 in MWC 2.3 ???What part of source code should be change???
Please answer if you know.
Thanks alot.