Donations towards server fund so far this month.

 
£0.00 / £100.00 per month
Page:
Home > A-Series EFI / Injection > Megasquirt Traction Control

robert

User Avatar

6745 Posts
Member #: 828
Post Whore

uranus

so do you mean its need to have a ''rate of change'' to react to rather than a steady difference between front and rear rod ?
bit like the fuel injection systems that have a ''rate of change on the accelerator pedal'' page to put in an asynchronous pulse width increase ,to stop bogging ?
could you mount the toothed wheels and spin them manuallly with both hands to simulate it all ?

Medusa + injection = too much torque for the dyno ..https://youtu.be/qg5o0_tJxYM


Rob H

4314 Posts
Member #: 700
Formerly British Open Classic

The West Country

The other option is to supply the input to the front wheels with a fixed voltage and supply the input to the rear wheels with a sin wave generator. The challenge will be working out what frequency to go for and trying to tell if the MS is retarding the ignition appropriately. Only really any use if you can datalog the input voltages & the ignition timing, even then I think you'd still need to do some intergration which is getting all too hard for a Sunday morning. What you need is an electronics student who's looking for a Uni project to do the maths for you.

Isambard Kingdom Brunel said:
Nothing is impossible if you are an Engineer


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 7th Mar, 2010 robert said:
so do you mean its need to have a ''rate of change'' to react to rather than a steady difference between front and rear rod ?


It certainly seems that way.

His actual words are "The easiest way is to use wheel rpm sensors. Any undriven wheel will provide a valid pickup for Traction as you can assume that it is "driven" by the friction from the corresponding surface. That gives you (symbol mu). For Slip you need both the driven wheel and the undriven wheel (that you already have). So install an rpm pickup on a driven wheel and calcualte slip as per given formula. Now you have slip or lambda how it's called in certain papers. Now you only need their derivates deltamu and deltalambda. On microcontroler systems this is commonly done by a simple subtraction from the last known value and the current value within a known loop time. See the source code for that."

Bearing in mind Patrick is German so he's used some phrases slightly different to how I would but I'm fairly certain when he says "now you only need their derivatives" I'm now assuming it driven by dv/dt differences (v being the rotational speed but I can't do the symbol for rads/s in this text editor....).

I might be completely wrong but it seems far more responsive lthat way but it's almost impossible to simulate with what I cobbled together so far as I had assumed that I just wanted absolute speed differences.

I'll try to find the source code later (his last sentence) and see if it is more obvious but some of his stuff has been removed from the MS-Extra forum while they argue over licencing....

On 7th Mar, 2010 Rob H said:
......... even then I think you'd still need to do some intergration which is getting all too hard for a Sunday morning. What you need is an electronics student who's looking for a Uni project to do the maths for you.


The thing is Patrick has obviously done all this, it is just a case of how best to simulate it, or not bothering, having seen enough to believe it will work for real.

I have all the parts so I may just take the latter option rather than spend any more time experimenting. It's dead easy to turn it on or off in the MS software and I've come up with a much simpler way of clamping the voltages at 5V so the MS can't come to any harm....

Edited by Rod S on 7th Mar, 2010.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Well done Rod, great piece of work.

I'm happy to proceed with fitting this to our Miglia on the basis of what you have found. I could fit it to the 998 Turbo to do some testing, as discussed, but that would just delay getting the Miglia finished for this summer(which is starting to worry me).

The question that I now have is: if the code looks at the rate of change in speed for the driven and undriven wheels, rather than the actual speed, do we have to be paranoid about using equal numbers of teeth on the front/rear trigger wheels? As long as we selected R1 and C1 values to get them close, surely that would suffice.

Edited by Paul S on 7th Mar, 2010.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Brett

User Avatar

9502 Posts
Member #: 1023
Post Whore

Doncaster, South Yorkshire

excellent work guys

Yes i moved to the darkside *happy*

Instagram @jdm_brett


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 7th Mar, 2010 Paul S said:
The question that I now have is: if the code looks at the rate of change in speed for the driven and undriven wheels, rather than the actual speed, do we have to be paranoid about using equal numbers of teeth on the front/rear trigger wheels? As long as we selected R1 and C1 values to get them close, surely that would suffice.


