Can anybody please tell me that how to sense the current of solar panel using micro controller. I want to use it in MPPT for battery charging. Max current is 1Amp. Please help.
Insert a low ohm resistor. Current goes through it, generating a voltage across it. The voltage can be measured.
You do not want the resistor to waste a lot of power, creating a lot of heat. Hence its value should be as low as possible, yet still give a usable reading throughout its intended range of operation.
Example, If you send 1 A through 0.1 ohm, it will give you 100 mV.
How to charge the battery after sensing the current and voltage?. I thought of using transistor and a mosfet to charge the 14v battery. Is it enough to supply sufficient current or do i have to connect the choke too.
resistance used for Current sensing will pass voltage too through it. So when voltage of panel is maximum above 5v, it will destroy the controller. Also current direction through current sense resistor will be different while charging and discharging. So how to sense that current direction.
For LCD, collect the values, write LCD display routine and display on LCD. Look for LCD datasheet for pin configuration , 4 bit or 8 bit data configuration of LCD.
resistance used for Current sensing will pass voltage too through it. So when voltage of panel is maximum above 5v, it will destroy the controller. Also current direction through current sense resistor will be different while charging and discharging. So how to sense that current direction.
No, as Brad said its the voltage developed across the resistance, not the voltage from the solar panel or battery.
Its typically very small, as said about 100mv, for use with a micro its often fed into an op amp to boost the voltage to a level more suitable for the micro; trying to get clear readings from a 0 to 100nv signal is not easy as say from a x20 boost to 2v.
As for the 'direction' of the current flow, if you just use one current sense resistor at the junction of the battery how will you know what the true charging or load currents are ? you really need to monitor with 2 resistors, one in the charging line and one on the load line.
You might find using these little ebay volt/amp meters a simpler option, got some the other day, seem quiet accurate.
They have inbuilt shunts so no need for any external resistors.
**broken link removed**
Use a series resistance of low value and take voltage across it ( < 200 mV). Amplify it to 5V using an OpAmp and feed the output of OpAmp to adc of MCU. 5V will represent 200 mV. If 1A is represented by 100 mA then 2.5V adc input represents 1A.
I was thinking of keeping solar panel and battery in parallel with controller section in between them. SO that while charging current will flow through the battery,resistor clockwise and while discharging through the battery to the load. That's why i asked what will be the current through the resistance and its direction when battery is discharging. Is any other way than using an op amp.
I had a backup power system years ago. I wanted to arrange things so I could put a single current meter on the battery, bidirectional. An op amp would make this possible.
When I thought about it, however, I realized that current going out of the battery would be much greater than current going in. I would need two different scales, and two different gains.
I decided I could not do it with one meter. I would need two.
Your general concept is correct. It will need more wires and components, to make it into a working schematic.
A choke (inductor) is not essential for charging a battery from a PV panel. However there will be an inductor in your charge controller if it is a buck converter.