Mine did not work. I kept going over the wiring and code. Really made me scratch my head. This morning thought that I would try again. As I was staring at it, I heard a noise that made me jump out of my chair. It was WORKING! I was not waiting the full 7 second delay. Thank you! OBTW: One can discard the pot by connecting 3.3V pin directly to the A0 pin.
thank you for the video. I am trying to make nRF24 controlled boat (drone), and need a "reverse" function on the motor, controlled through ESC. I think I may get an idea of how to do it from your video.
Hii! Were you able to do a reverse function on through a regular ESC? How did you manage to do so via code without swapping 2 of 3 ESC to Motor connections? Thanks in advance.
@@hazzchah I used a bi-directional ESC. Look at the code and you will understand how it reverses direction. I believe it's not possible to do the same through regular ESC. Essentially when joystick is in the middle, it reads as 0. But when I start to move joystick up or down, throttle rotates, either clockwise or counterclockwise. Again look at the code... And good luck!
@@tomjoad1060 Thank you very much! I spent a whole day just trying to figure out how to reverse the direction via code without adding any additional circuitry or manually swapping 2 of the 3 phase junctions. I'll go find a bi-directional esc now. Thank you again.
Can i power up an ardiuno using bec(gnd and +ve to ardiuno 5v and gnd) and also connect a 11.1v 2.6ah battery into ardiuno vin and gnd at the same time or is it bad for the ardiuno like burning up?
I've tried connecting 2 thrusters to an arduino, but they don't spin. If I tell the arduino to only spin one of the two motors, it spins, but as soon as I try to spin them simultaneously, it doesn't work. Is it even possible for multiple thrusters to spin simultaneously? If so, how do we do it?
Hi NightLeo, you can absolutely do this! Can't really say what's wrong without seeing you code and setup. If you make a post on our forums here, we'll be happy to help! discuss.bluerobotics.com/c/blue-robotics-products/escs/29
Hi Nick, that wouldn't give you any more precision here. If you want to test your EDFs precisely, we'd recommend adjusting the Arduino program to step up a bit at a time until it starts. That way you'll know exactly when it starts as well! If you're not comfortable with Arduino, that would be a great project to get started with. This page has some good examples to start from: makersportal.com/blog/2020/3/14/arduino-servo-motor-control
Highlighted comment @khanhla6673 Hi! You can use pretty much anything that can output the correct PWM signal! If you're using a Basic ESC, you'll need to send a PWM signal of 1500 microseconds (µs) to initialize it. When the ESC is initialized, you should hear two more beeps. The first beep indicates the ESC detects a throttle signal, and the second beep indicates that the correct 1500 µs signal is detected and the ESC is now fully initialized. After the ESC is initialized, sending a PWM signal from 1100 µs to 1900 µs will control the throttle of the thruster: 1500 µs to stop the thruster >1525 µs to 1900 µs for forward thrust
Hi David, this code already supports having the thruster run in forward and reverse. Note that you do have to have a speed controller (ESC) capable of doing that, and many of them are designed for just one direction. The "Basic ESC" we use here can do both.
I Have a question about values you passed in function map() Why did you pass ,0,1023,1100,1900 i mean why these values and is these values can be determine by brushless motor kv or by esc because if i have different motor and different esc how can i put a values are compitable with mine
Hi there! We used 0-1023 as the input range because that is the range measured by the potentiometer with the analogRead function. We used 1100-1900 as the output range because that is the signal range that the ESC accepts as a valid signal. These values should work for the vast majority of ESCs!
Hi Adam, the reason is because the analog to digital converter (ADC) on the Arduino is a "10-bit ADC". 10 bits means it has 2^10 = 1024 possible readings. So, when reading a voltage between 0 to 5V, it maps that reading to one of those values from 0-1023, which is 1024 possible measurements. Google can probably tell you a lot more about the Arduino ADC!
How do I wire a regular RC ESC to work with the transmitter and potentiometer feedback like a small servo controller? Basically I want to use an ESC to control a large motor for a custom servo.
Hi, you can use this technique with any ESC, but you'd have to change the code on the Arduino to start at 1100 and go up to 1900 microseconds signal. The example in this video is for bidirectional ESCs and starts at 1500 microseconds, going to 1100 and 1900 in each direction. Here's the written version as well: bluerobotics.com/learn/guide-for-controlling-the-basic-esc-with-a-potentiometer/
The motor only increases to the speed we entered momentarily, then turns slowly at a constant speed again. It repeats this in short periods. What would be the reason?
Hi Mehmet, can you share the exact code you are using on our forums? I'm sure there's a reason, but it's hard to know without seeing the code. discuss.bluerobotics.com
Hi there! It’s a 4S battery with a 230Wh capacity, and it doesn’t have a BMS (battery system management). Arduino boards have five options in which they can be powered: * Powering via USB connector * Powering via the onboard barrel jack connector (if available on the board) * Powering via the onboard battery connector (if available on the board) * Powering via the VIN (Voltage In) pin * Powering via the 3V3/5V pin* If you have other questions, please reach out to our team at support@bluerobotics.com!
why is this not working with my esc ? after i ran the code, the motor run for a second then it stopped. I tried to recompile and give the input to the esc, but its not working anymore
Hi, it should work continuously. Issues like this are typically from insufficient power that causes the voltage to drop and reset the Arduino. Are you powering from a battery?
Hi Milo, the ground connection is required to complete the circuit so that the Arduino can properly measure the signal. With a single wire, there wouldn't be any flow of electricity, just like any electrical circuit. You don't have to connect the 5v wire because that only provides power to each device and they are separately powered (ESC by battery and Arduino through USB port).
why is the Arduino needed? Wouldn't the speed control work with the potentiometer if you just plug the potentiometer directly into the three prong that would normally go to a receiver?
Unfortunately, not. ESCs listen to "servo-style PWM signals" which is a short pulse that indicates the speed. Potentiometers just output an analog voltage that varies as you rotate the knob, but the ESCs typically won't take that as an input. The Arduino is just there to translate from the analog voltage to a PWM signal.
@@BlueRobotics oh now I get it! That really clears it up for me. So is there some way that maybe I can tap into the pwm signal on a small servo circuit board with the ESC 3 wire connector? Thank you so much for your time. I really appreciate it. 🤙
@@TheWingnut58 yeah that's a good point. I wonder if that will work, using a servo tester as a potentiometer connected to the steering. That would be a heck of a lot easier and cheaper than messing with all that Arduino stuff
@@brsrc759 yes, it will absolutely work.....I've been into R/C 40+ years and have used servo testers on everything from micro servos all the way up to the giant scale stuff as well as for testing motor/ESC combinations on drones. You could use a large servo on the rudder and rig some sort of spring system to "self center" the servo tester as well as using one to controll the motor speed....
You can use any digital pin to control a thruster speed controller with an Arduino using the Servo library, so it's quite a few! If you want the thrusters to all behave the same, then you can connect one signal to multiple speed controllers.
Hi there, you can use a joystick that has the same type of analog output as a potentiometer, like this one: www.adafruit.com/product/512?gclid=CjwKCAjwuqiiBhBtEiwATgvixDMCx7IXv09zDqk0-3Tk3Z5XYOJqd3f1fsJoWF0q7Cb-WYmNeeP7PhoCTwUQAvD_BwE
To control thrusters with a Raspberry Pi, we recommend a PWM Hat like the one from Adafruit: www.adafruit.com/product/2327. You can follow tutorials on controlling the servo motor, which should also work with the ESCs!
Mine did not work. I kept going over the wiring and code. Really made me scratch my head. This morning thought that I would try again. As I was staring at it, I heard a noise that made me jump out of my chair. It was WORKING! I was not waiting the full 7 second delay. Thank you! OBTW: One can discard the pot by connecting 3.3V pin directly to the A0 pin.
Awesome simplified explanation. First time using ESC, it does not say which wire is what. Your video helped me understand that and more. :)
Fully technical and to the point. Wish all robotic tutorials were like your channel man. Keep it up!
Thank you so much! This is the first tutorial that helped me :)
thank you for the video. I am trying to make nRF24 controlled boat (drone), and need a "reverse" function on the motor, controlled through ESC. I think I may get an idea of how to do it from your video.
Hii! Were you able to do a reverse function on through a regular ESC? How did you manage to do so via code without swapping 2 of 3 ESC to Motor connections? Thanks in advance.
@@hazzchah I used a bi-directional ESC. Look at the code and you will understand how it reverses direction. I believe it's not possible to do the same through regular ESC. Essentially when joystick is in the middle, it reads as 0. But when I start to move joystick up or down, throttle rotates, either clockwise or counterclockwise. Again look at the code... And good luck!
@@tomjoad1060 Thank you very much! I spent a whole day just trying to figure out how to reverse the direction via code without adding any additional circuitry or manually swapping 2 of the 3 phase junctions. I'll go find a bi-directional esc now. Thank you again.
Can i power up an ardiuno using bec(gnd and +ve to ardiuno 5v and gnd) and also connect a 11.1v 2.6ah battery into ardiuno vin and gnd at the same time or is it bad for the ardiuno like burning up?
I've tried connecting 2 thrusters to an arduino, but they don't spin. If I tell the arduino to only spin one of the two motors, it spins, but as soon as I try to spin them simultaneously, it doesn't work. Is it even possible for multiple thrusters to spin simultaneously? If so, how do we do it?
Hi NightLeo, you can absolutely do this! Can't really say what's wrong without seeing you code and setup. If you make a post on our forums here, we'll be happy to help! discuss.bluerobotics.com/c/blue-robotics-products/escs/29
Could I have more precision speed control of I go to a 20k, multi turn pot instead of the 10k? I'm trying to find my EDFs lowest point of operation.
Hi Nick, that wouldn't give you any more precision here. If you want to test your EDFs precisely, we'd recommend adjusting the Arduino program to step up a bit at a time until it starts. That way you'll know exactly when it starts as well! If you're not comfortable with Arduino, that would be a great project to get started with. This page has some good examples to start from: makersportal.com/blog/2020/3/14/arduino-servo-motor-control
Can I use Tiva C Series instead of Arduino? Please help. Im hanving trouble caliberating the ESC.
Highlighted comment
@khanhla6673 Hi! You can use pretty much anything that can output the correct PWM signal! If you're using a Basic ESC, you'll need to send a PWM signal of 1500 microseconds (µs) to initialize it. When the ESC is initialized, you should hear two more beeps. The first beep indicates the ESC detects a throttle signal, and the second beep indicates that the correct 1500 µs signal is detected and the ESC is now fully initialized.
After the ESC is initialized, sending a PWM signal from 1100 µs to 1900 µs will control the throttle of the thruster:
1500 µs to stop the thruster
>1525 µs to 1900 µs for forward thrust
How would you change this code to make the thruster be able to reverse?
Hi David, this code already supports having the thruster run in forward and reverse. Note that you do have to have a speed controller (ESC) capable of doing that, and many of them are designed for just one direction. The "Basic ESC" we use here can do both.
I Have a question about values you passed in function map()
Why did you pass ,0,1023,1100,1900 i mean why these values and is these values can be determine by brushless motor kv or by esc because if i have different motor and different esc how can i put a values are compitable with mine
Hi there! We used 0-1023 as the input range because that is the range measured by the potentiometer with the analogRead function. We used 1100-1900 as the output range because that is the signal range that the ESC accepts as a valid signal. These values should work for the vast majority of ESCs!
Great vid! One question, why do the values that the arduino reads from the pot range from zero to 1023? Is this dependent on the value of the pot?
Hi Adam, the reason is because the analog to digital converter (ADC) on the Arduino is a "10-bit ADC". 10 bits means it has 2^10 = 1024 possible readings. So, when reading a voltage between 0 to 5V, it maps that reading to one of those values from 0-1023, which is 1024 possible measurements. Google can probably tell you a lot more about the Arduino ADC!
@@BlueRobotics great that clears it up, thank you much!
How do I wire a regular RC ESC to work with the transmitter and potentiometer feedback like a small servo controller? Basically I want to use an ESC to control a large motor for a custom servo.
Hi, you can use this technique with any ESC, but you'd have to change the code on the Arduino to start at 1100 and go up to 1900 microseconds signal. The example in this video is for bidirectional ESCs and starts at 1500 microseconds, going to 1100 and 1900 in each direction. Here's the written version as well: bluerobotics.com/learn/guide-for-controlling-the-basic-esc-with-a-potentiometer/
How do you know what the thruster min/max values are for the map function?
Hi Fred! This is easier to explain via email - please get in touch with our team at support@bluerobotics.com! Thanks!
The motor only increases to the speed we entered momentarily, then turns slowly at a constant speed again. It repeats this in short periods. What would be the reason?
Hi Mehmet, can you share the exact code you are using on our forums? I'm sure there's a reason, but it's hard to know without seeing the code. discuss.bluerobotics.com
What are the specs of the battery? Also there is no need for battery protection? And how you power Arduino? I mean when not connect it to usb
Hi there! It’s a 4S battery with a 230Wh capacity, and it doesn’t have a BMS (battery system management).
Arduino boards have five options in which they can be powered:
* Powering via USB connector
* Powering via the onboard barrel jack connector (if available on the board)
* Powering via the onboard battery connector (if available on the board)
* Powering via the VIN (Voltage In) pin
* Powering via the 3V3/5V pin*
If you have other questions, please reach out to our team at support@bluerobotics.com!
why is this not working with my esc ? after i ran the code, the motor run for a second then it stopped. I tried to recompile and give the input to the esc, but its not working anymore
Hi, it should work continuously. Issues like this are typically from insufficient power that causes the voltage to drop and reset the Arduino. Are you powering from a battery?
is this doing forward and reverse or do I have to split the reading and map accordingly
This tutorial does both forward and reverse, but requires a speed controller that is compatible with that!
I get why you obviously have to connect a signal wire between arduino and esc, but why ground (and then why not 5v)?
Hi Milo, the ground connection is required to complete the circuit so that the Arduino can properly measure the signal. With a single wire, there wouldn't be any flow of electricity, just like any electrical circuit. You don't have to connect the 5v wire because that only provides power to each device and they are separately powered (ESC by battery and Arduino through USB port).
how could i power this without a battery
why is the Arduino needed? Wouldn't the speed control work with the potentiometer if you just plug the potentiometer directly into the three prong that would normally go to a receiver?
Unfortunately, not. ESCs listen to "servo-style PWM signals" which is a short pulse that indicates the speed. Potentiometers just output an analog voltage that varies as you rotate the knob, but the ESCs typically won't take that as an input. The Arduino is just there to translate from the analog voltage to a PWM signal.
@@BlueRobotics oh now I get it! That really clears it up for me. So is there some way that maybe I can tap into the pwm signal on a small servo circuit board with the ESC 3 wire connector? Thank you so much for your time. I really appreciate it. 🤙
Just use a simple "servo tester"....simple and cheap
@@TheWingnut58 yeah that's a good point. I wonder if that will work, using a servo tester as a potentiometer connected to the steering. That would be a heck of a lot easier and cheaper than messing with all that Arduino stuff
@@brsrc759 yes, it will absolutely work.....I've been into R/C 40+ years and have used servo testers on everything from micro servos all the way up to the giant scale stuff as well as for testing motor/ESC combinations on drones.
You could use a large servo on the rudder and rig some sort of spring system to "self center" the servo tester as well as using one to controll the motor speed....
thank-you
How to control only use ecs and servo controler
is there a limit to how many thrusters an arduino can control?
You can use any digital pin to control a thruster speed controller with an Arduino using the Servo library, so it's quite a few! If you want the thrusters to all behave the same, then you can connect one signal to multiple speed controllers.
how can i replace the potentiometer with a joystick
Hi there, you can use a joystick that has the same type of analog output as a potentiometer, like this one: www.adafruit.com/product/512?gclid=CjwKCAjwuqiiBhBtEiwATgvixDMCx7IXv09zDqk0-3Tk3Z5XYOJqd3f1fsJoWF0q7Cb-WYmNeeP7PhoCTwUQAvD_BwE
can you use a similar script for rsapberry pi ?
should be possible. the GPIO on a RasPi should be fast enough to handle firing a PWM signal to an ESC
Like 185 ❤
Can it be run by raspberry pi5?
To control thrusters with a Raspberry Pi, we recommend a PWM Hat like the one from Adafruit: www.adafruit.com/product/2327. You can follow tutorials on controlling the servo motor, which should also work with the ESCs!
@@BlueRobotics I have raspberry pi5, can't I run it directly by connecting the motors to digital pins?
@@Hazar-bt6nf please reach out to our team at support@bluerobotics.com to continue this conversation!
can i use 50k potentiometer?
Hi there, yes, that should work fine as well.
that should i change pwm value or the same?
@@ahmeddiab9778ytr It should result in the same PWM output value.
thank you 😊 i want ask you about something i made robot arm using bruchless motor but I can't know how to control it with arduino or another board
@@ahmeddiab9778ytr Cool! That's not something we're familiar with but I'm sure you can find some others online doing robotic arms with Arduinos!
230$???? A PIECE OF PLASTIC WITH A 10$ MOTOR?
WTF IS THE "T200 THruster" WTF
Hi there! Please send us a message at sos@bluerobotics.com if you have any issues with your thrusters and we'd be happy to help you there!
#include
byte servoPin = 9;
byte potentiometerPin = A0;
Servo servo;
void setup() {
Servo.attach(servoPin);
Servo.writeMicroseconds(1500);
delay(7000)
}
void loop() {
int potVal = analogRead(potentiometerpin);
int pwmval = map(potval,0, 1023, 1100, 1900);
servo.writeMicroseconds(pwmval);
}C:\Users\jakob\AppData\Local\Temp\.arduinoIDE-unsaved2023911-21968-4mb429.ejflx\sketch_oct11a\sketch_oct11a.ino:1:10: fatal error: servo: No such file or directory
#include
^~~~~~~
compilation terminated.
exit status 1
Compilation error: servo: No such file or directory
help mi
Hi there, the library file "Servo.h" must start with a capital "S".
@@BlueRobotics C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino: In function 'void setup()':
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:10:6: error: expected unqualified-id before '.' token
Servo.attach(servoPin);
^
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:11:6: error: expected unqualified-id before '.' token
Servo.writeMicroseconds(1500);
^
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:14:1: error: expected ';' before '}' token
}
^
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino: In function 'void loop()':
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:17:27: error: 'potentiometerpin' was not declared in this scope
int potVal = analogRead(potentiometerpin);
^~~~~~~~~~~~~~~~
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:17:27: note: suggested alternative: 'potentiometerPin'
int potVal = analogRead(potentiometerpin);
^~~~~~~~~~~~~~~~
potentiometerPin
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:19:20: error: 'potval' was not declared in this scope
int pwmval = map(potval,0, 1023, 1100, 1900);
^~~~~~
C:\Users\jakob\OneDrive\Dokumente\Arduino\sketch_oct11a\sketch_oct11a.ino:19:20: note: suggested alternative: 'potVal'
int pwmval = map(potval,0, 1023, 1100, 1900);
^~~~~~
potVal
exit status 1
Compilation error: expected unqualified-id before '.' token
#include
byte servoPin = 9;
byte potentiometerPin = A0;
Servo servo;
void setup() {
Servo.attach(servoPin);
Servo.writeMicroseconds(1500);
delay(7000)
}
void loop() {
int potVal = analogRead(potentiometerpin);
int pwmval = map(potval,0, 1023, 1100, 1900);
servo.writeMicroseconds(pwmval);
}
weis nicht weiter