Tuesday, March 31, 2009

Accellerometers and traction control


As my friend Fabio suggested, I should include some accellerator sensors to better perform the traction control.

The task should not so difficult since there are many accellerometers on the market even for low prices. In particular, I think is better to look at those having a digital interface (i.e. IIC2 or SPI bus) instead of those having pure analogue output. Looking around I've found many but all have tiny pacheages so are really difficult to be soldered! Thanks to FuturaElettronica we can get a soldered 3-axis accellerometer for only 13€: link.

How it works?

The digital accellerometers are MEMS componenet having one floating part inside that goes to change 3 capacitances (each capacitor is perpendicular to each other: one in X direction, one in Y and one in Z), the capacitance variation are then converted to digital signals by appropriate circuitry integrated on the same die. Typically they could measure +/-1.5g or +/-6g, but for the byke the +/-2g should be enough, so the MMA7455LT could be ok.

Monday, March 30, 2009

XE164 KeyChain ERRATA

Please take care that the KeyChain serigraphy of connector J4 is wrong: pin P04 is bottom-right and not top-left. the following picture try to explayin it:

Saturday, March 28, 2009

How works CDI

Since I need to modulate the engine power, I need to understand the CDI technology:

Capacitor
The Capacitor is the main component: in the fist phase it is charged whle in the second phase it is discharged trought the coil and the spark. Typically is value is from 0.47uF to 2µF .

Switch
The Switch element has the purpose to transfer the energy from the capacitor to the coil, typically it is composed of one SCR ( Silicon Controlled Rectifier) or TRIAC combined with one diode for the reverse current coming from the ignition coil.

Ignition coil
The ignition coil has the goal to increase the voltage to 5 .. 20 kV

Spark plug
The Spark is such component capable to fire the combustible mixtures. The mixutures could start burning only if about 20 milli joules will be given to it.

Finally also a position sensor and an CPU is required:


Let's try to understand the hot part:


Seems that when the SCR start to be conductive, the current Ith goes from the capacitor to the coil, while the negative impulse is conducted by the diode. Finally the current that goes into the coil is:


Uhmmm.... this is not all what I would need to fully understand it, but is a good starting point!

Sito segnalato da:

La risorsa Italiana per l'elettronica.

Elettronicamente.com


Sito segnalato da:

La risorsa Italiana per l'elettronica.

Friday, March 27, 2009

