Problems with L293D + Arduino

You say that becaus you

You say that becaus you haven’t seen the other side of it. ; )

though, I tought that by making it clean and everything it would have been easier to trouble shoot/modify.

I should have posted a picture of the first one i made too, it was so small, but again it was impossible to modify.

 

here it is! It’s not that ugly I may be a bit anal about my cricuits…

Troubleshooting

Switch the connections from the Arduino to the motor driver. Does this make the other motor work? If so, could be a initialization of the PWM pins that is not occuring, and only one set is actually driving the h-bridge.

Another possibility is that there may not be a good connection between power and pin 1 or pin 9 on the L293. If you have a meter, might be good to test each pin (on the chip side) to see if +5v is getting there. You could also check the PWM pins to see if an output is being generated.

robologist
I think he said he figured it out and it works now :)!

I said a lot of things ;

I said a lot of things ; )

 

Sorry no updates, I haven’t worked on it. I have a lot of thing to do like varnishing a new table for my elctronic workplace that I’ll ruin with solder drops, so I maybe update tomorrow I don’t know.

Latest News
I’ve checked Pin 1 and 9 the +5v is getting there, i still have to check the PWM outputs. I’ll varnish my table and will come back to ou with the infos.

PWM output tests

I’ve tested every PWM (3, 5, 6, 11) that goes form the Arduino to the motor driver, the only pin that gives me something is pin 11, with +4.08v. there’s still 3 pins left, I’m guessing that the problem comes from the code, but I’m not sur at all.

P.S. My new table is awesome, I can work on my electronics and do thing on my computer now, I don’t have to go back to my garage every time I want to solder a pin.

Arduino experts

Sounds liike you’re on your way to finding it, now just need someone who works with the Arduiono to look at your code to see if the PWMs need to be initalized somehow.

Congrats on the table. Oh, one thing, you can scrub the flux off the motor driver board, to prevent it from eating into your connections. Looks like a well soldered board.

Here’s the code :

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VARIABLES

int motorSpeed = 200; // motor speed - from 0 to 255;

// Motor Pins
// the H bridge takes two outputs from the Arduino to control each motor.
int motor1_Pin0 = 11;
int motor1_Pin1 = 6;

int motor2_Pin0 = 5;
int motor2_Pin1 = 3;

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SETUP
void setup() {

// set Arduino pins as outputs
pinMode(motor1_Pin0, OUTPUT);
pinMode(motor1_Pin1, OUTPUT);

pinMode(motor2_Pin0, OUTPUT);
pinMode(motor2_Pin1, OUTPUT);

delay(500);
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP
void loop() {

analogWrite(motor1_Pin0, motorSpeed);
digitalWrite(motor1_Pin1, LOW);

analogWrite(motor2_Pin0, motorSpeed);
digitalWrite(motor2_Pin1, LOW);

delay (1000);

digitalWrite(motor1_Pin0, LOW);
analogWrite(motor1_Pin1, motorSpeed);

digitalWrite(motor2_Pin0, LOW);
analogWrite(motor2_Pin1, motorSpeed);

delay (1000);

}

 

 

Thanks for your help. How do

Thanks for your help.

How do you remove the Flux? I’ve tried with an old toothbrush and it doesn’t work, the flux is quite hard.

toothbrush and …
soap and water, and then a blow dryer afterwards. Takes a bit, but it does come off. Just don’t look at some of my old boards, that I forgot to clean.

I r newbeh

I’ve still yet to code even my first blinking LED, but only time shall prevail!

But one thing I noticed in your loop, your motors are set on LOW, from what I’ve read (not much), almost everycode you use to power something is either a HIGH (1) or a LOW (0), could this be why you’re not getting anything?
Again, I’m a newb so don’t mind the questions if they’re not the brightest:D

And looking at the Arduino website, stating it as a LOW status, grounds it, giving 0 Volts, when a HIGH in a digital output, or 3.3v for older boards.

I dunno I’m so confused :stuck_out_tongue:

**It works, sort of **

Ok I gave the whole arduino + motor driver and motors to my friend Philippe who’s buidling the robot with me.

He never did any code until yesterday and figured out how the whole thing works. It took me months to just understand the syntax and he solves the problem in one day, damn he’s good.

But there’s still a little “bug” The two motors work if they’re used one at a time, he’s able to control the speed and direction but he can’t control 2 motors at the same time, either nothing happens or only one spins randomly.

Tyr 2 supplies
Sounds like the motors are browning out the processor when starting, so perhaps you can power the motors with another battery. Just plug it into V2 on the chip, and tie the grounds together and see if it works better.

MCU input to L293D

I understand L293D is controlled by MCU inputs.

Is it necessary L293D and the MCU to share the power source?? for example common ground

The L293D has two power

The L293D has two power inputs - one for logic and the other for the motor drivers.
The logic power must be the same voltage (or close to it) as your microcontroller, or else the logic levels won’t be compatible to allow the micro to control the L293D properly.
The motor driver power can be any voltage supported by the L293D, this will be the power source that feeds the motors.
Ground lines must be connected to ensure a common reference for the logic levels.

same problem

I’ve been struggling with the very same problem! I can get one motor working but not the other :-(  I have concluded that perhaps I fried the L293D with ESD since one of the motor pins remains low regardless of input. I’ve ordered a protective desk cover and wrist strap! But I will keep trying to figure it out, in case I’m wrong.

 

SubMicro

I’m with you too. I’m

I’m with you too. I’m measuring about 1.5 volts signal from the arduino when the output is going into the L239D, but 5 volts with any other output. I’m assuming it was fried as I had the chip backwards for a bit…stupid mistake but I own up to it. Ordering a new chip from Digikey so I’ll confirm when I get a new chip.