Mitsubishi outlander charger and DC:DC

Mitsubishi hybrid drive unit hacking
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

IT'S WORKING!!!!! :o
It only took me two days but I finally got the ac charger working. :)

I connected the PP lead from the Leaf charger socket to ground via a 220R resistor
The CP lead goes to the charger pin 9
Hooked up the HV leads to the switched side of the contactors.
Connected the low voltage connector as described.
Plugged in the granny charger and as expected nothing as I hadn't sent any CAN messages yet.

I tried using Arber333's code but couldn't get it to work. I don't have his shield so maybe that was the reason, I'm not sure but decided to try sending the CAN messages mentioned earlier in this thread and after a few hours tweaking someone elses code it's now working.

The messages sent were
msg ID 0x285 data 00 00 B6 00 00 00 00 00 every 100ms
msg ID 0x286 data 28 0F 78 37 00 00 0A 00 every 800ms

A massive thanks to Arber333, Dilbert and bobby_come_lately and all the others for hard their work on this.

I don't have any cooling yet so didn't leave it charging for long but saw the battery pack voltage rising from 350V to 351V.
I still need to confirm it will cut off at 390V as Arber333 said it should but I'm not sure I have everything connected correctly for this to happen.

This is where I found the Due sketch that I adapted. https://github.com/49thdiver/EV-Project ... in/OBC/src
And this is the thread where I found out about it. https://www.mynissanleaf.com/viewtopic. ... &start=200

edit
If anyone is interested, the libraries and sketch required to make this work are here
https://github.com/Alibro53/Outlander-PHEV-AC-Charger
Warning! Read Arber333 last post about the charging voltage. This will charge your batteries up to approx 420V if you do not manually stop it.
I need a bigger hammer!
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

Alibro wrote: Wed Jul 13, 2022 5:30 pm IT'S WORKING!!!!! :o
It only took me two days but I finally got the ac charger working. :)

I connected the PP lead from the Leaf charger socket to ground via a 220R resistor
The CP lead goes to the charger pin 9
Hooked up the HV leads to the switched side of the contactors.
Connected the low voltage connector as described.
Plugged in the granny charger and as expected nothing as I hadn't sent any CAN messages yet.

I tried using Arber333's code but couldn't get it to work. I don't have his shield so maybe that was the reason, I'm not sure but decided to try sending the CAN messages mentioned earlier in this thread and after a few hours tweaking someone elses code it's now working.

The messages sent were
msg ID 0x285 data 00 00 B6 00 00 00 00 00 every 100ms
msg ID 0x286 data 28 0F 78 37 00 00 0A 00 every 800ms

A massive thanks to Arber333, Dilbert and bobby_come_lately and all the others for hard their work on this.

I don't have any cooling yet so didn't leave it charging for long but saw the battery pack voltage rising from 350V to 351V.
I still need to confirm it will cut off at 390V as Arber333 said it should but I'm not sure I have everything connected correctly for this to happen.

This is where I found the Due sketch that I adapted. https://github.com/49thdiver/EV-Project ... in/OBC/src
And this is the thread where I found out about it. https://www.mynissanleaf.com/viewtopic. ... &start=200
No it will not stop up to 400Vdc. You must either have a BMS to trip the charger or use the charger can report from my code to stop the charger by removing 0x285 heartbeat message. Read through my outlander charge code i am sure you can even improve on it.
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

Thanks mate, I'll add it to the to-do list to look at it again.
I have a Nissan Leaf BMS working with my eGolf batteries (plus 2 modules to make 96 cells) but have not checked what would happen when the batteries are charged. So far all I have managed to do with it is to monitor the cells on LeafSpy.
I'm sure I'll figure out a way to stop the charging before it goes too high.
I need a bigger hammer!
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

If anyone is interested, the libraries and sketch required to make this work are here
https://github.com/Alibro53/Outlander-PHEV-AC-Charger
Warning! Read Arber333 last post about the charging voltage. This will charge your batteries up to approx 420V if you do not manually stop it.
I need a bigger hammer!
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

Alibro wrote: Wed Jul 13, 2022 8:38 pm Thanks mate, I'll add it to the to-do list to look at it again.
I have a Nissan Leaf BMS working with the eGolf batteries (plus 2 modules to make 96 cells) I have but have not checked what would happen when the batteries are charged. So far all I have managed to do with it is to monitor the cells on LeafSpy.
I'm sure I'll figure out a way to stop the charging before it goes too high.
Just dont get distracted with the charger on.
Seriously, use the can report from charger. Its just one byte and its accurate up to 2V, but it gets the job done without outside systems. Keep your BMS as a safety net but set your VCU with control loop for charger report.
Remember you need two equasions to solve two unknowns...
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

arber333 wrote: Wed Jul 13, 2022 8:44 pm
Alibro wrote: Wed Jul 13, 2022 8:38 pm Thanks mate, I'll add it to the to-do list to look at it again.
I have a Nissan Leaf BMS working with the eGolf batteries (plus 2 modules to make 96 cells) I have but have not checked what would happen when the batteries are charged. So far all I have managed to do with it is to monitor the cells on LeafSpy.
I'm sure I'll figure out a way to stop the charging before it goes too high.
Just dont get distracted with the charger on.
Seriously, use the can report from charger. Its just one byte and its accurate up to 2V, but it gets the job done without outside systems. Keep your BMS as a safety net but set your VCU with control loop for charger report.
Remember you need two equasions to solve two unknowns...
I'm 100% the sort of person who would start charging and forget about it so automating this is a priority.

Any suggestions why I couldn't see any CAN from your code?
Does the Due need to see the PP signal before it sends code?
Do I need a shield like yours to make it work?
Have you any circuit diagrams of your setup?

Thanks
I need a bigger hammer!
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

Alibro wrote: Wed Jul 13, 2022 10:04 pm
I'm 100% the sort of person who would start charging and forget about it so automating this is a priority.

Any suggestions why I couldn't see any CAN from your code?
Does the Due need to see the PP signal before it sends code?
Do I need a shield like yours to make it work?
Have you any circuit diagrams of your setup?

Thanks
Arent we all 😁...

I dont think you need my shield for this to work, its just easier with it.
DUE has 2 CAN bus connections. Try to see which one did you use and declare accordingly. Default is CAN0.
PP signal should declare EVSE connected. It is a request for 0x286 msg.
0x285 is present all the time via an interrupt routine. Like a heartbeat msg. It is also required to operate the inverter, heater and AC compressor...
After PP pin gets pulled low CP pin is activated and pulles in a CP relay (redundant with outlander charger).
DUE is listening for charger temperature and voltage all the time.
BMS input just makes 0x285 msg say all 00 00
evMacGyver
Posts: 108
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 19 times
Been thanked: 5 times

Re: Mitsubishi outlander charger and DC:DC

Post by evMacGyver »

Alibro wrote: Wed Jul 13, 2022 8:43 pm If anyone is interested, the libraries and sketch required to make this work are here
https://github.com/Alibro53/Outlander-PHEV-AC-Charger
Warning! Read Arber333 last post about the charging voltage. This will charge your batteries up to approx 420V if you do not manually stop it.
Interesting, these are different than on Wiki:
//285 8 bytes including prun & crc
byte message285_0[8] = {0xa4,0x40,0xAA,0x00,0xDF,0xC0,0x00,0x76};
byte message285_1[8] = {0xa4,0x40,0xAA,0x00,0xDF,0xC0,0x01,0xf3};
byte message285_2[8] = {0xa4,0x40,0xAA,0x00,0xDF,0xC0,0x02,0xf9};
byte message285_3[8] = {0xa4,0x40,0xAA,0x00,0xDF,0xC0,0x03,0x7c};
//286 8 bytes no prun or crc
byte message286[8] = {0x28,0x0F,0x78,0x37,0x00,0x00,0x0A,0x00};

