Scaling a nominal 48V battery bank voltage for a 5V analog input

Started by Jedon, November 30, 2009, 04:05:58 PM

Previous topic - Next topic

Jedon

Engineer says:
QuoteIf you are talking about the Multi MINI, then we have a 10k resistor in front of the analog input.  Our previous MINI-P had 19.6k in front.

The processor spec recommends no more than 2.5k impedance in the source voltage, but we prefer to have more to protect the pin from over-voltage.

BruceM

Jens, spot on. Thanks.

Bob, yes, I've already posted a schematic for a proper op-amp scaler, and I'd be glad to change the resistor values for this application, (48V battery instead of 120V) but I think Jedon is content with lower resolution, and so I think he might be best off keeping  things as simple as possible, with the addtion of just a single op amp voltage follower. (No resistors, even.)

OK, Jedon, that is the input impedance information you've needed. As Bob and Jens suggest,  You MUST add an op amp, at least one as a voltage follower.  You can NOT just use a resistor divider, because the Analog input requires too much current, it is a low impedance input.  

Are you up for a single op amp on a prototyping board, they sell some nice little one IC ones at Radio Shack?  Do I remember correctly that you have 12VDC (battery) handy at the A/D?  

I'll find you an op amp voltage follower diagram on the web, and I can help you pick an op amp.  Here's the diagram:
http://hyperphysics.phy-astr.gsu.edu/Hbase/electronic/opampvar2.html

A "voltage follower" op amp configuration is just a "buffer", it does not change the voltage of the input signal, just drives the same voltage on the ouput with the current capacity of the op amp.  

As you can see, the output pin goes to the negative input, and the signal from your voltage divider goes to the postive input.  You'll need a 0.1 uf capacitor tantalum or ceramic at the 12V supply, right near the chip.  As for op amp selection, get back to me on the voltage of power that is most convenient to use.  You'll want a 2K ohm resistor between the output and A/D, unless the supply is 5V, in which case we'll use a rail to rail output op amp and won't need the output resistor.

Your divider can now could be a 100K, 200K or 1M cermet multiturn trim pot, adjusted to the proper resistance ratio with your VOM before connection, or use fixed resistors.  

You can just add resistors to get what you need, putting resistors in series. Measure the actual values with your meter, assuming you have a  digital VOM.

The schematic for a proper scaler circuit is show below.  It's a 5V, micropower op amp with rail to rail outputs- the voltage can't go over 5V. Battery voltage is divided by fixed resistors, then buffered with a voltage follower.  That is then input to a difference amplifier, where a fixed reference voltage is subtracted.(in this case created by a trim pot from the 5V regulated supply- a precision adjustable reference would be better, but I didn't feel it needed for my application- I'm just sanity checking battery voltage, my battery shunt regulators do the precision work.  The result of the difference amp is then scaled to the 0-5V range, and there's one spare op amp (which I now use fpr no-load current detection).

If someone needs it, I can recompute resistances for any battery range conversion to 0-5 volt, or some other output voltage range.


.

Jedon

Okay I grabbed a breadboard and a soldering iron, now need a parts list so I can head to Radio Shack.
There is a 12V battery that feeds the board so I can use that as the power source.
So I need:
OpAmp http://www.radioshack.com/product/index.jsp?productId=2062547
1M pot http://www.radioshack.com/product/index.jsp?productId=2062297
They only have 10K in cermet http://www.radioshack.com/product/index.jsp?productId=2062308
Capacitor http://www.radioshack.com/product/index.jsp?productId=2102589
2.2K resistor http://www.radioshack.com/product/index.jsp?productId=2062325

BruceM

The 741 op amp is a piece of crap. It has been obsolete for 20+ years. The output will not got to ground, it would suck for this application.  Radio Shack only sells floor sweepings for ICs.

One good choice would be an LT1006. Digikey part number LT1006CN8#PBF-ND   Its $3. Another good choice, TLC27L2, Digikey # 296-7370-5-ND. It's only a buck.  The supply max voltage on the TLC27L2 is 16V. If you would equalize the pack that high with circuit connected, go with the LT1006 or put some diodes in the supply to drop the voltage a bit.  They didn't have the higher temperature range industrial version parts of these op amps at Digikey- what operating temperatures will your op amp need to be in?

You might be better off buying it all mail order from Digikey, Mouser, Allied, or Jameco. Digikey is probably the best stocked and always ships the same day (Minnesota). They have the cermet pots in every size and flavor. They do cheap 1st class mail shipping, too. Look for ceramic decoupling capacitor for the 0.1 uF.




Jedon

Thanks Bruce, I need to remember to not be impatient and do things right.
Perhaps I should stop and think of the other inputs and outputs I'm planning on and order all the parts at once.
It would be nice to know how many amp hours I'm draining and I already have that shunt.
I would like to use a relay to be able to turn the generator on.
Air temp would be nice, perhaps water temp and oil temp on the 6/1 and oil level on the SR2?
Maybe voltage and amp hours from the solar panels? I have a doc watson but the panels are above 60V when not loaded down the battery.
I'd probably need to detect AC to see if the generator is running or not, maybe use a digital input for that, on or off.

BruceM

Sounds like a good idea to work on your plan.  If you are talking AC current measurement, just get a sensor that does that for you, with 5V output. They do come up on ebay sometimes, that's how I got one. Here's a nice one at a good price, ebay item number: 180427741019

For DC current, I have a schematic for a 0-5V, 4 channel, 12A version that I designed for my BBCC board.  The max current can be changed easily.  It takes one op amp and multiturn trim pot per channel, plus a bunch of resistors.  A single quad op amp IC does it. Click on the link below.  The filtering caps shown on each op amp feedback are not needed for slower, low power op amps.

Since your A/D board requires buffering on all inputs, you might want to use a quad op amp, TLC27L4, or two. Pity you can't just remove their load resistors.

Jedon

In college I made an interface board to the parallel port on my Amiga, I would guess this might have some of the same parts to make buffered I/O?
I have:
DM7446A, DM7447A BCD to 7-Segment Decoders/Drivers  http://digchip.com/datasheets/parts/datasheet/161/DM7447AN.php
SN74LS148N - 10-LINE TO 4-LINE AND 8-LINE TO 3-LINE PRIORITY ENCODER http://www.alldatasheet.com/datasheet-pdf/pdf/27383/TI/SN74LS148N.html
LM339N Low Power Low Offset Voltage Quad Comparator http://www.national.com/mpf/LM/LM339.html#Overview
DM74LS241N - Octal TRI-STATE Buffers/Line Drivers/Line Receivers - National Semiconductor http://www.alldatasheet.com/datasheet-pdf/pdf/115835/NSC/DM74LS241N.html

BruceM

Nope, to buffer the analog inputs you'll have to add another op amp voltage follower for each one.  Alternative; look at the  A/D board you have, can you clip their pull down resistors off or is it surface mount parts?

I don't have a feel for what your overall plan is, and what hardware you'll be using.

Jedon

I have a plan? I'm mostly just trying to get my house done!
I could pull resisters off, they are on a test board.

BruceM

I meant the resistors on the A/D board- but forget I said that, I think it's a little too hardware for you just yet. 

Sometime when has no plan, and doesn't have the experience to plan ahead, the best thing is to just jump in and go for "rapid prototype". ( Just cobble stuff.)  When you're done, you can then come up with a plan, and clean up, redo, polish.