Skip to content

Add Solar PV control input to vary Charging current #20

@arwooldridge

Description

@arwooldridge

On tethered units ( most home chargers?) the PP analogue input is unused, so could be used for proportionally controlling charging current depending on Solar PV power available. The variable voltage control could be from the Solar PV inverter if available, or from a mini, resistive loaded, solar cell to mimic the Solar PV, or from a directional energy monitor sensing excess PV power over consumer load. zappy style.
For example something like this in SetCurrent()
unsigned int demandcurrent;
if(!config) current = current * 10; // multiply by 10 (current in Amps x10 (160= 16A) )
else { demandcurrent= current * 10; //using fixed cable so can vary current using PP
ProximityPin(); // because it does the A/D on PP ( could just call A/D routine instead)
//current=(unsigned int)round(160.0 * ADRES/1024.0); // 160 is 16A for 4kwatt PV system
//might need to let menu to change this value.
current=160uL * ADRES/1023; //also works but 160 * ADRES can overflow as unsigned int.
if (current> demandcurrent) current=demandcurrent;
}
//if ((current >= 60) && (current <= 510)) DutyCycle = (unsigned int) (current / 0.6); // calculate DutyCycle from current
if ((current >= 48) && (current <= 510)) DutyCycle = (unsigned int) (current / 0.6); //ARW change to 5 amp min for Tesla. Not yet tested on other EV's but should work.
//ARW but change pilot test from 3-9% to 3-7%
//ARW Tesla charging current drops to zero when duty cycle < 83
else if ((current > 510) && (current <= 800)) DutyCycle = (unsigned int) (current / 2.5) + 640;
// else DutyCycle = 100; // invalid, use 6A
else DutyCycle = 80; //ARW use 4.8A for tesla and it stops charging

NB with this code the EVSE remains in charging state C throughout but the EV drops the charge current to zero below a 5A demand
The above code tests OK on Tesla with variable current 5A to 16A
The internal 1K pullup to 3.3V ensures correct default operation if PP not connected.
A simple series switch to disconnect the analogue input ensures default operation if you need to charge with no Sun.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions