Mercedes A and B class donors; stability control

Open for any sort of non-technical discussion regarding EVs
marcopolo
Groupie
Posts: 357
Joined: Sat, 27 Feb 2010, 20:57

Mercedes A and B class donors; stability control

Post by marcopolo »

Digger11 wrote: I disagree that this is bizarre - it is totally ludicrous !!! I thought an EV only changed the powerplant of the vehicle ??? and usually decreased the power (so less likely to need ESC???)

We are getting worse than a Nanny State in Victoria as even my Grandmother could not make sense of decisions like this.

If they do make these changes - then I will just not change the registration on the donor as an ICE (i.e. keep it registered and insured during the build period) - the Victorian Government can go and get stuffed.

The additional cost of 6-12 months rego and insurance will offset the lack of engineers expense.My understanding is that the Insurance will still be valid, unless the modifications caused the accident. Would be a good court case with the Insurance company as less power usually could not be proven to cause accidents.
Yes indeed! Absolutely ludicrous! However please read the terms of your insurance policy! You may be able to argue such considerations in a US court, but in Australia, no court would consider whether or not it is likely to cause accidents, simply the terms of the insurance contract.

I can't advocate you drive a modified vehicle in defiance of Vic-roads, however much I agree! If the worst circumstances occur, it would be consider an act of wilful defiance requiring a penalty a the higher end of the scale!

Nanny state indeed!

But the technical question remains, how to provide a conversion with ESC?


Digger11
Groupie
Posts: 60
Joined: Fri, 12 Mar 2010, 19:55
Real Name: Digger Jones
Location: Melbourne

Mercedes A and B class donors; stability control

Post by Digger11 »

I recently looked into a conversion of a late model 2006 3 series BMW that has ESP. I spoke yesterday to my local BMW independent in Box Hill and he said it is absolutely impossible to keep the stability control when the ICE is gone. He said that they work on these BMW's everyday and even they cannot work it out as it is the CAN is proprietary and cannot even be read with OBD readers and the like due to the speed of the communications in it.

So technically impossible - thanks Vic Roads for ending all EV conversions in Vistoria - much appreciated.

As for wilfull defiance - if the nanny's running this state keep on overstepping the mark then I think eventually the tribes will start to revolt.

User avatar
coulomb
Site Admin
Posts: 3834
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Mercedes A and B class donors; stability control

Post by coulomb »

Digger11 wrote: ... as it is the CAN is proprietary and cannot even be read with OBD readers and the like due to the speed of the communications in it.

So technically impossible - thanks Vic Roads for ending all EV conversions in Victoria

Impossible is such a harsh word. Surely someone motivated enough could create a reader and reverse engineer the CAN protocol. However, until the first person does that and publishes it for others to use (and possibly open himself up for prosecution), it creates a big barrier to conversions.

I actually have a bit of an interest in reverse engineering, but it's more the theory and process than the doing. I'd also need a suitable donor and a big chunk of time. So I'm not likely to want to start any time soon, but it's a slight possibility for the medium term.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Mercedes A and B class donors; stability control

Post by Johny »

Surely you could take off all the ICE sensors and spin them, warm them, push them and create a virtual engine. Then, one step at a time, you replace the comms you find going to each sensor with a comms stream that keeps the ECU happy.

With the right CAN sniffer and logging this shouldn't be that hard - just time consuming. They are not going to encrypt it - just not publish it!

No, I agree with coulomb, not impossible.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Mercedes A and B class donors; stability control

Post by Johny »

Here's a start
http://www.honeysw.com/canproject.php

BTW I do not believe any car manufacturer would both to mount a court case against a DIY EVer. Why bother? Just don't flaunt the information.

User avatar
coulomb
Site Admin
Posts: 3834
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Mercedes A and B class donors; stability control

Post by coulomb »

Just thinking a bit further on how hard this might be.
Digger11 wrote: I recently looked into a conversion of a late model 2006 3 series BMW that has ESP. I spoke yesterday to my local BMW independent in Box Hill and he said it is absolutely impossible to keep the stability control when the ICE is gone.

So that would imply that part of the stability control is to change the ICE output power. Ineed per the Wikipedia Electronic Stability Control page:

