-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Electric smart CAN bus. OBC #17
Comments
I have made dump of CAN bus today while charging from 94.2% to 100%. Here is dump and some info. May be it will be useful for someone in the future. https://github.com/aospan/smart_fortwo_electric_charge_canbus |
Hello aospan, my project with the 451ED started a long time ago and without access to this type of car I can't help with new findings. But here are my thoughts: I was able to control the charging current buy using the same IDs as the dashboard. It was so easy to get, that I did not document it. The dashboard uses 0x5nn IDs, so just scan for alternations in this range, when changing the value in the dashboard. Then write one of those current message to the bus and sniff for reply messages from the charger (rqID 0x61A, respID 0x483) to get the charging current content (also monitor 0x62F). But: I don't think that you can use currents below the 6A limit. This is the defined limit by the charging standard and currents below that value are only controlled internally by the charger itself. The battery is first charged on a constant current basis (13.4A as in your dump). When the first cell is almost reaching the limiting voltage of 4.2V the charger will switch into constant voltage mode and the charging current is smoothly reduced to top off the cells. This algorithm is implemented into the charger. You can try to get lower currents-setpoints, but I think they will be coerced to a defined window. I will overview some old logs and if I find the bus ID, I will report here... Best regards |
@MyLab-odyssey huge thanks for info ! I have found how to read charging current with 0x61A and 0x483 (using your source code, thanks !) and updated my README with this info. Also, I have made CAN bus dump while changing charging current from 12A to 8A on dashboard. Charging current actually changed (I'm controlling on OpenEVSE unit). I have uploaded this dump to my repo too. So, interested PID somewhere in this file :) BTW, is OBD port directly connected to CAN bus and really can sniff 100% traffic between dashboard and charger (obc) ? If no then I should connect to CAN bus near OBC (green/white-green wires as I suspect). |
@MyLab-odyssey Please explain what is 0x62F PID for ? |
a) I wrote the following command to ID 0x512 to set the current: Please test values in between, I only tested the three standard values, but I think it should work - please report! b) c) Hope this helps and great that someone is using my findings ;-) I tried to structure the queries within separate header files to easily analyze the possible commands. Best regards |
@MyLab-odyssey it works ! thanks ! I can set charging current limit in range 8Amps to 16Amps (I have 3.3kw OBC). I have updated my README with this info. Unfortunately, values lower than 8Amps is ignored by OBC as you wrote above. thanks for your help ! :) |
Hello aospan, I hope the current control is still working for you?! When controlling the control pilot of the charging station (e.g. simple EVSE) you could go down to 6A, as per definition of the charging standard. Now I have a to ask you for a favor: A lot of people are asking for the pre-condition setup, as the vehicle homepage is shut down. I was not able to replicate the gsm-modem commands from the EV-CAN some years ago. But I think replication of the commands from the dash should work! I need someone with your skills and access to the car to test my theory: ID-range 0x5nn seems to be the dash. I retrieve the time from the first two bytes of ID 0x512. To write a time you need to get the current setpoint and then send the new value in an minutes offset. Not the absolute wanted time, only the change in minutes. I think there must be a change in this ID(s), if you manually setup a precondition / charging as done with the OBL current. Can you investigate this? - that would be great! THX in advance |
@MyLab-odyssey Sorry for late reply. Just found time to check time change. Then I change time on dashboard (minutes 4 to 59) of the car and made the CAN dump. Here is small dump (100 msec) when time changed: you can open it in Wireshark. File starts with old time: and finish with new time: so, something happens in between. I will try to identify packet that caused time change but if you can look too it will be great. |
I have checked all this 153 packets between time change and doesn't find any that cause time change. |
Thanks for your efforts! Did you alter the system time of the dash or did you change the departure time for climate control (for climate controlled departure, when the car is attached to mains)? If this works you can maybe alter the departure time the same way? Please give it a try again, as this would be a useful feature. THX, Odyssey |
I just tried to send:
and here is the dump:
as you can see nothing changed ;( |
If ID 0x512 is an response you could try to send the delta to ID 0x50A (-8). |
I am still trying to remember and maybe the Please test! THX Odyssey |
0x50a - no luck
offsets too ;(
and:
|
Please write But did you check if the departure time (in the "charge and depart menu") changed? Byte 3,4 could directly refer to the submenu, as the charging current value (byte 6) will do?! It should be one hour later to the actual system time... Please test this as a final attempt - THX!!! |
please check for AIC on and off |
Cool! Great finding ;-) So we can write the new time in hours and minutes. MBTP is asking the right question for the next step: Could you please post the changes for the following IDs when you activate AC on in the depart menu: |
I just found out that, to turn on the AC, we have to add 0x3F to the minutes, so for 18:30 instead of |
Congrats! This is really exiting and can help to build a replacement for the unsupported COM module. The next step I failed to replicate was waking up the sleeping car with a ID sequence. But I never tried to send a programmed time to the BC, so please test sending a new time when the car is asleep. |
i send with arduino with [(https://www.hackster.io/MyLab-odyssey/ed-bmsdiag-6bece5?ref=user&ref_id=61675&offset=0)] the dashboard change a/c on and off. i send the command 10x at 200ms and the change read ok |
But does it really start the AC when the desired (new programed times) is reached? With your offset you changed bit 6 (edited) which could hold the AC on/off value. Please test what is happening if you only write a minute value of 0x3F. If AC on/off does not change write 0x40 and please report. I don't have access to an old 451ED any more and can't test. @aospan: can you also try the suggestion from MBTP and mine? |
@MyLab-odyssey and @aospan, we really have to add 0x40 to enable bit 6 I tried it with @MBTP for 17:00 and the AC started immediately (it was 16:57). I confirm that when the car is asleep it cannot receive a departure time change. But @MBTP already had a module with an output on the door locking button, it wakes up the car for a couple minutes. He initially installed it to lock the car while leaving the AC ON when going at a store for a little while. So now we know that :
|
video the remote control [https://youtu.be/5iYPVjuNdk4)] |
The is a draft code functional if(digitalRead(A0)== HIGH) Serial.print(" Data: ");
if(sndStat == CAN_OK){ |
So we still have to get the car to wake up. Can someone please test these two queries when the car is asleep: Both patterns should comply with the Bosch CAN bus spec. for waking up a sleeping bus with recessive bits. |
Hi, on the C453 both queries seems to wake some parts of the car but only for a few seconds. can0@500000 0 0 0 0% |
(Y) THX Zoltan! So it will be the right wakeup on the physical layer?! Waking up the C453 will be the next task (for ED4scan and upcoming projects...), but I want to finish the ED3 tasks for now. But can someone please test on the 451ED? Please also check if the dashboard does react and if it gets up the "P" at the "shift lever". |
I'm travelling right now but if you haven't got a second person to check the 451 by next weekend I'll try to take a crack at it. |
THX Blaine, would really appreciate your help! |
Please help me for resetting message HV System workshop. If I drop 12v battery to low this message appears.I use sonoff remote for programming departure time with Arduino mega. This control is full functionality for programming departure time am and pm automatically |
if i send 0x423 05 10 00 02 the can bus wakes up and deliveres the following messages. key records ms last the last message before sleeping is 0x236 00 00 00 00 |
Update: Turns out it was a defective coolant sensor mounted on a T plugged on a hose easily accessible from underneath or via the service hatch. Hi,
As you can see there it was cold outside that day:
@MBTP FYI |
Hello,
I'm digging into my car (2015year smart fortwo electric). ED BMSdiag is up and running fine - I can get BMS, cooling, etc info.
Now I want to dig deeper and control charging cycle. First of all I want to "ask" OBC drain less current from J1772 socket. I need currents lower than 6A - this minimum can be achieved with 10% duty cycle on pilot pin. But I need lower than 6A for charging from solar panels (using microinverters).
Do you know any CAN bus ID's related to on board charger (3.3kW) ?
I'm trying to identify those ID's analyzing CAN bus traffic.
thanks !
P.S.
OBC drain smaller currents (about 1-2A) when battery is almost full. So, I hope OBC can be controlled over CAN bus to drain less currents.
The text was updated successfully, but these errors were encountered: