Go Down

Topic: Problem with DC motor from RC Car ( Re.el speed generation) (Read 179 times) previous topic - next topic

CronosVirus00

Hi All,
 I have just bought a little RC buggy, it is powered by two AA batteries.
I took the motor out and I tried to connect it to arduino; however, none of the following procedures work
Potentiometer
L293D
A bounces of modified codes based on the previous two methods

Strange thing, at least for me, is that using a dc motor provided by Elegoo (the one that you can find in an arduino sensors kit) all of the above methods work.

When I connect the motor to the current or back to the rc machine, it work just fine.

I'm working with an Arduino nano and this is a picture of the dc motor: it is produced by Chaoli and I cannot find the specs neither online or the instructions of the rc car.

What am I missing?

Thank you for your help.

Robin2

What am I missing?
I don't know what you are missing, but we are missing ...
  • your program and
  • your wiring diagram


An L293 needs at least 4.5v and it is not an efficient device. If you need to work with 3v then the Pololu DRV8833 would be suitable.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

CronosVirus00

My programs are the same from the example provided, the same goes for the sketches. I powered the motor with both 9v and 3v.
Schemes:
Potentiometer
L293D

Robin2

Sorry, but if you want help here then post YOUR program (i.e. the code YOU uploaded to your Arduino) and YOUR wiring diagram (i.e. a drawing that you made yourself from looking at your project) here.

I am not going to struggle through two Instructables projects on your behalf.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

CronosVirus00

#4
Jun 13, 2018, 11:19 am Last Edit: Jun 13, 2018, 02:17 pm by CronosVirus00
Alright, I wrote this simple code that turn on the dc motor for a second and turn it off for another second.

PIN (arduino nano):
 
motor + --> pin 9
motor - ---> GND

Quote
#define motorOutput 9

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

void loop()
{
  digitalWrite(motorOutput, HIGH);
  delay(1000);
 ////////////////////////////////////
  digitalWrite(motorOutput, LOW);
  delay(1000);
}
The code works with the DC motor provided with the arduino kit; yet, it does not work with the DC motor from the RC car.
Moreover, the RC car motor does not make any High frequency sound (which in others posts seems to be a common thing). It makes noises only when connected to +6v.

Even with the analogWrite method, the RC car motor does not work, while it works with the kit motor.

PIN (arduino nano):
 
motor + --> pin A0
motor - ---> GND


Quote
#define motorOutput 9

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

void loop()
{
 
  for (int i = 0; i <= 255; i++){  // it gains power slowly
  analogWrite(motorOutput, i);
  delay(50);
  }

}

Robin2

Alright, I wrote this simple code that turn on the dc motor for a second and turn it off for another second.
You also need to post diagrams showing how you have everything connected in the two different cases. Photos of simple pencil drawings will be best and no artistic skill is expected. See this  Simple Image Guide


...R
Two or three hours spent thinking and reading documentation solves most programming problems.

CronosVirus00


Robin2

You can't drive a motor from an Arduino I/O pin. You will most likely damage your Arduino. The absolute max current from an I/O pin is 40 mA and 20mA would be a lot more sensible. Even a very small motor probably needs 10 or 40 times that amount of current.

You need either a transistor or a motor driver between the Arduino and the motor and a separate power supply for the motor. If you only want the motor to move in one direction a transistor would probably be sufficient.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

CronosVirus00

It works!

I bought the  transistor and it works just fine! Thank you.

I followed these (just ignore the button) with the sketches posted above.

Go Up