"Some ESC systems also reduce engine power until control is regained."

Let's consider for the moment vehicles where this is true. The information exchanged from the stability control unit to the engine control unit (if separate) could take almost any form. Worse, you need to simulate fairly violent forces on the vehicle to even see that information exchange.

Even worse still, you need to convince yourself and then the authorities that your solution (if you can find one) is safe under all conditions. Presumably, this would involve some risky tests with a skid pan, helmet, and harness. This would be easiest if you kept the original SCU, or ECU if that has the SCU functionality inside it. But you'd still have to demonstrate that the required changes in ICE output have been faithfully translated to motor output, taking into account the different weight distribution that the electrical drive train brings. It sounds quite a task.

So it looks like donors with no Electronic Stability Control would be easiest to convert. We know that the Mercedes A and B class have it - they introduced ESC to small cars in the first place. The next easiest to convert would be those that don't attempt to control the ICE output. But even finding out what sort of ESC model X has could be difficult in many cases.
I recently looked into a conversion of a late model 2006 3 series BMW that has ESP.
Extra Sensory Perception is even harder; it's got to be harder than artificial intelligence   Image

Edit: I see that this isn't actually a typo. From the Wikipedia page:

"From 1987 to 1992, Mercedes-Benz and Robert Bosch GmbH co-developed a system called Elektronisches Stabilitätsprogramm (Ger. "Electronic Stability Programme" trademarked as ESP) a lateral slippage control system, the electronic stability control (ESC)."
Last edited by coulomb on Wed, 28 Apr 2010, 12:17, edited 1 time in total.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Mercedes A and B class donors; stability control

Post by Tritium_James »

What are they mounting a court case about? It's not an offence to publish somebodies trade secret! That's the downside to keeping it a secret - if it gets out there's nothing you can do about it, except change it on the next model. If they want to protect it the proper mechanism is a patent - you tell everyone how it works and charge them if they use it.

Reverse engineering vehicle CAN comms would be a truly massive amount of work. For starters, if you just tap into the bus and start reading messages (that part is easy) then you can't tell where the message came from - the CAN message ID does not have to reflect its physical location, it is ideally meant to indicate the contents of the message.

So, to identify which packets actually came from the ECU (so we can remove it later) you'd need to build some CAN bridge hardware so that each item on the bus was on its own physical segment, and you simulate the complete bus by routing messages around with your bridge. Then all you have is a long list of messages, you know that item X sent message id Y with up to 8 bytes of data Z. You don't know which other item on the bus actually cares about that piece of data. It really is a jigsaw puzzle with 10's of thousands of pieces.

As an example, I successfully reverse engineered the comms protocol between the tacho gauge cluster (main body computer) and the upper (speedo/fuel/temp) gauge cluster in the Civic. It sends 17 bytes with 2 acknowlegments on a half-duplex serial comms wire, and even that took over a day to work out what's what. There was incrementing counts with weird rollover intervals, checksums that sometimes didn't include certain bytes depending on what state it was in, test modes, the list was endless.

Doing this for a whole car would be months and months of full-time work. It might not be impossible, but it's got to be the closest thing I've seen to it in a very long time.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Mercedes A and B class donors; stability control

Post by Johny »

Believe it or not some manufacturers DO call it ESP. It stands for Electronic Stability Program(ESP). Most of the Chrysler car blurbs call it that.
So there is some possibilities here. I am trying to find a list of what manufacturers reduce or control engine power. I have a suspicion that it is sports and high end cars.

Edit: Not GM, Chrysler
Last edited by Johny on Wed, 28 Apr 2010, 12:34, edited 1 time in total.

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Mercedes A and B class donors; stability control

Post by Tritium_James »

Coulomb, regarding the testing aspect of it, and engineer at Holden told me that with all the simulation, documentation, test protocols and then actual testing, a minor change to say the brake biasing or even weight distribution of one of their cars triggers a 5-6 week process involving dozens of people and costing hundreds of thousands. And that's for a system they're already intimately familiar with! It's not ass-covering paperwork either, these systems really are genuinely scary if something isn't right, and everything therefore has to be perfect.

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Mercedes A and B class donors; stability control