Wiki says 285 byte 2 is important 0xB6, and it differs what you send?

I got working charger with these:
msg ID 0x285 data 00 00 B6 00 00 00 00 00 every 100ms
msg ID 0x286 data 28 0F 78 37 00 00 0A 00 every 800ms
..but have problem if I increase current (0x78) more than a bit, charger just shuts down, so it might be last byte which you are using?

If you know what are background of these differences, please share your knowledge! Also Wiki update would be really nice.
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

To be honest I just copied the CAN messages from the post below by Arber333. It is in page 9 of this thread. I haven't tried changing anything as it was working. I saw 9A at 240Vac giving around 6A at 350Vdc.
arber333 wrote: Fri Aug 27, 2021 6:46 am
fredd90 wrote: Thu Aug 26, 2021 6:15 pm 1.Plus connected to pin 8 IGCT main power
Minus connected to pin 11 GND
2. Both tested wirh my ecu and an arduino.
3. Did see a 27% signal in can message i think. But i maybe need to measure with scope.
So when it apears 6v on cp the EVSE cable should enable ac output from cable.
This stage is not happening i Think.
4. Have looked at open evse solution but i bought a prebuilt cable wirh 16A Cee connector.
https://www.google.com/search?q=3+phase ... d9rpwJzBgM
I have seen DCDC work with 14.4V in Mazda and 15.2Vdc in my Pug. No idea why.
Your cable is quite adequate, as long as there are PP and CP signals present. I use PP signal to start CAN bus flow. Did you by chance swap PP and CP pins? PP pin is the longer of the two because it needs to signal state change before/after CP is active.
The way i see step 4 to happen would be to connect AC directly and use a PWM signal 12V with 25% duty while CAN bus is broadcasting 2 IDs! I think you are missing something here...
msg ID 0x285 data 00 00 B6 00 00 00 00 00 every 100ms
B6 is charger enable request to pull CP in

msg ID 0x286 data 28 0F 78 37 00 00 0A 00 every 800ms or so
28 0F is voltage request 390V
78 is current request
37 and 0A i am not quite sure what they do

Since 0x286 does nothing to control output voltage (strangely because it needs voltage request quite explicitely) i used ID 0x396 to snoop for votlage and reduce charger after 390Vdc. BMS input is used to stop charger with 0x285 msg.

I posted the code for DUE here:
https://openinverter.org/forum/viewtopi ... 611#p20611
I am still working on it :).
I'm now stripping everything back out of the engine bay for painting and sealing of the battery boxes so won't be in a position to do any testing for a while.
I need a bigger hammer!
tom91
Posts: 1275
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 97 times
Been thanked: 204 times

Re: Mitsubishi outlander charger and DC:DC

Post by tom91 »

Just a note, do not ask for more then 12A as the charge will stop working when requested. A gotcha if you are programming it to work with a BMS system, need to ensure you limit the max request sent.
Founder Volt Influx https://www.voltinflux.com/
evMacGyver
Posts: 108
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 19 times
Been thanked: 5 times

Re: Mitsubishi outlander charger and DC:DC

Post by evMacGyver »

tom91 wrote: Fri Jul 22, 2022 12:32 pm Just a note, do not ask for more then 12A as the charge will stop working when requested. A gotcha if you are programming it to work with a BMS system, need to ensure you limit the max request sent.
Nice to know this, I was just hoping more current under 300VDC.
Alibro wrote: Fri Jul 15, 2022 1:43 pm To be honest I just copied the CAN messages from the post below by Arber333. It is in page 9 of this thread.
I might be blind, I just can't find the same messages anywhere that you are sending. 0x285 you send confuses me, but now that 12A limit is verified, I'll stick with the code that I already have. Unless somebody finds a way to get more juice on lower voltages from this charger :)

This is very nice and compact combined charger and DC/DC, only one that I got installed in free space in my setup. Onboard 3-phase charger would be nice, now thinking external charger using CCS port would be ultimate for my need, with CHAdeMO port it would be easy for now.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

evMacGyver wrote: Sat Jul 23, 2022 9:35 am.a

I might be blind, I just can't find the same messages anywhere that you are sending. 0x285 you send confuses me, but now that 12A limit is verified, I'll stick with the code that I already have. Unless somebody finds a way to get more juice on lower voltages from this charger :)
I remember now i got 0x285 msg from a real Outlander CAN capture. It seems byte2 contains information about dc voltage which is all most components need to work. But it is coded in (hex *2 = dec). So it seems that particular Outlander had its battery full 364Vdc at the time of capture. Yours particular had byte2 at AA which is 340Vdc.
evMacGyver
Posts: 108
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 19 times
Been thanked: 5 times

Re: Mitsubishi outlander charger and DC:DC

Post by evMacGyver »

arber333 wrote: Sat Jul 23, 2022 12:57 pm I remember now i got 0x285 msg from a real Outlander CAN capture. It seems byte2 contains information about dc voltage which is all most components need to work. But it is coded in (hex *2 = dec). So it seems that particular Outlander had its battery full 364Vdc at the time of capture. Yours particular had byte2 at AA which is 340Vdc.
Not mine, above lines are what Alibro is sending. And are you now confusing 286 and 285, because voltage is on 286? Alibro code seems to send 285 differently, even critical byte2=0xAA, which should be just 0xB6. It's fine if charger works also this way.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

evMacGyver wrote: Sat Jul 23, 2022 1:58 pm
Not mine, above lines are what Alibro is sending. And are you now confusing 286 and 285, because voltage is on 286? Alibro code seems to send 285 differently, even critical byte2=0xAA, which should be just 0xB6. It's fine if charger works also this way.
0x285 is a heartbeat from BMS. It contains most relevant data for Outlander subsystems to recognise its battery is alive and well. This is the first thing all devices check for before they accept their command telegrams. It is true for charger, inverter, heater, ac compressor and others.
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

I still have to run a full charge using the code so I don't know what will happen as the voltage rises.
but will be a while before that happens, I'm back to cutting, welding and grinding.
Then some more grinding. :?
I need a bigger hammer!
tom91
Posts: 1275
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 97 times
Been thanked: 204 times

Re: Mitsubishi outlander charger and DC:DC

Post by tom91 »

One other key item to keep in mind, the Charger does not terminate charge at zero current request it leaves the EVSE on and there is some current leakage.

I have my coding watch the current limit request and when it hits Zero to change the byte 2 in 285 to terminate charging and drop out the EVSE.

Things I still want to test is can the charger be turned on and off at will when the plug is inserted, or does the charger require a plug removal to reset.
Founder Volt Influx https://www.voltinflux.com/
evMacGyver
Posts: 108
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 19 times
Been thanked: 5 times

Re: Mitsubishi outlander charger and DC:DC

Post by evMacGyver »

Can you get output current over 10A or input current over 14.5A from charger? Did some testing and for some reason input current, which I read back from 0x389, never gets over 14,5A and HV battery being 290-300V output current seems to limit less than 10A, calculated maximum input power I could see was 3050W. I really can't tell what is limiting, input current or output current. Output current request between 10-12A makes no difference, below 10A request I get exactly current as expected.

Limiting factor should not be CP signal, because I create PWM for charger and even 50% PWM makes no difference. I can verify what CP% charger sees from 0x384.

I did test basically with these, which should give full 12A output current:
0x285 data 00 00 B6 00 00 00 00 00 every 100ms
0x286 data 28 0F 78 37 00 00 0A 00 every 800ms, well I also send this every 100ms, should not harm.

286 byte6=0x0A which could have been 10A limit, did try to rise it to 0x0F with no success to get over 10A output current.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

evMacGyver wrote: Sat Jul 23, 2022 7:53 pm Limiting factor should not be CP signal, because I create PWM for charger and even 50% PWM makes no difference. I can verify what CP% charger sees from 0x384.
With my 96S setup i always got 8A from the charger even though i commanded 12A.

Also PWM duty for 12A is more like 20%. Anything more than 40% is dc fast charging territory.
https://www.picoauto.com/library/automo ... ns-type-2/
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by johu »

Planning to use one of these in Touran but got worried reading through the thread that it is not possible to output less than 14.4V from the DC/DC. Is that still the state of science? I also wonder what happens if you feed a little higher voltage to the feedback pin, i.e. real voltage+0.4V. Would that make it drop to 14V?
Reason being I have 4 LFP cells as my "12V" battery and don't want them sitting at 3.6V for prolonged time. So 14V would be perfect.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

johu wrote: Mon Aug 08, 2022 2:28 pm Planning to use one of these in Touran but got worried reading through the thread that it is not possible to output less than 14.4V from the DC/DC. Is that still the state of science? I also wonder what happens if you feed a little higher voltage to the feedback pin, i.e. real voltage+0.4V. Would that make it drop to 14V?
Reason being I have 4 LFP cells as my "12V" battery and don't want them sitting at 3.6V for prolonged time. So 14V would be perfect.
I'm guessing the answer is yes because when I was testing I started with the sense pin connected via a longish cable and several connections. The voltage at the battery rose to over 14.7V and after changing to a shorter direct connection it settled back to 14.4V.
Sorry my pack is disconnected atm so cannot test for you for a bit.
I need a bigger hammer!
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by johu »

Right, so confirmed it goes up as expected. Maybe an internal voltage divider can be modified to output 14V. Maybe putting the voltage sense directly on the output will result in another drop to like 14.2V at the battery terminals.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by Alibro »

johu wrote: Mon Aug 08, 2022 3:18 pm Right, so confirmed it goes up as expected. Maybe an internal voltage divider can be modified to output 14V. Maybe putting the voltage sense directly on the output will result in another drop to like 14.2V at the battery terminals.
I would have gone with a cheap buck boost DC to DC converter with a constant voltage output but that's cause I know almost nothing about electronics. :lol:
I need a bigger hammer!
evMacGyver
Posts: 108
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 19 times
Been thanked: 5 times

Re: Mitsubishi outlander charger and DC:DC

Post by evMacGyver »

johu wrote: Mon Aug 08, 2022 3:18 pm Maybe an internal voltage divider can be modified to output 14V. Maybe putting the voltage sense directly on the output will result in another drop to like 14.2V at the battery terminals.
My vote for voltage divider mod if less voltage is needed. If you put sense directly to the output hoping less voltage, be aware, if there is no current flow, there is no voltage drop.. This unit send 12v level to CAN, you may shut off DCDC if some level is exceeded, but I would not rely on that.
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Mitsubishi outlander charger and DC:DC

Post by aot93 »

So, after nearly a year of no problems (at least none not caused by me..!) I have run into an issue with the DC-DC.

It's outputting about 15V instead of the normal 13.8v.
CAN data from the charger/DC-DC is reading about 1v lower than reality which I don't think it ever used to.
I've checked the DC-Sense voltage and all looks good maybe .5v lower than measuring at the battery.

Here is what I think might have caused the problem:
Car has been parked up for a few months whilst I've been away, the AUX battery had drained to about 7V - I think due to GPS tracker...
So i plugged it in to my C-Tec 12V charger gave it a min or 2 and then started up car, disconnecting the C-Tec charger a few seconds later.
I drove it out the workshop and left it there in the on state to charge the Aux battery.
I ended up leaving it there for about an hour as neighbour locked themselves out.
Coming back into the car there was a strong sulphur smell which prompted me to check the aux battery which was very hot, I shut down and left it to cool.

I know a few others have run into this 15v problem, did anyone find a solution?


Cheers.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Mitsubishi outlander charger and DC:DC

Post by arber333 »

aot93 wrote: Sun Aug 28, 2022 10:14 pm So, after nearly a year of no problems (at least none not caused by me..!) I have run into an issue with the DC-DC.

It's outputting about 15V instead of the normal 13.8v.
....
I know a few others have run into this 15v problem, did anyone find a solution?


Cheers.
Well you did seem to remember me complaining some time back :).
I got even more concerning 15.2V from my DCDC! That will surely kill your Aux battery if left to its own.

Lately i experimented with the same dcdc connected to rather banged up battery. It seems that dcdc input can sense aux battery input, maybe its internal resistance? Could be that you need to buy a new battery?
In any case what i did to mitigate this was:
1. DCDC is connected to HV directly through a 30A fuse! I connected the sense input directly to dcdc 12V output bolt together with charger input wire. I dont know why but if i connect both wires to 12V together i get 14.4Vdc on the output which is still more managable than 14.6V which dcdc gives on its own. I am not sure if i could improve sensing the aux voltage? Better that i just buy a new AGM aux battery and try that.

2. I wrote some code for DUE which observes CAN output on ID 0x377 bytes B0 and B1 and assembles the value. When my car is off or is charging i have the limit set to 12.6V and if lower i raise a flag. At that time DUE will turn on the DCDC signal pin and turn on 12V for DCDC. It will start the count like 3minutes and then remove the flag and turn DCDC off. I could add additional flag to limit DCDC turnon when HV battery would be too low.
That way i can leave my car parked for extended time and dont worry about aux battery getting too low.

I hope you can decypher my DUE code :)

Code: Select all


bool auxState = false; //create flag for aux voltage

// declare variables before setup 
unsigned long elapsedtime,time228,timestamp,startime,lastime; //Variables to compare millis for timers
const unsigned int ontime = 120000; //2min for on time
uint8_t aux1 = 0;
uint8_t aux2 = 0;
float auxvoltage = 0; 

....

//declare CAN channel in setup

// code in Void loop 
 if(incoming.id==0x377){
      aux1=incoming.data.bytes[0] ;
      aux2=incoming.data.bytes[1] ;   
      DCDCstatus=incoming.data.bytes[7] ;
      auxvoltage=((aux1 * 256) + aux2); //recalculate two bit voltage value
    }   
    
    ...
    
    if (digitalRead(Enable_pin) == HIGH) { // if Enable_pin senses ignition 
  digitalWrite(DCDC_active, HIGH); // turn on DCDC_active relay  
  if(millis()-lastime > myVars.transmitime)  //Nominally set for 120ms - do stuff on 120 ms non-interrupt clock
    {   
     lastime=millis();        //Zero our timer
       sendCANframeE(); 
       printstatus(); 
       sendCANframeD();
       printstatus(); 
       }         
} 

else {
digitalWrite(DCDC_active,LOW); // turn off DCDC_active relay
 }           

if (auxvoltage < 1260) { // if aux voltage is low and DCDC is off
auxState = true; // set the flag to true   
elapsedtime=millis();  
}

DCDCauxcharge(); // aux flag function

..... 

void DCDCauxcharge()
{ 
if ((auxState == true) && (digitalRead(Enable_pin) == LOW)) { // auxvoltage went below 12.6V
digitalWrite(DCDC_active,HIGH);   
if (millis() - elapsedtime >= ontime) { // if aux voltage is low and for 5min 
digitalWrite(DCDC_active,LOW); // turn off DCDC_active relay 
elapsedtime=millis();
auxState = false;
}}
else { // if auxvoltage is OK 
auxState = false; // turn off DCDC_active relay
}}
 
Post Reply