Hey everyone, new guy here.
This is my first time dealing with brushless motors and ESCs. My intent is to power a Bluerobotics T200 thruster via ESC with a simple on/off signal from an Arduino triggered by a momentary touch switch. If I can avoid the potentiometer used to regulate throttle that’d be preferred.
Specifically, I have some questions:
Does input voltage matter? Would I need to regulate my 20V battery down?
What would the Arduino code look like?
I look forward to hearing what you guys got!
Thanks
@Jatilano Welcome to the RobotShop Community. Normally the input of an ESC is the same as an RC servo, so your code can treat it accordingly. Double-check to see if the ESC PROVIDES 5V on the red / center wire (you don’t want to backfeed the Arduino, unless that’s how you plan to power it). You’d need to create a program which has the button as digital input and the servo position as output (yes, it’s an ESC, but again, treat it like a continuous rotation RC servo). If you want to add a potentiometer, the code is a bit more involved, where the button is simply On/Off and the potentiometer (analog input) determines speed and direction.
Q1) Does input voltage matter?
A1) To the thruster? Yes, normally motors operate at a “nominal” voltage. Lower voltages make them operate more slowly and less efficiently.
Q2) Would I need to regulate my 20V battery down?
A2) Check your thruster’s Min/Max input voltage. For example if you’re using this one, then it seems to be able to operate at 20V max. However, you’ll need to read the manual to be certain if that’s the ABSOLUTE MAX and your charged battery might provide more (which it won’t like).
Q3) What would the Arduino code look like?
- Digital read for the button (you can use an IF statement, like “IF the button is pressed then…”… if not, then do nothing)
- Analog read for the potentiometer (only if the button is detected, then read the potentiometer’s position, with 2.5V as “neutral”)
- Map the potentiometer’s 0 to 5V analog input to the servo’s 500 to 2500us output using the Map function)
- Output the servo position (use the Arduino servo library and choose a digital pin accordingly).
Your connections would be something like:
-
ESC 3-pin connector to Arduino: GND to GND, Signal to a digital pin, and 5V to Vin on the Arduino (assuming the ESC has a BEC).
https://docs.arduino.cc/tutorials/uno-rev3/intro-to-board -
Battery to the ESC’s input
Thanks for the reply!
When I’d made my original post, i hadn’t decided on an ESC but I’m going with the Bluerobotics BlueESC; it only has a signal and gnd.
Got all my components today and got to work. At the moment I’m powering the Arduino Uno via USB, powering ESC with DeWalt 20V battery. I loaded the sample code from Bluerobotics, which uses a potentiometer to control thrust/direction. Everything works as at should.
My next step is to forget about USB, and power the Arduino with a 9V. Also to delete the potentiometer and have the Arduino tell the ESC to go full thrust either A) as soon as the Arduino powers on, or B) when a button is pushed. Can you help me with the wiring and code for that setup?
Thanks again, and sorry for the noob questions; I’m just getting familiar with all this.
Hope you’ll post your progress under the Robots section here - would be nice to see what you create!