I buy 9v motor and put it in my arduino, but the motor run quite slow and when i check with voltmeter just 6 volt. Any idea how to increase the motor speed? or maximise the voltage to 9v?
My motor is micro metal gear 1000 rpm with torque 0.2kg/cm
Did it friend the other 3 volts on facebook first JK.
Ok so we know nothing about the power supply being used ?
We dont have your schematic ?
Those are the first order of business.
What motor? That means a link to the data for it, not just a brief description in words.
What motor driver?
What power supply?
Code?
ballscrewbob:
Did it friend the other 3 volts on facebook first JK.Ok so we know nothing about the power supply being used ?
We dont have your schematic ?Those are the first order of business.
im just using 9v battery connect to arduino and another 9v
battery connect to l298n dual motor controller 2AMy code:
///Define port line sensor
//in serial printing, bila kena black = 0, kalau white = 1
#define LS A1
#define LCS A2
#define CS A3
#define RCS A4
#define RS A5
//motor kiri
#define enA 2
#define in1 3
#define in2 4
//motor kanan
#define enB 7
#define in3 5
#define in4 6
void setup()
{
Serial.begin(9600);
pinMode(LS, INPUT);
pinMode(RS, INPUT);
pinMode(CS, INPUT);
pinMode(RCS, INPUT);
pinMode(LCS, INPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
delay(1000);
}
void loop()
{
if((digitalRead(CS)==0)) // Condition_1 stop
{
forward();
}else if((digitalRead(CS)==1) && (digitalRead(RCS)==1)) //CONDITION-2 FORWRD
{
left();
}
else if((digitalRead(CS)==1) && (digitalRead(RS)==1)) // RIGHT
{
left();
}
else if((digitalRead(CS)==1) && (digitalRead(LCS)==1))
{
right();
}
else if((digitalRead(CS)==1) && (digitalRead(LCS)==1))
{
right();
}
}void right() {
analogWrite(enA,255);
analogWrite(enB,255);
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
}
void Stop () {
analogWrite(enA, 0);
analogWrite(enB, 0);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, LOW);
}
void left() {
analogWrite(enA, 255);
analogWrite(enB, 255);
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
}
void forward() {
analogWrite(enA, 255);
analogWrite(enB, 255);
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
}
void back(){analogWrite(enA, 255);
analogWrite(enB, 255);
digitalWrite(in1, LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
}
And a common GROUND ?
BTW most regular 9V batteries do not last very long at all with motors and drain exceptionally quickly.
We still know nothing about the motor itself ?
https://nadieleczone.com.my/webshaper/store/viewProd.asp?pkProductItem=447
i bought it from this site you can check it out
Operating voltage : 3v -12v (Rated 6v)
Speed : 1000RPM (rotate per min )
Torque : 0.2kg.cm
Ampere : 40ma (No load) , 600ma (Stall)
Please answer ALL the questions in replies #1 and #2, and post a wiring diagram (hand drawn, not Fritzing).
Use code tags ("</>") when posting code.