Loading...
Pages: [1] 2   Go Down
Author Topic: Four Wheel Drive - Electronic differential control  (Read 1192 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone!

I'm a newbie here and I've been scouting the posts on here with interest, but have got to a point where I need to start asking questions.

I've set myself a little project. I have a VW Golf and I want to control a Haldex rear differential, from a VW Golf 4motion. Having researched the existing controller, it needs to communicate via a CAN-BUS with the original engine ECU. I don't have this, hence the need for a standalone controller. Enter Arduino.

The standard unit has multiple inputs:
* Wheel senders - Uses Anti Lock Braking sensors on each wheel to detect when the front wheel speeds are higher than the rears
* Accelerometer
* Steering angle input
* Engine power output - in Nm
* Foot brake on/off input
* Hand brake on off input
* Differential oil temp

These feed into the original controller which in turn controls a stepper motor to engage the clutch in the rear differential, thus transfering the power to the rear wheels.

Most of these inputs seem to have been used in other projects, so I have some idea on how to code for them individually. The problem I have is that I don't currently have the car at a stage where I can plug everything in and start coding/testing in real life. So, is there anyway I can programatically create the inputs, run it through the code and see the output?

Many thanks
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 311
Posts: 35470
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The standard unit has multiple inputs:
* Wheel senders
Analog or digital? Does the sensor output a voltage that varies with the speed differential?

Quote
* Steering angle input
Is this produced by an encoder that increments/decrements a value as the steering wheel is turned, or is it an analog reading from a multiturn potentiometer?

Quote
* Engine power output - in Nm
Serial output?

Quote
So, is there anyway I can programatically create the inputs
Of course, but you need to know a lot more about them.

Quote
The problem I have is that I don't currently have the car at a stage where I can plug everything in and start coding/testing in real life.
I'd say that this is a good thing.

Quote
it needs to communicate via a CAN-BUS with the original engine ECU.
Knowing what the inputs are, and knowing how they are used to arrive at the output, are two completely different things.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Paul. Thanks for replying.

A bit of research suggests VW ABS sensors return an AC voltage that rises with wheel speed. Guessing that has to be analog?

Steering angle input is returned in degrees, but I'm guessing that the original ECU is converting a signal from a potetiometer mounted on the streering column. As I'm not using the original ECU, let's assume it's an analog reading from a multiturn potentiometer.

Again, the engine output is delivered from the original ECU and I have no idea how. As I'm not using the original ECU and having thought about it, I want to make my life simple, lets ignore this one for now. The system will have to be reactive, rather than proactive, until I can work out how to reproduce this.

We can ignore the CAN-BUS as well. Again, that's original ECU stuff, which I won't have.

So, in summary:
* Wheel senders - AC voltage (analog)
* Accelerometer
* Steering angle input -  multiturn potentiometer (analog?)
* Foot brake on/off input
* Hand brake on/off input
* Differential oil temp

Does that help?

Once again, thanks.

Logged

Denmark
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


So, in summary:
* Wheel senders - AC voltage (analog) -
* Accelerometer
* Steering angle input -  multiturn potentiometer (analog?)
* Foot brake on/off input
* Hand brake on/off input
* Differential oil temp


steering-angle is an encoder.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 311
Posts: 35470
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
A bit of research suggests VW ABS sensors return an AC voltage that rises with wheel speed. Guessing that has to be analog?
I'd question the research, then. There is very little AC stuff on automobiles, unless you are referring to air conditioning. AC and Arduino do not go together.

Quote
but I'm guessing that the original ECU is converting a signal from a potetiometer mounted on the streering column. As I'm not using the original ECU, let's assume it's an analog reading from a multiturn potentiometer.
No, let's not assume that. Go look in the car and see.

Quote
Again, the engine output is delivered from the original ECU and I have no idea how.
Seems to me that you are dead in the water, then.

Quote
As I'm not using the original ECU and having thought about it, I want to make my life simple, lets ignore this one for now.
Ignore the whole project? Good idea.

Quote
So, is there anyway I can programatically create the inputs, run it through the code and see the output?
I don't think you know what all the inputs are - type, format, range of values, etc. However, it is likely that they can all be emulated in software. After all, the inputs are just numbers.

As for running the inputs through the code, the obvious question is "What code?".

Yes, you can see the outputs that you produce. Whether they are even remotely close to what the original controller produced, or not, I couldn't even begin to guess. I have my doubts that you could, either.
Logged

Denmark
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
A bit of research suggests VW ABS sensors return an AC voltage that rises with wheel speed. Guessing that has to be analog?
I'd question the research, then. There is very little AC stuff on automobiles, unless you are referring to air conditioning. AC and Arduino do not go together.
ABS-sonsers is inductive sensors wich "reads" a toothed-wheel mounted at the driveshaft. so it's ac-voltage.
Logged

New Jersey
Offline Offline
Edison Member
*
Karma: 24
Posts: 2345
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let's see: new to arduino, new to C? Noisy electrical environment, multiple inputs, implying somewhat complex code. That code to control a mission critical system, such that bugs may have life threatening consequences. Lack of knowledge about how the cars systems work.

<British understatement>Probably not an ideal first project</British understatement>

One practical suggestion: make sure you record lots of telemetry to an SD card so that at least you can figure out after the fact why the arduino decided to turn off the 4WD mid corner.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 311
Posts: 35470
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
One practical suggestion: make sure you record lots of telemetry to an SD card so that at least you can figure out after the fact why the arduino decided to turn off the 4WD mid corner.
Or your relatives can, afterwards.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone for your continued input.

I’m not sure if it’s the way I’m reading this or not, but I’m sensing that I’m being flamed for asking questions on this forum. I am a newbie, so please go gentle. But, I’ll assume that it’s the way I’m reading it.

Judging by some of the replies, I think somewhere along the line I’ve managed to confuse the situation, so I’ll try and straighten things out. I have a 1988 VW Golf. I have a rear differential from a 2002 VW Golf 4Motion. I’m trying to put the two together. My 1988 Golf has none of the wiring or sensors used by the 2002 VW Golf donor car. So I’ve done my research as best I can to find out how the diff was controlled originally. Haldex, the company who make the diff and supply the controller to operate it to VW, don’t publish too much info about how it works, hence finding the inputs, but not a lot more. Given that, all I can do is recreate the sensors however I feel best.

I can code, albeit mainly in VB and SQL, not C. But, hey, we can all learn and I have been working through the samples on the main Arduino site. Unfortunately, electronics is something I know little about, which is why I'm here. I have no intention of creating this project and throwing it in the car and taking it out for some high speed testing, hence why I asked about being able to recreate inputs on a PC, so I can test various scenarios before heading off for some testing away from public roads.

So, back to the project….

Quote
Quote
A bit of research suggests VW ABS sensors return an AC voltage that rises with wheel speed. Guessing that has to be analog?
I'd question the research, then. There is very little AC stuff on automobiles, unless you are referring to air conditioning. AC and Arduino do not go together.
As per JesperKonge’s comment, it would appear it is AC. Chatting to a friend he mentioned that there is a way to convert AC to DC using a 4 way phase rectifier and a smoothing capacitor? So, it is possible to work around it. Only thing is, I'm not sure if it is an AC voltage or frequency change from the ABS sensor. Can anyone help? I can then monitor the feed from each wheel, and when one wheel's feed exceeds a specified threshold, we can assume we have wheel spin and activate the stepper motor.

Quote
Quote
but I'm guessing that the original ECU is converting a signal from a potentiometer mounted on the steering column. As I'm not using the original ECU, let's assume it's an analog reading from a multi turn potentiometer.
No, let's not assume that. Go look in the car and see.
There is no point, as I have nothing on the car. The steering wheel angle will be calculated by whatever I fit. So, once again, let’s go with JesperKonge’s comment and go with an encoder.

Quote
Quote
Again, the engine output is delivered from the original ECU and I have no idea how.
Seems to me that you are dead in the water, then.
Well, no. Not really. As mentioned before, I’ll make this first version a reactive system, rather than proactive. This means I’ll wait to detect wheel spin before engaging the diff, rather than trying to predict when it will spin and proactively engaging it before it does. We’ll save that for V2. Don’t want to over complicate my first project now, do I?

Quote
Quote
As I'm not using the original ECU and having thought about it, I want to make my life simple, lets ignore this one for now.
Ignore the whole project? Good idea.
Why did you copy just that bit? On it’s own it means nothing. In context it means, let’s not worry about the engine torque figure input, for reasons outlined above.

Quote
I don't think you know what all the inputs are - type, format, range of values, etc. However, it is likely that they can all be emulated in software. After all, the inputs are just numbers.
That’s true, I don’t know what the inputs are. That’s why I’m here, looking for guidance from you guys. As I say, electronics are new to me and I’m willing to listen to your suggestions in order to learn and complete my little project. So how can I recreate the inputs then?

Quote
As for running the inputs through the code, the obvious question is "What code?".
I’ll have to write some code for the Arduino in order to produce an output based on the inputs. I haven’t written anything yet, because without having inputs, or being able to recreate them, I can’t start. This is why I’m here in the first place.

Quote
Yes, you can see the outputs that you produce. Whether they are even remotely close to what the original controller produced, or not, I couldn't even begin to guess. I have my doubts that you could, either.
They don’t need to be anything like the original, as I’m not using anything from the donor car, other than the diff. So as long as I can deal with the inputs from the components you guys suggest/I select, I’m up and running.

Quote
Let's see: new to Arduino, new to C? Noisy electrical environment, multiple inputs, implying somewhat complex code. That code to control a mission critical system, such that bugs may have life threatening consequences. Lack of knowledge about how the cars systems work.
Again, feel like I’m being flamed here. Why do you feel the need to do this? Yes I’m new to Arduino. Yes I’m new to C, but let’s be honest, coding in C is not that difficult. Mission Critical system? Well, no, not really. The car runs front wheel drive for 99% of it’s life. The rear wheels are only engaged when the fronts loose grip. So yes, if it cut out mid corner at 100mph, then it could be nasty. But, am I really gonna build something and then make that my first test? No. That’s why I want to create a testing environment on the PC, alter inputs and make sure the code doesn’t do anything silly, before going and testing in the real world away from public roads. I understand the concept of the system, and that’s all I need if I’m not using the original electronic components.


I do like the idea of data logging though. Might include that. No need for the comment about my relatives being able to decipher the exact cause as to what killed me though. That’s not called for.

Logged

New Jersey
Offline Offline
Edison Member
*
Karma: 24
Posts: 2345
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I was trying to suggest to you, in what I had hoped was a mildly humurous way, is that the project you're proposing is rather tricky, particularly to be sure that your code is bulletproof enough to control systems in a car. It is suprisingly difficult to get even simple systems bulletproof and I wouldn't call yours simple. It seems ambitious to say the least for a first project. If I caused offense though, I apologize.
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 11
Posts: 1288
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Everyone else has hinted on the risks to make you are aware of the possibilities so, I won't add to it.

  I guess you want the diff. to lock for maximum acceleration correct? If so, have you considered making it more simple like, full throttle triggers it to lock, or a simple on-off switch.

  I am not saying it is a good idea but, I have seen 2 wheel drive vehicles drive around with a locked rear diff. and they work even doing sharp turns. They do eat up tires and make chirping sounds when turning.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No problems WildBill. Thanks for the apology. Not many other people on forums would, so it is appreciated.

Point taken about it's complexity, but if we look at it in it's simplest form then would the flow not look something like this:

If wheel slip > predetermined parameter then

   If steering input angle < predetermined parameter then
      Activate Diff
   end if

else

   if accelerometer = 0 then
      Deactivate Diff
   end if

end if

The diff is of a closed type, and therefore doesn't like tight corners, hence the need to calculate steering input angle and only operate on straights or gentle bends.

The thought behind the accelerometer is that if you are on snow/ice and all four wheels end up spinning at the same rate, you'll need to use check accelerometer to tell if you are moving or not and only deactivate when acceleration is finished.

I know that is basic and needs "fleshing out", but in my mind, it isn't that difficult. Or am I really that deluded?
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 11
Posts: 1288
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


  Here is some info. on what the Haladex controller is connected to.

http://forums.vwvortex.com/showthread.php?3067960
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Everyone else has hinted on the risks to make you are aware of the possibilities so, I won't add to it.

  I guess you want the diff. to lock for maximum acceleration correct? If so, have you considered making it more simple like, full throttle triggers it to lock, or a simple on-off switch.

  I am not saying it is a good idea but, I have seen 2 wheel drive vehicles drive around with a locked rear diff. and they work even doing sharp turns. They do eat up tires and make chirping sounds when turning.

I am aware of the risks, but I am trying to reduce them as much as possible before applying them in the real world. But appreciate your concern.

I have seen setups than manually lock it on and off. They are fine in a straight line, but they "wind up" in tight corners. As you say, that causes the tyres to chirp and wear and the car to "hop". Given that a working setup is achievable, I'd prefer to aim for something like that.

A full throttle trigger could work. That might be a useful input. But you could end up with the 4WD being engaged at high speed, when not needed, all because you put your foot down. I guess that is why on the original setup, it monitors engine torque, not just the accelerator pedal, because a wide open throttle doesn't mean the engine is producing a lot of power. Think, high gear, load speed and foot to the floor.

But cheers for your input. All these thoughts and ideas are welcome to the mixing pot.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


  Here is some info. on what the Haladex controller is connected to.

http://forums.vwvortex.com/showthread.php?3067960

Thanks again. Vortex is a good forum.

Here is a diagram of how the system works from the factory. Please remember I am trying to recreate this as a standalone system using my own components and can therefore ignore the engine speed and throttle position sensor which is used to generate the engine torque value in Nm.

Logged

Pages: [1] 2   Go Up
Print
 
Jump to: