Automotive Haldex AWD controller?

fahrvergnuugen

New Member
I'm wondering how difficult it would be to use a PICAXE to control the differential lock on a Haldex AWD system.

Haldex is the AWD system used on modern VW / Audi / Seat / Skoda cars which have a transverse engine layout. There are a few of us who are converting older cars to use this electronically controlled AWD system.

The factory controller is very complex and is not practical to swap into an older car. There are standalone controllers available, but they are extremely expensive - ranging anywhere from $1000 to $1800 USD.

The system has a bipolar stepper motor which is connected to a valve that regulates oil flow to the differential. As the valve opens, oil flows and locks up the clutch plates, thus sending torque to the rear wheels.

My idea is to use the throttle position sensor (TPS) as an input to control how much torque is sent to the rear wheels. The TPS can provide a 0-5V analog signal. Reading the PICAXE manual, it seems reading this input is very straight forward.

My biggest question is with the stepper motor as I have no experience with them. Can a PICAXE control a bipolar stepper?

Here are some pictures of the motor (borrowed from this post):

 

BeanieBots

Moderator
Is this a "mission critical" system?
If yes, then you should re-consider doing it.

The function and programming are of little consequence and will pail into insignificance compared to what you will have to do in way of bullet proofing your signal conditioning and power supply issues associated with the electrical environment in a car. (15kV spikes, 200v surges, brownouts, alternator overshoot etc. etc.) Oh, and legislation!

There are countless threads in this forum which will highlight the sort of problems you will be up against so I won't repeat them here. Those units cost a lot of money for a good reason. Namely, they work in a car and they are failsafe.
 

hippy

Ex-Staff (retired)
This is both a mission critical and safety critical system and I would strongly advise against doing it.

Reading an analogue voltage and controlling a stepper motor are both within a PICAXE's capabilities but the issue here is of application and what happens when something goes wrong as the PICAXE does something unexpectedly when you least want it to; cornering at high speed etc.

The effort you have to put in is in making the system failsafe as BeanieBots says and this is what makes pre-built units so expensive. These will have undergone an extensive design process and testing in order not to kill a driver, their families or other road users.
 

fahrvergnuugen

New Member
Is this a "mission critical" system?
No. Worst case scenario is if it were to fail in the "on" position. In that case the car won't want to make a tight turn in a parking lot and it might overheat the oil in the rear differential. Failing in the off position wouldn't be any different than countless times I've broken my mechanical AWD system that I'm running now.


The power situation won't be that difficult to deal with. I can tap the engine ECU's power supply, which is already conditioned.
 

hippy

Ex-Staff (retired)
I have had my car's electrics fail which consequently killed the power-steering and the power-assisted brakes. As this was while pulling out of a side junction, the turning circle was masively reduced and braking all but failed, leaving me on the wrong side of the road facing into the oncoming flow of traffic. I narrowly missed crashing into the side of a vehicle travelling at 60mph, the one behind that emergency braked and stopped.

The worse case scenario is death.

That was a mechanical failure, such things do happen, we live with such risks and sucking car seats up our bum-holes ( and appreciate living much more afterwards ), but what really worries me is that on the thread where the photographs came from it seems most there don't even understand what they are dealing with let alone the consequences, to themselves or others.
 

fahrvergnuugen

New Member
hippy said:
The worse case scenario is death.
The worst case scenario of crossing the street is death. What's your point?

With all due respect (and don't take this the wrong way), but I didn't come here to get lectured on the ethics of modifying my car. I came here seeking advice on the capabilities of the PICAXE - specifically whether or not it can control a bipolar stepper motor.

You don't have to agree with what I'm doing, but you should at least respect that just maybe I know what I'm doing when it comes to modifying cars (just like I respect the fact that you, and others here, know far more than I ever will about electrical engineering).

I know that there are a lot of electrical intellect here on this site, and that's what drew my interest. I didn't come here with the expectation of getting advice on the application - though the "did you think of x or y" type comments are certainly valuable (if not for me, then for other readers). I mentioned the details about the application thinking that just maybe there might be other car enthusiasts here who might find what I'm doing interesting.
 

MartinM57

Moderator
Don't let them get you down f.

The forum is a fantastic source of support for making PICAXEs do things, but its house style is to be very circumspect and responsible whenever people want to use a PICAXE for absolutely anything to do with cars, lawnmowers, chainsaws, mains electricity, '000's of volts of static electricity etc.

It's IMHO a very responsible attitude to take as a lot of people wanting to do such things are completely naieve about safety, failure modes etc etc, but it does seem sometimes that it's a one-size fits all response however knowledgable the poster is about his/her subject matter.

Unfortunately, if you hadn't said what you wanted to control a motor for, you would have got the answers already - and a whole load more information as well...nothing a new username and a new post about PICAXEs and bp stepper motors won't sort out though :)

