Is it safe to connect both IR sensor and L293D on the same 5V pin?

I am new to electronics, and I'm making a project for my school. I'm making an IR-controlled car with 1 L293D, 2 motors and 1 SG-90 servomotor. At first, I had all of them hooked up to the 5V pin. Then I realized that's probably a bad idea so I decided to grab a 6V battery for the servomotor and connect it separately. Now I have both of the IR sensor and the L293D connected in parallel to the 5V pin. However, I'm not sure if the 5V pin can output enough current for both of them.

Upon looking up the specifications of these components, I found out that:

  • the L293D logic supply voltage is 5V, I don't know about the current.
  • the SG-90 servomotor voltage is around 6V, and the current is around 200 mA.
  • However for the IR sensor, I can't find any details. There are some information on similar sensors and they use 3.3 to 5V. So could this mean the 5V pin is not enough for both the L293D logic supply and the SG-90 servomotor?

Based on these, does anyone have an idea on how I should connect these components in this circuit for sufficient power? If more batteries are needed, I'll buy more.

Do not use the 5V Arduino output for motors and servos. It is not designed for that, and if you try, you may even destroy the Arduino. Ignore the many bad tutorials that suggest doing so is OK.

Use an external supply for the motor power connection of the L239D and the servo. Don't forget to connect all the grounds.

You may connect the logic power input of the L293D to the 5V output.

1 Like

Yes, that's what I'm doing. I'm sorry for not making it clearer.

I have a separate battery for the motor power output of the L293D. The only things that are connected to the Arduino 5V output are the logic power input and the IR sensor.
However, I'm not sure if the 5V output is enough for both of them.
The voltage of the 5V pin is enough since they are connected in parallel, but I don't know anything about the current of these components and how much current the 5V pin can output. That's why I made this post.

That should be fine. It would be a few mA current draw for each one.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.