automatically ajusting EVSE for off-grid/current sensing

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

ripple4

Well-known member
Joined
Sep 18, 2018
Messages
110
Location
Toledo, Ohio
This idea is related to the grid-interactive, but not grid-tied, hybrid inverter that I talked about in this post. (https://www.mynissanleaf.com/viewtopic.php?f=45&t=27295)

I thought this had enough merit or potential other uses to stand on its own and wanted to see if someone had anything to add. The basic idea is to have an EVSE that can sense some amount of current flow, somewhere else, and then increase or decrease car charging dynamically to not exceed some limit. there is a commercial solution for this from some .au address, Zappi, but it's $800. there is also an instrutable for an all-arduino EVSE. What i'm talking about is sort of the best of both worlds, low cost, moderate effort and moderate finish quality.

The issue that I’m wrestling with is how to balance car charging with a off grid inverter without exceeding the power limits of the inverter. The root problem is that if the array/charger/inverter is sized for the car in the winter then there will be an overproduction in the summer, so to use that, it would be great to run an air conditioning unit and house hold loads. However, when I come home in the afternoon I don’t want to have to unplug the AC and click a bunch of transfer switches. Nor do I want to always be limited to 240v/6A when there is full sun and nothing else is running. So the idea I have is to buy a EVSE that is very finely adjustable from 6-16 amps (my 2012 only charges at 16a max) and then put a current transformer on the output of the inverter. Then when the power demand is low for AC and house loads then EVSE will go up to 16a, but when the A/C kicks on or a bunch of loads come on, it will dial it back to 6A. all within the 2 seconds the inverter says it can handle a surge load.

How I think this can be done is buying an inexpensive EVSE replacement brick and sort of hacking it to be microcontroller, well, controlled. The one I’m going to experiment on had LED lights for each current level and a membrade dry contact push button to increase current. So if I tap into the LED signal wires and push button wires into a Arduino, with CNY17F optical isolation and a proper pull down signal conditioning on the digital inputs I will be able to make IF/THEN chain that cycles thought the various current levels and monitor that its at the right one. On the input side of the equation I see myself installing a split core current transfer OR a hall effect current sensor on the output of the inverter and that will measure the current flow going to all the loads added up. I would prefer a turn-key split core CT, unfortunately there is not a 20A signal conditioned CT on eBay that I can find, so the hardest part of all of this for me will be learning to build a CT signal conditioner that the Arduino can read.

I’ve made quite a few Arduino robots around the house, one that turns porch lights on and off with the sunrise/set (https://www.thingiverse.com/make:356106). Ones that runs stepper motors, 8x20 LCDS, SCRs and pneumatic valves, but I always seem to have problems signal conditioning random sensor when it comes to fighting EMI. solenoids and LCD combinations are the worst, i think the LCD is like an antenna right into the CPU. Just to be clear i'm linking to the sources i bought from as a courtesy to interested people, these are not seller links.

$80 adjustable EVSE brick
https://www.aliexpress.com/item/Electric-car-special-charging-controller-circuit-board-of-16A-input110-250V/32790412028.html?spm=a2g0s.9042311.0.0.28734c4dDXr0i8

CT sensor
https://www.ebay.com/itm/YHDC-SCT013-020-Split-Core-Current-Transformer-20A-1V-3-5mm-AC-Current-Sensor/162560986019?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Hall sensor
https://www.ebay.com/itm/Current-Sensor-IC-ACS758LCB-050B-100B-PFF-T-Current-Module-US/253320858129?ssPageName=STRK%3AMEBIDX%3AIT&var=552478285260&_trksid=p2057872.m2749.l2649

Zappi comercial current sensing evse
https://www.ebay.com/itm/myenergi-Zappi-7Kw-EVSE-EV-Wall-Charger-LEAF-i3-Tesla/113218017764?hash=item1a5c51d9e4:g:f38AAOSw2Wtbfz85

all arduino EVSE ( not adjustable as presented, but could be with additional PWM code and selector button)
https://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/
 
The surge load is only if the batteries can handle it too. The surge refers to the inverter being able to handle a starting load that exceeds the normal continuous rating.
But only if the battery can handle it too.

So you are wanting an evse that ramps up and down from 6 to 16 amps?
Is that even an option for J1772?
I was under the impression that it went 6, 8, 12, 16 amps, ect orjumped by whole amps. Can you dial one into say 7.5 amps?
Then have it slowly ramp up to say 9.3 amps as the sun gets higher in the sky?


The best thing you can do for going off grid is not get an electric vehicle, unless you drive it very little.
Or if you must, a plug in hybrid, that way you don't have to charge it to get around.

Because now that I have the leaf I can't even really think about going off grid.
With out the leaf a 50 kwh battery would probably work fine for me. Now that I have the leaf, nope better not even think about it till I can get a 100kwh battery or more.
Or make the leaf a secondary vehicle and burn gasoline or diesel, then charge and drive the leaf as electricity is available.
 
Oilpan4 said:
So you are wanting an evse that ramps up and down from 6 to 16 amps?
Is that even an option for J1772?
Why don't you read the standard?

11.) The EVSE may modify the pilot signal pulse width at any time, commanding the EV to increase or decrease the maximum AC current draw. The vehicle must adhere to the maximum response time in order guarantee universal compatibility with the external controlling equipment. (see Table 6, specification 10)


Oilpan4 said:
I was under the impression that it went 6, 8, 12, 16 amps, ect orjumped by whole amps. Can you dial one into say 7.5 amps?
Since you don't know, why are you wasting bandwidth?

5.3.5 EVSE Current Capacity - The EVSE provides the maximum available continuous current capacity, and by inference the rating of the protective circuit breaker, to the EV by modulating the pulse width as described in TABLE 4 and shown in FIGURE 8. The available line current is linearly proportional to the pulse width by the following equation:

Ampacity = (0.6 amps x pulse width, in usec) / 10 usec, from 100 to 800 usec.

Oilpan4 said:
The best thing you can do for going off grid is not get an electric vehicle, unless you drive it very little.

Maybe, and maybe not. Depends on driving time patterns as well. Are you often home during the day? Or not?
 
I could have explained this better, as the other poster indicated the standard allows for many discrete steps of charging current, its not infinitely variable. As I understand it the car’s onboard charger is the device that actually permits more or less current to be drawn, and it can change dynamically. The EVSE provided a variable pulse width pilot signal to the car letting the on-board charger know what current level to consume. the evse can include programing for as many discrete settings as are allowed by that formula, or as few as a practical. I am not a historian on the SAE j1772 spec, maybe someone can share why is was designed that way, because it seems unnecessary, why would the charge current need to change dynamically? Maybe they anticipated smart houses that could tune EV current draw to align with home usage, I really have no idea, but in my case it's going to work out great.

By finely adjustable I was drawing a difference between, for example the ZENCAR 16a EVSE, which has 8,10 and 16amp settings. And the ZWET box I linked to that has 6,8,10,12 and 16 amp settings. I know clipper creek is a forum sponsor, but I don’t see that they offer any adjustable units to include in this comparison.
 
ripple4 said:
I could have explained this better, as the other poster indicated the standard allows for many discrete steps of charging current, its not infinitely variable. As I understand it the car’s onboard charger is the device that actually permits more or less current to be drawn, and it can change dynamically. The EVSE provided a variable pulse width pilot signal to the car letting the on-board charger know what current level to consume. the evse can include programing for as many discrete settings as are allowed by that formula, or as few as a practical. I am not a historian on the SAE j1772 spec, maybe someone can share why is was designed that way, because it seems unnecessary, why would the charge current need to change dynamically? Maybe they anticipated smart houses that could tune EV current draw to align with home usage, I really have no idea, but in my case it's going to work out great.

By finely adjustable I was drawing a difference between, for example the ZENCAR 16a EVSE, which has 8,10 and 16amp settings. And the ZWET box I linked to that has 6,8,10,12 and 16 amp settings. I know clipper creek is a forum sponsor, but I don’t see that they offer any adjustable units to include in this comparison.

I too am not a j1772 historian and technical spec junky. I had no idea j1772 could do that.
It could be more useful than the 6, 8, 10, 12, 16 amp stair step. It's good to know.

If I was going to go off grid I would want to be able to use my home chademo at least occasionally, which peaks at just about 8kw.
I normally use my 12 amp 240v converted Panasonic brick for home charging.
I could probably go as low as 6 amps at 240v for most over night charging.

My leaf is pushing about 400kwh for the moth of april, mostly charging after 7pm.

I'm with you. I would love to go off grid, but have to do so affordablely and with out taking out a huge loan.

What size is your battery?
 
My project is not off-grid, its 'grid interactive', short of grid-tie. it can draw utility power when needed, but cannot put power into the utility. still the utility pass through feature of the hybrid inverter is breaker limited to 5kw, so i need this auto-adjustable charger if the solar is producing or not.

I'm planning on a 48v 410ah bank of 16x GC2 golf cart batteries. I choose that size to hold the 10kwh i need on a daily basis for the leaf and keep the DOD at around 50% which should give a 2000+cycle life. but in terms of raw capacity it's only a 1 day supply.
 
ripple4 said:
My project is not off-grid, its 'grid interactive', short of grid-tie. it can draw utility power when needed, but cannot put power into the utility. still the utility pass through feature of the hybrid inverter is breaker limited to 5kw, so i need this auto-adjustable charger if the solar is producing or not.

I'm planning on a 48v 410ah bank of 16x GC2 golf cart batteries. I choose that size to hold the 10kwh i need on a daily basis for the leaf and keep the DOD at around 50% which should give a 2000+cycle life. but in terms of raw capacity it's only a 1 day supply.
Why make it complicated? I would aim for fixed 4kW and see if there is an issue.
 
I went the simple route and if it is sunny I just set the EVSE for 10 amps @ 240 vac or 2400 watts. Our array is just over 3000w but if I start charging and it isn't solar noon, the array will produce less and as we pass noon a bit more, plus the house loads in there. Sometimes if I am in a hurry I set it to 20 amps @ 240 vac, which will draw down the house bank but knowing I am going to be gone and the bank will get topped back up later in the afternoon.

My understanding is once the charging session starts you can't change the pilot signal? It stays at the initial rate. Maybe if you set the car to always charge, it could disconnect every 15 minutes and check mppt and reset the pilot signal and start charging again? That was my intent long ago, but I just ball park it now and have had pretty good luck.
 
BrockWI said:
My understanding is once the charging session starts you can't change the pilot signal?

I have a charging station that I can change currents on and measure the current on. With my 2014 LEAF, right now.

The current changes as you would expect. Both up and down. As fast as the web page updates, which is about 15 seconds.
 
48v at 410ah is a very impressive battery bank. Are you sure you don't want to go off grid?

I only have a little 24v 255ah warehouse tug battery for powering my water well setup.
 
I would like to, but I would need a LOT more solar (and not much more space) and a lot more batteries. Most of our useage is the geothermal heat pump that pulls 5 kw running :)
 