I'm sure the answer to your question is "yes", but unfortunately I don't know the details - a bit of time searching the forum or even googling for "PICAXE bipolar stepper" will find some guidance

Good luck....
 

MartinM57

Moderator
Look at the schmatics of the Megasquirt system. It has a bullettproof power supply scheme:
Now you're treading on dangerous ground - talking about a DIY system that controls your fuel injection (and optionally your ignition system) built out of a microcontroller that no doubt expressly forbids itself being used in safety critical applications, some open source and community written C code and a load of discrete components all built into an amateurish extruded aluminium case using a 36-way D-type plug to carry ignition/injector coil currents....

...be away with you ;)
 

hippy

Ex-Staff (retired)
The worst case scenario of crossing the street is death. What's your point?
The point is that that if someone came here and asked if they could run across the road ( or jump off a cliff ) it would be rather reckless to simply say "yes, sure you can" without the obvious caveats.

With all due respect (and don't take this the wrong way), but I didn't come here to get lectured on the ethics of modifying my car. I came here seeking advice on the capabilities of the PICAXE - specifically whether or not it can control a bipolar stepper motor.
And that answer was indeed given in my first reply.

You don't have to agree with what I'm doing, but you should at least respect that just maybe I know what I'm doing when it comes to modifying cars (just like I respect the fact that you, and others here, know far more than I ever will about electrical engineering).
We all have to determine what "respect" should be given, and I'm afraid that your view of it not being a mission critical system and a rather throwaway assessment of what could go wrong ( contrary to my belief in the reality of what could go wrong ) suggested to me that you had not thought through the implications of what you were planning. If I'm wrong I can only apologise.

I know that there are a lot of electrical intellect here on this site, and that's what drew my interest. I didn't come here with the expectation of getting advice on the application - though the "did you think of x or y" type comments are certainly valuable (if not for me, then for other readers). I mentioned the details about the application thinking that just maybe there might be other car enthusiasts here who might find what I'm doing interesting.
Setting aside the issue of the application, the PICAXE can take an analogue input and can also control stepper motors.
 

Dippy

Moderator
'mission critical' - sounds so NASA doesn't it.

... and we trusted ABS in cars that were controlled by '70s semiconductors. Shame on us.

A zener diode used by General Motors is just the same as a Zener bought by you isn't it? I ask ironically.


Don't take it too much to heart fahrvergnuugen, many of the questions here are asked by very inexperienced youngsters thinking that they can control a Space Shuttle with three lines of code and a dusty transistor they found in Grandad's Beijing made Music Centre..

The 'Old Lags' (and at 38 I include myself) are generally concerned that people are doing things that they shouldn't - especially where safety is concerned so don't feel too put out.

Bottom line: no-one wants to condone you designing a circuit and programme that may cause pain.
Bottom line 2: Of course you can do it if you've got the skill/knowledge.
Bottom Line 3. Why do these things cost so much? Perhaps it's the cost of expertise, development time and testing time?

Oh, by the way, yes, with suitable skill you can control a stepper. But if you'd searched the Forum or even read the manuals you'd already know that....

I ask one question with the greatest respect; what is your skill level for electronics and coding? If you don't know your zener from your schottky then forget it.
 

RobertN

Member
Megasquirt input protection

I don't agree with the Megasqiurt input protection scheme. D4 and D6 are suppressing transients in the vehicle system, not just for the Megasquirt control. Why have components on your board that can carry high unwanted currents and transients from the vehicle, through your board. Apparently they are trying to protect the loads connected to V12. Best to limit the currents entering your board to what you need. D13, D15, and C15 provide basic passive trasient protection, some additional smaller value caps would be desireable for a broader suppression range.

Seems like a few here are overly sensitive to a hobbyist project involving a vehicle. Fahrvergnuugen is the one that is taking a risk acceptable to him. The risk to those supplying components and advice for his project is extremly low. One brief statement concerning the project and product liability is enough. Making a dagwood sandwich out of it is enough to choke us all.

Fahrvergnuugen, suggest you study the manuels, write some code, run simulator and bench tests. It takes a bit to understand this stuff, but it works well within its limits. The challenge is determining what you can do within those limits. And for Pete's sake, don't mention anything about medical, vehicle, high voltage, getting hot, high power, anything that moves, etc.
 

hippy

Ex-Staff (retired)
What needs to be said has been said so I don't want to drag this out further but I believe the following deserves a comment to explain why it was said -

Seems like a few here are overly sensitive to a hobbyist project involving a vehicle. Fahrvergnuugen is the one that is taking a risk acceptable to him. The risk to those supplying components and advice for his project is extremly low.
You're right some of us are sensitive, perhaps overly. All of us have a duty of care; to everyone, not just the project developer. If others are put at risk by a project there is a duty to protect those people as best we can. While the duty of care is primarily a moral one, if something goes wrong, a third-party may sue the project developer, who in turn may claim those giving advice were equally responsible for any harm done.

Sadly, blame does frequently get directed elsewhere when someone faces the stark consequences of their actions. Anyone giving advice in a public forum therefore has to protect themselves from the risk and consequences of that happening. Their reputations, livelihoods and even liberty is potentially at stake whenever they offer advice.

Likewise, the duty of care is a moral responsibility which can make not speaking out inappropriate. If a person was heard encouraging someone to run across a busy stretch of road with their eyes shut to intervene and speak out would be the correct course of action. Some may say the stupid deserve what they get, the counter is that stupidity is the result of vulnerability and the vulnerable need to be protected from adverse influence, and we all have the duty to do so. If someone doesn't appreciate the risks, there is a duty on those who do to enlighten them.

MartinM57 is right, if Fahrvergnuugen had not told us of his intended application and simply asked how to read analogue and how to control a stepper motor then advice on doing that would have been given ( and it is already publicly available ). There would have been no reason to have issued warnings on responded with cautions as that approach would have provided a valid defence to having not exercised a duty of care by those helping.

Fahrvergnuugen however explained the application. The potential risk was obvious and the responsibility for duty of care had to be exercised, which materialised as the advice against doing it, in order to create that valid defence to the consequences the project may have.
 

Dippy

Moderator
I appreciate hippy's concerns. It is always good to err on the side of caution.
And for total Newbies then many projects should err on the side of not doing it at all!
Though I do get a little tired of "mission critical"...

As I said before, many of the askers here are completely inexperienced and need to be protected from themselves in many cases.

Many 'enthusiastic' projects suggested on this Forum are perfectly OK for expreienced people but blinking dangerous in the hands of a newby. A little learning/knowledge can indeed be a dangerous thing.

However, I am not anti-have-a-go. But I have a few reservations, subject to what may happen if the device fails:-

1. If something slightly painful may happen to JUST the 'experimenter' then lesson learnt.
2. If something really nasty might happen then suggest NOT doing it.
3. If something may happen to third parties then forget it completley.
4. Could a consequence result in legal / insurance claim then leave it alone.
5. Will operation of the device cause an insurance or liability issue. Go ahead, laugh, but you may come a cropper.
6. Experience / knowledge / skill of constructor in the field of proposed project.

I don't know what would happen if this device in this instance went wrong. You may simply lose power to the rear wheels. Which may be dramatic in certain circumstances.
How do we know quality of construction when this Forum is littered with people proudly buying the cheapest parts available on the planet. What happens if the hose split and all the oil fell out?

Robert: "Fahrvergnuugen is the one that is taking a risk acceptable to him." - well, is this entirely true with a vehicle project being used on Public roads? If he was making a garage engine hoist then I might agree.

I'm not going to suggest Don't Do It, I've done all sorts with cars in the past and I don't want to sound a hypocrite. But I got experts to do the bits I was unsure about or plain not competent to do.
Just don't skimp on parts and don't skimp on time/testing - and don't do it anywhere near me :)


PS. HIPPY: Are you using the auto spell checker in Firefox?
 
Last edited:

hippy

Ex-Staff (retired)
@ Dippy : FF Spell checker turned on. Does it show ? Has it let one sneak through ? The "warnings on responded" was a typo FF wouldn't spot and I couldn't be bother to fix, should be "or".

FF only turns it on for "Quote". "Quick Replies" have to be manually enabled everytime. Right click, "Spell check this field".
 

demonicpicaxeguy

Senior Member
fahrvergnuugen ; i strongly suggest depending on where you live to have a look look through your insurance policy in the fine print as well what it says about "non factory modifications and alterations" failing that ring the insurance company and get some advice,

i've recently had what we refer to here in australia as a "rice burner" run into the back of my camry, it was a nice car suburau wrx, it was one of those hackyard modified ones, they had chopped the springs with the old angle grinder put on these big massive stupid rims that barely fit, fitted this silly boykit and also a bigger and better turbo(like it needed it) lukily ince it was lowered it literally just slid under the back of my camry carefully guided by my towbar, and completely took out my exhaust, anyway long story short there was a little arguement as to who was at fault which ened with the police arriving`and his car being issued a defect notice and him issued a fine,,,,, it goes on...

since then their insurance is refusing to cover the damage and as for my insurance company they are trying to tell me i haven't been covered since november because aparently the bank refused the direct debts on my acount an niether party rang me about it :(

thankfully my car i still drivable after the brief investment of a new exhaust system with money i really didn't have, and i've still got a bent towbar and bent floor in the boot, all this because somone didn't get an engineers certificate and did somthing themselves in a dodgy manner

turned out what caused the accident was brake failure , which were also modified

just curious where do you live?, and what do you do for a living?

personally by comming on here and asking what you have without obviously reading the picaxe manuals, and by the way you reacted to the caefull and concerned advice by a few peoplei'd say you're probably not as educated to the level that is really needed to carryout this poject in a safe and legal manner, there is a good reason these things cost thousands of dollars and it's mostly because of the reasons you don't immeditly think of,
 

FBM-spec

New Member
I am a member of a very unique internet club, we modify uk ' proper ' mini's ( cars....the old ones that rot alot) by taking out the old fashioned ( usually broken ) mini engines and replacing them with high performance modern day engines. Over 200 bhp is quite normal !!! To get people around modern day engine management quirks , Megasquirt is used by many. Even if it's design is not brilliant in terms of noise suppression. It is very reliable and very configurable. ( personally I don't use one )

The mods people do to cars are viewed by some as dangerous and rediculous. At the end of the day , most people who modify and drive these cars are generally knowledgable , sensible , and have RESPECT for what they have created. If they don't know about something they will endeavour to find out. Most ( not all) fully inform their insurance company of every change from standard . My own insurance company received a 20 page word document detailing changes from engine / gearbox / brakes down to the size of the fuse and cable feeding the fuel pump !!!

What is more dangerous in my view is the ' no so DIY ' guy who goes to his local halfords , buys a set of brake pads and fits them himself..........I have witnessed this personally...it takes some beleiveing but 100 % true...
I was getting a car MOT'd and waiting for the previous ' test' to finish...... the mechanic came out of the test bay shaking his head ....I was a regular at the test station so he showed me what he had found ;--

The owner had bought some brake pads and fitted them himself after it failed the MOT a few days earlier. He had fitted them the wrong way round....eg METAL SIDE to disc.

He had drove it to the test station too. !!!!!!

Back to the original question Yes the picaxe will drive the stepper with the help of a driver transistor / driver chip .

Picaxes are very prone to electrical spikes...this will desroy them or cause lock up !!!


Be careful , sensible , and honest
 

axcampbell

New Member
Entire reason I got into Picaxe was to modify electronic systems of cars. I use a "Megasquirt like" power input section with a LM7805, 2 caps, a diode and a resistor. I have run the system in several different kinds of cars.
I have built voltage and pulse width interceptors with analog input (with input filtering of course) and have only had very few problems, mainly with circuit board layout.
The big thing to look at with automotive mods is worst case scenario. With all of my modifications, worst case scenario is, well, engine or turbocharger failure. About the only system I would not work on is if I had electronic assist brakes. If you want to think about it, it is just a dangerous for someone to modify their lighting or not torque their low profile rims and have one fall of etc.
I would suggest buying a book called "Performance Electronics for Cars" It has really overkill input and output circuits. Along the same lines in http://www.autospeed.com. This is the same guys as Jaycar and is a site that really take the mystery out of performing mods to your cars. The main contributer, Julian Edgar, has devices to control traction control, brake controllers, lighting mods etc.

IMO the bottom line is that if you take the proper safety precautions nand do your homework, doing calculated electronics mods to your car is a very safe and fun.
 

boriz

Senior Member
“Mission critical” is a phrase used in the Picaxe documentation. It simply means that RevEd can’t be sued if a Picaxe fails and injury or loss results. It’s an important and necessary caveat in this age of nuisance lawsuits. It does not indicate anything uniquely fallible about the Picaxe.

A properly designed circuit with all required suppression and thoroughly tested software should fail no more or less often that a $1800 ‘pro controller’.

I think the problem here is that the portion of your project that you are asking advice on (the electronics, the interfacing, the software), could be just as critical to safety as any other more physical component in the vehicle and therefore could, if not properly designed/constructed/tested, indeed result in loss or injury.

Personally, as long as we all know exactly the risk we are taking, and can give informed consent, I see no reason not to proceed, even if there is a small risk of injury or even death. Hey what’s life all about? (And auto-racing in particular).

Back to the question:

Yes Picaxe can be used as a controller for your project. It’s relatively easy to read an analogue signal and drive a stepper (look in the pdf manuals). The difficult part will be making it fail-safe, fool-proof and reliable in your electrically noisy and physically demanding application.
 
Top