Maker Pro
Maker Pro

Need advice for controlling Sentilon 100A HV with Arduino

TheRealDeal

Mar 19, 2016
3
Joined
Mar 19, 2016
Messages
3
Hey all,

First time here, hopefully I'm doing everything right. :) I come to you hoping that someone will be able to help me with my Electric Skateboard project (a copy of this cool project). I got the parts from Hobbyking a while back and have been trying to control the Motor with my Arduino through the Sentilon 100A HV ESC. But so far I've not been able to accomplish anything beyond a few beeps. :(

For those curious I'll start with a parts list:
My issue is that no matter what I send to the Arduino, the ESC the ESC only responds by beeping the motor roughly every 2 seconds. Like this:

The entire setup is connected like this:
eyxb3yk.jpg

h3smG1B.jpg

ksu4UZw.jpg

tTWhrNa.jpg


I've tried using the Arduino's Servo.h write( ) method for values 0 - 20, 160 - 180 and a few assorted randoms in between, and writeMicroseconds( ) method for values between 0 and 2000 but no luck.

At this point I'm out of ideas. I've made triply sure that the motor is attached to pin 9 and even probed it to check if it's really a PWM signal I'm sending, all that looks good. But I don't even get the "Several 'beep-' tones" which tell me the number of Lithium cells I have connected.

I'm thinking it might be the batteries instead of code related but I was wondering what people had to say. Thanks so much!
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
What is powering the Arduino?
Does the ESC need supply?
What is the code used?
I don't see any inputs to the Arduino.
Beeping sounds like the normal "power-up" beep, no signal.
Did you run the code through the serial monitor to see what is going on?
 
Last edited:

TheRealDeal

Mar 19, 2016
3
Joined
Mar 19, 2016
Messages
3
Hey Bluejets,

Thank you for taking the time to help me. :)
As far as I'm aware the ESC supplies itself from the batteries. I followed the instructions on this blog and it didn't look like another supply was needed.
The Arduino is powered via my laptop's USB port.
The code I've been trying to use comes from this place. It allows me to enter a number and then writes that to the ESC using writeMicroseconds( ) (I made the switch after write( ) didn't work). It looks like this:
uTY2d2B.png

I scoped the signal too but don't only took one picture *whoops*. Not exactly sure which one created this waveform but I think it was writeMicroseconds(0):
qoIIWot.jpg


What makes me suspicious is that the ESC doesn't make the beeping noises from the normal startup procedure. I think the initial beeps are just a power up and then it checks something, which fails, and it goes into an error mode. :(
wL7WpsQ.jpg
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
I think you need to go back to the programming code and look again.
The example you have here is 99% commented out (// ) and there is no basic structure to the program which requires setup and void loop to run.
/* followed by */ is just a way of reminding the programmer what the code does, not actually compiled or run.
 

TheRealDeal

Mar 19, 2016
3
Joined
Mar 19, 2016
Messages
3
Yah, I commented out the valid input check since I wanted to enter values above 180 for writeMicroseconds( ). But I took your advice to heart and built something loosely following mem's answer in this thread on the Arduinoforums. The code looks like this:
Code:
#include <Servo.h>
Servo motor;
int speed;

void arm_servo(){
  set_speed(0);
  delay(2000); 
}

void set_speed(int speed){
   int angle = map(speed, 0, 100, 0, 180);
   Serial.println(angle); //Output for debugging.
   motor.write(angle);
}

void setup() {
  Serial.begin(9600);
  Serial.setTimeout(100000); //Huge timeout so that parseInt will block until I enter a new number
  
  Serial.println("Attaching motor to PIN 9");
  motor.attach(9);
  Serial.println("Motor has been attached to PIN 9");
  
  Serial.println("Initializing Servo");
  arm_servo();
  Serial.println("Servo has been initialized");
}

int val_sent;
void loop() {
  val_sent = Serial.parseInt();
  set_speed(val_sent);
  Serial.println(val_sent);
}

I read on this thread that ESC's need to be calibrated first so I tried sending it some values but I'm really just poking in the dark.
zAOaHdp.png


Behavior remains unchanged. I set a value on the Arduino, plug in the ESC, it beeps three times and then begins beeping once every two seconds. Still wondering if it might be the batteries? They're just two 3 cell packs in series, so like 19.8 Volts. Is that what an ESC is used to?
 

relations99

Jul 24, 2018
2
Joined
Jul 24, 2018
Messages
2
Yah, I commented out the valid input check since I wanted to enter values above 180 for writeMicroseconds( ). But I took your advice to heart and built something loosely following mem's answer in this thread on the Arduinoforums. The code looks like this:
Code:
#include <Servo.h>
Servo motor;
int speed;

void arm_servo(){
  set_speed(0);
  delay(2000);
}

void set_speed(int speed){
   int angle = map(speed, 0, 100, 0, 180);
   Serial.println(angle); //Output for debugging.
   motor.write(angle);
}

void setup() {
  Serial.begin(9600);
  Serial.setTimeout(100000); //Huge timeout so that parseInt will block until I enter a new number
 
  Serial.println("Attaching motor to PIN 9");
  motor.attach(9);
  Serial.println("Motor has been attached to PIN 9");
 
  Serial.println("Initializing Servo");
  arm_servo();
  Serial.println("Servo has been initialized");
}

int val_sent;
void loop() {
  val_sent = Serial.parseInt();
  set_speed(val_sent);
  Serial.println(val_sent);
}

I read on this thread that ESC's need to be calibrated first so I tried sending it some values but I'm really just poking in the dark.
zAOaHdp.png


Behavior remains unchanged. I set a value on the Arduino, plug in the ESC, it beeps three times and then begins beeping once every two seconds. Still wondering if it might be the batteries? They're just two 3 cell packs in series, so like 19.8 Volts. Is that what an ESC is used to?


Have you been able to solve the issue? I have the exact problem
 
Top