[Diy_efi] Traction control strategy (solution offered)

Nic van der Walt nic at unibell.co.za
Tue Apr 30 09:23:13 GMT 2002



>As suggestioned, the output could then be directly read in from a
parallel
>port to a PC?

Yes, but if you are running windows the timing will be almost impossible
(not quite,
see later).

If you can run DOS, then measuring the times is relatively easy. I doubt
the
system timer is good enough, it only goes down to 18mS resolution.

All you need is relative speed, i.e. driven wheel is spinning x% faster
than
non-driven. So all you need to do is count clock cycles between edges.

On the parallel port you don't get interrupts, so you'll be sitting in a
tight loop
watching the inputs until all four has gone high-low-high. Then you have
four values,
you do the math, set some output based on whether you have slip and then
start watching
the inputs again.

With a 100MHz DX/4 you will be able to measure spin very accurately. You
won't have much
of an idea of absolute speed though. Crude but effective.

If you want/have to run windows you want external hardware to measure
the pulse widths. For
that you won't beat an Atmel AVR that does the counting and streams out
data on the serial
port.

There is one way a Windows based machine can do this though, if you are
really really good:
First of you need to use interrupts, a standard PC does have four lines
you can use for that.
There are the two handshaking inputs on each serial port that can
generate interrupts. Accessing
them is not trivial though. If you use the serial drivers of Windows you
introduce a lot of
latency. If you access the interrupts directly you can get very good
timing. This can be done
by writing your own driver.

Once you have the interrupts working you need an accurate timebase. The
system timer won't work, but
directX has something called the multimedia timer that gives you micro
second resolution.

If you get this working it will be a great app!

N.



_______________________________________________
Diy_efi mailing list
Diy_efi at diy-efi.org
http://www.diy-efi.org/mailman/listinfo/diy_efi



More information about the Diy_efi mailing list