MPPT FOR SOLAR PANEL WITH PIC16F1939

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
SILVESTROS9
Posts: 115
Joined: Wed Aug 03, 2016 10:45 pm
Has thanked: 24 times
Been thanked: 11 times
Contact:

MPPT FOR SOLAR PANEL WITH PIC16F1939

Post by SILVESTROS9 »

Hello to all!
I made a solar panel controller with a PIC16F1939 to charge a 12V Pbo battery.I would like to use a Maximum Power Point Tracking algorithm in the pic code , so is there any idea on how to implement the MPPT in the FC7 code? The flow chart of a type of MPPT is at site below, but I have some problems.MPPT algorithm calculate the power of the solar panel using voltage and current as voltage input.PIC16F1939 has 14-10bit adc inputs.The power is V*I. How can I use the ADC , for multiplication of V, I to get the power PI ?
https://hackaday.io/project/4613-arduin ... -modelling
Many thanks.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: MPPT FOR SOLAR PANEL WITH PIC16F1939

Post by QMESAR »

SILVESTROS9 wrote: I have some problems.MPPT algorithm calculate the power of the solar panel using voltage and current as voltage input.PIC16F1939 has 14-10bit adc inputs.The power is V*I. How can I use the ADC , for multiplication of V, I to get the power PI ?
Hi.
well one solution for measuring the Voltage is by using 3 Resistors in series (Small tolerance as 1% or smaller) tapping of from the last Resistor into the adc will give you a range of input Voltages 0-15V and 0-5V at the adc there you have your Voltage.
for the Current you can use a small tolerance small value shunt resistor in line(ground side-Low side sensing) with a gain amplifier stage that outputs a Voltage proportional to the current flow or you can use a Hall sensor type wich give out the voltage proportional to current now you have V and I just do the math for P . I think this is the easy way to do it :D
1.JPG
1.JPG (10.34 KiB) Viewed 3521 times
2.JPG
2.JPG (17.28 KiB) Viewed 3521 times

SILVESTROS9
Posts: 115
Joined: Wed Aug 03, 2016 10:45 pm
Has thanked: 24 times
Been thanked: 11 times
Contact:

Re: MPPT FOR SOLAR PANEL WITH PIC16F1939

Post by SILVESTROS9 »

Thanks QMESAR for info.My problem is how to handle the V*I multipication with FC7 code and display the result as watts at a LCD ..Is there an example code for FC7 where I can use ADC inputs of a 8Bit PIC ( a PIC 16F1939 or similar), to take the measurements of V (from a voltage divider, and I (from a current sensor), calculate the watts and display the result on a 4x20 char. common LCD.
Thanks.

Post Reply