At the end of the day, whether I'm right or wrong about rate of change rather than absolute difference, the MegaSquirt is only looking at simple 0-5V signals on two analogue inputs.

So it's much more a case of making sure the voltages are the same for given equal speeds, the number of teeth to achieve the voltage is irrelevant because, as you say, just choose appropriate R1 and C1 values.

However, one thing I did notice when testing all four LM2907 chips on the same square wave input, they all gave slightly different voltages out. As they were all being fed from the same regulated power supply I assume the small differences are down to the tolerance of R1 (5% as standard) and C1 (20% as standard) so once you've calculated the values you need it might be worth buying higher tolerance components. The other way would be to include a trim pot with R1 (low value in series or high value in parallel).

Schrödinger's cat - so which one am I ???


robert

User Avatar

6745 Posts
Member #: 828
Post Whore

uranus

ALTENATIVELY ,ACCEPT A SMALL PERCENTAGE EROR IN ALLOWABLE WHEELSPIN ,AND TUNE IT ON THE AMOUNT OF RETARD APPLIED PER (oops sorry caps) rate of change (ROC?)difference front to back ?

it does sound ,after reading the fuzzy logic paper , lke it needs a varying rate signal to react with a ''what will happen next ''fuzzy logic process ?

Medusa + injection = too much torque for the dyno ..https://youtu.be/qg5o0_tJxYM


Rob H

4314 Posts
Member #: 700
Formerly British Open Classic

The West Country

Surely if it works on the rate of change in voltage it doesn't matter if one input is giving a slightly higher reading than the other thus negating the effect of the tolerences on R1 and C1.

Isambard Kingdom Brunel said:
Nothing is impossible if you are an Engineer


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 7th Mar, 2010 Rob H said:
Surely if it works on the rate of change in voltage it doesn't matter if one input is giving a slightly higher reading than the other thus negating the effect of the tolerences on R1 and C1.


There is another feature with Patrick's code where it monitors for defective sensors. It acts after a certain time and can be switched off - Patrick said on the MS-Extra forum to turn it off for testing - but I can only assume (and I stress this is an assumption at the moment) that it watches the voltages.

So, without understanding it better, it would seem sensible to match the voltages as best as possible.

The less unknowns you have when trying something new, the better :)

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Well, the MS Forum thread has been locked because of personal insults !!!

To me it seems that Patrick (European) has stolen someones thunder and probably upset the mainsteam code writers (Americans). In my opinion, of course.

There are licensing issues, but I think that was only part of the problem.

What we need to do is work out how to build the traction control code into the latest 3.0.3t code. There is a make file that can do this, but I'm loathe to start learning how to compile code again.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


carl talbot

326 Posts
Member #: 1323
Senior Member

Just 'sort of' read this thread through
You guys are unbelievable !
Amazing stuff !

there was me thinking that the throttle pedal did this stuff ?


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

On 30th Apr, 2010 Paul S said:
To me it seems that Patrick (European) has stolen someones thunder and probably upset the mainsteam code writers (Americans). In my opinion, of course.

Actually, James Murray (jsmcortina) is English... And he's the main MS1/Extra, MS2/Extra and MS3 code writer (with Ken Culver in the last 2 cases). And in my opinion, Patrick overreacted and didn't even acknowledge the compromise presented.

What we need to do is work out how to build the traction control code into the latest 3.0.3t code. There is a make file that can do this, but I'm loathe to start learning how to compile code again.

I'll have a look at it at some point.

Jean

http://www.jbperf.com/


Brett

User Avatar

9502 Posts
Member #: 1023
Post Whore

Doncaster, South Yorkshire

ive put this to bed for now, but i reality i can be testing my front sensor at this point :)

Yes i moved to the darkside *happy*

Instagram @jdm_brett


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Well, it's been a while but Graham, Paul and myself have picked this up again in the last few weeks so thought it worth mentioning that we are making some progress.

We have all now had various prototypes working on breadboard, veroboard, driven by electronic simulators, toothed wheels in lathes etc. but nothing yet in a real car.

Everything checks out fine on the early version of the Extra code (that Patrick initially used) but we are having a few problems recompiling into the latest version of the code.

