Site hosted by Angelfire.com: Build your free website today!


            Bosch modified original TSZ-I ignition using a PIC 16F84
             or 16F628 with multiple sparks



This project is the result of a surge in my periodic interest in modern
ignition systems and the fact that I had a few  exceeding 16F84's PIC
microcontrollers left from a previous application.
   Basically I wanted to improve on my old 1987 VW Passat (Dasher) which has
a 1.6 liter ethanol engine which is a 4 cylinder with Bosch distributor
including mechanical vacuum spark advance  and centrifugal speed spark advance.
There is a reluctor (magnetic pick-up) inside the distributor that signals the Bosch ignition
box ( all electronics fit inside that box ) when to switch the coil on and off for delivering the spark.

The scope of the project was that if the modified ignition box
stopped working then I would switch to an extra unmodified ignition box
 to avoid getting stranded in the road.

As the distributor already has vacuum and mechanical advance there was no
need to implement advances electronically so the microcontroller's only
 objective is to manage current switching through the coil.


The fig.1  shows a reverse engineered schematics of the original Bosch
TSZ-I ignition box.
original Bosch ignition

As you can see in  the schematics in Fig. 1  transistors  T01 and T02
act as a  non-invert Schmitt-trigger. So the periodic sine-like signal of varying amplitude coming from the reluctor in the distributor will get
transformed into a 12V p-p square wave at the collector of T02. Transistor T03 will amplify current from a few milliamps to 0.25 amps.
Transistor T04 will switch coil current  (several amps) on and off.  Resistors R15 and R16  and 75V zener will protect power transistor if collector voltage  raise above about 230 volts.

Errata: Diode 1N5232 should be 1N5262

Fig. 2 shows the original Bosch ignition box.

original ignition box


The scope of the project is to  place  the  16F84 microprocessor  and the
extra components needed in a small printed circuit under the main ignition
board and connect them through 5 thin cables. Everything should fit inside
ignition box (Fig 2)

The Fig. 3 shows the schematics of the added hardware.
schematics of added hardware
 As you can see this hardware is enclosed by a dashed line.
The circuit inside the dashed rectangle in Fig. 3 replaces  the dashed
rectangle in Fig. 1


Enlarged Fig. 1

Enlarged Fig. 3

 
 At the input the 0 to 12V square wave is transformed  to a 0 to 5V square
wave by resistors R01, R02 and ZD01 and then input to RB0 pin 6 of PIC 16F84
microcontroller. I decided to use a 4Mhz cristal or resonator instead of internal RC oscillator to avoid possible jitter problems. Output is at RB3
pin 9 and uses BC548 transistor to switch base current at T03 BD139.
Supply to microcontroller PIC 16F84 is 5 volts through regulator 7805.

That is all there is about  the hardware.

The software  accomplishes the following:

1) No current through coil if engine is not running
2) Constant dwell time over most of speed range  (well  almost)

The software is assembled for a coil of 5 ms. dwell time  so the included
igni1.hex is for a 5ms. coil only.

If your coil has a different dwell time then edit the file igni1.asm  placing the new value of dwell at file and then reassemble it with mpasm.exe and you will get a new igni1.hex file with your values.

Note: *.hex files are what you input the 16F84 programmer.

The algorithm is as follows for 4 cyl. engine:
Note: spark duration is always 1 ms.

If engine speed is above 5000 rpm (6ms. between firings)
then increasing engine speed  will decrease dwell time).

If engine speed is from 750 to 5000 rpm (6 to 40 ms. between firings)
then dwell time will be a constant 5 ms.

If engine speed is below 750 rpm ( more than 40 ms. between firings)
then dwell time will be one eighth of firing  interval.
So if engine runs at 500 rpm (60 ms. ) then dwell time will be 7.5ms.

In addition to the main spark signaled by distributor, this ignition
will provide up to 5 additional sparks after main spark for each cylinder, provided time constrains allow it.

Assuming t=0 at main spark
then at   t=1ms.  charge coil
then at   t=6ms.  extra  spark 1
then at   t=7ms.  charge coil
then at   t=12ms. extra  spark 2
then at   t=13ms. charge coil
then at   t=18ms. extra spark 3
            19ms.
            24ms  extra spark 4
            25ms.
            30ms. extra spark 5    

Any of the extra sparks will fire only from 0 to 22.5 degrees of crankshaft rotation.
So above about 935 rpm there will be no extra sparks.
So from  375 to 935 rpm there will be 1 extra spark
""  ""   234 to 375  ""   ""      2
""  ""   170 to 234  ""    ""     3  

