Author Topic: Op-Amp weirdness  (Read 1935 times)

0 Members and 1 Guest are viewing this topic.

Offline groovy9Topic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Op-Amp weirdness
« on: January 28, 2007, 05:44:51 PM »
So I built the voltage difference amplifier circuit at the bottom of this page:

http://www.societyofrobots.com/schematics_voltamp.shtml

To measure the current through my motor controller (A SN754410).  I'm using a .1 ohm power resistor between the positive motor battery rail (4.8V) and VCC2 on the SN754410,  and tapping each side of it for the op-amp inputs.  R1 is 10k, R2 is 100k, and max current of the motor is 2A, so I should be seeing a voltage drop across the .1 ohm resistor of 0 to .2 volts.  Which means I should see 0 to 2 volts at the op-amp output.

But I'm actually seeing 1.2V under zero motor load (motors off), and 1.26V under any load at all.  Under no load, my voltmeter shows .2 mV across the .1 resistor.

I'm using an LM741CN from Radio Shack.  Is there something I'm missing about that op-amp? 

I've double-checked the circuit wiring and all resistor values, and am about to start pulling out hair...

Offline groovy9Topic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: Op-Amp weirdness
« Reply #1 on: January 28, 2007, 06:32:04 PM »
Ok, did a little digging and discovered that this op-amp has two "offset null" inputs, to which you can attach a pot to adjust a zero input difference down to a zero output.  Fine and dandy, I don't actually need it to read 0.  I can zero it out in software.

But the amplification still seems to be off.  My (admittedly cheap) voltmeter shows .1V across the .1 resistor during motor startup, but the op-amp output only jumps by .1V when that happens.  Am I expecting too much from this simple circuit?  Or too much from my voltmeter?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: Op-Amp weirdness
« Reply #2 on: January 28, 2007, 06:58:14 PM »
Quote
To measure the current through my motor controller

Your described circuit measures current to the motor, not motor controller. To measure the current across the motor controller you need to do it between the battery and the controller. Knowing the current to the motor controller is more useful information, since it includes all efficiency losses. Plus, you dont need to account for the motor changing polarity.

And if you need to measure the motor directly . . . Why are you using a differential amplifier? Does your motor reverse polarity? If not, use the non-inverting amplifier schematic.

Looking at the motor controller function table:
http://focus.ti.com/docs/prod/folders/print/sn754410.html
It appears that there will always be some current going across your motor no matter what. If you set EN to low, that should give you a voltage closest to zero.

And a stupid check for the differential amplifier . . . Im sure you did this, but just in case . . . make sure that both R1's and both R2's are exactly the same. For example, with a +/-5% error, your first 10k could actually be 10.5k and the other 9.5k - a 1kohm difference!

if these ideas dont work, let me know and Ill think about it some more . . .

Offline groovy9Topic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: Op-Amp weirdness
« Reply #3 on: January 29, 2007, 09:18:12 AM »
Your described circuit measures current to the motor, not motor controller.

More specifically, it measures the total current drawn by all motors driven by the motor controller :)

To measure the current across the motor controller you need to do it between the battery and the controller. Knowing the current to the motor controller is more useful information, since it includes all efficiency losses. Plus, you dont need to account for the motor changing polarity.

Right.  That's what I'm trying to do.  The .1 ohm resistor is between the positive battery terminal and the controller's motor voltage source pin VCC2, as opposed to its logic voltage source, VCC1.

And a stupid check for the differential amplifier . . . Im sure you did this, but just in case . . . make sure that both R1's and both R2's are exactly the same. For example, with a +/-5% error, your first 10k could actually be 10.5k and the other 9.5k - a 1kohm difference!

Good point.  I'll check that.  I just grabbed two each from the 10k and 100k bins.   Then I'll go ahead and set up my MCU to read the op-amp output and see what it sees.  I suspect the response time of my voltmeter might just be too slow to get accurate numbers for short events, and I don't really want to burn up the motors by forcing stalls :)


 


Get Your Ad Here