Why doesn't the Arduino motor do what it should?
Hello, this is my third question on the Arduino topic.
I used this sketch:
const int forwardPin = 8;
const int backwardPin = 12;
const int delayTime = 2000;
void setup(){
pinMode(forwardPin, OUTPUT);
pinMode(backwardPin, OUTPUT);
}
void loop(){
digitalWrite(forwardPin, LOW);
digitalWrite(backwardPin, LOW);
delay(delayTime);
digitalWrite(forwardPin,HIGH);
digitalWrite(backwardPin,LOW);
delay(5000);
}
and I'm just experimenting a little bit so I know how the engine works.
However, it doesn't do what it's supposed to. Sometimes it just rotates jerkily, then for 10 seconds, then not at all, and then it rotates until I unplug it, etc.
I don't know what the problem is and hope someone can answer this for me so that the engine finally does what it's supposed to.
Here are some more pictures of my setup:
Images show too little.
Which IC have you installed? Is it connected by data sheet? I miss at least one 100nF condenser zw. GND and 5V.
Did you rebuild a schematic or a grid? Then post this.
And very important in retrofitting: take red and black cables only for power supply.
That’s a DC engine. He doesn’t need an IC for the code, does he?
I don’t know, but I don’t know how to connect him with the arduino
Yes, because the Arduino exit is the power. There must always be relays or a power level behind. Transistors or optionally H stage (motor driver with change of direction)
The questioner gives too little information.
I’ve only tried with the Arduino once, I use it for other things: pheli.de
The IC is an L293D, which is also properly connected.
The concrete structure is this https://www.youtube.com/watch?v=B0YmHIJInto (also from a previous question).
I have the structure from the net, I unfortunately have not enough other :/
The Ic is an L293d that should be the right thing I had already had on another question