increasing speed of the motor

Thread Starter

hcwickz

Joined Oct 31, 2011
21
Hi everyone. i have to increase the speed of my brushless motor to lift up the helicopter . i need to check if i can do anything to my code below to increase the speed? which part below is link to the speed rpm?

#include <Servo.h>

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

int potpin = 120;
int potpin1=150;// analog pin used to connect the potentiometer
int val;
int vall;// variable to read the value from the analog pin Use the analog joystick to throttle the helicopter
void setup()
{
myservo.attach(9);
myservo1.attach(10);
// 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, 90, 1023, 90, 179);
vall=analogRead(potpin1);
vall=map(vall,90,1023,90,179); // 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(5);
myservo1.write(vall);
delay(5); // waits for the servo to get there
}
 

thatoneguy

Joined Feb 19, 2009
6,359
What kind of servo is it? R/C type? It will only turn as fast as it's gearing allows. Faster servos with more torque = more $$$

What is the servo doing? If you are positioning something, that's one thing.

If you have de-geared it and are using it for a drive motor, that's another. Use a faster gearhead motor and H-Bridge for the drive case.
 

thatoneguy

Joined Feb 19, 2009
6,359
BLDC motor controller changes the speed by changing how fast the field rotates. If that is integrated into your program, than that is the fastest it will go. Switch to a faster processor, like an Uno 32 which is PIC based.

If you are driving a BLDC driver, which gives 3 phase output, look at the datasheet for it and what inputs relate to RPM.
 

Thread Starter

hcwickz

Joined Oct 31, 2011
21
what u mean by how fast the field rotate? Ya i am using arduino mini pro to program everything. so cant make use of the code to edit the speed?
 

thatoneguy

Joined Feb 19, 2009
6,359
A BLDC Driver is simply an oscillator that creates 3 fields that "chase" each other, the faster the fields chase each other, the higher the frequency is, the higher the frequency is, the faster the motor runs.
 

THE_RB

Joined Feb 11, 2008
5,438
You need to increase the system voltage (to compensate motor inductance) so that you can use a higher frequency and still get enough current to deliver the desired power.
 

Thread Starter

hcwickz

Joined Oct 31, 2011
21
Ok thks for the info . i juz up my system voltage , however when my brushless motor is spinning , i cant up my voltage becoz there is a blink in c.c (constant current) in the dc power supply , isnt short circuit anywhere?
 

thatoneguy

Joined Feb 19, 2009
6,359
so power input pin such as ground and power source right?
sorry i am a noob , not so good at circuit
Yes, across the power lines.

And a 0.1uF cap across V+ and GND of the microcontroller if you don't have one already (see sigline link on decoupling caps).
 
Top