Post by Tritium_James »

Johny, I know my old-ish 1997 model BMW controls engine power, and it only has the early version 'ASC' stability control. It doesn't control the engine in any elegant fashion though, it just cuts out the spark or fuel (can't remember which) on or off completely as required.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Mercedes A and B class donors; stability control

Post by Johny »

Geez, you wouldn't want to carry luggage - let alone tow anything.

Edit: The Chrysler ESP system DOES control engine power. One down....
Edit again: ESP is Chrysler's
Last edited by Johny on Wed, 28 Apr 2010, 12:34, edited 1 time in total.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Mercedes A and B class donors; stability control

Post by Johny »

Actually we have got a bit off track. What we really want to know is which vehicles use a separate computer to control the ESP, ESC, ASC. It is emerging that if the ECU does it we are kind of stuffed.
At least if it's a different unit it moves it back to possible???

Edit Changed id to if - kind of Fraudian.
Last edited by Johny on Wed, 28 Apr 2010, 12:31, edited 1 time in total.

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Mercedes A and B class donors; stability control

Post by Tritium_James »

I know in the Civic it was a separate item - and it wasn't included in the base-model one that we converted. So as long as you can convince it that the ECU is still there and running OK, then it should presumably let you drive, but you'd have to have the electric motor controller exactly mimic the ESC computer's expected torque responses for various commands or the ESC isn't going to work the same - and that could quite easily be very dangerous.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Mercedes A and B class donors; stability control

Post by Johny »

It will be complicated. I extracted this from an Audi hackers forum. It sounds like the Bosch system handles bits of the Safety system going missing. I can not imagine any Road Authority engineer taking on an EV conversion that was going to get this deep. The guy who wrote the explanation below mentioned that Bosch are going to/may have already published a complete manual for their ABS/ESC/ECM. Oh well, plenty of pre ABS/ESC cars around for now.

ESP ECU contains separate controllers for ESP, ABS/TCS & MSR. ABS/TCS, MSR & ECM controllers are subordinate to the ESP controller. ECU output is tied to the braking system, when it wants to change the engine output it makes a request to the MSR controller. The MSR controller determines the amount of torque change and transmits this through the CAN bus. It's up to the ECM to decide how (ignition timing, throttle position, fuel cutoff, boost pressure [usually starts with ignition timing]). Let's say for incompatibility we implement the engine output request frame with a unique identifier not used by previous versions of MSR {of course there is absolutely no reason to do this}. Now an old ECM will not respond. ESP ECU will discover that a receiver was not present to handle the request. It will also find, by way of the incoming data, that additional corrective action is needed. At this point it will then issue requests to the ABS/TCS controller to modulate the brake pressure to overcome the lack of response from the ECM. Still better than no ESP and definitely not a dangerous situation.

User avatar
coulomb
Site Admin
Posts: 3834
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Mercedes A and B class donors; stability control

Post by coulomb »

Tritium_James wrote: As an example, I successfully reverse engineered the comms protocol between the tacho gauge cluster (main body computer) and the upper (speedo/fuel/temp) gauge cluster in the Civic. It sends 17 bytes with 2 acknowlegments on a half-duplex serial comms wire, and even that took over a day to work out what's what. There was incrementing counts with weird rollover intervals, checksums that sometimes didn't include certain bytes depending on what state it was in, test modes, the list was endless.

Eek. I'm surprised you came across test modes and the like with ordinary operation of the vehicle, or perhaps you were trying all combinations of what seemed to be "opcode" bytes? Did the incrementing counts seem to be part of noise immunity, or obfuscating?

Well, it's a sobering lesson from a real-world example. Thanks.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Mercedes A and B class donors; stability control

Post by Squiggles »

Tritium_James wrote: Coulomb, regarding the testing aspect of it, and engineer at Holden told me that with all the simulation, documentation, test protocols and then actual testing, a minor change to say the brake biasing or even weight distribution of one of their cars triggers a 5-6 week process involving dozens of people and costing hundreds of thousands. And that's for a system they're already intimately familiar with! It's not ass-covering paperwork either, these systems really are genuinely scary if something isn't right, and everything therefore has to be perfect.


This is exactly why I would rather drive a car without it.....at least I would think I was in control!! Jeez if I was that bad a driver that I needed all this stuff I would just catch a train or bus.

Another off topic comment, apparently the way to break into a holden is to snap off the external rear view mirror, attach your CAN enabled emulator to the CAN bus that is used to control the electric mirror (?) send the command that the air bags have activated and the doors all unlock! It may be a false story, but I was told about it by a chap who works for holden so maybe there is some truth in it.

Digger11
Groupie
Posts: 60
Joined: Fri, 12 Mar 2010, 19:55
Real Name: Digger Jones
Location: Melbourne

Mercedes A and B class donors; stability control

Post by Digger11 »

http://www.asashop.org/autoinc/may2007/techtips.htm

Something I came across when searching for any info on CAN bus and ESC. It does sound tought to emulate.
Whilst I enjoy a challengs as muich as anyone, I think building an EV will be enough of a challenge anyway without having to worry about the ESC.
If I ahd to keep all of the ESC related ICE sensors then it would make the motor more difficult to sell.

Also, I have had ESC in my car that I bought 5 years ago and it has only been used once - that was when I was up at the snow and decided in an icy vacant carpark to see if it worked.
I normal driving it has never been activated. In an EV that I wouldn't drive in the rain, it would be 100% surplus to requirements.
Obviously I drive far too carefully.

p.s. I like how the topic heading was changed to keep the ESC discussion "on-topic" !

antiscab
Senior Member
Posts: 2499
Joined: Mon, 26 Nov 2007, 05:39
Real Name: Matthew Lacey
Location: Perth, WA

Mercedes A and B class donors; stability control

Post by antiscab »

heh,
andrew or striker must be lurking (i didnt do it)
Matt
2017 Renault zoe - 25'000km
2007 vectrix - 156'000km
1998 prius - needs Batt
1999 Prius - needs batt
2000 prius - has 200 x headway 38120 cells

User avatar
coulomb
Site Admin
Posts: 3834
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Mercedes A and B class donors; stability control

Post by coulomb »

antiscab wrote: heh,
Andrew or Striker must be lurking (I didn't do it)

No, I did it myself; a privilege of being a topic starter is you can change the topic (it took me a while to figure that out; when you edit the first post of a topic, you get the option of editing the topic subject. Of course, you have to be the author of the first post to do that).

I considered asking for a bunch of posts to be moved to another topic, but it's just easier to rename the topic, so people have a better chance of finding relevant discussions later on. I'm more of a "laissez-faire" or "let it flow" guy when it comes to attempting to keep posts on topic.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

marcopolo
Groupie
Posts: 357
Joined: Sat, 27 Feb 2010, 20:57

Mercedes A and B class donors; stability control

Post by marcopolo »

Wow! For a non technical person, I seem to have unleashed a storm of technical debate. Hmmm.. pretty cool. (even technical post descriptions!)

But, and this may be really stupid, what kind of ESC is the Leaf, iMev, equipped with?

Interestingly Ford is releasing a production EV conversion of the Focus. Now it occurs to me that Ford must have solved the problem. Or am I missing something?

Whether you think you need ABS, ESC, or for that matter seat-belts, isn't really the point. If the law requires such safety equipment then the regulations must be observed, certainly if you intend to resell the vehicle.

The Vic-Roads may have found a method of wiping out conversions! At least, in Victoria, while seeming reasonable and very safety conscious.

It must be possible to build an ECU unit with a suitable program to accommodate the newly converted EV, but if I understand you guys correctly, this is a very, very expensive task!

User avatar
Electrocycle
Senior Member
Posts: 985
Joined: Sun, 19 Oct 2008, 20:23
Real Name: Andrew
Location: Sydney
MSN: dumhed@dumhed.com
Contact:

Mercedes A and B class donors; stability control

Post by Electrocycle »

coulomb wrote:The next easiest to convert would be those that don't attempt to control the ICE output.


I'm yet to see one that doesn't control the engine output. That is the simplest part, and the first thing done by any of the early traction control systems.
Before electronic (fly by wire) throttles, many engines had a secondary throttle valve controlled by a motor for the traction control.
Others (including aftermarket add-on systems) did it by cutting fuel / spark or changing ignition timing.

The current systems also tend to use the brakes (via the ABS) to control the car's direction as well as just traction.
The Engine Whisperer - fixer of things

User avatar
EV2Go
Senior Member
Posts: 2059
Joined: Wed, 16 Jul 2008, 00:21
Real Name: Paul
Location: Brisbane 1963

Mercedes A and B class donors; stability control

Post by EV2Go »

I know it would add considerable cost to the build but has anyone considered an aftermarket ECU? Haltech parted (with much reluctance) the protocols for my Haltech E11V2. Haltech are generally not too far behind the manufactures when it comes to adding features to their ECUs, so if cars require ESC, then they will more than likely incorporate it...

Damn sight easier to work with Haltech then getting GM or Ford to part with info.

User avatar
coulomb
Site Admin
Posts: 3834
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Mercedes A and B class donors; stability control

Post by coulomb »

marcopolo wrote: Interestingly Ford is releasing a production EV conversion of the Focus. Now it occurs to me that Ford must have solved the problem. Or am I missing something?

Perhaps you're overlooking the simple fact that for the Ford company to convert a Ford to an electric drivetrain is a lot easier than for one of us to do the same thing, since they have all the details on their CAN protocols at hand. No need for Ford to reverse engineer the protocol, their engineers can just go to the file or ask the engineer in the next cubicle who designed it.

Edit: so the point is, getting an already working ESC system to talk to an electric motor instead of an ICE is presumably not very hard, it's just you have to find the command that says "kill the spark now" and translate it to "command zero torque". That's an easy case; a harder case might be recognising some "set fuel mixture to X" as a requirement to cut the torque to 20% or some such. Or it could be a cluster of such commands. And of course, you may want to ignore hundreds of similar such commands that have nothing to do with ESC.

The other thing is that the command won't actually say "kill the spark now", it will just be a CAN packet with say 8 bytes of data in it, with a particular destination address (say the ECU), and a particular payload of data. Unless you have the rosetta stone that tells you what all those numbers in all those packets mean, the CAN bus is a 10,000 piece jigsaw puzzle, as TJ has mentioned. And CAN is used for so much these days: sensors, gauges, computer to computer control information, and possibly mundane things like turning on the wiper motors.
Last edited by coulomb on Wed, 28 Apr 2010, 20:23, edited 1 time in total.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Mercedes A and B class donors; stability control

Post by Tritium_James »

coulomb wrote:Perhaps you're overlooking the simple fact that for the Ford company to convert a Ford to an electric drivetrain is a lot easier than for one of us to do the same thing, since they have all the details on their CAN protocols at hand. No need for Ford to reverse engineer the protocol, their engineers can just go to the file or ask the engineer in the next cubicle who designed it.

Edit: so the point is, getting an already working ESC system to talk to an electric motor instead of an ICE is presumably not very hard, it's just you have to find the command that says "kill the spark now" and translate it to "command zero torque".

Yes, this is it exactly. In fact, since the CAN ID is about where the message came from (or more specifically, what it contains) rather than where it is going to, the ESC system itself probably doesn't need to change at all. They just need to program their electric motor ECU to look for CAN packets from the ESC system saying "I'm reaching the limit of what I can control with the brakes" type stuff, and respond in a similar ramp rate and amplitude to what the petrol ECU did.

As far as one of us doing the same thing - even if we did manage to reverse engineer the comms, and implement our own, can you trust it? I know Tesla spent months and months testing theirs, and I think that may have only been traction control, not even stability control? Not sure on that last point. But I know it involved trips to Sweden or somewhere for a month or two of testing on ice and snow.

Digger11
Groupie
Posts: 60
Joined: Fri, 12 Mar 2010, 19:55
Real Name: Digger Jones
Location: Melbourne

Mercedes A and B class donors; stability control

Post by Digger11 »

I still think Vicroads have just invented a black market of illegally converted electric cars.
Remember that we do not have annual RWC's in Vic. The only time a car is checked is when it is sold.

When was the last time anyone in authority (i.e. a policeman)looked under the bonnet of your car ??? For me, never in nearly 40 years of driving.

Post Reply