E-MotorWerks JuiceBox - an open source 15kW EVSE

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.
Okay. Try this:

Code:
    if(state==STATE_C) {
            // vehicle requested NON-VENTILATED power - this is our MONEY state
            int ctrlBtn_cnt=0;

//-----------Start additional code 
            ReadyToCharge=ReadyToChargeCheck()
            if(!ReadyToCharge){
               printClrMsg(F("Vehicle connected waiting to charge."), 1000, 0x1f, 0x3f, 0);
               delayinsecs(20);
               break;
            }
//-----------------end additional code

            // commence charging
            setRelay(HIGH);
            ... etc ...
 
Hey guys,

Don't mean to interrupt - really cool stuff you guys are talking about here. I think you've got everything nailed, but I'd just like to suggest something that could be happening: maybe the current sensor is picking up anomalous readings at higher voltages/fluctuating high voltages? It could be worth sticking an Oscilloscope probe on 5G (GND from power supply) and D3 (Arduino pin - PCB front face) and seeing how much that voltage value fluctuates at different charge states (different amounts of detected current). GFI will of course trigger given too big of a differential, I'd just be interested to see if you're seeing weird changes in that differential value at higher current levels. Anyways, just my two cents.

ImpactVector, thanks a bunch for your permission to record your mods - and thanks to everyone talking about this stuff!

Btw, will probably be coming to you guys for questions/input going forward ;)
 
Levi8than said:
Okay. Try this:

Code:
    if(state==STATE_C) {
            // vehicle requested NON-VENTILATED power - this is our MONEY state
            int ctrlBtn_cnt=0;

//-----------Start additional code 
            ReadyToCharge=ReadyToChargeCheck()
            if(!ReadyToCharge){
               printClrMsg(F("Vehicle connected waiting to charge."), 1000, 0x1f, 0x3f, 0);
               delayinsecs(20);
               break;
            }
//-----------------end additional code

            // commence charging
            setRelay(HIGH);
            ... etc ...
Just woke up to check it, looks like it hit the code but the charger fault light in the car still went off
 
ImpactVector said:
Just woke up to check it, looks like it hit the code but the charger fault light in the car still went off

Is it this? If so it looks like it's a common failure, unrelated to the JuiceBox, and you are not alone.
This thread about your yellow charging light
http://www.mynissanleaf.com/viewtopic.php?f=30&t=12864" onclick="window.open(this.href);return false;
And this thread blaming the PDM (power distribution module) for your charge issues
http://www.mynissanleaf.com/viewtopic.php?f=30&t=13194" onclick="window.open(this.href);return false;

See if you can repro with the stock code, no timer. If you can then see if you repro with a public charger, or take it to the dealership and try to repro in front of them on their charger. I'm guessing you're still under warranty.
 
Here's a question.....

Had a power failure while charging (entire area for 8 hours).....

When I got up in the am, (now with power), the leaf was NOT fully charged. Unplugged and replugged, and it still didn't start charging again.....

Had to POPO (Power-Off,Power-On) the breaker going to the Juicebox to get it to reset and charge again.

Is this expected? Or is the firmware on the Juicebox written allow repowering up (AC cycle) while still plugged into the car. If not, when will this be fixed?
 
ImpactVector said:
Just woke up to check it, looks like it hit the code but the charger fault light in the car still went off

Just to be clear: Which light is it? And does my last post make sense?
 
pthack said:
Here's a question.....

Had a power failure while charging (entire area for 8 hours).....

When I got up in the am, (now with power), the leaf was NOT fully charged. Unplugged and replugged, and it still didn't start charging again.....

Had to POPO (Power-Off,Power-On) the breaker going to the Juicebox to get it to reset and charge again.

Is this expected? Or is the firmware on the Juicebox written allow repowering up (AC cycle) while still plugged into the car. If not, when will this be fixed?

The JB won't care about the power cycling. When the power goes out, the relay will open. Then when the power comes back up, if the vehicle is attached when the power comes back on, it'll go through its normal init sequence of closing the breaker, testing GFI, then opening the breaker and giving the LEAF a chance to communicate. The leaf shouldn't care about that init sequence, but the openEVSE (https://code.google.com/p/open-evse/" onclick="window.open(this.href);return false;) folks suggest that cycling the breaker like that without first checking what's connected to the other end is dangerous and shouldn't be done. Instead they first check if there is something attached on the other end, and if it's car that passes the diode check, they jump straight to communicating with the car.

Maybe this section in the code should be reconsidered.

And I've digressed. If the car is connected when the power comes back on it should be given the chance to begin charging. But I'm guessing you are using the Leaf's built-in charger. In that case, when the power came back on, the leaf looked at your charge timer and decide that it wasn't time to charge yet, so it didn't try charging again. I guess this is a pretty good argument for using an RTC + a built-in timer on the charger unit, rather than in the car itself.

Does this sound right?

*Now, I'm answering based on 8.6.5, I haven't looked at older versions of the firmware, but I doubt this is something that would have been missed.
 
Levi8than said:
pthack said:
Here's a question.....
*Now, I'm answering based on 8.6.5, I haven't looked at older versions of the firmware, but I doubt this is something that would have been missed.

I stand corrected.
I've rolled back to look at older versions of the firmware, and older versions of the firmware re-calibrate the pilot voltage analog input voltages without first checking to see if the vehicle is attached.

8.1 and 8.3 have this bug.
8.6.1 - 8.6.5 look good.

How old is your Juicebox? If you've got the SW and cable set up to flash, you could try fixing this.

Replace this:
Code:
  pVcal/=12.; // calibration constant
  // now adjust boundaries for top being not 12V
  state_A_Vmin=def_state_A_Vmin*pVcal;  state_A_Vmax=def_state_A_Vmax*pVcal; 
  state_B_Vmin=def_state_B_Vmin*pVcal;  state_B_Vmax=def_state_B_Vmax*pVcal; 
  state_C_Vmin=def_state_C_Vmin*pVcal;  state_C_Vmax=def_state_C_Vmax*pVcal; 
  state_D_Vmin=def_state_D_Vmin*pVcal;  state_D_Vmax=def_state_D_Vmax*pVcal; 
  state_E_Vmin=-1.5, state_E_Vmax=1.5; 
  state_F_Vmin=-14., state_F_Vmax=-10.;

With this:
Code:
  // set default thresholds for pilot signal levels
  state_A_Vmin=def_state_A_Vmin; state_A_Vmax=def_state_A_Vmax; 
  state_B_Vmin=def_state_B_Vmin; state_B_Vmax=def_state_B_Vmax; 
  state_C_Vmin=def_state_C_Vmin; state_C_Vmax=def_state_C_Vmax; 
  state_D_Vmin=def_state_D_Vmin; state_D_Vmax=def_state_D_Vmax; 
  state_E_Vmin=-1.5, state_E_Vmax=1.5; 
  state_F_Vmin=-14., state_F_Vmax=-10.; 
  
  // recalibrate the pilot sensing code. helps fight any possible temperature / aging drifts
  // but only do it if it's not too far off - this will prevent recalibration in case the power 
  // cycles while the JuiceBox is plugged into the car
  // note that this will mean that the JuiceBox would not be able to recalibrate if the pilot is more than 
  // 10% off (unlikely with a precision 12V regulator used and R-R op amp)
  if(pVcal>def_state_B_Vmax) {  
    pVcal/=12.; // calibration constant
    // now adjust boundaries for top being not 12V
    state_A_Vmin=def_state_A_Vmin*pVcal;  state_A_Vmax=def_state_A_Vmax*pVcal; 
    state_B_Vmin=def_state_B_Vmin*pVcal;  state_B_Vmax=def_state_B_Vmax*pVcal; 
    state_C_Vmin=def_state_C_Vmin*pVcal;  state_C_Vmax=def_state_C_Vmax*pVcal; 
    state_D_Vmin=def_state_D_Vmin*pVcal;  state_D_Vmax=def_state_D_Vmax*pVcal; 
    state_E_Vmin=-1.5, state_E_Vmax=1.5; 
    state_F_Vmin=-14., state_F_Vmax=-10.; 
  }
 
Also - do you have a premium or base model?

I could possibly see an issue if its a premium and you had the timer set. After losing power it may have lost the time.

Looks like Joe may have nailed it if its a base edition.
 
Levi8than said:
ImpactVector said:
Just woke up to check it, looks like it hit the code but the charger fault light in the car still went off

Is it this? If so it looks like it's a common failure, unrelated to the JuiceBox, and you are not alone.
This thread about your yellow charging light
http://www.mynissanleaf.com/viewtopic.php?f=30&t=12864" onclick="window.open(this.href);return false;
And this thread blaming the PDM (power distribution module) for your charge issues
http://www.mynissanleaf.com/viewtopic.php?f=30&t=13194" onclick="window.open(this.href);return false;

See if you can repro with the stock code, no timer. If you can then see if you repro with a public charger, or take it to the dealership and try to repro in front of them on their charger. I'm guessing you're still under warranty.


Thats gold!! Thanks Ill see what they will do!
 
I've got my own charging issue. I don't think it's related to the JuiceBox, but I'll post here anyway just in case somebody else has dealt with it.
While my leaf is charging, wires in my walls buzz. My wife can't hear it, she sleeps just fine, but it bothers me. Clock radios buzz, other random electronics buzz. even the light ballasts buzz.

With everything else off, I can track the path the wires take from my circuit panel to my garage just be following the buzz. If I step outside, it's gone. and the at the circuit box I hear just the subtlest chirp. Of course, flipping the breaker off fixes it.

There are several folks on this thread: http://www.mynissanleaf.com/viewtopic.php?p=349233#p349233" onclick="window.open(this.href);return false;
complaining about noisy charger boards and nissan fixes them. But nobody else on that threads has a 2013. And I would have expected Nissan to fix it by the time 2013's rolled around.

I guess what I need is a second car to plug in and see if it charges just fine. Anybody care to come to south San Jose near Almaden and 85 for a free charge and a sixpack of beer? :)
 
Levi8than said:
I've got my own charging issue. I don't think it's related to the JuiceBox, but I'll post here anyway just in case somebody else has dealt with it.
While my leaf is charging, wires in my walls buzz. My wife can't hear it, she sleeps just fine, but it bothers me. Clock radios buzz, other random electronics buzz. even the light ballasts buzz.

With everything else off, I can track the path the wires take from my circuit panel to my garage just be following the buzz. If I step outside, it's gone. and the at the circuit box I hear just the subtlest chirp. Of course, flipping the breaker off fixes it.

There are several folks on this thread: http://www.mynissanleaf.com/viewtopic.php?p=349233#p349233" onclick="window.open(this.href);return false;
complaining about noisy charger boards and nissan fixes them. But nobody else on that threads has a 2013. And I would have expected Nissan to fix it by the time 2013's rolled around.

I guess what I need is a second car to plug in and see if it charges just fine. Anybody care to come to south San Jose near Almaden and 85 for a free charge and a sixpack of beer? :)

Have you tried to change the current limit and see if that changes anything ?

I have seen that happen frequently when wires are either punctured with nails or if there is a join and a resonant frequency emerges.
All your screws tight on the power panel? Breaker?

I would try turning the JB down and up and see if it changes.

Goodluck!
 
ImpactVector said:
Have you tried to change the current limit and see if that changes anything?
For me to try this while the vehicle is charging and actually listen for a difference, I'd need to invite a friend over that can either hear the noise too, or that I'm sure won't electrocute him/herself while turning the pilot pot. My wife doesn't fall into either of these categories.

But I guess I can try to figure it out on my own first. My leaf is already charged up now. I'll try tonight after using it a bit.

ImpactVector said:
I have seen that happen frequently when wires are either punctured with nails or if there is a join and a resonant frequency emerges.
All your screws tight on the power panel? Breaker?

