Todd1561
Posts: 11
Joined: Sun Sep 29, 2019 5:24 pm
Delivery Date: 30 Sep 2019

Re: Cutting power to EVSE concerns

Mon Oct 07, 2019 6:41 pm

Thanks everyone for the input. I’ve put together the final solution tonight and it seems to be working well. It works as follows:

A powershell script runs at the same time every night, it starts by querying the Nissan carwings API to get my current SOC. The script then calculates the time required to get to my 75% set point. Then it sends a TCP command to a PoE powered arduino to turn on a relay for that calculated time. The relay is what breaks/connects the pilot wire and stops/starts charging.

The car doesn’t seem to have any problems with this and still reports the plug connected even when the relay is off. I was worried that by breaking the pilot connection the car would report it not plugged in and allow you to drive away.

Modifying the EVSE was pretty easy, once you get the caps off the torx security screws. The pilot line is the smallest of the 4 wires and just terminates to a ring terminal.

I can provide more info on any of this if there’s interest.

Thanks again for the help!

WetEV
Posts: 3220
Joined: Fri May 04, 2012 8:25 am
Delivery Date: 16 Feb 2014
Location: Near Seattle, WA

Re: Cutting power to EVSE concerns

Tue Oct 08, 2019 5:02 am

Make sure you handle car networking errors correctly.
WetEV
#49
Most everything around here is wet during the rainy season. And the rainy season is long.
2012 Leaf SL Red (Totaled)
2014 Leaf SL Red
2019 eTron Blue

Todd1561
Posts: 11
Joined: Sun Sep 29, 2019 5:24 pm
Delivery Date: 30 Sep 2019

Re: Cutting power to EVSE concerns

Tue Oct 08, 2019 5:17 am

Yes I do have some checks in there to validate the data I'm getting from Carwings

User avatar
davewill
Posts: 5081
Joined: Thu Mar 17, 2011 6:04 pm
Location: San Diego, CA, US

Re: Cutting power to EVSE concerns

Tue Oct 08, 2019 10:35 am

Sounds great. You might want to add hourly checks during the charging period to handle weird cases like plugging in after the start time.
2014 Rav4 EV, Blizzard Pearl White
2011 LEAF SL w/QC, Blue Ocean, returned at end of lease

Todd1561
Posts: 11
Joined: Sun Sep 29, 2019 5:24 pm
Delivery Date: 30 Sep 2019

Re: Cutting power to EVSE concerns

Tue Oct 08, 2019 10:44 am

Not a bad idea, my solution to that was just to start the schedule pretty late at 1am. With 1 kid and another on the way our days of staying out past 1am are pretty much non-existent :)

User avatar
davewill
Posts: 5081
Joined: Thu Mar 17, 2011 6:04 pm
Location: San Diego, CA, US

Re: Cutting power to EVSE concerns

Wed Oct 09, 2019 10:09 am

Another idea that occurred to me was adding a switch mounted on the outside of the EVSE, either connected to an input on the Arduino or (if you want to be more failsafe) between the Arduino and the relay, that would override the timer and force the EVSE to be on. That way if you need to charge in the middle of the day, or want to go to 100%, all you have to do is flip the switch.

P.S. I'm sure that a lot of people would be interested to see pictures and code for what you've done. It would be very handy for a lot of people.
2014 Rav4 EV, Blizzard Pearl White
2011 LEAF SL w/QC, Blue Ocean, returned at end of lease

alozzy
Posts: 1408
Joined: Fri Jan 20, 2017 4:25 pm
Delivery Date: 18 Jan 2017
Location: Vancouver, BC
Contact: Website

Re: Cutting power to EVSE concerns

Wed Oct 09, 2019 10:31 am

I know @mux is very busy with his battery extender business, but I recall him mentioning that "80% charging" can be easily implemented using the "man in the middle" CANBUS device that he designed:

https://mynissanleaf.com/viewtopic.php? ... 10#p531734

Hopefully he's made progress on that front...

I recall that @dala purchased this device from muxsan, perhaps he could look into what coding would be needed to make the muxsan CANBUS device act like a transparent bridge in all respects, other than spoofing the SOC value.
Vancouver, CA owner of a 2013 Ocean Blue SV + QC, purchased 01/2017 in WA
Zencar 12/20/24/30A L1/L2 portable EVSE
1-1/4" Curt #11396 hitch
After market, DIY LED DRLs
LeafSpy Pro + Konnwei KW902 ELM327 BT OBDII dongle
Loving my first BEV :D

Todd1561
Posts: 11
Joined: Sun Sep 29, 2019 5:24 pm
Delivery Date: 30 Sep 2019

Re: Cutting power to EVSE concerns

Wed Oct 09, 2019 11:03 am

davewill wrote:
Wed Oct 09, 2019 10:09 am
Another idea that occurred to me was adding a switch mounted on the outside of the EVSE, either connected to an input on the Arduino or (if you want to be more failsafe) between the Arduino and the relay, that would override the timer and force the EVSE to be on. That way if you need to charge in the middle of the day, or want to go to 100%, all you have to do is flip the switch.

P.S. I'm sure that a lot of people would be interested to see pictures and code for what you've done. It would be very handy for a lot of people.
A physical switch would be a good addition for that purpose. For me it's all done in software. I made a simple app for my phone so I can override the schedule, change the target charge % or force an immediate charge from anywhere in the world. I'm happy to put together some legitimate docs with pics that cover this project. Some of it is pretty specific to my needs and require a 24x7 running server, which probably won't be practical for most people, but I have all that overhead already for other purposes. But I can highlight where people could use some alternatives that would make this more generic. I'll post back here when I've got something together.
alozzy wrote: I know @mux is very busy with his battery extender business, but I recall him mentioning that "80% charging" can be easily implemented using the "man in the middle" CANBUS device that he designed:

https://mynissanleaf.com/viewtopic.php? ... 10#p531734

Hopefully he's made progress on that front...

I recall that @dala purchased this device from muxsan, perhaps he could look into what coding would be needed to make the muxsan CANBUS device act like a transparent bridge in all respects, other than spoofing the SOC value.
I came across this thread early on in my searching, too. If this ever becomes a real product then it would likely be the ultimate answer. Presumably much more self-contained and could be used outside of the home at public charging stations. That's probably the biggest drawback to my solution, it only works at my house. I don't see us doing much public charging so for me it's not a big concern, but may be for others. A CANBUS solution would also not be dependent on having a subscription to the Nissan Connect service and all the headaches that go along with integrating with that API. Hopefully someone develops a product some day.

Todd

nlspace
Posts: 95
Joined: Mon Jun 05, 2017 10:21 pm
Delivery Date: 06 Jun 2017

Re: Cutting power to EVSE concerns

Sun Nov 03, 2019 3:30 pm

coulomb wrote:
Sun Oct 06, 2019 4:07 pm
... the early leafs don't heed this pin, which I think is a shocking violation of the J1772 standard. ...
This is really shocking and unbelievable violation of the standard; i had read this post but never experienced it until this last friday.

i came home from the daily ~45 mile commute and plugged in to get a couple of hours of L2 in order to go downtown for a hockey game. Normally i plug in at night and it is ready in the morning. But i pressed the trigger--and nothing happened, the blue lights were on and blinking and i didn't hear the snap of contactors.

i sure didn't want to pull the plug with current in the OBC and across the Main Contactors and cause a ration of damage.

So i tried pressing the "charge off" button on the left knee dash, then pressed the start button and the charge "off" button, still with no success. Finally pressed the brake pedal and start button, and then the contactors snapped off (the car didn't start while chargging). Quite a hassle and PIA especially when it's dark and rainy.

And potentially damaging to the OBC and contactors. Maybe that big 2700 uF 420VDC capacitor in the OBC is big enough to hold up the PFC buss long enough for a graceful shutdown?

coulomb
Posts: 74
Joined: Thu Oct 09, 2014 5:08 pm
Delivery Date: 07 Mar 2015
Leaf Number: 200445
Location: Brisbane, Australia

Re: Cutting power to EVSE concerns

Sun Nov 03, 2019 5:22 pm

nlspace wrote:
Sun Nov 03, 2019 3:30 pm
Maybe that big 2700 uF 420VDC capacitor in the OBC is big enough to hold up the PFC buss long enough for a graceful shutdown?
Definitely. I didn't realize that brake+start would stop the charge. So I've been stopping a charge by removing the J-1772 plug. I always expect nasty arcing, but so far it never seems to happen. I wonder if it detects the loss of pilot signal before the AC disconnects, and does a graceful disconnect anyway. I'd still way prefer that it heeded the proximity switch.
2012 Leaf with new battery May 2019. New to me June 2019.

Return to “Batteries & Charging”