I don't know if those extra sparks are of any use  but they are
for free so enjoy them and tell me.
The engine in my car seems to refuse to die at low idling speeds.

Note: if you don't like extra sparks you can edit the igni1.asm file by
uncommenting the indicated line (deleting a semi-colon) then reassemble
the igni1.asm file using mpasm.exe to obtain a new igni1.hex with no extra sparks

Note: The software assumes negative-going input to indicate time to fire.
       ""          provides  negative going output to fire spark
       ""          provides  positive going output to start charging coil.                   
This software uses the only byte counter TMR0 in the 16F84. The maximun resolution is one whole byte count or 256 microseconds. Attempts were made before to increase resolution  to fractions of byte counting but I encountered too much jitter. Also during development I attempted to use
parabolic extrapolation for calculating future dwell but at certain speeds
too much jitter was again  observed. So I settled  for zero order extrapolation (future interval between firings equal past one). With 2 byte
hardware counters as in 16F628 or higher clock speed (20 Mhz.)  I  guess
the better extrapolation is possible.

Despite of all this talk I have been using this ignition in my car for a couple of months with very satisfying results.
If any of the readers  builds this  ignition let me know how it went.

Note: I have only assembled and tested the 5ms.dwell version so if you try other values of dwell make sure the values as they show in igni1.lst make sense

My guess is that software will run for dwells smaller or equal than 31 times 0.256 milliseconds (about 8ms.)

Note: use at your own risk, I assume no responsibility if your engine
blows up or so!

The links are provided to download the igni1.asm and the igni1.hex file.
Also the files mpasm.exe, p16f84.inc and ate.bat are provided for download

                    Go to main page (software downloads)
 
If you want to assemble igni1.asm yourself then put files  mpasm.exe , P16F84.inc , ate.bat and igni1.asm in the same directory and run at command line prompt (MS-DOS mode):  

ate igni1.asm

And you will get new igni1.hex file

Good luck.

Authoring: Luis A. Loeff

e-mail: swlfb@vivointernetdiscada.com.br  

____________________________________________________________________________________________

Patrick Bull made an ignition based on this software

Here is the exchange of information

Dear

 

Can i get some info on the TCI ignition here ?

 

Grts

Patrick

-------------------------------------------

Hi Patrick

Can you express what information you want?

We manufacture one ignition for distribuitor engines using magnetic pick-up and transformer type coil.

Regards

Luis A. Loeff

LFB Ind & Com Ltda

--------------------------------------------------

Dear

Found your ignition on the web (Bosch Tci ) and was impressed by the good idea. I made a test this weekend and got it working :-) . Also changed the dwell time to 3ms and it worked. When I uncomment the extra sparks it works also but it seems to get a bit unstable on the dwell time at low rpm's . This could also be my old oscilloscope .

Only problem was the assembly of the .asm file. I keep getting 1 error on the line 137 from the INC file of the 16F84.

This is a line at the bottom just after the last LIST. The assembler say's " illegal character (< ) "

Only when I erase the whole text past LIST I have no errors.

You have any solution ?

Grts Patrick

-----------------------------------------------------

Hi Patrick

I am glad you tried the software for the electronic ignition.

Please send mi a copy of the text where this character "<" appears.

Remember that the .INC files are supplied by Microchip, not by me.

This bad character is probably a misprint or error.

I cannot guarantee I will know the answer because I composed that software 6 or 7 years ago.

Regards and good luck

I haven't answerered before because my computer broke

Regards

Luis A. Loeff

-------------------------------------------------------

Hello Luis

Thank you for the reaction.

Just seen your mail as i was on holiday. In the meanwhile I have build your project and it works fine. :-) I have erased the part after LIST and the assembler accepts the asm file now.

Did a bit of study on the asm because I am not a programmer , but beginning to understand it now. Still have some questions about it , but will send them in another mail along with some pictures.

I am going to use it on a ford sierra cosworth turbo engine. As the ECU itself has no dwell control , done by a marelli amplifier module, it was not possible to use a more powerfull and faster coil. With your design I can use the ignition timing output signal from the marelli ecu and transform it with a programmable fixed dwell time. The output from the PIC I use then to control a bosch BIP373 transistor that can easily switch 11amps (and is fully protected ).

I have done some testing on HEI coils also with your project. Will send you the info.

Grts from Belgium Patrick

____________________________________________________

Luis

I had to erase everything after LIST at the bottom of the file. Otherwise I kept on getting error messages when assembling.

I use windows notepad to open the file .

Patrick

___________________________________________________

Hi Patrick

Amazing all scripts that got glued together with the file P16F84.inc

It seems angelfire also modifies .inc files so I have renamed them as .inz and

