Author Topic: Controlling a Motor with SN754410 and Arduino  (Read 2444 times)

0 Members and 1 Guest are viewing this topic.

Offline ben23fTopic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Controlling a Motor with SN754410 and Arduino
« on: April 03, 2012, 02:38:56 AM »
Hey i hope there isnt other info on this on here but im having trouble with controlling a motor with the SN754410. I made the circuit below and was wondering if its ok? Also do i need all the filtering capacitors?



Also if the motor is a small 3V one should i reduce the voltage to it? The minimum from the H-bridge is 4.5V...

Offline OitaFish

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Controlling a Motor with SN754410 and Arduino
« Reply #1 on: April 04, 2012, 08:29:26 AM »
I am not an expert on motor control but the circuit looks OK to me.  What trouble are you having?  Does the motor do anything?

Offline infurl

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Controlling a Motor with SN754410 and Arduino
« Reply #2 on: April 04, 2012, 06:23:44 PM »

If your circuit schematic is accurate, there appears to be a problem with your power distribution. There is no power being supplied to the logic of the SN754410 or the Arduino.

The positive from the 9 volt battery should be connected directly to pin 8 on the SN754410. That's the power for the motor and that is what is regulated by the SN754410 via PWM from the Arduino. The regulated output of the 7805 on the other hand should be connected directly to the +5 volt on the Arduino *and* pin 16 on the SN754410.

I'm no electrical engineer but a good rule of thumb is that you should have at least one 0.1uF despiking capacitor as close as possible to the power connections of each IC, so you certainly don't have too many capacitors on there. Admittedly I'm not sure why you need the 10uF capacitor but at least it shouldn't be doing any harm.

PS I've been doing a lot of work with the SN754410 lately which I've written about on my website at http://infurl.net

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Controlling a Motor with SN754410 and Arduino
« Reply #3 on: April 06, 2012, 07:05:31 PM »
Hi,

I made the circuit below and was wondering if its ok?
Seems to be OK (as long as we don't talk about the visual layout ;))


Also do i need all the filtering capacitors?
The first one (left to right) is used as a buffer for the battery.
Next one is the input cap on the regulator - make it 220nF to 330nF.
On the output side you need a cap of 22..33F.
The input and output caps are there to dampen noise and kill oscillations and the values I just mentioned is for regular regulators - they must be mounted as close as physical possibble to the regulator terminals.

With LDO regulators, you need to consult the datasheet for the exact regulator, as they vary a bit and eg. a too large output cap might actually make it oscillate as well.
The 100nF + 10F is drawn in by someone that only learned enough to be dangerous and it stems from other instances, where you need to parallel several values to get the widest band of noise dampening.

Since the regulated voltage is just used for the motor, you might consider using 3 AA primary cells (or 4 NiMH AA cells) directly to the motor voltage terminal (and ground) and drop the regulator and the losses it introduces.


Also if the motor is a small 3V one should i reduce the voltage to it? The minimum from the H-bridge is 4.5V...
According to the datasheet, the SN754410 has got a typical drop of 2.1V at a 500mA draw (there's a drop on both high and low side), so you should get around 2.9V (at 0.5A).
If you want the motor to run slower, just use PWM (on pin 1 if you want to keep it simple).


You didn't mention your 9V source, but if it's a non-rechargeable PP3 battery (box shaped "transistor" battery), you have the explanation of it not working, as a PP3 simply haven'tgot the oomph for this.
Another thing is, that the voltage regulator needs to drop 3V, so anything below 8V will throw the regulator out of regulation. A 9V battery drops from ~9.6V when brand new, to 5.4V when completely exhausted and will only be usable for this during a short part of its life.
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ben23fTopic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Re: Controlling a Motor with SN754410 and Arduino
« Reply #4 on: April 09, 2012, 01:20:32 AM »
hi thanks all so much for the help. Ive modified it a bit but i discovered the problem was the microcontroller not connecting properly with the computer.

Quote
Seems to be OK (as long as we don't talk about the visual layout )

Is there somewhere like books or a website that i can learn to do draw circuits better? I used OrCAD to draw it but i also have EAGLE. Which would you say is better?

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Controlling a Motor with SN754410 and Arduino
« Reply #5 on: April 09, 2012, 03:45:38 PM »
Well, Eagle is designed to do schematics and board layouts, while CAD programs aren't. Using what you're used to has merit, but if you want to do anything with schematics besides look at them, I think you'd be better off with Eagle. There's a learning curve to it, but there are tutorials on the net. Sparkfun has one in its tutorials section for example. I think CadSoft has one on their website too.

Joe

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Controlling a Motor with SN754410 and Arduino
« Reply #6 on: April 09, 2012, 06:12:16 PM »
Hi,

Well, Eagle is designed to do schematics and board layouts, while CAD programs aren't. Using what you're used to has merit, but if you want to do anything with schematics besides look at them, I think you'd be better off with Eagle. There's a learning curve to it, but there are tutorials on the net. Sparkfun has one in its tutorials section for example. I think CadSoft has one on their website too.

Well come again...
You shouldn't be so explicit when you obviously don't know the subject.

CAD simply means Computer Assisted Design (like CAM for CA-Manufacture and CAE FOR CA-Engineering).

OrCAD is a very mature CAD program for electronics design and it is way ahead of Eagle (which I only use since it's the most used CAD by the people I help, but while Eagle can be termed semi-pro, OrCAD (which is an older CAD than Eagle and with far more programming power behind it) is the undisputed pro in the electronics CAD business.
Just one simple example... You cannot make thermal assessments of your design in Eagle.

There simply is no comparison here and it's plain nonsense postulating that OrCAD aren't designed for schematics and PCB - it's why it was born!


Perhaps take a look at the products homepage at:
http://www.cadence.com/products/orcad/pages/default.aspx

Or just grab the first few paragraphs of the Wikipedia article:
http://en.wikipedia.org/wiki/OrCAD
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list