Oh the wonderful world of analogue electronics. It is a pain in the neck for this digital person. I love OP-Amps; they are so mathematical and seemingly endless in their versatility. But it always has been tough for me to get them to work properly.

In this article I will do a personal refresher on their operation

. I will also do an assessment on the equipment I will use in the future for my analogue OP-Amp applications. It is interesting to see the things you need to do for simple experiments with OP-Amps.

 

And finally I will get a project done that I have wanted to do for some time. This is the making of a Battery Monitor to check the condition of all the batteries I have laying around the shop.

Years ago I made this breadboard up, in anticipation of doing some analogue work. Thus all the different valued rheostats and the different sockets used. Darn good Augut sockets too. I can never guess with analogue what I may need. I only have one 200K rheostat and I will need 2 according to Murphy.

Then there are all the rhostats in the middle those are expensive little suckers. All that stuff just so I could do some analogue work. Hey and not to mention all the soldering time.

But it did do about 1000 experiments. So it had to be of some use!

So I had a hard time to just junk it. Instead I decided to incorporate into my new Digital Bread Board.

So I put it at the back of the my new Digital Bread Board and figured I would use the old board strickly for Analogue Circuits.

It just didn't work out. The rheostats are in a tough position to get at to adjust and I have to lean way over to do wiring etc. Then I have bunches of wires coming in all over the place. That is not good for Analog work at all.

Over on the left is an area for my micro controller a Basic Stamp at the moment. So there are more wires floating around and it becomes a real nightmare to keep them straight.

So I junked the old breadboard. And went on to Plan B.

All this work so I could do some experiments with OP-AMPS and the world of Analogue Electronics.

 

Working with Op-Amps you always need adjustments with rheostats so I built this little daughter board with some rheostats on it so I can just plug it into my bread board. That has worked out wonderful.

Analogue always has to be tweaked here and there to make it work.

The little can IC on the breadboard is a voltage reference of +10 Volts. Murphy was here again I have +12 and +5 but do I have 10Volts...no!! That is analogue.

I do have plenty of power available, and notice that it is all fused. I even have a connection to a heavy duty deep cycle battery. The voltages are provided courtesy of some poor recycled computer.

In the Analog world of OP-Amps.

I even had a couple of fantastic 20 turn rheostats mounted right on the front panel, those things are expensive and sure work smooth. But as can be seen I have about a foot of cable attached to them to put them anywhere on the breadboard that I want, on top of that they are wire wound. All this are no no's in the analogue world.

This little circuit on the breadboard is an example of an analogue circuit wired up. It is a relativly simple circuit. Yet it takes up about a third of my large breadboard. It is a 10 segment bar graph display. The IC is a LM3914 which has 10 comparators and built in resistors to drive the 10 segments. You can set the trip point of each comparator. So I wanted a segment to turn on for every volt change in the input of the LM 3914 up to a max of ten volts. Naturally with Analogue you need other things like that little can to get a 10 volt reference and a rheostat to adjust the brightness of the led segment. Notice I used my little rheostat board to get a value for the brighnessof the Leds.

This little wire job is the start of my project to monitor the charge on a 12 Volt battery. A well charged battery will be 12.7 Volts with no load.

So basically you are only interested ion the tenth of a voltage over 12 Volts. If you arte below 12 Volts your battery is in deep trouble.

So more circuity is needed to just get the voltage of the battery above 12 Volts and amplify it by 10. Then this little circuit will turn on one segment per 10th of a volt above 12Volts on the battery. Simple eh!

I can buy a voltage display complete and boxed up for about $10.

Why do us electronic junkies do this kind of thing. The answer is "BECAUSE WE CAN"

All of this is to show how you need a lot of stuff to check out the simplest circuit and it seems to be twice as bad when you are working with a analogue circuit. And I haven't even mentioned the meters and scopes that you need to display whats happening in the circuit. The main idea is ALWAYS breadboard a circuit up a portion at a time before you get the soldering iron out or you will have big troubles getting the circuit or your idea to work.

So to get started let me reiterate few facts about OP-Amps. If you are into the analogue world for audio applications with filters and amplification you are a long way out of my world. In this analogue world you are using dual power supplies and paying special to all sorts of things like grounding, rejection ratios, and 100's of other details. You can't just whip up a circuit on the breadboard. I want to interface to transducers- simple amplifiers, see what voltages I get-comparators, or simply output a pulse or voltage that I supply. I especially don't want to use (+) and (-) supplies. You can see that from the pictures above of my test bench.

With all this in mind I choose to use so called single ended Op-Amps which means no (+) and (-) power supplies. The old standby Op-Amp is the LM741 and it can be used as a single supply but isn't’t quite as efficient running on a single supply. They now specify certain Op-Amps as single supplies but they are simply the 741 repackaged with great low power capabilities. By the way I have always referred to the 741 as the LM741. It is an IC that National has made for years. In fact with OP-Amps and analogue stuff  I have not kept up too well over the years. There are so many new foreign manufacturers these days that duplicate the work of the old standbys. National is my favorite, then there is Motorola, Intersil, Xar, Texas Instruments etc. etc. So for certain IC’s I will say LM741, Ne555, LM358 etc. referring to the IC. I guess it comes from the old days when we had shelves of manufacturer’s literature and we knew where to find the data sheet for it by referring to the manufacturer. Now of course we have the Internet and don’t have to have a library of catalogs. Anyway I digress.