Breaker panel is tight. I even tried swapping my 30A breaker for a 40A breaker last night to see if my 25A charging was just too close to the 30A limit and causing the magnetic breaker to hum. But no, that's not it. I haven't swapped the 30A breaker back yet, but I should do that now to be safe.

I could climb up in my attic and chase the wire to look for a nail or something. That's possible. But the house is so old that I wouldn't expect the wood to hold enough moisture to have any sort of an effect anymore.

A splice is a good idea, too. I think there's a single piece of wire running from the box to the garage. No splice points. But the internal connections in the dryer outlet could be loose. I'll check that before charging tonight.

Thanks.
 
I have an issue that troubles me. Background: 13 SL using end timer. JB Deluxe version with LCD. Leviton J1772 30 amp 25ft connector, 14-50 connector (Stove/dryer cord) to #6 X ~8ft romex to 30a breaker on 100a load center in garage with no other heavy loads( 2 X 15 amp for garage door openers/ lights). LCD stated voltage while charging:208. Issue: Every time I plug in at night with the switch in run mode on the JB, enabling the timer/LCD operation, but not activating its timer option, after the morning charge completion and my daily drive (disconnect and reconnect J1772), I get no callout for the pilot signal. To reset, I must cycle the breaker. I can also switch to prog mode on the JB, which allows the pilot without trouble. I checked with the Schneider EVSE I also have under its start timer and the Leaf end timer and they play nice together. I also checked the lock button on the J1772 to verify function. Everything runs right after cycling the breaker, or repeatably with the switch toggled. All my crimps are done with a crimp tool and soldered after. Maybe I need to drive the 80 miles to my Dad's and borrow his scope to tune this in? It's got fresh out of the box settings now. Forgive me, but I dont have an ftdi cable yet, maybe I'll need one?
Post edit: just checked the voltage across output side with a meter with the contactor closed and charging is 240v even. Didn't check across open as I didn't want to interrupt charging.
 
joewaters said:
I have an issue that troubles me. Background: 13 SL using end timer. JB Deluxe version with LCD. Leviton J1772 30 amp 25ft connector, L6-50 connector (Stove/dryer cord) to #6 X ~8ft to 30a breaker on 100a load center in garage with no other heavy loads( 2 X 15 amp for garage door openers/ lights). LCD stated voltage while charging:208. Issue: Every time I plug in at night with the switch in run mode on the JB, enabling the timer/LCD operation, but not activating its timer option, after the morning charge completion and my daily drive (disconnect and reconnect J1772), I get no callout for the pilot signal. To reset, I must cycle the breaker. I can also switch to prog mode on the JB, which allows the pilot without trouble. I checked with the Schneider EVSE I also have under its start timer and the Leaf end timer and they play nice together. I also checked the lock button on the J1772 to verify function. Everything runs right after cycling the breaker, or repeatably with the switch toggled. All my crimps are done with a crimp tool and soldered after. Maybe I need to drive the 80 miles to my Dad's and borrow his scope to tune this in? It's got fresh out of the box settings now. Forgive me, but I dont have an ftdi cable yet, maybe I'll need one?

So the 208 volt problem I have as well. I don't think its major. Just a calibration range.

So the end timer is always interesting because the documentation sucks that comes with the car. You may know this already but the onboard timer plans to have the car fully charged at the end time. It doesn't start immediately but rather waits until it calculates it can finish and then works backwards.

If you leave your end timer on and run the job does it not charge the car at all?

