Hello,
I am using a ardunio nano connected to a custom shield that has 4 10A transistors on it connected to the PWM pins to control the motor speed. When I connect both the battery power supply and the 5V USB power to the nano, the motors respond and act perfectly. When I disconnect the USB power and just run it off the battery (which are two 3.7 volt lipo connected in series), the nano seems to reset immediately. The motors click and move about 5 degrees in rotation. Any help would be greatly appreciated, and I have attached the schematic diagram of the custom shield below for reference.
Hi,
What transistors are you using and where are the base current limit resistors?
Are the two LiPo batteries also powering the motors?
What Ah rating are they?
Have you measured the battery voltage when you run with USB and without USB?
Also I see no bypass capacitors.
Can you tell us your electronics, programming, Arduino, hardware experience?
Hi,
When you are using Vin as your supply it has to be at least 8V, so the nano controller regulator can work.
With high load of motors the battery voltage will change and it will not be high enough, the 5V regulator will drop out and cause the nano to keep resetting.
mschindl:
Hello,
I am using a ardunio nano connected to a custom shield that has 4 10A transistors on it connected to the PWM pins to control the motor speed. When I connect both the battery power supply and the 5V USB power to the nano, the motors respond and act perfectly. When I disconnect the USB power and just run it off the battery (which are two 3.7 volt lipo connected in series), the nano seems to reset immediately. The motors click and move about 5 degrees in rotation. Any help would be greatly appreciated, and I have attached the schematic diagram of the custom shield below for reference.
You have no base resistors and expecting a single transistor stage to amplify the Arduino's
30mA output current to 10A (a gain of 300 whereas as a switch a transistor has a usable gain of 20 at most).
I'd recommend using logic-level MOSFETs instead of BJTs, makes the circuit simpler and better performing (only need one stage, higher frequency PWM can be used if you get the details right)
When I disconnect all but 1 motor, the arduino is able to power up the motor and itself just fine, even when connected to only a single 3.7V battery. When I try to connect more than 1 motor, the motors click on and then the arduino resets. Both the nano and the motors run on the same power supply. I have soldered a 220uF polarized capacitor directly on to the nano's Vin and GND pins. This unfortunately did not help the situation. I will be switching out the transistors for MOSFET's soon, will this help the situation at all? None of the motors have flashback diodes on them yet, if I were to add them, would I solder them directly to the power and ground wires of each motor?
Thanks for all the help.
*Added a 220uF capacitor to the Vin and GND pins on the arduino nano.
*Added a diode across the motors.
*Added a small ceramic 0.1uF Capacitor across the motors.
When I plug just 1 motor in, the motor and arduino will operate fine. I can push the motor up to full power with no glitches. When I plug in two motors, I can only push the motors to about half power using the remote control. Again, both the motors and arduino and being powered by the same battery, and the whole system is being controlled through another arduino via radio signals. Even with the changes I am still running into the same issue with no improvements, any recommendations would be incredibly helpful.
I have attached a schematic showing the modifications I have made to the original circuit.
Hi,
Can you post a picture of your drone motor please and a link to its spec/data sheet.
Also post a copy of your code.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Battery: 7.7V
Battery with Motors on: 7.01V (Last measurements before motors cut out and arduino reset)
Voltage across motors: 3.57V (When only 1 motor is plugged in to prevent reset)
I tried to add base resistors before but it severely slowed down the motors power. I did use a 1K Ohm resistor though. Is there a recommended base resistor value to use? Also, will switching to logic level MOSFET's solve any issues? I have also attached a picture of the drone circuit below. A little messy, I know, but I can assure you everything is connected securely.
As for the drone motors themselves, they are brushed drone motors that I took out of a Syma x5c. I do not have the code on me, as my coder has it saved on his computer. It is just a basic PWM signal based on the remote control feedback. The code works perfectly fine when the nano is being powered through USB and the motors are running off the battery.
Also, will switching to logic level MOSFET's solve any issues?
Yes, you will get less voltage drop across the switching MOSFETS.
Use a 470R series gate resistor, and a 10K from gate to source.
7.01 - 3.75 = 3.26V
You are at the moment loosing half your potential across the transistors.
What is the current drawn by the motors with propeller fitted?
Your shield will have to carry 4 times that current to the switching devices?
Without your code, I assumed you were using the nano analogWrite PWM statemant.
OPs pics.
So after much testing, I think I have isolated the main issue.
When the arduino is powered by a separate isolated power supply (like the USB port) everything works fine! The motors can reach full speed no problem. When both the arduino and motors are powered by the battery, and the motors start to spin to fast, the arduino resets. So the issue is with the power supply.
So my question is, what is the best way to stop all of this noise and give a nice voltage to the arduino?
What kind of lipo batteries are these? Some small 3.7v have low voltage cutoff circuits soldered onto the battery. Take a look and see if you can see a tiny little circuit board by where the battery leads come out. If you do the battery might not be able to deliver a high current. To be clear your are using 7.4v?
The answers we gave ARE to reduce electrical noise and hopefully stabilize the power rail. There will be a inductive spike when the transistors turn off , the diode handles this( should be a fast diode), There will be voltage fluctuation on the main battery lines, the big cap helps this(low esr). There will be noise from the brushes. A small 0.1 uF helps this across the motor terminals helps this. Finally the base resistors limit the current from the Arduino pin.
Your wiring has to be able to handle the current.
These few things are all really all that is needed to successfully run a motor. I have motor drivers that use up to 30 amps at 12v and they still just use the things mentioned here.
MOSFETs would be much better choice than bjt transistors.