Been making a few posts about my drone and i am getting closer and closer to my goal to make it work.

Right now I have a problem with stuttering with all four of my motors (sometimes the motors does not even start but they beep instead). This is the motor and esc I use: https://hobbyking.com/en_us/mt1806-brushless-combo-include-esc-5030cw-ccw.html

I put together a very quick schematic on how i have everything connected: enter image description here

So motor connected to the ESC and the ESC grounds go to arduino Gnd, the signal pins from the ESC goes to different pwm pins and the rest of the esc goes to the power distribution where i also insert my 3s lipo battery. From my power distribution i connect two cables to my arduino uno gnd and vin pin.

When I use this very simple code:

ESC9.write (100);
ESC6.write (100);
ESC5.write (100);
ESC3.write (100);
delay (2000);

ESC9.write (0);
ESC6.write (0);
ESC5.write (0);
ESC3.write (0);
delay (2000);

The motors start like they should but they stutter (some motors move more than others) and as you can see in my code i tell them to stop after 2 seconds to see if i can control them and indeed they stop nicely.

This is a 3 second video on how it looks once I enter my lipo battery:


Is this a case of bad soldering somewhere perhaps or do I need to calibrate my ESC/motor? Codewise I am just using a simple Servo and then I just use the code I posted above. Do I need to add anything else maybe? Since all 4 motors are stuttering/buzzing it is most likely not a problem with the motor/esc i suppose!

My arduino uno is a chinese copy, could that have anything to do with it?

Also I made this post earlier with a little less information but more info about my soldering: All four of my ESC motors stutters when I run it on my Arduino, how can this be fixed?

Appreciate every help and tips!

  • This seem to be the same problem. You should have just edited the previous question. – gre_gor Dec 26 '16 at 22:20
  • Ah ok i am pretty new so i thought i should create a new post with more info. – Martman Dec 26 '16 at 22:30
  • Please edit the original post with this new information/images. – sa_leinad Jan 20 '17 at 0:49

It isn't clear from your diagram or the video what wire thicknesses you've used or precisely how currents are being routed, or how big your battery is.

Let BPG denote the ground terminal on the battery pack, and BP+ the battery's positive terminal.

There should be heavy wire from BPG to the ground pin of each ESC. There should be a signal wire (that is, heavy or light, makes little difference as long as motor currents have their own heavy wires to follow) from BPG to an Arduino Gnd pin.

There should be heavy wire from BP+ to the positive voltage pin of each ESC. There should be a signal wire from BP+ to Arduino Vin.

There should be signal wires from Arduino PWM outputs to ESC PWM inputs. There should be heavy wires from ESCs to motors.

Also, in your code try changing 100 on up to 200 or 250 (or near whatever the ESC maximum setting is) to see if problem persists at higher levels of PWM drive. Also if your battery pack is small, add some more packs of the same voltage in parallel, or try a heavier-duty pack.

Edit 1: Check whether each of the motors can work ok by itself. That is, either comment out three at a time, or use if-statements that check button or jumper settings. If all the motors work ok singly, try them in pairs or triples. There are six different combinations of motor pairs, so rather than trying all six of those you might first try the four different sets of three motors at a time, and if that reveals a combination of three motors that fails, try the pair combinations among those three to see if there is some interaction between two motors. If problems occur when testing with fewer than four motors, try swapping motors on to different ESCs, to find out if the problem is due to a motor, an ESC, or the battery. (You can also swap motors on ESCs and test all four at once, but testing with fewer motors going should provide a more systematic problem solving method.)

  • I have used regular arduino jumper cable on everything except with the ESC and motor. with the ESC i soldered a bullet on the red and black wire (that are a little bit thicker than an arduino cable and then i connect those to the power distribution board. On the distribution board there are two slots where i can put two arduino jumper cables and there i put one that goes to the GND and the other to the VIN. – Martman Dec 26 '16 at 21:59
  • The motors that are connected to the ESC are also 3 thicker wires that i have put together (did not need to solder anything here, just put them together). I tried changing to 100, 200, 250 but it stutters the same with the same frequency. My battery is a 3s lipo with 1500 mah 65C. – Martman Dec 26 '16 at 21:59
  • This is the motor + esc i use: hobbyking.com/en_us/… and the battery i use: hobbyking.com/en_us/graphene-1500mah-3s-65c-w-xt60.html – Martman Dec 26 '16 at 21:59
  • Have you tried with two motors only, or three? See edit 1 for more comments on testing – James Waldby - jwpat7 Dec 26 '16 at 23:24
  • Will try it now! – Martman Dec 26 '16 at 23:36

Beeping noise comes from the motors when the PWM of ESC does not have enough power to rotate the motor. Since you are hearing a noise, this is a good indication that PWM exists.

Now, if you lower your duty cycle, beeping noise should decrease and vice versa. This way, you can know that the arduino is capable of controlling your ESC PWM and duty cycle.

Since you can control duty cycle and you have a PWM and no motion, there are a couple problems that comes to mind.

  • PWM of ESC can not follow BLDC rotation speed. So your ESC can't detect back emf of your motor. (From your diagram, I think its a sensorless ESC.) This could happen if ESC voltage sense pin does not work, or there is noise etc. But its unlikely that all ESC are broken.
  • You say that sometimes it works and there is stuttering. Well, stuttering exists also if BLDC can't sense back emf correctly so it is issuing the wrong angle at the wrong time and this causes the motor to sometimes go back a bit which appears as stuttering.
  • ESC supply voltage drops when motors are running, this causes ESC to shut down/ behave erratically. This happens when you have bad soldering or thin wires.

I would say that the third is the most probable cause.

As for back emf detection, measure motor back emf yourself using your arduino (if you don't have an osilloscope, of course). Send data to PC and see if there is good back emf when you turn the motors (turn them fast using another motor or your hands with a quick motion)

  • This is a better image of the schematic/circuit: imgur.com/a/JYAiO The yellow, brown and purple cables are small arduino jumper cables – Martman Dec 27 '16 at 22:28
  • Can you try with arduino powered from laptop/PC and see it works? – user29094 Dec 27 '16 at 22:38
  • I have tried when I disconnect the cables from power distrubtion board to the arduino and then I power the arduino with the computer while I power the drone with the lipo battery. Is there a way I can power the motors only by the PC? – Martman Dec 27 '16 at 22:39
  • If i do the thing i mentioned above they still stutter the motors. I have not tested to power the arduino + motors only by pc though. Is that possible? – Martman Dec 27 '16 at 22:41
  • That is unlikely. Your motors are rated for 11.1V, that for one. Also, they probably will require a ~1A at least for no-load operation. Your PC USB will blow up. Can you try removing all ESC, just leave 1 ESC and motor and try? What happens then? – user29094 Dec 27 '16 at 22:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.