0

I've attached the breadboard layout and schematic of a circuit I'm constructing, which is a simple Arduino radio control car, with a 9V powering the Arduino Uno, and the 6 volt battery pack feeding power to the motors via the L293D. My question is regarding the switch where I've connected the ground from both battery power supplies to one side, and connected the ground of the circuit to the other side. Is this OK and safe to do? Is there anything I should be concerned about with this setup? Is there a safer or better way to do this? What components added or removed (if any) would improve this circuit in terms of power safety and battery longevity?

In case you are wondering why I have two switches, the reason is because I wanted to debug the radio receiver using the serial monitor when I wired this to USB, but I also wanted to prevent it from powering up the motors so my project doesn't try and roll away while it's still connected to the USB cable. The switch I'm asking about in my question is sort of a mains power switch, so when it's off USB I can just flip on both switches and set the robot car free...

Fritzing wiring diagram of circuit with 9 volt and 6 volt grounds wired to same switch

This is the same circuit as the previous picture, but shown in schematic format. Created with Fritzing, this shows an Arduino board wired to an L293D and two battery packs, controlled with a common switch leading to ground.

  • Be very careful with those switches. If you remove the power from the motor driver chip, you must be sure all the arduino pins connected to it, are all LOW. Otherwise you will exceed the maximum input-voltage allowed for the L293D, and thing could get damaged. – Gerben Mar 21 '16 at 14:37
  • Gerben your comment is interesting, would you mind elaborating? We definitely don't want to burn out any parts, but I'm not seeing the issue you see. Your comment about if I "remove the power from the motor driver chip" could refer to one of three sources of voltage feeding the chip. Based on this L293D datasheet, plus the fact that the Arduino pins output only 5V, I believe all the connections are within recommended operating conditions. Regardless, what would you add/remove to improve the circuit? – Projski Mar 22 '16 at 19:34
  • Input High voltage (Vih) shouldn't exceed Vcc1, which it does in an arduino pin is high, and you disconnect Vcc1. Secondly Vcc2 should be at least Vcc1. So if you disconnect Vcc2, while Vcc1 is connected, you fail this requirement. – Gerben Mar 23 '16 at 16:06
1

You have the grounds of the batteries permanently connected together, so opening the switch won't remove them from the circuit altogether: it will leave a potential difference of 3v between the Arduino's power input at the L293's power input.

That would be exactly equivalent to having a 3v battery with its +ve terminal connected to the Arduino power input, and its -ve connected to the L293's power input, with their grounds connected together - so they're sort of wired in series, with one of them backwards, with a far-too-small supply voltage.

I suspect it won't kill anything but I would imagine it would drain the batteries and probably isn't what you want to do.

  • Thank you for your reply. What would be a better way to wire this up? What components added or removed (if any) would improve this circuit in terms of power safety and battery longevity? I think I provided enough information about the reason for the two switches, but if you have questions that would help clarify things, please let me know. Thanks! – Projski Mar 22 '16 at 19:04
  • You're welcome. You could put a DP (double pole) switch on the batteries - switch both of them together. Or, you could drive the whole lot from the 9v battery and just be careful to limit the level you drive the motors at to 2/3 of their maximum -- check my calcs first though! – Mark Smith Mar 22 '16 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.