L239D motor shield power

Hi everyone I am doing an line follower car with a l239D motor driver shield to run the two motors that I have. I am using three infrared sensors and a 9V baterry to power the arduino UNO and the motor driver shield.

The 9V works fine and is enough to run the two motors and two infrared sensors. However when I connect the third infrared sensor the motors dont move. to solve this problem I connected 4AA batteries to the arduino jack but it doesnt make any difference I even tried removing the PWR jumper and connect the 4AA(6V) to the barrel jack and the 9V to the shield but the car doesnt move either. the car only moves when the 9V batteries are conected to the shield.

The three sensors and the motors work when the USB is connected to the arduino and the 9V battery to the shield.

I am sorry, I know that there are some other questions about this topic but i did not find my answer in any of these...

Here is a pic of my setup.

I want the three infrared sensors to work.

Can anybody help?

4 x AA battories are not really enough for the barel jack. It needs 7 - 12 volt to work.
A 9 volt battory can not be used for things like motors because it can not deliver that much current.

Do somee more work. Then attach a drawing showing the system. Shakespeare type drawings don’t work well.

Considering the power lost in the L239D I would consider a different driver, preferably one with MOSFET outputs. in typical darlington devices, both NPN and PNP. Each transistor will have about 0.7 Volt drop so a darlington configuration has two junctions so that becomes 1.4 volt drop. A H bridge with a darlington in each leg drops about 2.8V. Multiply that voltage times the current and you get the wattage you have to dissipate. This is all wasted. With a MOSFET H-Bridge with a RDSon 0f 0.001 ohms you will dissipate almost nothing. Also your voltage drop goes to maybe 0.024 volts, depending on the MOSFET, that is over 2.5 volts more for your load. That is about 20% more power that would have been burnt as heat. Uses a MOSFET H-Bridge your project will be much cooler and better battery life…

Please read the how to use this forum sticky post. We don’t appreciate links that are not clickable or that shower your machine with spam.when I tried your. Link it was highjacked by a spam pop up telling me I had wone something.

Post images correctly please.

The L239D looses more voltage than Gill said, it is a useless chip for small voltages.

Sorry about the link I had done it before and no one complained, sorry about that.

Well I will try to give more power to the arduino jack and see if it works.
I already knew of the high voltage drop but with 9V batterie I can control two motors and a infrared sensor, the two motors consume 3.5V each one and the infrared sensor consumes 2.86V and the 9V batterie is enough for this.

I will try to power the arduino with 6AA batteries instead of four.

Thanks for your answers.

the two motors consume 3.5V each one and the infrared sensor consumes 2.86V

OK I think you are misunderstanding something about electricity here.

Components do not consume voltage, it is as if you were adding up all the voltage drops together, this is wrong.

Components do consume current and the current is additive.

When you supply a voltage to a parallel circuit all components get that voltage applied to them. However, if the combined current of all the devices is more than the battery / power supply can deliver, the voltage from the power source will drop. This is a shortcoming of the power supply, nothing to do with the components.

If you want to see if it is lack of capacity in your power source measure the voltage out of it when it is under load, that is the components are drawing current.

I see thanks for your answer I was indeed misunderstanding. I have already measured the power supply when under load and it gives 8.5V however it is not enough for the three sensors therefore I will give more power to my arduino UNO trough the barel jack and I will see if that works.

Thank you for your answer it was very useful.

however it is not enough for the three sensors

I think you might be wrong about that, sensors normally take very little current, it is the motors that are the heavy load.

What exactly are these sensors? Have you a part number?

I am sorry when I said that it is not enough I wanted to say that it powers the sensors but the car doesnt move the motors dont work whit two sensors connected.

I am using infrared sensors.
And the motors are just regular DC motors nothing special.

Thanks.

I am sorry when I said that it is not enough I wanted to say that it powers the sensors but the car doesnt move the motors dont work whit two sensors connected.

I am using infrared sensors.
And the motors are just regular DC motors nothing special.

Thanks.

I am using the flying fish ir sensor F-51

So not so much a sensor but a sensor board, that makes a big difference.

You need to break things down and take one small step at a time.
Will three sensors work with no motors attached?
Will three sensors work with one motor attached?
Will three sensors work with the other motor attached?

If the answer to all that is yes and it will not work with three sensors and two motors then most likely your power supply to the motors can not provide enough power.

I am assuming that you are using different pins for the sensors than you are using for the motor drivers.

The answer to all that questions is yes so I Will try to Change my motor power source, because the three sensors work but the motors dont work even with the 9V connected in the DC barel.
So when I have the three sensors and the motors together the motors dont work.
I will give more power to the motor supply.

Thanks for your answers.