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.
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
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.
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
#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);
}
CronosVirus00:
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
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.