3

Sorry in advance as I'm still a rookie with Arduino projects. My goal is to use an Arduino Uno 3 to create an inexpensive drone/plane project.

Here are my materials and my set up:

Upon compiling the code I found here and connecting the 9 V battery to the ESC, all I hear is constant beep sounds from the motor (about once every 1.5 seconds). Can anyone help me figure out what's going on? Is it the 9 V battery that's not giving the motor enough juice? Or am I just too silly hoping to create something that works under 10ドル?

#include <Servo.h>
Servo ESC1;
int pos = 0; //Sets position variable
void arm() {
 setSpeed(0); //Sets speed variable delay(1000);
}
void setSpeed(int speed){
 int angle = map(speed, 0, 100, 0, 180);
 //Sets servo positions to different speeds ESC1.write(angle);
}
void setup() {
 ESC1.attach(9); //Adds ESC to certain pin. arm();
}
void loop() {
 int speed; //Implements speed variable
 for(speed = 0; speed <= 70; speed += 5) {
 //Cycles speed up to 70% power for 1 second
 setSpeed(speed);
 //Creates variable for speed to be used in in for loop
 delay(1000);
 }
 delay(4000); //Stays on for 4 seconds
 for(speed = 70; speed > 0; speed -= 5) {
 // Cycles speed down to 0% power for 1 second
 setSpeed(speed); delay(1000);
 }
 setSpeed(0);
 //Sets speed variable to zero no matter what
 delay(1000);
 //Turns off for 1 second
}

Full build Battery Arduino

Greenonline
3,1527 gold badges36 silver badges48 bronze badges
asked Jan 31, 2017 at 2:50
1

4 Answers 4

2

Like the previous answer stated, you should be using a 20-25c battery (can discharge up to 25A). I don't know exactly how much a 9V draws, but it definitely can't supply more than an AMP. Your motor pulls much more than 1 amp. Get yourself a nice LiPo from hobbyking.com, maybe an 8.4v or 11.1v

The ESC beeping could be telling you it can't draw enough Amps from the battery?

answered Jan 31, 2017 at 15:43
0
2

Probably a bit late but your code has some important parts commented out such as (in order):

  • delay(1000);
  • ESC1.write(angle);
  • arm();

Once you add those to the next lines the program should work and the esc shouldn't just beep and actually get the motor to spin

answered Sep 28, 2018 at 11:06
1
  • thanks anyway! we'll consider this if we use those motors again/ Commented Sep 29, 2018 at 23:32
1

The beeping is actually from the ESC. I believe that this model needs to be properly configured (which you can do using the Arduino - refer to the user manual or here) before it can be used. Some kits come with it preconfigured but since you seem to have possibly purchased it individually you need to configure it yourself. Also it doesn't appear to be that your code wouldn't actually send any PWM signals to the ESC. I've only ever used Servo.write() functions in my quads, so I can't be 100% sure on that.

answered Jan 31, 2017 at 4:43
2
  • thank you. Correction, it's actually not a beeping sound, but a little twitch sound made by the motor (nothing from the ESC) I'll continue to read your link and learn more on this. Best regards! Commented Jan 31, 2017 at 5:07
  • That twitching is a possible error/idle warning in your ESC configuration. I know that my ESCs came programmed to start twitching like a mad dog if they were idle for 10 minutes, which kinda broke the idle warning/shutdown sequence I had designed for my camera-quad. Commented Jan 31, 2017 at 5:22
0

You need high current for working with this motor, 8.4 LiPo battery for example.

answered Jan 31, 2017 at 14:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.