the user should rename back to .inc

Regards

Luis

----------------------------------------------------------------

ignition project

 

Hello Luis

 

 

Here some pictures from  the project.

 

And some questions about the program (correct me if I am wrong )

1.      Maxtim is the time to wait to check if the engine does not turn  anymore. Where do you get the 65.5 msec from ?

2.      Lowlim is the rpm point to change to non programmed dwell ( 1/8 from cycle time ) Why do you do that and not calculate to almost zero rpm ?

3.      Why do you use a difficult calculation for permaxdw and not a fixed time/rpm  .

 

 

dwell       equ        20    ;     =  5.12 ms

 

; maxdwell computed automatically

maxdwell    equ      dwell + 0x04 ;  = 6.144 ms. ,  0x04 = spark duration

 

; permaxdw computed automatically

permaxdw    equ      (dwell/2 + 2) + 4  ; arbitrary min. dwell + spark

                                         ; duration for extra sparks

; computed automatically

medlim      equ      8*permaxdw    ;  0x80 =  32.77 ms

; computed automatically

lowlim      equ       8*dwell       ;  0xA0 =  40.96 ms.

maxtim      equ       0x06   ;    = 6* 65.5 ms   approx.  393 ms.

 

 

Mvg.

 

Patrick

_____________________________________________________________________

schematics of added hardware

schematics of added hardware

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
------------------------------------------------------------------------

LX 91 coil testing

 

 

Hello Luis

 

I did some more testing today as you can see on the pictures with these settings.

 

1.      Ubat  = 13V

2.      Freq = 133 Hz =4000 rpm

3.      Dwell 3.5 msec

4.      Plug  gap 1mm

5.      Amp prim  1A/div  vert

6.      Amp sec  1V/div vert at the top of the screen  (measuring resistor at negative plug = 21.6 ohm)

7.      Time  1msec/div

8.      I calculate the energy at the primary side , simpler  ( I know there are losses to secondary in the coil that are different )

 

 

The test with  2 coils parallel was not good. The current was very high primary but divided by the 2 coils so no problem  .The spark energy was high also but the spark time was also very very short !!

Almost like CDI. It was more like a spike than a few msec burn time. So no option.

 

The crane coil has the most energy at 3.5 msec dwell with 7 amp primary current  but also the shortest bun time  +- 1.25 msec.

The second lx91 picture is at 14V Ubat , here I have 8.5 amps primary and 13.9 mA secondary !!  So maybe I even have to decrease the dwell to 3.25 or 3 msec , as the car is at  13.8-14V while running.

Here I have 0.5*4.7*8.5^2 = 169 mJ !!

It sure is the “fastest”  and most powerful coil .

 

I find the IGN-1 coil  really bad , as supposed to what I find on the internet ! Only 4 amps prim.

 

The groupA coil has not so much primary current but very long burn time. Almost 2.5 msec. So it’s also kind a “slow” , strange as it’s sold as racing coil ???

 

But the good old Bosch coil is not bad at all !!

I think at 4 msec dwell it maybe has the same energy as the crane LX91 and 2 msec spark time.  Of course when you add 2 msec spark time and 4 msec dwell I get 6 msec cycle and that’s only, for me, 5000 rpm.

 

 

At the end the question is ; will the 1.3 msec spark time of the LX91 be good enough. Then the LX91 would be the best option.

Grts

Patrick

---------------------------------------------------------------------

schematics of added hardware

schematics of added hardware

--------------------------------------------------------------------

Hi Patrick

  ignition project > > > > Hello Luis > > > Here some pictures from the project. > > And some questions about the program (correct me if I am wrong ) > 1.Maxtim is the time to wait to check if the engine does not turn anymore. Where do > you get the 65.5 msec from ?

That is for coil protection. After 393 ms. with the no inputs, coil shuts off and no current flows. 65.5 ms. is 256 count of time counter.

> 2.Lowlim is the rpm point to change to non programmed dwell ( 1/8 from cycle time ) > Why do you do that and not calculate to almost zero rpm ?

When the engine idles there is a variation of speed of several percent. But dwell varies very much. So to make sure that there will always be a spark, I start increasing dwell at 1/8 732 rpm for 4 cylinder engine and 5.12 ms. dwell. For 3 ms dwell transition will be at around 1220 rpm

> 3.Why do you use a difficult calculation for permaxdw and not a fixed time/rpm . > > This has to do with multiple sparks and and it is a transition point on when to start multiple sparks. I don't remember very well.

You can also adjust spark duration 0x04 times (256 microsec.) by changing maxdwell.