My personal experience with the onboard charger was bad enough for me not to use it. If you have the premium let it do it rather! (My opinion...but I stated earlier in this thread why I don't like the end timer..

Also see the previous comments about a firmware issue on early juice boxes.
The ftdi is very cool if your a tinkerer.

Hope this helps.
 
ImpactVector said:
So the 208 volt problem I have as well. I don't think its major. Just a calibration range.
I'm not terribly concerned about the calibration, just posted to reinforce a previous poster's observance.
So the end timer is always interesting because the documentation sucks that comes with the car. You may know this already but the onboard timer plans to have the car fully charged at the end time. It doesn't start immediately but rather waits until it calculates it can finish and then works backwards.
I use the end timer because I want the car to have just finished charging before I leave in the morning in hopes that a warm battery will improve my commute efficiency and reduce the time spent at 100% SOC. I don't want to calculate backwards everyday for start time when I can just plug and go.

If you leave your end timer on and run the job does it not charge the car at all?
I guess I wasn't too clear on this, the scenario is that, after properly charging on day 1, I drive my 72+ mile commute, return to charge (end timer still active) and the JB does nothing in the handshake with the car. The car signifies that it is plugged in, but not charging. The 'on-the-timer' sequence on my dash does not run. When the timer should signal to start charging, it has no reference to the JB to start, therefore charging does not occur, and I drive my wife's ICE to work.

My personal experience with the onboard charger was bad enough for me not to use it. If you have the premium let it do it rather! (My opinion...but I stated earlier in this thread why I don't like the end timer..
I've used the end timer on the car for the few months since getting a Schneider EVSE and had no trouble using either the EVSE start timer or the Car's end timer.

Also see the previous comments about a firmware issue on early juice boxes.
The ftdi is very cool if your a tinkerer.

Hope this helps.
I am sure I will be ordering the cable, but I'll be away from the Leaf for a while on business, so it's on the back burner.
Just today got my dummy inlet in the mail :)
Thanks
Joe
 
Levi8than said:
pthack said:
Here's a question.....

Had a power failure while charging (entire area for 8 hours).....

When I got up in the am, (now with power), the leaf was NOT fully charged. Unplugged and replugged, and it still didn't start charging again.....

Had to POPO (Power-Off,Power-On) the breaker going to the Juicebox to get it to reset and charge again.

Is this expected? Or is the firmware on the Juicebox written allow repowering up (AC cycle) while still plugged into the car. If not, when will this be fixed?

The JB won't care about the power cycling. When the power goes out, the relay will open. Then when the power comes back up, if the vehicle is attached when the power comes back on, it'll go through its normal init sequence of closing the breaker, testing GFI, then opening the breaker and giving the LEAF a chance to communicate. The leaf shouldn't care about that init sequence, but the openEVSE (https://code.google.com/p/open-evse/" onclick="window.open(this.href);return false;) folks suggest that cycling the breaker like that without first checking what's connected to the other end is dangerous and shouldn't be done. Instead they first check if there is something attached on the other end, and if it's car that passes the diode check, they jump straight to communicating with the car.

Maybe this section in the code should be reconsidered.

And I've digressed. If the car is connected when the power comes back on it should be given the chance to begin charging. But I'm guessing you are using the Leaf's built-in charger. In that case, when the power came back on, the leaf looked at your charge timer and decide that it wasn't time to charge yet, so it didn't try charging again. I guess this is a pretty good argument for using an RTC + a built-in timer on the charger unit, rather than in the car itself.

Does this sound right?

*Now, I'm answering based on 8.6.5, I haven't looked at older versions of the firmware, but I doubt this is something that would have been missed.


Not sure.....I don't use the charge timer, just the heater timer....Got out to the car well before it would have started, and got in to check the charge.....it wasn't fully charged (I charge to 100%, and it was at 78%), so that's when I tried the unplug car, then replug, and didn't hear the car 'click' like it normally does on a disconnect, and didn't start charging on the re-connect...

The only thing on the circuit is the Juicebox, so I cycled the breaker (it's installed right next to the panel), so I heard it do the relay test (car unplugged), then replugged the car and it started charging fine....

When power went out, it DID bounce a couple of times before totally dying, so might have confused the ucode in the Juicebox....just wanted to let folks know about this potential exposure....
 
Guys- is the case on your job getting warm after an hour of being on?

Mine is probably 30 degrees warmer than the surroundings at 30 amps. That OK? No fire risk?
 
ImpactVector said:
Guys- is the case on your job getting warm after an hour of being on?

Mine is probably 30 degrees warmer than the surroundings at 30 amps. That OK? No fire risk?

mine does not heat up noticeably to the touch.
 
Back
Top