Content originally posted in LPCWare by dragilla on Mon Nov 14 06:17:02 MST 2011
Hi,
I'm working on a motorcycle traction control project. My device will also do simple data logging on an sd card.
My general idea:
1) read data from various sensors (including g-sensor, gyro, tilt?, wheel speed sensors, gps) in a loop at constant rate (say maybe 300hz).
2) in each loop calculate if the traction control should be engaged - I have a basic concept but it will require a lot of tracday testing
3) set flags for tc for 4 cylinders, telling to either retard or kill sparks for selected cylinders (based on the level of traction loss)
4) each signal from the ecu to coil (spark signal) interrupt occurs. In thec interrupt function (one function for each cylinder) I check the flag and either pass the signal to the coil or retard it or kill it
5) in the mean time i log the data to an sd card (probably in the sam loop as in 1)
Do you have any thoughts on this? What should I pay special attention to? I know power supply must be very stable.
Any advice on the tilt angle? Should I use the Kalman Filter or the Complimentary Filter to calculate tilt from gyro and acceleraion? Or maybe I should just forget about it and get a tilt angle sensor?
Anyway let me know what you think about the general working scheme I wrote above. Maybe it should be constructed differently? Can be done better? Tell me.
I was adviced to use LPCXpresso for this as it is powerful enough. Is this right? I have lpcxpresso 1769.
If you have some knowledge about ignition retarding I could really use some advice on that too :)
cheers,
--
Luke