Drone Motors with Arduino

So after much testing, I have found the powering issue. To connect the two batteries in series to double the voltage I had to use jumper cables, and then connect those cables to the board. When I used a two-cell lipo battery and plugged it straight into the circuit board pins, every motor powered up just fine. The issue was the jumper cable wires themselves. Must not have been thick enough to carry all the current. Though when I did power up the drone to full speed, after two seconds the motors cut out and it smelled as if something was burning. As it turns out, the copper trace on the custom PCB wasn't thick enough and blew due to the current load.

With that issue resolved, I decided to switch out the BJT's with some logic level MOSFET's as I heard those we better to use for this application. I kept the circuit exactly the same but something weird happened when I was using the MOSFET's. The motors acted spontaneously. When I first plugged in the battery, two of the motors would spin very slowly until the actual main code started. Then randomly a motor would go to full power and the arduino stopped responding to commands form the remote control. Is there something extra in the circuit that I need to make sure the MOSFET's will work. I have attached the schematic of the setup below, as well as links to the datasheets of the BJT's and MOSFET's.

BJT Datasheet

MOSFET Datasheet

Shield (MOD).pdf (17.1 KB)

Hi,
Have you got 10K resistors on each MOSFET going from the gate to source?
Are you using 470R series resistors in each gate.

When the Nano boots all the pins are inputs and high impedance, the gate of the MOSFET is also high impedance and can store a charge that can turn the MOSFET ON.
The 10K makes sure the gate is kept discharged if the gate is left open circuit.

Please update your schematic, to show MOSFETs.

Can you please export your circuit diagrams as jpg please.

Thanks.. Tom... :slight_smile:
OPs Circuit

Hi,
Have you got your MOSFETs and motors connected like this?


The IRLB8743 have protection diodes across Drain to Source.

Tom... :slight_smile:

TomGeorge:
Hi,
Have you got your MOSFETs and motors connected like this?


The IRLB8743 have protection diodes across Drain to Source.

Tom... :slight_smile:

May I ask why you are using 470R gate resistors? The arduino nano pins can supply up to 40mA of power per pin, so shouldn't I be using 125R resistors? Thanks for the help!!

Hi,

mschindl:
May I ask why you are using 470R gate resistors? The arduino nano pins can supply up to 40mA of power per pin, so shouldn't I be using 125R resistors? Thanks for the help!!

You do not operate an IC at Absolute Max Ratings.
AbsoluteMax.jpg
Also you have to keep the Port Total current to under 200mA.
Tom... :slight_smile:

mschindl:
May I ask why you are using 470R gate resistors? The arduino nano pins can supply up to 40mA of power per pin, so shouldn't I be using 125R resistors? Thanks for the help!!

Lots of lengthy discussions on here about gate resistors, 470 IMO is a bit too conservative. I would recommend in the 125-200 range to increase switching speed.

For what its worth I use 100 Ohm gate resistors for all my Atmega speed controllers and will continue to do so. Most inexpensive Atmega based speed controllers from Hobbyking, XXD, HW, etc. use 50-150 Ohm range and have cumulatively logged millions of hours.

YES, this does exceed the datasheet value of the Atmega328 for a few nanoseconds. This also does allow for higher switching speeds and has been field tested on a massive scale.

IF you find that you are getting significant heating in your mosfets when you start increasing the PWM frequency ( you will want to eventually) you may want to use a lower value gate resistor. If you have no issue with switching loss related heat, then keep the 470r resistor and be nice to your Atmega ! I really don't see an issue with 125 Ohm however. Don't go lower unless you understand the risks.