I'm sure we will get over that soon but in the meantime I decided to annoy Graham and Paul by putting the hardware on a proper PCB



Not fully assembled yet but four channels and output voltage clamp.

Big thanks to Jean for recommending a Chinese/HongKong company that will do prototype PCBs at a very reasonable cost.

I was going to follow Rob's suggestion and make a simple single sided PCB myself (old fashoined chemical tanks etc.) but this company Jean suggested does ten prototype double sided boards up to a maximum of 100x100mm each for £22 delivered to the UK. That's £2.20 each......

This first version is a bit crude as I did the initial design as single sided with loads of jumper wires on the top and when I quickly changed it to double sided, I didn't bother much with the layout..... Version 1.1 (yet to be ordered) is much better for layout and has a serial port added for LC-1 comms to Jean's IOx board (which the three of us are now assembling).

So if any of you wish to help progress this, I have a few spare PCBs......

Schrödinger's cat - so which one am I ???


hazpalmer

User Avatar

1648 Posts
Member #: 9038
Post Whore

Carlisle, Cumbria

sort of thing i do at work, with PCB's and breadboards and then programming them. Its not to that sort of level though.


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

That's a great bit of work there Rod, very proffessional.

My involvement in this has been to test the circuits that we developed last winter. So I built a couple of circuits on a piece of veroboard.

I'm planning on developing/using this on the next 998Ti. As it will have an open diff and I don't have room for toothed wheels on each pot joint, I have decided to run the driven sensor on the crown wheel. I will have to select a lower slip in the software to make allowance for a mechanical "average" rather than an electronic "maximum" circuit.

To test the circuits, I mounted a 59 tooth crown wheel, a 37 tooth idler gear and one of the 12 tooth wheels in the lathe and ran it at it's highest speed. Attached the sensor to the toolpost and read the frequency and voltages with a DVM. All went well except that all the voltage outputs were only 60% of what was calculated.

After a bit of head scratching, I read somewhere that standard capacitors were subject to a tolerance of +20%/-80%, yes, minus 80% !!!! Anyway, I bought a couple of tight tolerance capacitors for C1 and hey presto, voltages within 2%.

Question for Rod. have you configured your board so that you can just use 2 or 3 wheel sensors? For the "average", rear wheel circuit, it looks like if you just leave out the components it will be fine. What about the "maximum" driven wheel circuit?

Now all we have to do is break down the assembler code to understand how it talks to the ECU ???? *frown*

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Thanks Paul,

It's not up to Jean's standards but,
(a) I started off on the assumption I was going to make a single sided home made PCB with lots of jumper wires on the top so the layout was to minimise jumpers rather than optimise the spacing of components and,
(b) because I've only ever done home made boards before and they are hard with track widths, spacings etc. because you can't do solder resist on a home made board, I didn't try to compress it.
Mk2 (only on the PC HDD at the moment) is much better.

I've yet to test that I've got everything right but it takes 2,3 or 4 sensors.
Basically it is two "select high" pairs (not average), one front, one rear, and you just leave out the left hand IC if you want a single input from either axle.

The "select high" is much easier to give 1 or 2 sensor options, the "select average" would need two alternate circuits (using jumpers to choose which) but "select high" just utilises the open collector output stage of the LM chips so the highest one just "wins". It would however, be dead easy to do the "select average" option on the MK2 PCB now I can see how much space I have wasted.

I also couldn't think of any good reason to use "select average" for traction control (maybe for ABS on an old 3 channel pump system, but not for TC).
The "select high" will be more sensitive on the front with two sensors (you obviously will have a mechanical select average) and on the rear, if using the average, as soon as you lift the inside rear wheel the rear average would drop and TC would engage even if both fronts still had grip.

So I can't think of any TC scenario on a FWD car where average is better, although a production car designer might think otherwise and want TC to engage when a rear wheel lifts......

Also, all the other bits on the PCB are optional, it will take either the 2917 chip (with internal voltage regulation) or the 2907 from the 9V power supply I included. The 9V is to run the OpAmp which does the (optional) voltage clamp on the outputs - I only included the clamp because I'm paranoid about anything over 5V getting near the MS2 CPU - and also to run the Hall switches from a constant 9V supply rather than the car battery which, again, is what I'm going to do but is totally optional.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Put like that I have to agree that front and rear "select high" circuits would be best.