The EVSE control box came in and opened it it up to find tie points on the board and documented where i got the signals. LED 2 did not have a test point, so i jumped on the current limiting resistor but it broke off, so i put in a through hole resistor to repair it, it was ugly, then i used black RTV to stick the wires to the board and that was mess too. I got a used j1772 handle and 20' cord off ebay and will connect it in to test it on the car. I don't have 240v at my soldering station, but i did have a 480/240 --> 120 .1KVA control transformer, I connected it backwards to power up the 240v only evse. if it works it works.

working on the code now, the flashing LEDs is a tricky angle i didn't expect, looks like i'll have to read the input twice, 1/2 second delayed, and see if its different between each reading. i'll put the code up once its done.

https://ibb.co/BcJQPWL
 
It works! today i plugged it in and it charges the car OK, so it functions as a EVSE which is the first requirement. the time delay between when the current is changed and the car changes its draw is between an instant and about 2 seconds, so very responsive to changes. the 6 interface pins are pulled into a round connector on the side so it can be disconnected.



here is a youtube video of the controller adjusting the current up to the maximum. not all of the features have been tested. the clamp-over current sensor is giving me trouble, its a learning process.



https://youtu.be/bjBkcHM5C0w
 
the code is pretty well sorted out, getting the hall effect current sensor to read well was very tricky, had to use someone else's RMS calculations, but it reads very accurately now. the controller increases and decreases EVSE pilot signal commanded current to maximum available supply or the maximum EVSE current of 16a which ever is lower. in the code I have it setup for a 18 amp max, and if the current gets close to 18a it sets the current to 6amps, and then auto increases to 16 amps on the EVSE or until it reaches the maximum allowed current without going over.

https://github.com/ripple4/auto-ajustable-EVSE/blob/master/EVSE_control.ino



I have to simulate an AC current draw using a 10a variac and a load bank, but at least i am demonstrating getting the system to increase, decrease and hold a EVSE charge current.

https://youtu.be/QjijG0nJKng
 
Nice job ripple4. I would like to set up something like this at some point. I have a clipper creek EVSE, which is common hardware with some EVSEs supplied with older Volts. The EVSE can be modified by changing jumpers with a switch, https://www.gm-volt.com/threads/clippercreek-lcs-20-circuit-board-pictures.151401/#post-4693261

I have set up a battery backup solar system with AC coupled panels and a pair of SMA Sunny Island inverters. When the SMAs decide the battery is up to charge, or to limit voltage from going above the target battery voltage, they raise the AC frequency in order to limit production from any AC coupled inverters. The scheme I'm thinking of is to modify the charger with some controller like an ESP32 to flip transistors for the jumpers, controlled by watching for increased frequency on the AC. If the AC frequency ramps up, turn up the charger to consume more solar power. Otherwise, ramp slowly down to the minimum setting of the EVSE.

Anyone done something similar?
 
Thanks, it was a fun learning opportunity. I used these tricks in a diffrent recent project (with clamp-over CTs) and had a leg up since i'd already done it once! I think this is why we don’t see many commercial products around this. Everyone is going to want something different, different inputs and sensor with different algorithms to act on. DIYers rule the world, because we make our own solutions exact to the need! I honestly have had this up and running for a while and I have never used it in its fully automatic mode because i don’t need to. I use the cars charge timer to soak up the afternoon sun, and then restart charging after midnight to reduce peak grid usage. Even then that’s only 4 days a week, since I don’t need to recharge quickly for the Monday commute. Maybe the 62kwh battery changes the math, but I measured that my car uses ~150kwh a month and my panels made 750kwh/month from 6-10 to 7-10-2020. So even if it was super fancy at optimizing the power flow, I’d still need to sink that surplus 600kwh. With phantom loads managed as best as I’m willing to, I can get base home load down to 650watts, and so the key thing was installing a window AC unit with a delay start timer, if its going to be >80F, I set it to start at 11am. And then let it run to 6pm or so, this reduces the cycling of the central AC so it never turns on, or down to once every 2 hours with these >95F days we have been having. with gird-tie it may not make a difference either way if you're net metered.

I’d love to upgrade to the 40 or 62kwh pack. looks like this process is taking off! i'm envious of the DIY pack upgrade!
 
You might like this project, https://github.com/dalathegreat/Nissan-Leaf-ChargeCurrent

It would be possible to build on this and control the current according to the solar input
 
Awesome, I have the 3 channel CAN bridge that i want to install and will download this code to try out.

your link deserves its own post. thank you!
 
ripple4 said:
Awesome, I have the 3 channel CAN bridge that i want to install and will download this code to try out.

your link deserves its own post. thank you!

Thanks, I went ahead and created a separate thread! https://mynissanleaf.com/viewtopic.php?f=44&p=589584#p589584
 
Back
Top