Hobbywing 30A ESC speed controller

Hello Long story short I'm making a robot using the hoverboard wheels. i have two hoverboards that was given to me by a friend of mine both hoverboard catch on fire Because of battery pack had no protection on them. So long story short i have them now and i would like to make a robot out of them. I have no programming skills what so ever. Well not much anyhow. But more less when it comes on ESC speed controllers. I use to have a Quadcopter i bought and end up crashing it a while back. However the Speed controllers are still good. I would like to use them. Here is my problem. I have no clue how to Arm or disarm them. And no clue how to make them move.

I searched online for some example code using a Pot and it didn't work no matter how much i searched online i got nothing from it. I really need some help. Is there something a example i can test to arm it and then make the motor move i can not find nothing that makes it work.

The speed controller is a Hobbywing Pentium-30A. Here is a link on amazon. I didn't get them form there but ou can see what they look like Click here. I have the correct voltages using a 16.8v Power supply.

I'm also using a arduino uno for test. And a hoverboard wheel.

See this?
http://site.hobbypartz.com/manual/ESC_e.pdf

Hello thank you for the reply. I have also saw that site. But I'm no closer to figuring how to arm it and move the motor. Sense I'm not using a RC controller or a PWM test controller i have no clue.

The example Knob program from the IDE works fine with those ESCs. Arming just needs a low throttle for at least 1 second following which the motor should run. If you have problems report what happens, including exactly what beeps you hear from the ESC/motor.

Steve

How can i tell from that example which pin it is sending to? Also how do i send a Low throttle signal to get it started then speed it up?

Edit: Sorry i had the wrong sketch. I have the correct one now. But not sure how to do the Low throttle setup?

I did try out the sketch. It works But at first the Pot is down the Zero the beep is like every second or two. And if i turn the pot up 1/4 way the beep is twice which sounds like it's Armed Then i turn the Pot up 1/2 way and the motor moves then i tried 3/4 of the way and got faster then 100% of the pot turned up and got even faster.

But here is where the strange part comes into play. When i turn the pot down to half way the motor slowed down and when i got to 1/4 way motor stopped. But when i turned the pot to 0% the motor speed right back up to 100% and wouldn't stop.

I've never seen one do exactly that but it is probably because Knob uses the rather extreme default range of 544-2400us. Try changing

myservo.attach(9);
to
myservo.attach(9, 800, 2200);
or even
myservo.attach(9, 1000, 2000);

They will reduce the range and should help.

Steve

That made no difference. If i unplug the arduino then it stops.

josephchrzempiec:
That made no difference. If i unplug the arduino then it stops.

Can you post the code you used for this test?

I'm Just using the Knob example.

/*
 Controlling a servo position using a potentiometer (variable resistor)
 by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

 modified on 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Knob
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 100, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there
}

But what I'm thinking is that a while ago i reprogrammed these ESC on my quad copter to different things and maybe is why it is acting funny. However i don't have my quadcopter no more and sold it with the programmer But i keep the ESC's all four of them. I wonder if that is why it is not acting right?

Steve suggested this:

myservo.attach(9, 1000, 2000);

You said:

That made no difference.

I asked:

Can you post the code you used for this test?

But when you posted the code, I do not see Steve's suggested fix. Did you post the code you tried that did not work?

Hello sorry that was the un modded code. I thought you wanted the orignal my fault.

here is the first change code i did.

/*
 Controlling a servo position using a potentiometer (variable resistor)
 by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

 modified on 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Knob
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
  myservo.attach(9, 800, 2200);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 100, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there
}

then i tried the second code and this is it.

/*
 Controlling a servo position using a potentiometer (variable resistor)
 by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

 modified on 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Knob
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
  myservo.attach(9, 1000, 2000);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 100, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there
}

Here is a small video of it in action. I was showing my friend Hari who is into all kinds of stuff Click here.

You have changed the map command for some reason of your own. Now it doesn't match the comments or what is needed.

In the normal Knob example it is map(val, 0, 1023, 0, 180). It should still be that.

Steve

Hello yes i change feom 1023 to 100. I was just testing it an hour ago messing around with a few settings. Even at 1023 nothing change.

josephchrzempiec:
Hello yes i change feom 1023 to 100. I was just testing it an hour ago messing around with a few settings. Even at 1023 nothing change.

Sorry but if you're just going to change things at random without mentioning it then I give up. I can have no real idea what anything you say actually means. Good luck with your experiments.

Steve

Hello Slipstick you are right i forgot that i have tried different things because I'm running back and forth still trying to figure things out that sometimes it does slip my my mind. it's my fault and I'm sorry.

Edited I did put back to the default and added that part myservo.attach(9, 800, 2200); it did act the same Difference is it slams on the breaks a lot faster now. But if i turn the pot down to zero somehow it still comes back on to full speed. If i leave it 1/4 way up then it is fully stopped. It is strange. But i did do a little video showing how the Pot acts when being on full zero Click here.

Hello There was something off when i tried the to add the new code i thought it was compiling but it wasn't My arduino wasn't even compiling at all. So i hoped onto my other laptop and tried it and this is what i got I uploaded the new code which is below.

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
 myservo.attach(9, 800, 2200);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there
}

And it works. When Fully putting the pot on zero it does stop with no problem. Thank you all for the help.
Now i need to look into why my other laptop won't compile. Because i tried to do a simple Blink sketch and it looks like it was compiling and said uploading then said it was done but nothing happen. And then i was thinking it was the board. So i hoped onto this laptop that I'm on now did the same led blink sketch and it worked. So something is wrong. That is my next thing to figure out. Thank you all for the help again.