I'll have one of your boards. Are you going to do kits of parts?

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Joe C

User Avatar

12307 Posts
Member #: 565
Carlos Fandango

Burnham-on-Crouch, Essex

If it helps I'll take one too, dunno if/when i'd get around to using it though.

On 28th Aug, 2011 Kean said:
At the risk of being sigged...

Joe, do you have a photo of your tool?



http://www.turbominis.co.uk/forums/index.p...9064&lastpost=1

https://joe1977.imgbb.com/



Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Paul, you're obviously more than welcome but you might want to wait for Mk2 if you ever want to use your original Innovate gear with Jean's IOx board in the future as I've included the RS232 chip and circuitry to do that link on the same PCB (saves space in the case). Or you can have one or more of each type.....

Kit of parts is no problem, I have the Farnell codes and last year they upgraded me to a pseudo trade type account (still on credit card but no mimimum order and/or postage charges any more). I've already ordered a stock of the small footprint DB9 male connectors as it is becoming hard to get the small footprint ones in the UK any more. Male to prevent it being confused with the MS2 serial connector if they were all in the same case.

Joe, you're more than welcome. The help will be ultimately in taking this forwards, the cost of the PCBs is peanuts thanks to the company Jean suggested. ie, the more people we get involved the more likely we are to make it truely successful.

But again, you might want to wait for the Mk2.

No problem either way, but I do need to finish assembling it and test it properly first - I did the design the old fashioned way, no schematics and netlists to verify the design, just manually placing components and allocating tracks so there may be an error/omission that I failed to spot.

Schrödinger's cat - so which one am I ???


Anton

User Avatar

1050 Posts
Member #: 764
Post Whore

Staffordshire

I was playing with a custom TC system last november using an arduino. But has since got held up with other projects and the release of Black Op's on xbox :)


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 26th Jan, 2011 Anton said:
I was playing with a custom TC system last november using an arduino. But has since got held up with other projects and the release of Black Op's on xbox :)


Interestingly the PCB company that Jean recommended (and I used) does some arduino development stuff too.

Not sure what "Black Op's on xbox" is though...... must be from before my time :)

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Finally got around to fitting the sensor/wheel to the gearbox. Last job before fitting the engine and box together.



I had to machine down the diameter of the wheel to clear the gearbox casing, but it all fits nice.

I've also skimmed the face of the coupling to make sure that it is nice and flat and will fit the HS.

The other sensor is for the dash speedo. It will have a locknut fitted.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Brett

User Avatar

9502 Posts
Member #: 1023
Post Whore

Doncaster, South Yorkshire




On 21st Jan, 2011 Rod S said:



Rod any chance you have another board i could buy? or have you done any updated ones

cheers

Yes i moved to the darkside *happy*

Instagram @jdm_brett


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Brett,

You are welcome to one, PM me your address. The company that does the prototypes allways do batches of 10.

Bear in mind we haven't made this work yet with the latest versions of the code.

The teddys got thrown out of the cot at version 3.0.3r so a modified version of 3.0.3r is the only one that works.

Patrick made the "diff" file freely available so theoretically it can be integrated into any version of the MS2-Extra code but Graham T spent a fair amount of time trying without much success - apparently in the later versions some key lines of code have been moved so the merge isn't straightforward.

But if you can, let us all know :)

It isn't realistic to stick with 3.0.3r because I (at least) need 3.0.3v or later to use the CAN bus for all the O2 readings. And the best versions are probably the 3.1 series.

I designed an updated board but never had them made.

But the update was only to use spare space on the board for an RS232 chip - for Innovate LC-1s to talk digitally to MS2 via Jean's IOx, but I've now done that much more neatly with Jean's smaller IOx-OEM - the traction control circuits stayed the same.

Schrödinger's cat - so which one am I ???

Home > A-Series EFI / Injection > Megasquirt Traction Control
Users viewing this thread: none. (+ 1 Guests) <- Prev   Next ->
To post messages you must be logged in!
Username: Password:
Page: