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.
borland said:
I don't see how you could run out of resources without getting compile errors.

I've only reviewed the source code briefly, but there's a warning about letting the watchdog timeout...

Code:
#ifdef WATCHDOG
  // WARNING: ALL DELAYS *MUST* BE SHORTER THAN THIS TIMER OR WE WILL GET INTO
  // AN INFINITE RESET LOOP
  wdt_enable(WDTO_1S);   // enable watchdog timer
#endif // WATCHDOG

WATCHDOG is not enabled by default.

There are 2 types of memory RAM and EEPROM. If the code fits in EEPROM it will compile without errors, however there is no warning that when the code is executed that RAM capacity could be used up. Yes, the code fits in EEPROM but I believe we have a RAM problem.
 
At first, I thought it was a resource problem and isolated it down to a single line of code that I can disable and enable and see it work and not work but as I enabled back that line and took away code from somewhere else, the experiment was inconclusive and i could not find a resource limit that when crossed, it would not work. Do you know how much RAM we have? It says we are using ~1438 bytes.

There is one thing thing I think we can disable and get everything else to still work. I am going to compile out the Auto Start menu item and that will save a few bytes. Everytime I've done that, it has started no problems. The funny thing is that now I have everything that Chris has on my test board and it will start 10 out of 10 times. Why is there varying code execution between devices?
 
I am finding it difficult to find the various versions and their library versions.
Can you provide links direct to the OpenEVSE soruce for each of these, please?

1.0.5
1.0.8
1.0.9

1.6.0
1.6.1

Did I miss any important version?
Thanks, Gary
 
gary,

To get access to the specific versions, you need to get them at github. There needs to be more testing before they are deemed stable and can be zipped up along with HEX files to distribute. To find the libraries, you can find the latest at github again. Do a search for "LiquidTWI2" and you will find lincomatic/LiquidTWI2 repository and you can download the latest library files there.

Chris,

Did you find an issue with no LCD connected and 1.0.9? It seems like m_LCD.print still calls the LiquidTWI2::write library which still has the while EndTransmission loop which should still cause the system to hang.

Also, there is a delay(50) in the LiquidTWI2 library and maybe that is where the delay for reliable LCD detection should be changed?

Code:
void LiquidTWI2::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
  // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
  // according to datasheet, we need at least 40ms after power rises above 2.7V
  // before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
  delay(50);
 
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 file name should be self explanatory on which features are included. BTN menu by 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
 
Looks like 1.0.9 fw is here, but nothing obvious says that :
https://github.com/lincomatic/open_evse" onclick="window.open(this.href);return false;

Where are the previous versions (links please)?

Where are 1.6.1 and 1.6.2
Apparently it is obvious to you, but not to me.

Links, please?
 
If you go to commits, you can see previous changes and get those specific revisions. By default, you will get the HEAD which is the latest and greatest. Same with the RTC project. You can see all the changes that went into the project from the time 1.6.0 was submitted.

https://github.com/goldserve/openevse_rtc/commits/master" onclick="window.open(this.href);return false;
 
Nothing on the linked page mentions 1.6.1 or 1.6.2

You know what is where, and what files are needed,
but others, including myself, do not

Is the entire source now in an ".ino" file, whatever that is?

Is it difficult to create a zip file of all the files needed
for each version, and provide a link to download it?

Or, perhaps a list of links to all the files and libraries
needed for each version?

If that is too difficult for you to do in just a few minutes,
It is virtually impossible for a gitlib novice to do.

Please???
 
When you go to the files tab, it shows you the files that are in the most recent version. I've found the most reliable way to see the version is to click on the "open_evse.pde" file and read the source code. For example, at the time of this post, if you go to https://github.com/lincomatic/open_evse" onclick="window.open(this.href);return false; and click on the Files tab, then click on "open_evse.pde", the code will show in your browser, and on line 37 it says: prog_char VERSTR[] PROGMEM = "1.0.9"

You can also see older older versions. From that same files tab, don't click on "open_evse.pde", but instead, there's a link that is currently labeled "39 commits". Click on that and you'll see a listing with a brief description of the various commit. Unfortunately, it doesn't list the version, but each commit has a "browse code" link which you can click and see the "open_evse.pde" file within.

I appreciate how you ask those questions that we're each embarrassed to ask, for the benefit of others.

Harry
 
Chris in an email to me said the EVSE ran fine with CLI disabled. I loaded the default Audrino file and it worked from the programmer but not with the PS suppling power. I think the lack of memory is overwriting the setup instructions.

I then loaded goldserve's hex file with CLI disabled and it is just fine and stable. Chris (the father of this project) has nailed the problem.

CLI is something I have played with but unless there is a full time computer hooked to the EVSE it is not needed.

At this time I will go with Chris's advise.


I found a ChronoDot from macetech in my mailbox today. I can confirm that it works fine. It is easier to interface since the layout is GND +5V SCL SDA. That means it is easy to construct an inline setup.
 
Yeah, the memory issue will be hard to track down because roughly 1.4K of 2K memory is taken up but there is still heap and stack usage during runtime. One could debug using the 1-wire JTAG or find some ATMEGA328P emulator that we can run the program though and see what it is doing in terms of memory usage.
 
Chris's new OpenEVSE shield w/AdaFruit momentary pushbutton added (blue ring)

OpenEVSEShield.jpg


AdaFruit RGB display w/ChronoDot being tested (works fine).

D90C3B74-3B45-45A4-9C6E-B600CC97792E-10793-000005261102C9EA.jpg
 
Chris,

Do you have the shields for sale? I could use another, and i don't mind if they don't have the RTC chip on there...
 
Well after testing on my test EVSE for a week I installed Ver 1.62 w/ no CLI on my main unit. We will see how it goes but it looks good right now.

timerinstall_zpsc9267ed7.jpg


rtctimer_zps389ad003.jpg
 
Nothing on the linked github page mentions 1.6.1 or 1.6.2

Is the entire source now in an ".ino" file, whatever that is?
I expected to find a ".pde" (sketch) file.

what am I missing?

Is it difficult to create a zip file of all the files needed
for each version, and provide a link to download it?

Or, perhaps a list of links to all the files and libraries
needed for each version?

Please???
Thanks
 
The Arduino software uses ".ino" as the default extension. Maybe it used to use ".pde", and that's why the first versions of Open EVSE firmware have that extension, I don't know, but ino and pde files are plain ol' text, so don't let the extension should throw you off.

At the time of this post, the RTC branch of Open EVSE is at version 1.6.2, which you can't immediately see at that link, but you can see by clicking on the INO file and viewing the source code in your browser -OR- you can click on the "9 commits" link (which will change to 10 commits, 11 commits, etc as new versions are deposited) to see any previous version.

There is also a button on that page to download all the files of that particular version as a ZIP file. This is convenient when there are lots of files, but in this case, there's just the one file, "openevse_rtc.ino".

I haven't put this RTC branch of the firmware on my OpenEVSE board, but I'm pretty sure just like the non-RTC OpenEVSE firmware it will also need the Time and LiquidTWI2 libraries that I linked to in this post.
 
For some reason the file was changed to ino in the ver 1+. It will rename a pde file when it loads.

I have found the the ino file works fine in .0023 if you rename it to file.pde.

It may be that by now all of the libraries have been converted but a while back Adafruit advised to use the earlier versions. .0023 has worked fine for me on the OpenEVSE and LeafCAN files.
 
Back
Top