Upgrading OpenEVSE / EmonEVSE Controller Firmware using ISP programmer

I’d like to upgrade mine too but there doesn’t seem to exist a ‘Programming the OpenEVSE for Dummies’ documentation available anywhere.

I’m assuming I just need some (yet to be determined) software on my Linux or Win10 laptop, that board you highlighted and a USB cable to join the two, connect to a disconnected OpenEVSE, point the software to the firmware location and hit upload or something.

However, the wife won’t be pleased if I brick it and she can’t charge her beloved Zoe.

This article looks quite promising. Just the actual ISP programmer is something I’m wondering. If it’s not the one I linked earlier, will pretty much any programmer from eBay work, as long as it contains 6 pin connector for the OpenEVSE module?

The firmware looks like it’s for the EU. Is that firmware also available for the US?

A little old but is still the process I use.

Paul

1 Like

No, that’s a USB > UART programmer. This is an ISP programmer:

https://www.amazon.co.uk/USBasp-Programmer-Cable-Arduino-Programming/dp/B01CPZ52MI

This is the correct guide to follow:

Avrdude on Linux is my preferred way, as documented in the readme:

avrdude -p atmega328p -c usbasp -P usb -e -U flash:w:firmware.hex

Pre compiled EU firmware for OpenEVSE and EmonEVSE can be downloaded from here: GitHub - openenergymonitor/open_evse: Firmware for OpenEnergyMonitor OpenEVSE

2 Likes

So only the openevse.hex file is required on Windows as well as Linux?

The flash.bat file referred to does some other stuff as well.

Anyway, I also have a laptop with Linux so will probably use that instead of Win 10.

All,

Have successfully updated the firmware today now running 7.0.2EU
I use the https://smile.amazon.co.uk/gp/product/B07DLZPV7Q/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 as it performs both functions should I need the TTL side at some point.
The commands I used are all done on a Win10 PC from the command prompt

avrdude -c stk500v2 -P COM14 -p atmega328p -U eeprom:r:oldevse.hex:i

This makes a copy of the eeprom to file oldevse.hex

Then

avrdude -c stk500v2 -P COM14 -p atmega328p -U flash:r:oldevse1.hex:i

This makes a copy of the flash to file oldevse1.hex

Then I flashed the new one in with
avrdude -c stk500v2 -P COM14 -p atmega328p -U flash:w:openevse.hex

After a power cycle and all is good :slight_smile:
Not 100% sure what all the changes were between V5 and V7 but I have them now.

John

1 Like

OK, went to do this just now and find that the ISP1 connector on the board has six pins and the device I bought (the USBasp) has 10 pins on the cable.

I’ve no idea as to the orientation and/or which six are supposed to connect. Help!

Hi,

this is the conversion

image

And this is the orientation on the board as mounted in the unit

image

John

So the cable that came with the USBasp unit (I bought the one linked above) can’t be used?

Sorry, no you would have to use individual cables. If you want an easy solution then buy the one I linked above as it comes with a 6 way cable and just plugs straight on. Or buy some individual wires and connect them as per the diagram I posted. I can confirm that with the above board and included cable it was very easy :slight_smile:

John

Does the board need to be powered up somehow or are the six pins connected enough?

I’ve connected to the unit with the front removed but no power obviously and I’m getting an invalid signature message back (0x000) when using avrdude.

Hi,

I did mine with the power on as the programmer can provide power but you have to play about with the config to tell it to do that and I did not feel I wanted to bother doing that. Just do not touch the mains connectors :slight_smile:

John

1 Like

Bought a 10 pin to 6 pin adapter and finally completed the task today.

I did it carefully with the unit still powered on and all went fine.

Thanks for all that helped.

Glad you sorted it, the next one will be easier :slight_smile:
John

Delayed reply but hopefully useful for others.
US firmware: Releases · OpenEVSE/open_evse · GitHub
EU firmware: Releases · openenergymonitor/open_evse · GitHub

Differences in the EU versions (extracted from open_evse.h in the source code archive) are:-
// - Disable AUTOSVCLEVEL (autodetection is designed for split-phase)
// - Charging level default to L2
// - Set MAX_CURRENT_CAPACITY_L2 32 (European Limit)
// - Add ‘.EU’ to version number
// - Enable LCD Re-draw every couple of min (required for EMC/CE)

1 Like

Excellent instructions from @JJC. Thank you John.

@BrianD Thanks :slight_smile:

John

@JJC @glyn.hudson

I’ve been trying to update my openevse firmware today without any joy.

Initially I bought the programmer recommended by Glynn, but as noted here, the connector doesn;t match that on the openevse. It seemed it was going to cost almost as much to get a set of individual leads to make the connection as to buy the one that JJC recommended, so I got that. However, that isn’t recognised when I plug it into my windows 10 PC (USB C - USB adapter). And I wasn;t able to figure out how to install a driver for it as the ‘Zagig’ programme doesn’t see it. I’m also not clear on how much of the instructions posted by Glynn (How to Load OpenEVSE Firmware (WinAVR) - OpenEVSE) I’m supposed to follow as they don’t seem to match what other people are doing.

As there was a flashing light on the programmer I did try running the AVRdude line, but just get the following error:

Command:
C:\Users\Rachel\Dropbox\Home\House\EnergyStuff\OpenEvSEFirmware>avrdude -c stk500v2 -P COM14 -p atmega328p -U eeprom:r:oldevse.hex:i
Response:
avrdude: ser_open(): can’t open device “\.\COM14”: The system cannot find the file specified.

I’m guessing that’s because there isn’t a driver installed, but I’m not much of a nerd in this area!

So having failed with that programmer, I then remembered my son had some leads from an old electronics kit and managed to patch up the programmer Glyn recommended using JCCs diagram. I also downloaded the driver from the instructions in the guide Glynn listed and seemed to be able to install that OK. HOwever, when I try to run Glyn’s command line I get this:

Command:
C:\Users\Rachel\Dropbox\Home\House\EnergyStuff\OpenEvSEFirmware>avrdude -p atmega328p -c usbasp -P usb -e -U flash:w:openevse.hex

Response:
avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

So I’m not clear whether that’s just a connection issue or something more as I’m pretty sure my wiring is right and making contact.

Can anyone help?

Regards
Rachel

Hi Rachel,

have you get the EVSE powered on? This is the easiest way but you need to be careful :slight_smile:
If not then you need to alter the software config so the programmer board provides the power but found it was easier to just power the EVSE up.

Also the line I used was
avrdude -c stk500v2 -P COM14 -p atmega328p -U eeprom:r:oldevse.hex:i

but the COM14 may change depending what port your PC allocates to the programming board

Then

avrdude -c stk500v2 -P COM14 -p atmega328p -U flash:r:oldevse1.hex:i

This makes a copy of the flash to file oldevse1.hex

Then I flashed the new one in with
avrdude -c stk500v2 -P COM14 -p atmega328p -U flash:w:openevse.hex

John