Start a new topic

Adding feature to limit current by changing input AC voltage

Hello All,


I have some limits for input power at my household AC line, and I think it should be interesting for other to add some function, like "Auto current level".

In analogies of temperature monitoring it can be like this:


#ifdef VOLTAGE_MONITORING

// Voltage thresholds below are expressed as 2200 meaning 220.0V to save from needing floating point library

// Keep any adjustments that you make at least 2V apart, giving things some hysteresis. (example is 2230 is 3V apart from 2200)

// The RESTORE_AMPERAGE value must be lower than the THROTTLE_DOWN value

// The THROTTLE_DOWN value must be lower than the SHUTDOWN value

// The SHUTDOWN value must be lower than the PANIC value

#ifdef OPENEVSE_2

#define VOLTAGE_INPUT_THROTTLE_DOWN 2120

#else

#define VOLTAGE_INPUT_THROTTLE_DOWN 2120

#endif

// If the OpenEVSE responds nicely to the lower current drawn and voltage input

// recover to this level we can kick the current back up to the user's original amperage setting.

#ifdef OPENEVSE_2

#define VOLTAGE_INPUT_RESTORE_AMPERAGE 2240

#else

#define VOLTAGE_INPUT_RESTORE_AMPERAGE 2240

#endif

// This is the voltage input where we tell the car to draw 1/4 amperage or 6A is minimum.

#ifdef OPENEVSE_2

#define VOLTAGE_INPUT_SHUTDOWN 2080

#else

#define VOLTAGE_INPUT_SHUTDOWN 2080

#endif

// At this voltage gracefully tell the EV to quit drawing any current, and leave the EVSE in

// an input voltage error state. The EVSE can be restart from the button or unplugged.

// If voltage input get to this level it is advised to monitor power connection to look for trouble.

#ifdef OPENEVSE_2

#define VOLTAGE_INPUT_PANIC 2000

#else

#define VOLTAGE_INPUT_PANIC 2000

#endif

#endif // VOLTAGE_MONITORING


Sure, defines could be changed, but main idea almost the same as in overheating but undervoltage. It can be configurable option from web also.

If someone can help to implement that in life, I'll be very appreciate!

Or just tell, where I can implement this feature? I have some experience with C for AVR, but not for CPP...

Thanks!



The current OpenEVSE hardware does not have the circuitry to measure voltage, just current. This would need to be addressed first.

I have OpenEVSE HW version 2. And I've found in EnergyMeter.cpp next one: g_EvseController.GetVoltage() - does it mean voltmeter function support? Anyway, thanks for any help!

If you have the OpenEVSE II by Geppetto Electronics  https://www.tindie.com/products/nsayer/openevse-ii/ then there is a basic measurement of voltage.


If you have the OpenEVSE Plus v2 by OpenEVSE then there is no voltage measurement hardware.

Hi! I have OpenEVSE Plus v2 by OpenEVSE. And I see some HW for AC voltages measurement like AC_TEST line from optocoupler to MCU. I suppose, with ADC measuring after. Why I can't use that approach? Not quite enough accuracy for voltage measurements?

The Opto-isolator Outputs logic HIGH (5v) when there is no voltage on the line. It outputs logic LOW (0v) when there is voltage. There is no way to know what the exact voltage is.  

I see, thanks for clarifying! I'fe found next one: https://openev.freshdesk.com/support/discussions/topics/6000053591

I'll do the same for HW. So question is open - how to implement voltage monitoring in FW? And after to add auto current limitation function?

I have an EmonPI to measure mains voltage, solar generation and feed in.  The OpenEVSE then sets it's charge current from the feed in power data delivered by EmonPI over my wifi network.  Maybe something similar could be used to solve your problem.  The EmonPI can also pause the EVSE over http.  Not tried it though.  But in principle anything on the EVSE web interface can be controlled by a script on the EmonPI.  I've used CUrl and php to do this with my own web applications.  You can add extra CT clamps with an EmonTX if the 2 possible with EmonPI isn't enough.  So, for example, you could measure the cooker and an electric shower and decide what you need to tell the EVSE to do.


I'm currently looking at controlling a resistive load as well as EVSE to use up more of my solar feed in.

Having a raspberry-pi controlling everything means you can quickly set up many complex outcomes from many sensors or even web data like weather and solar forecasts.

Login or Signup to post a comment