The Op-Amps I will work with are as follows: For amplification operations I will use the dual LM324 and the quad LM358. For comparator operations I will use the special LM311 and the quad LM3900. If I get desperate I will use the old standby LM741.

I used my favorite LM358 in a simple operation called a Voltage Follower. The voltage you put in will come out the other end untouched. Within reason of course, you couldn't put in 50 Volts and expect the Op-Amp to provide more than the +12 Volts it has.

So if I put in 12 volts I should get 12 volts out right? With the Op-Amp using the +/- supplies this worked as expected. The chart shows what happened when I used it single ended. It worked to +10 Volts fine but just pooped out and wouldn't do anymore after +10.

I am sure that if I studied the data sheets more there would be an explanation for this. But the manufacturer is so busy explaining the advantages of being low powered and presenting frequency response curves and temperature graphs that I am sure he may only have had room to make a small print explanation. So I am going to consider the top end output the Op- Amp running with a single supply to have a 2 volt margin for the top end. If I want to get 12 Volts out I have to use a minimum 14 Volt supply. This is the analogue world options.... options, not like my digital world where it is a yes or a no and no maybe's allowed.

Just to make sure I used a section of the LM324 in the voltage follower configuration and sure enough it acted exactly the same as the LM358.Goodie goodie I can make a conclusion here.

Using the 339 comparator as a Voltage Follower is not a good idea. You can see the results in Figure 3 are all over the place. It tried to work at 2 Volts the rest was out by undefined amounts. A comparator is close to my world though. It has an open collector output and it is meant to give you a yes or no answer. So I think the lesson here is to use a Comparator for comparing and a Op-amp to amplify.

This is the classic operation of a amplifier taught at high school and colleges throughout the land. So it will take a plus voltage make it bigger according to the mathematical calculation and invert it or make it go below ground. Well all you have is ground or zero you can't get lower than that. So what does it do? It indicates 10.8 volts. Well I guess it makes sense!! So you will have to use it in the non inverting configuration.

Figure 5 on the left shows the LM358 in the non-inverting configuration. Crunching the numbers gives a gain of 11. It is hard to get even numbers for the gain when you always add 1 to it. So this little operation sets a gain of 11 and it seems to work flawless...at least it works. Then we have the old addage that it poops out at 10 volts. By now I am used to this tenancy. But maybe I can use this for my battery indicator. All I have to do is take any voltage above 12V on the battery and run it through this circuit. If it is 12.7 Volts I will read 7.85 Volts. A little bit off... but if I adjust the gain I should get an even 10 gain and will get 7 Volts. Huum!

Figure 6 uses the Lm324 in the non-inverting mode and confirms the readings of table 4 using the LM358. We again have a gain of 11 and the amplifier peaks out at 10 volts.

One thing I didn't do was check out how these Op-Amps amplified below 100mVolts. I bet if the amplifier peaks out at 10 volts it will have its low end tolerance too. the spec sheets really stressed how well the single ended OP-Amps work near zero.

Below 100 mVolts is definitely the analogue world, I can get 100 mVolts from breathing too hard.

Figure 4 shows the LM324 in another common configuration called a differential amplifier. The difference between the two inputs to the Op-Amp will be amplified by the gain of the amplifier. In this case the gain is 1 so whatever the difference is will be reflected in the output.

Table 1 and Table 2 show that the amplifier didn't start working until the difference between the two inputs was nearly 700mVolts. When the difference was 1 Volt it was fine the rest of the way until it reached its good old high peak of 10 Volts.

Table 3 on the left verifies the operation of the LM324 as a differential amplifier. In this configuration the difference between the inputs was always more than 1 Volt. It then worked flawlessly.

So my conclusion about using these single ended Op-Amps is to always keep the inputs at a minimum diode drop or about 0.7 Volts when working them near the low end. And near the upper rail make sure you don't depend on them for anything more than 75% of the supply rail. Remember that 10 volt max was all that I could get with a 12Volt supply.

Now to take all that proceeding useful information and make something practical with it. Remember I wanted to make a battery monitor. With this monitor I wanted to display the voltage of a battery only above 12 Volts and in 10ths of a Volt.

The LM3914 shown in the schematic will take the 10 Volt reference and divide it by 10. So that will mean each volt on Pin 5 will turn on a Led. So 5 Volts means 5 Leds will be on.

So I need a voltage from the Op-Amp that would vary from 1 to 10 Volts but only with the voltage above 12 Volts on the battery. This was accomplished by using a 12 Volt Zener diode and a resistor. Only the voltage above 12 Volts (across the resistor) gets passed to the Op-Amp Input. The Op-Amp functions as a x 11 amplifier because it is a non-inverting configuration.

To get it to an even 10x I used the rheostat on the feedback loop. So if the voltage across the battery is say 12.7 Volts the Op-Amp will get 0.7 Volts and amplify it to 7 volts and the LM3914 will turn on 7 Leds in response to the 7 Volt input.

UPDATE 2013:

I didn't follow some basic design rules on this project. The circuit worked fine for months. Then one day in a rush I reversed the voltage leads and it went poof. Don't reverse the supply voltage on an IC or it will blow up. So I forgot to put a diode in the supply line stupid of me. It blew up the 10 Volt reference a LH001, and I only had 1 in my stock, or if I had more I couldn't find them anymore. Another rule is make sure you have 3 of any components you are going to use in a project. It also blew up the op amp. So as I was busy fixing the circuit out I clipped out the 12 Volt zener and was going to replace it with another zener. Well I had 3 or 4 zeners but they were way out at 12.6 and 12.7 volts. So I didn't have enough to get a nice 12 Volts. Murphy's Law again right? But I did fix it up and it is back to work mostly because, as I said earlier if the project is nicely boxed up and labelled you use it more, and it doesn't go to the junk box.

E-Waste thoughts

I mentioned earlier that it would have probably been easier to buy a boxed voltage display from E-Bay for $10. I sure spent more than $10 in labor and parts on this project. If the display burned out just throw it in the garbage and buy another one.

The first problem with the attitude -- throw it out and buy another --, is that we have a heck of a problem in this world with E-Waste. If something breaks just throw it out and buy another. Electronics is not made to be serviced anymore. This is a real sore point with my principles. I don't care what piece of electronics you have it will have at least one piece that is useful. But it takes time to take it apart and a of expertise to figure out what to use. In this fast paced money hungry world we live in we are sadly lacking both of these talents. Millions of CRT monitors have been replaced by LCD and Led monitors for our computer world. I once figured out that there was about $10 worth of salvagble parts in a CRT monitor. That isn't to much money but if you multiply it out it could provide a fair amout of money, 1000 monitors would be $10,000. But invironmentalists say there is lead in the glass CRT tube and you have to be certified to take it apart and make sure you don't put the Lead into our Environment. The large company that is in charge of recyling here in Briitish Columbia Canada will not certify anyone unless you have at least 2-3 Million Dollars. There are only two certified recyclers in the province of B.C. They ship pallets of Electronic Surplus from Bottle Depots all across the province and stockpile it at the coast in huge piles. They then look for a buyer overseas and ship it out of the country. Thus the money need to get into the business. It is the cost of hiring a big boat and shipping it overseas that would make you a certified recycler. Thus my problem with throwing away a piece of Electronic equipment and buying another to replace it.

Another thing about building your own thing is that you know how the gear works and can always fix it if you have too. And the bonus is that it does exactly what you want. One needs to display the voltage of a battery but only the amount over 12 Volts and on top of that it has to be in 10ths of a volt. Getting a voltage display with that accuracy might be a little tough.

Thus Mission accomplished it works the way I want it. Now to box it up so I don't lose all my hard work.

Putting the circuit together on the prototype board wasn't too much of a problem: getting it up to 10 Leds on a front panel was a problem. Instead of a small dip sized bar graph display I wanted to use 10 single Leds....stupid me. That was a mechanical challenge. Have you ever tried to drill 10 holes in a perfect row---that is tough !!!!

With much dexterity and cursing by the way I did it. The socket on the proto board will accept any 14 pin dip header so I built three front panels for monitors in the future. What the hey if you are going to build one why not go the little extra and build a spare, the soldering iron is warmed up anyway? You have to make sure you have a good design though because if it doesn't work you will have three of them to throw away not just one. By the way that's what all the ugly black painting was all about...I wanted a background for the Leds so the bar display would stand out good.

Now doesn't that look mighty fine? This battery was out of a big truck and was a mighty fine battery in its day. But it has failed big time this winter it just goes flat. Two days ago I gave it a good charge and all the Leds were on indicating it was at 13 Volts or so. One Load test brought it down to 12.6 and now it is about 12.4. So what do I do with it? Probably throw it away would be the wise decision. But I think I will throw it in a corner with the battery monitor on and occasionally bring it out and work it a bit and recharge it again and let it sit again. Sort of like stirring it up. The Leds will remind me to give it a stir and I will see if it can be refurbished. If it doesn't get better I will throw it out.

With a glance at the battery monitor I can see that this battery is supposed to be "Working Good" at 12.5 Volts But it is just sitting there doing nothing, so something is not right. Thus my labeling scheme. It is legitimate for a battery to be at 12.3 or even 12 if it is really pushing out a lot of juice. And the information that I got from the experts is that if the battery has 12.7 Volts without a load it is a mighty fine battery ready to go. Anything over 12.7 is just a flash in the pan so to speak and will be used up very quickly on the slightest load.

Revised 2013 by Larry Gentleman