Friday, 15 June 2012

Test bench set up working well.

Today I have built the Ion current bias generator and tested it on our test bench. The results show that the circuit charged up around 80v from the coil back EMF. The old ignitor has been replaced by a Toyota ignitor and a frequency generator has been used for the trigger signal.

Friday, 8 June 2012

Dual channel zero crossing circuit made

Today I have built a two channel zero crossing detection circuit for use with the PIC32. This circuit converts two variable reluctance position sensor signals into square wave digital signals that the PIC32 can read directly. This design features two LM1815 chips and is simply built on veroboard. I have tested it on our test bench with good results on the scope.

Tuesday, 1 May 2012

Ion current sampling software started

This week I have begun writing the software which will use the ADC module to sample the ion current traversing the spark gap. This mode of the software sets up the ADC module for manual sampling then the angular event control calls the ion current event every increment of sampling required. This begins the next sample conversion after which the ADC interrupt saves the result into the sample array.

Tuesday, 10 April 2012

Software sync on engine

Today during testing on the 1ZZ-FE the software was able to synchronise with the crankshaft and attain CRANK SYNC. This is a good milestone that shows the software can work in real applications. Next step is to make a two channel zero crossing detection circuit that can covert the crank and cam VR signals into digital for the PIC32. Thanks to Dennis for lending me his zero crossing circuit.

Wednesday, 4 April 2012

Software modified to suit 1zz-fe

While the go kart engine is being modified. I have been setting up the software to suit one of the 1zz-fe engines downstairs. These have two inductive pick ups; one 36 minus 2 teeth on the crankshaft and a 4 minus 1 tooth on the camshaft. From my research I have found that the first tooth after the crank missing teeth gap is 36 degrees before cylinder 3 and 2 TDC. The camshaft first tooth after the teeth gap is around 36 degrees before cylinder 4 TDC when the VVTI is in neutral position.


Monday, 26 March 2012

Angular event control mostly functional

The angular event control code is capable of calling the function at what appears to be the correct angle. I have used function pointers to allow different functions to be called from the same output compare interrupt. This allows the user to set up events to occur at a certain angle and choose which function is called and leave the rest to the software.

Tuesday, 21 February 2012

Event Control Started

This week I have been programming the module which is responsible for angular event control.
So far the soft ware can pick the next event from a list and then calculate which crank sensor tooth it should be time referenced from and the time-stamp with which to trigger the output compare module to start the event.

I am also converting the software to use 16bit integers for angle variables instead of floating point to save on processing time.

Friday, 17 February 2012

Software Design Spec

Combustion Pressure Monitoring Subsystem Software Design Specification


Inputs:
  • Crankshaft Position (Frequency Signal - Interrupt Based)
  • Engine Load (Analogue signal – ADC)
  • Spark Gap Ion Current (Analogue signal – ADC)

Outputs:
  • Optimum ignition timing referenced with engine load and RPM.

Software Components:

Crankshaft Position Sensor Decoder

  • Takes input from crankshaft position sensor via input capture.
  • Uses crankshaft position sensor input to constantly update engine RPM and crankshaft position.
Angular Event Generation

  • Uses engine RPM and crankshaft position inputs to calculate reference tooth and timing variables for output compare to trigger asynchronous events.
  • Steps through each event which has not been carried out this cycle to update timing variables.
Angular Event Sorting

  • Steps through all current events and determines which event is next in queue for triggering.
  • Next event is assigned to an output compare module.
  • Output compare becomes active when the next event reference tooth is reached.

Angular Event Triggering

  • Output compare calls event at predetermined time to achieve correct phase.

Ion Current Sampling

  • Creates asynchronous events to log samples of the spark gap ion current from the ADC module.
  • Creates and maintains buffers, pointers and variables to store samples for later use.

Peak Cylinder Pressure Point Calculation

  • Operates on the stored ADC samples to determine the crankshaft angle where peak cylinder pressure occurs.
  • The results are stored with reference to the engine RPM and load to allow the ECU to update the ignition timing maps.

Timing information transmission

  • The stored results are transmitted to the ECU via UART, CAN, SPI?

System Block Diagram

Thursday, 9 February 2012

Got SYNC!

Last night my mucking around with MPLAB proved fruitful and I was able to simulate an external interrupt and timer interacting with my program to track the crank shaft position.

Friday, 13 January 2012

Maximite!

Today Ambar and myself visited Unitec. We reviewed our project and decided to set some deadlines to make sure we keep up our progress.

We also visited Mervyn who gave me some header pin connectors for the Maximite computer which will be sampling the signal and deciphering the combustion pressure for our project.

The Maximite is based around a powerful PIC32MX695F512H micro-controller. Operating at 80MHz and capable of 1 instruction per cycle it should be fast enough to perform the calculations required to determine the optimal ignition timing.

The increased power and extra peripherals are welcomed but it also means I must learn how to use the MPLAB IDE along with its C32 tool suite. This software is not as user friendly as CCS but has encouraged me for example to learn to handle the registers for I/O port operation instead of relying on CCS's basic macros. MPLAB is also very powerful with a full software debugger including a logic analyser and a stopwatch for measuring the performance of operations.

My first program running on the Maximite simply consists of a flashing LED, this will be adapted to allow me to identify the position of each of the 20 I/O pins in the IDC connector and has allowed me start at the shallow end of the MPLAB pool.

My next step is to interface with the ACE kit for use of the LCD and frequency generator for debugging with more complex code.