Using ZEUS ESC with Arduino UNO

Hello everyone,

I just received two ESCs that i'm trying to use.

I wasn't able to find any tutorial on the internet for this brand of ESC, and i'm struggling to get them to make my motors move. ( Motors are 350W, 36V taken from a hoverboard, drawing about 7A per phase maximum.

Here is a few extract of the little manual i got with the ESC :


And the ESC itself :

About the wiring, the three black wires from the ESC are connected to the three motor's phases. The first part where i am confused is about the Receiver/Programme Card. I assume those ESC are supposed to work with a remote controller sending information to the receiver, but it my case, the receiver would most likely be the ESC since it's my Arduino that sends the commands ? My question is do I have to connect the signal and GND wires of the arduino to the long wires (receiver) or the short ( programm) ones ? :neutral_face:

I've already tried two tutorials : First tutorial and second one
But i wasn't able to make my motor move, when i plug the battery, my ESC just keeps emitting a short beep about every 2 seconds, and doesn't seems to care about what I'm sending to him. :confused:

I may have forgot something or done something bad but it can't seem to find the issue.
So now i'm looking toward you if you may have an idea to help me getting this thing to work :slight_smile:

I also want to precise that it's the first time i'm using an ESC.

Don't hesitate if you need more precision, pictures, codes etc...

Thanks in advance, and have a great day :slight_smile:

Hi.

  1. Make sure your wirings to the motor (and everything else) is correct.

  2. Ask the guys on rc forum if they are familiar with the motor / esc you use, and beep signal you have. Also ask if this esc works on pwm basis ( I believe it's 5v pwm but you need to make sure)

  3. Try arduino to put 5v pwm signal to esc see if it's work.

Normally these ESCs have a default setting. You should be able to connect the ESC to the Arduino using the wires that would normally connect to the r/c receiver. The wires are normally black (GND) red (5V) and yellow/orange (signal). Connect the GND to Arduino ground and the signal line to the PWM/servo pin on the Arduino. Set the PWM/servo pin to output a 1000us pulse 50 times per second (throttle off). The ESC should beep in a couple seconds.

At this point, you should be able to control the speed of the motor. Be careful. Some motors are quite capable of removing a finger if a prop is connected.

Hi guys,

Thanks for your answers,

I realised i didn't explained well what i've done and my questions, so I tried to make a little schematic of what i've done, right here :

As you can see, i've connected the long wires to the arduino as an output on the 9 pin and the GND ( not the 5V so i don't fry my arduino, right ? ). The short wires are connected to the GND and the analog input 2 of the arduino ( i didn't connect the 5v here either, should I ? ) where is the signal of my potentiometer.

The code going with this schematic is right here :

/*

#include <Servo.h>


int value = 0; 
int potPin = 2;
int value2 = 0;
Servo firstESC; 

void setup() {
  firstESC.attach(9);    
  Serial.begin(9600);    

}

void loop() {

  value=analogRead(potPin);
  Serial.print(" val : ");
  Serial.println(value);
  value2=map(value,0,1023,0,180);
  Serial.print(" val 2 : ");
  Serial.println(value2);
  firstESC.writeMicroseconds(value2);
}

About my process, i connect my arduino to the ESC, power on the arduinon with the minimal signal on the potentiometer, than power of the ESC with the battery. And that's at that time that i hear a beep every 2 seconds whatever i do with the potentiometer. Also, the motor seems to have a little jolt when the beep is heard, but the motor directly returns to its initial position?

Am i missing something here ?

Thanks for your time and have a great day :slight_smile:

/*

#include <Servo.h>


int value = 0;
int potPin = 2;
int value2 = 0;
Servo firstESC;

void setup() {
  firstESC.attach(9);   
  //Serial.begin(9600);   

}

void loop() {

  value=analogRead(potPin);
  //Serial.print(" val : ");
  //Serial.println(value);
  value2=map(value,0,1023,0,180);
  //Serial.print(" val 2 : ");
  //Serial.println(value2); 
  firstESC.write(value2);
}

Try this code and let us know how it goes... But NOT until you clarify/fix the wiring problems.

Darzang:
As you can see, i've connected the long wires to the arduino as an output on the 9 pin and the GND ( not the 5V so i don't fry my arduino, right ? ).

Your picture shows the long wire connected to your analog input, same as the pot. This wire needs to be moved to pin 9. You are correct about the ground. As far as the 5v goes, some escs require this connection( i personally have several that wont work without it) some don't. I have no clue about yours. Try everything else I suggest first, and it still doesn't work, you may try it. I believe it will not be a problem, but make no guarantees, do so at your own risk.

Darzang:
The short wires are connected to the GND and the analog input 2 of the arduino ( i didn't connect the 5v here either, should I ? ) where is the signal of my potentiometer.

Again, from your picture it looks like the short wire is connected to pin 9. You need to remove this. I would leave all the short wires disconnected for now.

Leave the pot connected as it is.

Darzang:
Am i missing something here ?

Yes, lots... ;}

Darzang:
Thanks for your time and have a great day :slight_smile:

Your welcome you too.

**with your previous code,
firstESC.writeMicroseconds(value2);
sends a pulse to the esc that will be between 0 and 180 microseconds, because of the previous 'map' function. Most esc's are looking for a signal somewhere between say 750 to 1100 microseconds to 'arm' then start/increase the speed of the motor to max speed as you increase the pulse to around say 1900 to 2400 microseconds.

You could alternatively change the line:
value2=map(value,0,1023,0,180); to
value2=map(value,0,1023,750,2400); and leave
firstESC.writeMicroseconds(value2); as is...
and expect similar results.

I've done the changes you told me, i unplugged all the shorter wires connection, moved the signal wire on the longer wires to the 9 pin of my arduino, and left the pot as it is connected.

I've tried with and without maping the values from 0..180 to 750..2400. But i still have this motor who doesn't want to turn and keeps beeping ... :frowning:

However i found on internet that this ESC has " PWM Preset at 16 kHz" Do i have to adapt this frequency to my arduino ?

Also, the motor is equiped with hall sensor wires, could it be the source of the issue ? I thought this sensors were used if we wanted to drive the motor wich a better precision, but were not mandatory for the rotation of the motor, am I right ?

I forgot to mention that i made my attempts with 2 different ESCs, so I don't think it's a problem with the ESC itself.

How can i know if i need the 5v connection or not ? I risk to fry my Arduino by doing that right !?

Thanks for you time

Have a great day :slight_smile:

If your motors are 36V 7A, they aren't RC motors, I doubt most standard ESCs would be happy with such small
currents at that voltage. You need a BLDC controller. RC ESCs assume extremely low impedance
motor windings (less than 0.1 ohm normally), it wouldn't surprise me at all if they fail to startup.

This is the kind of motor such ESCs are designed for (OK, perhaps not quite this big):

note the 4 milliohm windings.....

Darzang:
I've done the changes you told me, i unplugged all the shorter wires connection, moved the signal wire on the longer wires to the 9 pin of my arduino, and left the pot as it is connected.

Ok, don't give up yet. While MarkT may be correct about the motor being mismatched for the controller, I really don't believe you've reached that point just yet. My opinion is that the esc is still not seeing the proper signal from the Arduino. Lots of esc simply 'beep' every few seconds when they aren't receiving signal. Even if the motor won't run properly with the esc, based on MarkT's comments, I would certainly expect it to at least attempt to run for a little bit, shake violently, or something similar.

  1. did you upload the code exactly as I attached to my last post?

  2. If so, did you slooooowlyyy work the pot all the way from one end to the other. Leave it all the way turn one way for several seconds, then leave it turned all the way the other for several seconds, then do the same for many points in between. It could be when you think it is sending motor stop/low speed/arm esc signal, it is actually sending max speed signal, and vice versa

  3. Can you lay all the parts, as connected out on a table and take a picture to share here, in a way that will clearly show all the connections.

  4. Do you know what all the 'serial' stuff that I commented out does?

Darzang:
I've tried with and without maping the values from 0..180 to 750..2400. But i still have this motor who doesn't want to turn and keeps beeping ... :frowning:

I'm unclear by this EXACTLY what you've tried, but if you don't understand my previous explanation then don't try changing anything, just flash the exact code i attached.

Darzang:
However i found on internet that this ESC has " PWM Preset at 16 kHz" Do i have to adapt this frequency to my arduino ?

No, don't worry this is irrelevant right now.

Darzang:
Also, the motor is equiped with hall sensor wires, could it be the source of the issue...

No, don't worry this is irrelevant right now.

Darzang:
How can i know if i need the 5v connection or not ? I risk to fry my Arduino by doing that right !?

billcat:
As far as the 5v goes, some escs require this connection(in my experience, usually ones that say 'opto' which indeed yours does)( i personally have several that wont work without it) some don't. I have no clue about yours. Try everything else I suggest first, and it still doesn't work, you may try it. I believe it will not be a problem, but make no guarantees, do so at your own risk.

Your Arduino is already at risk, anytime you are connecting a 36volt battery, an BLDC motor, an ESC, and aren't quite sure what you are doing ::slight_smile:

I'd add a 5k resistor in line with the servo signal wire, having seen more than one ESC explode in flames
I'd not want it to take out the Arduino too.