Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

0-1 volt amplification to 1-10 volts

Status
Not open for further replies.

egomez_mx

New Member
Hi all, I'm new to this forum, so pleased to meet you
I was wondering if you could help me with my project, here is the background. I’m building a solar cell system, and I would like to install some permanent Volt and ampers meters to monitor constantly the voltage and ampers that come out from the cells. I’m going to do several of these so I would like to keep it cheap.
I draw a general diagram to show you the idea. I have basic knowledge of electronics, so I at least know that V=IR and W=VA. So I saw on other blogs how to build a voltmeter with a PIC microprocessor and a LCD display, but I would like to add the functionality of an ammeter also.
So In the diagram attached, the blue box represent the PIC and LCD system, this system requires a 0 to 5 volts only input to be measured, so for example if my solar cells throw from 0 to 20 volts I always have to convert it to 0 to 5 volts, that’s why the divider. And I think it is wired in parallel with the solar cells.
Now to measure the current I read that I have to put the ammeter in series and that I needed a shunt resistor and that the ammeter must have the lowest possible resistance. My solar cells throw from 0 to 10 amps. So I placed a 0.1 ohms resistance (1 watt) trying to keep things simple. Then I suppose I have to measure the voltage on that resistance and I figure that it should read from 0 to 1 volt. Now I have to amplify that voltage and convert it to a range of 0 to 5 to be able to feed it to the PIC system correct?
Believing that I’m correct so far, I saw on site that I could use and operational amplifier to increase that voltage, and so the basic diagrams. I tried to figure out the basic theory with op-amps but got more confused with the issues about offsets, gains in Mhz or db, and cascade connections. So does anybody know a simple way to amplify the voltage?
I was thinking on using switches to divert the current and make it a parallel circuit or serial.
So can anybody comment on my project? Are the resistance values all wrong? For example, I also read that the voltmeter should have big impedance so are the resistance values more or less fine?
The five volts needed to feed everything will come from another source and I read that it has to be regulated so I have the closest to 5v all the time.

thanks to anyone in advance
 

Attachments

  • volt_amps_meter.jpg
    volt_amps_meter.jpg
    44.7 KB · Views: 311
For 0.1 ohms you need a minimum 10W preferably 20W, but the value is too large as you're disipating too much power in the shunt. Better to use 0.01ohm/2W. Placing the shunt in the ground side will make the amplification much easier. Since you only want 5v you could use an MCP616 with a gain of 50, and since it's rail to rail it could be run off the same 5v supply as the PIC.
 
The parasitic load put on your solar cells/battery by the resistive voltage divider is higher than I would like, so I would suggest using much higher value resistors, followed by a voltage-follower (opamp) to buffer between the resistive divider and the PIC's A-D input. The A-D reading you get from the PIC is only as accurate and stable as the 5V reference (PIC's Vdd pin), so use a good regulator to produce that reference voltage.

My favorite current monitor is a much lower value shunt resistor (1mΩ or 10mΩ) combined with an IC high-side current monitor chip like the ZXCT1009, or similar parts made by Analog Devices or National Semi.
 
Thanks to moffy and MikeML for your anwers, I will follow your advice, but can I use the same MCP616 for the voltage follower, or do you have some recommendation for that op amp? thanks again

Edgar
 
If the MCP616 is used as a voltage follower, and it is powered from 5.000V, the input signal can go no higher than 5-0.9 = 4.1V. You will have to limit the A/D input range from 0 to 4V (give up some of the resolution).

I would use an opamp that could be powered from the 20V, like an LM358. It's output range is from gnd to 20-1.5V, and its input common mode range is from ~-0.5V to 20-1.5V. Because its common mode range goes below gnd, it could be use as a low-side current monitor, too.
 
Thanks Mike, would you care to take a look at my design again, re drawn with the recommendations? I have doubts about the polarity, did I place correctly the Vsense+ and Vsense-? the voltaje Vout will be positive? If not, how do I make it positive?

Do I really need the swtiches to cut the current when meassuring volts or amps?
 

Attachments

  • volt_amps_meterv2.jpg
    volt_amps_meterv2.jpg
    52 KB · Views: 261
I wont be able to get to this until this evening. One obvious thing is that ZXCT1009 is a high-side monitor; you have it in the low side...

Later:

I went back an reread your original post where you say you want to measure 0-20V and 0-10A. Which raises the following question?

Is the "load" in your diagram a battery? or a battery in parallel with something that draws current out of the battery when the sun doesn't shine? If it is a battery, then the supply voltage being measured likely only varies from ~11V to ~15V.

Also, you may need two current monitors, one to monitor current between the solar panel and the battery, and another between the battery and actual loads.

Also, is the PIC and its interface circuitry powered from the solar panel/battery or does it have a separate power source? Obviously, the power source must always be higher than 5V plus the headroom for the regulator.
You are aware that a PIC ADC reading is only as good as the PIC's Vdd voltage (regulation, tolerance, drift)?
To make an accurate voltmeter out of a PIC you should be using a precision reference, not a garden variety 7805 as the ADC reference.
 
Last edited:
Awsom!!! Thanks for your answer Mike.
So the load is a charge controller to which I will also connect the battery bank (12 volts, 110 amp/hr, deep cycle) and the load, which will be an inverter, to which I will connect house hold appliances.

Ok, so I have to change the location of the ZXCT1009 to the high side , check. I was thinking on using the same battery bank to supply the regulator for the PIC and its interface circuitry (is that a bad idea?), I did read about the importance of having the most precise 5volts possible otherwise the measurements will be useless, but I had no idea that the 7805 was not appropriate for this kind of application, do you have a suggestion on a better choice of components and circuitry to have the precision 5 volts (somehow I know you have)?

And the whole story is to have several circuits of charge controllers and panels, attached is a diagram of the macro project to throw some more light into my Machiavellic project
 

Attachments

  • volt_amps_meterv3.jpg
    volt_amps_meterv3.jpg
    41.5 KB · Views: 233
You have two options for the PIC. One is to regulate the Vdd pin to 5V to the required degree of precision, the other is to configure it for an external ADC voltage reference, and then use an external precision reference like a TL431.

Here is configuration that would give you two 5V analog inputs to the PIC ADC. The simulation ramps the current from 0 to 10A while stepping the battery voltage from 8 to 20V.
 

Attachments

  • VIsense.png
    VIsense.png
    51.6 KB · Views: 187
I can't thank you enough Mike for all the time you shared. I'll go ahead with the project and let you know.
Greetings, Edgar
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top