Traction Control (Con't)

I did some researches in vision of the traction control: I look for POWER MOS capable to sustain high voltages....
Here what I found (and get!!!):
1. IPB50N10S3L-16
2. IPD50P03P4L-11

Humm, not really useful for the CDI, the best would be to get:
* IPP60R099CPA
* IPP60R099CP available from Farnell

... I think I should order from Farnel...

Sunday, March 22, 2009

Weeling Project goes to Traction Control

Since the Weeling Project is now working, I like to extend it with the Traction Control feature.
The basic idea is to cut the torque each time the rear weel is spinning above a certain threshold (same threshold used for the blinking white LED).
I've done some researches and I found out that one idea could to reduce the engine torque is to cut one cilinder spark firing.
Let's start to understand how Yamaha R6 is working:


About the spark coil, I found:



Yamaha declare to use a CDI, this is what Wiki is teaching us:
In a CDI system, a charging circuit charges a high voltage capacitor, and during the ignition point the system stops charging the capacitor, allowing the capacitor to discharge its output to the ignition coil before reaching the spark plug.

A typical CDI module consists of a small transformer, a charging circuit, a triggering circuit and a main capacitor. First, the system voltage is raised up to 400-600 V by a transformer inside the CDI module. Then, the electric current flows to the charging circuit and charges the capacitor. The rectifier inside the charging circuit prevents capacitor discharge before the ignition point. When the triggering circuit receives triggering signals, the triggering circuit stops the operation of the charging circuit, allowing the capacitor to discharge its output rapidly to the low inductance ignition coil, which increase the 400-600 V capacitor discharge to up to 40 kV at the secondary winding at the spark plug. When there's no triggering signal, the charging circuit is re-connected to charge back the capacitor.

The circuit shuld be similar to the B-type:


threfore without additional information, I have to assume that inside the Yamaha R6 ECU four capacitors are available and charged at about 400V and ready to share their energy with the spark-coils (E = 0.5 x L x I2 = 0.5 x C x V2) when the fire should happen.

Tourque Control
One idea to control the tourque seems to be the disabling of one cilinder firing, seems that GripOne is implementing such strategy.

Looking around I found this connection for the Inductive Transistorized injection (so, not working on my R6):



Some useful links:
McLaren CDI
GripOne Manual

Saturday, March 14, 2009

Putting it together (Con't...)

After one day on the race-track, I've try to understand the YAMAHA R6 (2003 model) ECU signals, these are the garage photos: after I have connected the new weels speed sensors: and the rear one: as is visible in the photo, the inductive sensor does not detect the metal braking disk (LED is OFF), when moving the weel it comes near by the metal the contact is activated (LED in ON): I also take some oscillograms of the engine PRM and rear RPM (output of the inductive sensor), here the 1st gear at RPM=1000:

this is WEELING:

Sunday, March 1, 2009

Putting it together...

It is time to put the pieces together.... even if all is not ready. The "XE164 to Display connections" post explayin how the XE164 is driving the Display module, now remains only to solder the connectors: I decided to solder connectors to the XE164 KeyChain board so to be flexible to replace it (you never know... and since I have not done any dedicated PCB, I'm afraid that I will need maintenance!). For the insystem flash programming and for the debug the XE164 KeyChain makes available the JTAG interface, I solder then a dedicated conector on the top side, all is visible in the picture:
The little adaptor board is intended to:
- supply the the XE164 KeyChain providing 5V (I just use an old fashion 7805 linear voltage regulator)
- be the interface board connecting the display to the XE164
- be the interface board for speed sensors (electronics not yet soldered)
- be the interface board for Oil Temperature sensor (I use the one already available on the YAMAHA R6, so I just need to protect the XE164 and convert the signal with the ADC) - be the interface board for fuel level signal
- be the interface board for any forther expansion (feel free to post ideas...).

At the end, this is the video of the first power-on:

where I have created a demo project where the weels and engine speed are generated by the SW itself, this permit to observe all the Display Messages (real debug will come once the weeling speed sensors will be connected). Anyhow, the first bug has been discovered: the Display refresh speed is too slow !!!
To fix it I had to reload Timer_4 counter to the 480Hz value after each Interrupt Service occours:
//****************************************************************************
// @Function void GPT1_viTmr4(void)
//
//----------------------------------------------------------------------------
// @Description This is the interrupt service routine for the GPT1 timer 4.
// It is called up in the case of over or underflow of the
// timer 4 register.
// If the incremental interface mode is selected and the
// interrupt for this mode is not disabled it is called up if
// count edge or count direction was detected.
//
// Please note that you have to add application specific code
// to this function.
//
//----------------------------------------------------------------------------
// @Returnvalue None
//
//----------------------------------------------------------------------------
// @Parameters None
//
//----------------------------------------------------------------------------
// @Date 3/1/2009
//
//****************************************************************************

void GPT1_viTmr4(void) interrupt T4INT
{
// Stop Timer first !
GPT1_vStopTmr(GPT1_TIMER_4);


if ( ucDisplayDigit[ucIdx] != 0xFF )
{
SelectDigit ( 0 ); // Deselect any DIGIT
Display ( ucDisplayDigit[ucIdx] );
// DOT driver
if ( ucDisplayDigit[ucIdx]>>4 )
IO_vSetPin ( IO_P0_6 );
else
IO_vResetPin ( IO_P0_6 );

SelectDigit ( ucIdx );
}
ucIdx++;
if ( ucIdx > 5 ) ucIdx = 0;

// Start Timer
GPT12E_T4 = TIMER4_480Hz;
GPT1_vStartTmr(GPT1_TIMER_4);

} // End of function GPT1_viTmr4
... now, beliewe me, the refresh speed is as expected and the digits are really bright and stable.