Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: using ESC to control motor speed on: January 17, 2013, 04:41:52 am
thanks guys a lot of new info for me to work on.

some questions though:

Quote
There's not nearly enough current capacity there to run a motor as large as that one looks.
what do you mean current capacity? how do i know what a batteries current capacity is?

Quote
a brushless motor expects a servo signal (a pulse between 1000 and 2000 microseconds every 20 mS.)
does that mean that i can't program a brushless (or a servo) without using the 'servo' library? for example if I send a 'HIGH' signal every 20ms and use the potentiometer to change a variable that pauses the HIGH signal between 1000-2000 microsec's?

suramu
2  Using Arduino / Motors, Mechanics, and Power / using ESC to control motor speed on: January 15, 2013, 06:24:59 pm
Hi all,

I have a basic question regarding the coding to use ESC's for motor speed control in Arduino UNO.

I have done some reading up and been scouring the web and the forums trying to find something that will help me solve my problems but I can't get my head around the issue.


What I am trying to do is to control the motor speed using a potentiometer. Ive connected a motor (MEDUSA 4300kv) to an ESC (picture attached) the ESC is connected to a regular 9V battery for power supply, the other end is connected to the Arduino ground (black wire from ESC) and a PWM pin for signal output (white wire from the ESC). NOTE I didnt know what to do with the red wire and from my understanding I didnt really need to connect it to the board. I used the following code which I got from the Arduino.cc example pages (the potentiometer is connected to A0 port, Ground, Arduino 5V pin):

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

#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, 1023, 0, 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(15);                           // waits for the servo to get there
}

The problem is that the motor doesn't go at full capacity or even close, I know this because it (motor and ESC) has been tested using a different control board that was controlled using a R/C transmitter-receiver set up with a variable power supply as source.

so basically: Help?

3  Using Arduino / Motors, Mechanics, and Power / Re: Motor not spinning, but LED blinking on: December 24, 2012, 07:44:31 pm
Using ohm's law, V=IR, or V/I = R, we can determine the resistor value:
(5V-0.7V)/20mA = 215 ohm

so if I understand this right that means that with a 330 ohm less current is allowed to pass through but the voltage remains the same?

If your transistor has a gain (Hfe) of 50, then 20mA into the base will allow 1000mA thru the collector/emitter.

If the device you are driving has some resistance/impedance, like a motor, then that becomes the current limiting factor, and not the transistor, which is the situation you want when using a transistor as a switch.

So what I did was to connect a battery between the motor and the ground port (4x1.5V=6V) just to see if there would be more motor action. But there isnt that much change tbh. So I guess my question is, is it because Im using a 330ohm resistor for my base? does increasing the battery voltage not in anyway compensate ?

PS Ive added the new schematic, arduino board is connected to computer via usb
4  Using Arduino / Motors, Mechanics, and Power / Re: Motor not spinning, but LED blinking on: December 23, 2012, 08:45:21 am
With 10K base resistor, you are getting very little current flow thru the transistor.
Thanks I changed it for a 330ohm one worked a lot better.

Does that mean that the lower the resistor value the better it will work?
Cause Im a bit confused now as to how much current we are actually suppose to send through to the transistor
5  Using Arduino / Motors, Mechanics, and Power / Motor not spinning, but LED blinking on: December 22, 2012, 09:11:48 pm
Hi all,

Im really new to Arduino and electronic stuff in general but Im having a lot of trouble with getting a DC motor to spin. I can't figure out what the problem is.
I have connected the arduino board to a motor using a transistor resulting in the motor not moving. when I replace the motor for an LED it flashes (my code is for a motor to go on for 2sec then of for 2 sec).

The motor I am using is:
http://proto-pic.co.uk/hobby-motor/
The transistor I am using:
2N3604 (this has been replaced for BUF742 and BD135 with approx same result)
Diode used is:
1N4001
Resistor used:
10kOhm

The code I used is:

int motorPin = 6;

void setup(){
  pinMode(motorPin, OUTPUT);
}

void loop(){

  digitalWrite(motorPin, HIGH);
  delay(2000);
  digitalWrite(motorPin, LOW);
  delay(2000);
 
}

attached is the schematic of my layout

any help as to why my motor wont run is appreciated.
Pages: [1]