Battery Source for Arduino Uno & 1 12v dc motor?

Hello I’m basically controlling a 12v dc motor with a sn754410 motor driver ic to move forwards, pause, and backwards, pause and loop. I followed When it is connected to my computer and where the 12v battery is, it runs ok. But when I plug a 9v battery into the jack for the arduino (since it regulates to 5v) and leave the 12v battery where it is (for the motor), there was smoke. Did I overload the power?

Would it be ok if I connect the 12v battery to the arduino jack and connect the vin to leg 7 of my h-bridge to power both the board and the motor with one battery source?

Ideally it would run for a couple of hours.

Oh if I wanted to control the speed, do I need to add in a potentiometer or can I control the speed directly using the sn754410?

Thanks in advance.

Where did the smoke come from?

Probe it with a multimeter and check for shorts! Also are you sure you haven't connected the power of the two batteries together?

The smoke came from one of the digital pins 1-7. Not sure which.

The batteries are connected like in the diagram. Does that connect to each other in any way?

The circuit as drawn seems correct. However there ought to be some decoupling on VCC1 of the SN754410 near that chip.

When interfacing to a higher-voltage driver chip like this it is a wise precaution to add some series resistance to each logic line - a few kohms will help protect the Arduino from any over-voltage.

A typical failure mode goes like this:

  1. Something stresses the motor driver chip beyond its limits (voltage, current, power...)
  2. That chip then melts/shorts/whatever
  3. All its inputs connect to some common voltage, if unlucky this will be Vcc2 (12V)
  4. The 12V on the logic lines fries the microcontroller.

Adding series resistors should prevent 3) leading to 4)...

I note you are using a lead-acid 12V accumulator without a fuse or other current-limitation device - not wise.

Thanks for all your responses. I’ve added some stuff and need to check if I’ve done it right cos I’m a total noob. Got another capacitor on (25v 10uF), the one on the left is 25v 47uF (both white strip facing the left). 2 resistors 0.5w 10k each on pin 1 & 7 connected to ground.

How do I go about adding a fuse or current limitation device to the battery?

And I don't have a multimeter.. unfortunately even if I had one I wouldn't know how to use it

And I don't have a multimeter.. unfortunately even if I had one I wouldn't know how to use it

Well that's easily fixed... Here's a simple tutorial on using the main functions of a digital multimeter. It doesn't cover everything you can use a multimeter for, of course, but it will show you how to take all the basic measurements.

Now you have no excuse! :stuck_out_tongue:

Edit: Adafruit has a slightly more extensive tutorial as well, if the one from Sparkfun glossed over things a bit too much.

Lol yes I'll definitely have to educate myself on that when I get my hands on one! Right now I'm working on a tight deadline though. And panicking =(