Test my OpenEVSE FW Ver 1.6.2 with RTC and Delay Timers

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.

goldserve

Well-known member
Joined
Nov 11, 2012
Messages
70
---Version 1.6.0 NOW available and tested to work with LEAF EV---

So, I would like to invite people to test my latest firmware (1.5.5) which adds a real time clock and delay start/stop charging features.

To get started, a RTC chip + battery module has to be installed. You can pick up a compatible DS1307 module at https://www.adafruit.com/products/264. Connect SCL, SDA, Power, GND to the same SCL, SDA, 5V, GND as the Adafruit RGB LCD.

The features of the firmware 1.5.5
- CLI command 'dt' to set date/time of system
- CLI command 'timer' to view/set start/stop timers
- LCD button menu 'Date/Time' to set system date/time
- LCD button menu 'Delay Timer' to set/enable start/top timers
- Once Timers are set and valid, EVSE will start up in disabled mode and will start when the start time has reached
- One can use the manual button to start the EVSE and the system will only stop once the stop time has reached
- LCD will display 'EV Connected' and not the old 'Stopped' message but if the system is stopped, a square stop icon will be present on the first line
- LCD will display a Time icon on the first line to indicate Timers are active on the system

The features of the firmware 1.5.6
- All of the above
- LCD button menu to set 'Auto Start' On or Off. Default is ON so when set to OFF, a manual start is required to start charging. By setting Timers ON, you are setting Auto Start OFF as well.

The features of firmware 1.6.0
- Implemented a different way to handle manual/timer start/stop charging to play nice with EVs
- Changed the way the "Stopped" screen looks. If timers are enabled, it will display the start and stop time along with nice little icons (See skydrive link below for example pictures)
- Also includes the "Auto Start" menu in the LCD as stated above
- NOTE: I should probably point out that this firmware is close to taking up the entire 32K available for code storage so the Arduino boot loader will probably not work. Burn the HEX directly with USBTiny
- NOTE2: The firmware will not start up properly if RGB LCD is not connected. This was introduced in version 1.0.3 but i'll take some time to look at it to see if anything can be done

The features of firmware 1.6.2
- Merged in 1.0.9 mainline OpenEVSE changes
- Added ifdef option to include AutoStart in LCD Menus. Disabled by default to conserve on SRAM space
- When DELAYTIMERs are enabled, changed the behaviour when you exit LCD menu to be more consistent
- NOTE: Compiled hex files can be found in the skydrive for those that want to load directly without compilation. The filename should be self explanatory on which features are included. BTN menu be default uses Digital Pin 7, which routes out to Pin 3 of I/O pin header on the v4 through hole boards. ADAFRUITBTN is the HEX that has been compiled to use button on LCD shield

Compiled into the firmware are the following features so make sure your board supports these including the RTC module that is mentioned up above: GFI, SERIALCLI, RGBLCD, ADVPWR, BTN_MENU, BTN_ENABLE_TOGGLE

Some pictures of the menu, CLI interface, and firmware hex file can be found here: http://sdrv.ms/UbcUGk

Please consider donating something @ PP [email protected] if you think this is worth it to you. I spent countless late nights to get this all working and I'm happy I did :) Looking forward to feedback!

Edit: Added YouTube video of the Date/Time, Delay Timers and Charging menus...
[youtube]http://www.youtube.com/watch?v=xEW_XIwJIlo[/youtube]

Edit: Checked in code at https://github.com/goldserve/openevse_rtc" onclick="window.open(this.href);return false;
 
Great work, I plan to test it out in the next few days.

I will donate a new OpenEVSE RGB LCD kit for your efforts, I look forward to seeing the source code in github when lincomatic approves your submission.
 
Maybe using the DS3231 chip would be better,
and maybe even cost less, since the crystal is
internal to the chip?

http://www.maximintegrated.com/products/timers/ds3231.cfm" onclick="window.open(this.href);return false;

http://www.maximintegrated.com/datasheet/index.mvp/id/4627?utm_expid=50713806-2&utm_referrer=http%3A%2F%2Fwww.maximintegrated.com%2Fproducts%2Ftimers%2Fds3231.cfm" onclick="window.open(this.href);return false;

Apparently used in Adafruit ChronoDot
http://www.adafruit.com/products/255" onclick="window.open(this.href);return false;
 
Shoot, the DS3231 looks like a better clock. I'll have to get one of these to try out the code to see if it is 100% compatible.
 
I loaded your hex file on my test unit. The menus look great! I can not test further until my Adafruit order arrives with the real time clocks.

It took a long time to load. It looks like you used all of the available space.
 
Yes, I did use all the available space and I could not fit a menu to set Auto Start On/Off. Well, technically it did fit but when I uploaded the hex, the chip would to reset and when I took the menu out, it was OK. I narrowed it down to a line or code which I can disable and enable but it made no sense at all. I'm going around to optimize other parts of the code in hope I can easily put back the Auto Start menu.

I would like some feedback on the way I disable/enable charging now. In the past, it would just show Stopped and set the EVSE to disabled state. Now i don't allow the state machine to advance to charging state but I like the visual feedback of the LCD more.

Anyways, if someone is interested, I can ship the same DS1307 module I used for $10 + $1.50 postage to anyone in CA for faster testing. We could also meet up locally in the bay area as well. I ordered a few so I have extras.

Cheers!
 
Thanks for the offer but my 2 kits from Adafruit will likely be here late next week. I ordered 2. one for my garage EVSE and one for my test unit. When you consider $6+ for shipping adding another $9 clock made sense.

I like the clock symbol showing while it is waiting.

I take it manual start stop no longer exists?
 
Manual start stop still works. You can start the charge even before the start time and it will continue to charge until end time. You can stop the charge during the charge interval but it will turn back on within 1 minute.
 
I will have to wait upon receipt of the real time clock but without it the start stop button is inop. The menu selection works fine.
 
I am hoping to have m opent EVSE working for the Jan 5 meeting. I guess it depends on how fast Adafruit ships my priority mail package.
 
I pulled the download because it does not work the way I expected it to. Firstly, the car does not charge if it never enters the charge state even if it is enabled by button later on. Also, the way I am stopping the car seems to confuse the car and the "stopped" way that was implemented before seems to be a better/working way.

I need help in understanding what the car expects and how the EVSE should respond. I am using the EV simulator and it doesn't quite respond to state changes the same way. Sorry!

On the wiki, I see the following sequence:
The Sequence is: EVSE starts at 12V solid no square wave. Connect to EV. EV pulls voltage down to ~9v. EVSE turns on pilot +12 - -12 1khz. EV pulls voltage down to ~6v when ready to charge. EVSE energizes the AC lines. When finished charging EV returns voltage back to 9v. EVSE opens AC lines.

What is the safest way I should keep the pilot signal at when the car is plugged in and wants to charge but should not charge? Should I keep the pilot signal disabled? 0V?
 
goldserve said:
What is the safest way I should keep the pilot signal at when the car is plugged in and wants to charge but should not charge? Should I keep the pilot signal disabled? 0V?

Should be 12v steady. No 1khz square wave. When EVSE is ready start the pilot wave.
 
Is there a state in the existing firmware that has 12v steady? I see that when it is disabled, no voltage is present and that is how the toggle enable/disable button works.
 
goldserve said:
Is there a state in the existing firmware that has 12v steady? I see that when it is disabled, no voltage is present and that is how the toggle enable/disable button works.

Yes, State A is pilot high no PWM. The pilot stays off until it is pulled down to 9v by the EV. If a timer is waiting than the
EVSE should leave the pilot off. When the timer activates the pilot should start. EV will then pull the signal down to 6v and charging should begin.
 
Using the DS3231 RTC chip:
http://www.l8ter.com/?p=417" onclick="window.open(this.href);return false;

But the breakout board is a bit expensive
https://www.loveelectronics.co.uk/products/137/ds3231-real-time-clock-Module" onclick="window.open(this.href);return false;

This surface mount chip appears to be about $10, with a price break at Q25.
http://www.maximintegrated.com/datasheet/index.mvp/ver/F/id/4627/t/or?ver=F&utm_expid=50713806-2&utm_referrer=http%3A%2F%2Fwww.maximintegrated.com%2Fdatasheet%2Findex.mvp%2Fid%2F4627%3Fver%3DF#Price%20and%20Availability" onclick="window.open(this.href);return false;

Maybe Mouser carries it... Several...
http://www.mouser.com/Mobile/Semiconductors/Clock-Timer-ICs-Analog/_/N-4k35s/?Keyword=DS3231" onclick="window.open(this.href);return false;

Maybe this one for $8.35 Q1, $5.85 Q25????
http://www.mouser.com/Search/m_ProductDetail.aspx?Maxim-Integrated/DS3231S/&qs=sGAEpiMZZMtpeOq/1QMb1dMUzmKwAGb5LuG0x5vGz%252b8=" onclick="window.open(this.href);return false;

But some have less pins...??
 
Manual start stop does indeed work. It just works slightly different. The EVSE has to be plugged in for it to work now.

I left my test unit on over night with no problems. It looks really good.

I will have my test unit at Cerritos. Hopefully with a real time clock installed. In any event it works well enough to demo without it.
 
I just compared 1.03 and your build. The difference I see is that 1n 1.03 when you push stop the square wave is removed and the pilot remains at a minus voltage. Your stop is like 1.03's ready. The pilot voltage changes but the square wave remains.

I can testify that the leaf will start charging when the square wave reappears. I have a delay timer that pulses the button for stop and start.

My main unit has the timer triggered by the nc contacts of the button. If I want to charge without delay I just plug the car in. If I want an 8 hour delay I push the button to stop. This also triggers the timer and 8 hours later it pulses the button to shift to start.
 
For all of you located in CA, I found the manufacturer of the "ChronoDot" that uses the more accurate DS3231 Maxim chip.

They cost $14.99 from them, and they are located near San Francisco, so shipping cost will be less, and delivery likely quicker :)

http://macetech.com/store/index.php?main_page=product_info&cPath=5&products_id=8" onclick="window.open(this.href);return false;

They also posted links to the Opensource design, if you want to send out to OSHPark and have PCBs made... Not that it's worthwhile to do so.
 
Back
Top