> dwell equ 20 ; = 5.12 ms > > ; maxdwell computed automatically > maxdwell equ dwell + 0x04 ; = 6.144 ms. , 0x04 = spark duration > > ; permaxdw computed automatically > permaxdw equ (dwell/2 + 2) + 4 ; arbitrary min. dwell + spark ; > duration for extra sparks ; computed automatically medlim equ > 8*permaxdw ; 0x80 = 32.77 ms ; computed automatically

I think at lower than around 915 rpm (32.77 ms.) begin multiple sparks

> lowlim equ 8*dwell ; 0xA0 = 40.96 ms. > maxtim equ 0x06 ; = 6* 65.5 ms approx.393 ms. > > > > Regards

Luis A. Loeff

LFB Ind & Com Ltda

-----------------------------------------------------------------------------

ignition project

Thanks Luis

I have changed the lowlim factor already so i get around 700rpm also with 3.5 msec dwell for my 4 cylinder engine.

lowlim equ 12 *dwell ; 0xA0 = 40.96 ms.

Grts Patrick

--------------------------------------------------------------------------------  

Luis

Would it be possible to program a copy of the existing output (signal ) on a second PIC output but with a programmable time offset (+- 0.5 msec ) ? Apparently a modern technique is a dual coil/spark on one spark plug. A bit like multispark on CDI but then with TCI and 2 coils on 1 spark plug.

Grts Patrick

-------------------------------------------------------------------------------

ignition project

Hi Patrick

You mean another diffferent output pin with everything delayed like 0.512 ms. ?

Yes I think it could be done. There are many unused pins. But the ignition generates multisparks at low speeds when time allows. What would be your purpose?

Regards

Luis

-------------------------------------------------------------------------------

Hello Luis

Yes , that's what i mean. But for the whole rpm range While reading about modern ignitions I found an article from , I think LUCAS , about there latest technology for very lean burn low emissions engines. I assume al the major brands are going this way to achieve modern emissions levels. To get very high energy + very long sparks ( 2.5 msec ) needed for this kind of mixture, and with IGBT transistor technology, they fire two coils (in one housing ) on one plug .One after the other. A bit like multispark on a CDI ignition. As you will know these high power coils are very high on primary current (15-20A) and fast saturation ( dwell about 1.5-2msec) but there sparks are also way to short ( +- 1 msec) for this application. So a second output + BIP 373 + coil , with a ignition delay like 0.512-0.768 msec , would be a nice experiment.

Grts Patrick

---------------------------------------------------------------

Hello Luis

 

Did the first few miles today with the ignition and a crane LX91 coil.

All ok.

Dwell set at 3.25 msec , the LX is a fast and powerful coil.  Reaching 8 amps primary current in 3.25 msec !

The BIP can go up to 11 amp but then the coil is getting to hot.

No extra sparks as the ECU dos this already.

 

This is my schematic.

The output from the ECU is a open collector pull down transistor.

R8 is to give the 5V regulator always a load. Like it more like that.

 

  schematics of added hardware

 

 

Mvg.

 

Patrick

--------------------------------------------------------------------------

Luis

 

Here the first draw of my wasted spark system.

The 0 ohm resistors are for the easy drawing of the board.

Grts

Patrick

-------------------------------------------------------------------------

picture 6 schematics of added hardware

========================================================================

Hi Patrick

This is a nice schematic, and I have 2 questions about your ECU?

What car is it on? Will the ECU not be able to adjust dwell?

REGARDS

Luis

---------------------------------------------------------------------------

schematics of added hardware

------------------------------------------------------------------------

Hi Luis

What car is it on? My sierra Cosworth from 1986 . Will the ECU not be able to adjust dwell ? No, it only controls timing , normally the marelli ignition amplifier does the dwell regulation. ( google : bigturbo.uk)

Grts Patrick

------------------------------------------------------------------------

Hi Luis

Here it seems you have sort of a distribuitor output and you want to make it a wasted spark. Correct. The wasted spark system you can buy , I find way to expensive. And I like to DIY :-)

Usually wasted spark have 2 outputs from ECU Indeed , I know.

In this case you have to command the ADG switch properly. How do you do it?

Optical reflection sensor ( diode/transistor ) detects the adapted rotor position and syncs the ADG switch. This way I have a mechanical controlled wasted spark system with programmable dwell . So this is usable on every old car with distributor and only 1 ECU output. Of course this is still a project , but I think I will file a patent on it.

http://passionford.com/forum/ford-sierra-sapphire-rs500-cosworth/475429-mech anical-electronic-wasted-spark-ignition-system.html

Grts Patrick

_________________________________________________________________________

schematics of added hardware

schematics of added hardware

schematics of added hardware