Upgrading OpenEVSE / EmonEVSE Controller Firmware using ISP programmer

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

Thanks John,

My PC doesn’t seem to recognise the programmer board being plugged in - I have no idea what if any COM port it is being assigned to. Is there a way to find this out (assuming it’s being recognised at all?)

I have tried it both ways - powered and unpowered!

Rachel

Rachel,

What OS are you using on your PC?
What cable are you using to connect the PC to the programmer board?

John

You might find some helpful information here: Learn→Electricity Monitoring→Programmers

Rachael, if you are using Windows 10, then right click on the start button and select device manager. Then have a look at the COM ports entry. I found it added two on mine, COM3 and COM4, I found that COM3 didn’t work but COM4 did for John’s command lines.

Pete

I have “Successfully” done the upgrade to 7.1.3 following John’s instructions and also updated the WiFi to version 4.1.1.

I put “Successfully” in quotes, because I think I may have messed up a bit. I am now restricted to 24 Amps, and I think I may have mistakenly downloaded the US version from GitHub. There was a file called EEPROM_24.bin which I also programmed - it seemed the right thing to do because that operation was also listed in flash.bat - but now I think it was a mistake.

So how do I get back to 32 Amps now? I found the correct UK version, but there is no EEPROM file in that one. Will it revert to the correct limit if I re-flash openevse.hex ? Or is there some way I can change that limit from the UI?

Thanks,

Pete

Pete,

if you followed my instructions fully you will have created backup files that you could re-load taking you back to before you started. At this point you could start again and I hope all should be good.

John

That sounds like a plan, I did indeed create the backup files as per your instructions. As it’s now getting dark out there, I’ll leave taking the cover off again today, and have a go next time I have a gap in my work schedule, I can live with the 24A limit for a week or so if necessary.

Thanks,

Pete

Oh dear, I think I do need some help now, I seem to have gone backwards instead of forwards :frowning:

I had some time today, so decided to see if I could re-flash it and get my full 32Amps back again. I followed your instructions, John, and re-flashed it back to the old version before I messed up last time by putting the US version in. This worked fine, I got my 32A back and it was reporting 5.1 EU (or something similar).

So next I flashed it with 7.1.3EU which I got from the right (I hope) GitHub repository this time. I flashed the file openevse.hex - was this the right one?

Programming seemed to go ok, except that it reported some fuses had been changed, did I want to put them back? I answered no, on the basis that they should be set however that hex file specified them. Is this where I went wrong?

Now the display on my charger is completely blank, and no response to ping or web access from the wi-fi (which I didn’t modify this time).

I tried to flash it again, either with the old version or the new new one, but now I get:


avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

I tried the -F override suggested, and then I get the additional messages:


avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F

Have I somehow managed to destroy my processor chip?
I now have a dead charger I cannot use. I have 80% in the car, which is good for 200 miles or so this time of year, and fortunately I don’t have any long trips planned in the next week or so, but it would be good to get it working again.

Can anyone suggest how I should proceed from here?

Thanks,

Pete

@PeteBee

I hope that there are no major issues, the responses that you are getting make me think the board has no power. can you “carefully” with the unit powered up check if you have 12V on the 12v connections. Also check that you have not disturbed the 240v connections on the left side of the board and that they have power.

John