Page 2 of 2

Re: ESP32 Based Chademo

Posted: Sun Jul 23, 2023 2:20 pm
by Ev8
Still very happy with it though Jamie charge initiates perfectly

Re: ESP32 Based Chademo

Posted: Sun Jul 23, 2023 2:45 pm
by Bigpie
I think I had the same issue on the way here and had to switch to my backup Due, the SoC was over 100% and the osprey chargers refused to work.
Always works fine on local chargers :D I think I've got a couple of messages mixed up, 102, byte 6 should be the SoC (I think) and 100 byte 6 should be 100 for 100%. I've got them the other way round.

Re: ESP32 Based Chademo

Posted: Tue Jul 25, 2023 7:02 pm
by Bigpie
Just pushed v1.1 correcting the swapped messages. Still having issues with the BYD instavolts though. Going back with can logger this week.

Re: ESP32 Based Chademo

Posted: Tue Jul 25, 2023 8:08 pm
by arber333
Bigpie wrote: Tue Jul 25, 2023 7:02 pm Just pushed v1.1 correcting the swapped messages
Hey! I made some mistakes on my VCU and i had to reorder corrections.
Can you tell me about use of the MCP2515_INT pin? Do we really need this or can we ommit it?

tnx

Re: ESP32 Based Chademo

Posted: Tue Jul 25, 2023 8:34 pm
by Bigpie
You can do without and just poll instead,, depending on library used.

Re: ESP32 Based Chademo

Posted: Sat Nov 25, 2023 12:13 am
by OutlanderMatt
Hey, great work and good to see the esp32 being implemented for this.

I have added a range extender pack to my 2015 outlander so taken the EV range up to wound 140kms so pretty happy with that.

I have purchased the boards and all the hardware and are currently setting up a test setup for this. I am currently getting communication back from the IVT-S shunt however the Voltage and Current seem to be all over the place ranging from large high numbers to negative numbers. If I remove any of the wires both CAN and Power it stays with the reading it has and then keeps going once I put the wire back in. This tells me it is communicating and the ESP32 is getting values from it or at least from the CANBUS.

I have attached a screenshot and would like any help if possible on getting this stable.

Currently its on a test board with 12V power and the same 12V on the voltage input terminal.
ivt-s info.jpg
Thanks, Matt.

Re: ESP32 Based Chademo

Posted: Sun Nov 26, 2023 4:12 am
by OutlanderMatt
OutlanderMatt wrote: Sat Nov 25, 2023 12:13 am Hey, great work and good to see the esp32 being implemented for this.


Thanks, Matt.
So seem to have got this sorted by changing the Endian order and reversed it. Screenshot of code fix attached.
Readings Fixed.jpg

Re: ESP32 Based Chademo

Posted: Sun Nov 26, 2023 8:12 am
by Bigpie
Sorry, somehow missed this.
From new the ISA shunt uses big endian and doesn't output as much data https://openinverter.org/wiki/Isabellen ... te_Heusler has instructions to swtup

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 10:57 am
by OutlanderMatt
Bigpie wrote: Sun Nov 26, 2023 8:12 am Sorry, somehow missed this.
From new the ISA shunt uses big endian and doesn't output as much data https://openinverter.org/wiki/Isabellen ... te_Heusler has instructions to swtup
Thanks for your reply. That would explain why I am not getting very far. I can get it to charge and for the most part seems to respond however Soc, Kwh etc isnt working. I will see if I can get my hands on a DUE and setup the shunt. Could this be done on a Mega? Also I am getting Voltage and Current from the Shunt at present.

Could this also explain why the current isnt ramping down when the voltage gets up to the target voltage? Seems to reach target voltage and then just shutdown?

Thanks, Matt.

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 11:02 am
by Bigpie
It's not coded to do so, it's pretty much the same code as other implementations ported to ESP32. I get to about 90% with this implementation, but wouldn't take much effort to implement a ramping down.

Shouldn't need a DUE specifically, just need to send a few can messages.

Code: Select all

void ISA::initialize()
{
  

	firstframe=false;
	STOP();
	delay(700);
	for(int i=0;i<9;i++)
	{
	
Serial.println("initialization \n");
	
	outframe.id = 0x411;      // Set our transmission address ID
        outframe.length = 8;       // Data payload 8 bytes
        outframe.extended = 0; // Extended addresses  0=11-bit1=29bit
        outframe.rtr=1;                 //No request
        outframe.data.bytes[0]=(0x20+i);
        outframe.data.bytes[1]=0x42;  
        outframe.data.bytes[2]=0x00;
        outframe.data.bytes[3]=(0x60+(i*18));
        outframe.data.bytes[4]=0x00;
        outframe.data.bytes[5]=0x00;
        outframe.data.bytes[6]=0x00;
        outframe.data.bytes[7]=0x00;

	   canPort->sendFrame(outframe);
     
       if(debug)printCAN(&outframe);
	   delay(500);
      
       sendSTORE();
       delay(500);
     }
    //  delay(500);
      START();
      delay(500);
      ah=As;
      kwh=wh;

                      
}

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 11:20 am
by OutlanderMatt
Bigpie wrote: Thu Nov 30, 2023 11:02 am It's not coded to do so, it's pretty much the same code as other implementations ported to ESP32. I get to about 90% with this implementation, but wouldn't take much effort to implement a ramping down.

Shouldn't need a DUE specifically, just need to send a few can messages.
I guess I could use the current board as it is all connected to run the initialisation? Just need that code and the setup for the CANBUS on the correct port? Or should I add this to the existing code?

I was thinking of writing some ramping down code to impliment when it gets within 1-2V of max voltage. Currently trying to work my way through your code and decipher all the peices. Fairly new to coding this stuff however I did get my range extender working but this is a little above what I had to do for that, still learning as they say

:)

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 11:32 am
by Bigpie
Could do either way, adding an initialise to the current code would be nice.

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 11:36 am
by OutlanderMatt
Bigpie wrote: Thu Nov 30, 2023 11:32 am Could do either way, adding an initialise to the current code would be nice.
I gather that would initialise each time it started up then huh?

Where would be the best place to put it? Could come after sendStatusToVCU()? I havent changed anything so can1 should be the can for the shunt.

Is that code you posted the exact code or does it need some massaging? I can give it a crack at a charging station tomorrow

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 11:54 am
by OutlanderMatt
OutlanderMatt wrote: Thu Nov 30, 2023 11:36 am I gather that would initialise each time it started up then huh?

Where would be the best place to put it? Could come after sendStatusToVCU()? I havent changed anything so can1 should be the can for the shunt.

Is that code you posted the exact code or does it need some massaging? I can give it a crack at a charging station tomorrow
Doesnt seem to like that function

error: no declaration matches 'void ISA::initialize()

Re: ESP32 Based Chademo

Posted: Thu Nov 30, 2023 12:21 pm
by Bigpie
Ive pushed some completely untested code that should initialise the shunt from the web interface but may not :D

Re: ESP32 Based Chademo

Posted: Fri Dec 01, 2023 1:51 am
by OutlanderMatt
So the initialise worked but I think something is up with web interface files as the esp got very laggy and would keep dropping the web connection etc and I struggled to upload the files. If could be in the main code, started to check that out but then had to head to a job

Ended up re-loading previous files and web interface onto a new esp32 and seems to be working so far. Now I have Kw and AH counting up etc too.

Off to the charger soon to test it out. Just trying to write a little ramp down code for when its getting up to its max so just getting my head around all of that. :)

Re: ESP32 Based Chademo

Posted: Sun Dec 03, 2023 9:05 pm
by OutlanderMatt
Testing is proving great and also implemented a ramp down feature to go from CC to CV and seems to be working well. Just added in the complete shut down after it gets below the minimum charge current so will test that today.

Have been playing with the web pages just to make them look a bit nicer on my Android screen in the car. I have managed to work out all the colours and font sizes etc so am playing around with them at the mo but cant seem to find how to charge the background of the gauges to Black?

Have done quite a bit of searching and cant seem to fine where this setting is for the gauges. Seem to find all the other settings, just not the one it want :x

Any help with this would be great

Thanks, Matt.

Re: ESP32 Based Chademo

Posted: Sun Dec 03, 2023 9:10 pm
by Bigpie
Awesome. Do a PR for the ramp down. Can't remember off hand how to change the background. Will have to check tomorrow

Re: ESP32 Based Chademo

Posted: Tue Dec 12, 2023 4:46 am
by OutlanderMatt
Charging been going well. Am sending across my BMS data finally and updating Soc and is working well. Ramp down and shut down working so last thing will be the ramp down when battery temps or cell voltages get high etc. Just working out what that needs to be.

With regards to powering the ESP32, I see the board doesnt have any connection to 3.3V or 5V. I gather the reason for this is that reading up on the esp32's they dont have the power switching/protection like the Arduino's do.

Hopefully not a dumb question but how has everyone powered their esp32. Just playing with some different ideas now so I can still retain the USB for monitoring when required.

Thanks, Matt.

Re: ESP32 Based Chademo

Posted: Tue Dec 12, 2023 6:23 am
by Bigpie
It should, the first iteration had an error.on the board. The use a usb cable with the 5v cut

Re: ESP32 Based Chademo

Posted: Tue Dec 12, 2023 6:25 pm
by OutlanderMatt
Bigpie wrote: Tue Dec 12, 2023 6:23 am It should, the first iteration had an error.on the board. The use a usb cable with the 5v cut
Ok thanks. I must have got the older file as there was definitely no connection to 3.3V or 5V. I guess it’s preferable to use the 3.3v?

Also did you get a chance to find out how to change the background colour of the gauges?

Currently just updating code to send remaining charge time to charger (not that it really matters) and testing the ramp down for the temps/cell voltages etc but all seems to be going very well 🙂

Re: ESP32 Based Chademo

Posted: Tue Dec 12, 2023 6:50 pm
by Bigpie
I connected the 3.3v
In gauges.js theres a backgroundColor property on the gauges, might be worth having a look at that, not sure, not had chance to look properly

Re: ESP32 Based Chademo

Posted: Tue Dec 12, 2023 7:17 pm
by OutlanderMatt
Ok thanks. Yes I jumpered the 3.3V to get it all working and seems to run well.

I’ll take a bit more time looking at the gauges and see what I can find :)

Re: ESP32 Based Chademo

Posted: Fri Dec 15, 2023 11:34 pm
by chentron
hi, the Isabellenhutte needed for this project is the U3 or U0 version ? In other words... needs to read voltage ? I can get one from a ipace but it looks it is the U0 version.

Re: ESP32 Based Chademo

Posted: Sat Dec 16, 2023 7:37 am
by Ev8
Yes it needs to read voltage so the u0 version is no use