Graplr
Posts: 8
Joined: Sun Jun 08, 2014 11:30 am
Delivery Date: 07 Jun 2014
Leaf Number: 404942

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Fri Oct 03, 2014 8:49 pm

Valery,
Thanks for the help. I'm sorry but I'm a bit confused. Where do I find the getState function and how do I replace it? I'm good with tools and following DIY directions but I'm a novice at programming.

Thanks,
Ryan
2013 Nissan Leaf SV

dsinned
Posts: 152
Joined: Fri Jun 27, 2014 12:20 pm

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Sat Oct 04, 2014 9:27 am

Ryan, you can locate this line in the code by using the "Find" command (Cntlr/F) in the Arduino programming suite while viewing the source code file (JB_firmware_V8_x_x) for your particular version of Juicebox firmware. I see the "getState()" referenced in three different places. The third Find command will highlight it at line #874 in the latest version, V8.9.1. A few more lines further down (Line #888) is the line in question. Just change (edit) that line to what Valery advised in his post above. The original line before this change reads as follows:

if(mode==1) pV=((pV-pV_min)*PWM_res+pV_min*duty)/duty;

Note, that the only change you need to make is from "duty" to "set_duty" in two places on that line.

Keep in mind, to do this you will need a "FTDI Programming Cable" and familiarity with the Juicebox firmware reprogramming procedure which was posted earlier in this thread.

GOOD LUCK!
Last edited by dsinned on Sat Oct 25, 2014 9:09 am, edited 1 time in total.

Graplr
Posts: 8
Joined: Sun Jun 08, 2014 11:30 am
Delivery Date: 07 Jun 2014
Leaf Number: 404942

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Sat Oct 04, 2014 11:19 am

Thanks. That is exactly the directions I needed. Makes sense now. Looks like I've got some reading to do and get a cable!
2013 Nissan Leaf SV

Graplr
Posts: 8
Joined: Sun Jun 08, 2014 11:30 am
Delivery Date: 07 Jun 2014
Leaf Number: 404942

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Sat Oct 04, 2014 12:49 pm

Valery,
If I just upgrade the Firmware to 8.9 can I bypass have to change what you suggested, or would I still need to change the code?

I need to get my cord so I'm not sure when I will be able to get it done.

Ryan
2013 Nissan Leaf SV

dsinned
Posts: 152
Joined: Fri Jun 27, 2014 12:20 pm

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Sat Oct 04, 2014 2:13 pm

Valery is the expert here, so you should follow his recommendations, but I believe you will still need the FTDI Programming Cable if all you want is to upload a newer version of the firmware. However, "if" your JuiceBox was built with an older version of F/W, you just can't skip to a newer version unless your hardware (PCB version) is KNOWN TO SUPPORT IT. There are certain dependencies in the hardware, that ONLY the same version of firmware supports properly.

For example, I started out with V8.7.9 firmware with a V8.7 PCB. I have since uploaded to F/W V8.7.13b. The latter has various modifications of my own choosing to support a slightly larger display module, but my modified firmware is still based on V8.7.9 (compatible with the original uLCD) and original V8.7.x PCB. Because my PCB is still the same, later version(s) of firmware (e.g. V8.9.1) would NOT necessarily be compatible with my existing hardware, and for sure it wouldn't be 100% compatible with my new display.

Sometimes, new versions of F/W can be made "compatible" with respect to older H/W, but eMW's verification "testing" probably was only done with the latest hardware, so mismatching versions of H/W and F/W would generally not be advisable.
Last edited by dsinned on Sat Oct 25, 2014 9:14 am, edited 1 time in total.

Graplr
Posts: 8
Joined: Sun Jun 08, 2014 11:30 am
Delivery Date: 07 Jun 2014
Leaf Number: 404942

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Mon Oct 06, 2014 10:32 am

I ordered the FTDI cable from emotorwerks. I will await its arrival and then post back here my results. I think I should be able to figure out the Arduino software (hopefully) as I've read the directions laid out in a few places. If not I'll post back with questions!

Thanks for the help!
Ryan
2013 Nissan Leaf SV

User avatar
emotorwerks
Vendor
Posts: 18
Joined: Sun Oct 05, 2014 4:12 pm
Delivery Date: 05 Oct 2014

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Tue Oct 07, 2014 10:10 pm

Last edited by emotorwerks on Tue Oct 07, 2014 11:27 pm, edited 2 times in total.

QueenBee
Posts: 1564
Joined: Sun Aug 08, 2010 5:14 pm
Delivery Date: 20 Jun 2011
Leaf Number: 2062
Location: Portland

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Tue Oct 07, 2014 10:46 pm

emotorwerks wrote:Controllable JuiceBox #000001! Charging one of our Nissan Leafs and happily changing charging power on command from a mobile phone

Did you mean to share the URL to control this unit? I can't tell if the controls are just really flakey or if I'm not the only one playing with it.

User avatar
emotorwerks
Vendor
Posts: 18
Joined: Sun Oct 05, 2014 4:12 pm
Delivery Date: 05 Oct 2014

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Tue Oct 07, 2014 10:59 pm

QueenBee wrote:Did you mean to share the URL to control this unit? I can't tell if the controls are just really flaky or if I'm not the only one playing with it.
Both are a possibility. It looks like the LEAF is ramping down, since it might be nearly full. In my experience, it takes about 5-7 seconds to see the change reflected on the screen. I blanked out the URL in the screenshot to help avoid multiple concurrent access attempts. Good on you to spot that.

QueenBee
Posts: 1564
Joined: Sun Aug 08, 2010 5:14 pm
Delivery Date: 20 Jun 2011
Leaf Number: 2062
Location: Portland

Re: E-MotorWerks JuiceBox - an open source 15kW EVSE

Tue Oct 07, 2014 11:09 pm

emotorwerks wrote:
QueenBee wrote:Did you mean to share the URL to control this unit? I can't tell if the controls are just really flaky or if I'm not the only one playing with it.
Both are a possibility. It looks like the LEAF is ramping down, since it might be nearly full. In my experience, it takes about 5-7 seconds to see the change reflected on the screen. I blanked out the URL in the screenshot to help avoid multiple concurrent access attempts. Good on you to spot that.
It doesn't seem to stay set at what I set it to for very long before it changes back to a different value. I also fixed the grammar on your name since your code eats the single quote I had to get out the real apostrophe :) Making the URL light gray but perfectly readable doesn't count as blanking it out, nor does including your units full ID in the screenshot.

Return to “EVSE / Charging Equipment and Networks”