Maker Pro
Maker Pro

Digital programmable CDI ignition for 2-stroke engines

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
Mar 18
another example of the scope showing false circuit test results
in this case it shows nothing. repeat 'send' .. nothing . this went
on for 5 times and then , viola', a Ch 4 pulse.
what makes this type of result so awful is having an immediate
reaction to not seeing the expected Ch 4 pulse is that there's
something wrong with the code. then going off chasing this
ghost of an idea. and finding nothing but frustration. because
you are confident with the code being good.

.DS1Z_QuickPrint43.jpg

the whole test result for this code is for the Ch 4 pulse to be
a certain time after the 10 pulse and have a certain width.

... the Ch 4 pulse shown is way off. bigger by a factor of 2 +/-.
and with some thought i continued to do the reset/send thing.
and after 4 or 5 more no-show screens a Ch 4 pulse finally
appeared. and , guess what, it had the sought-after spacing
and width. hooray

i gotta say tho that these no-show results are the worst kind.
until you catch on and keep doing the reset/send steps.
and then you just sort of smile and shake your head
at this being what it takes to get what u want given the circumstances
 
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
Mar 24
this post is meant to complete exp. no. 4
2 pulses enter a 508 and it then outputs a pulse with width = the time between their LE's
two ways to do this will be shown.
the first begins the output pulse as soon as the -70 LE is detected.
then this pulse continues until the LE of the -10 input pulse.
then the Ch 1 output pulse ends


now the scope shot of this action ......
Ch 1 is the output pulse , offset 4uS from the incoming LE's .. so it shows up better
Ch 2 is the -70 input pulse and Ch 3 is the -10 input pulse.
their creation & spacing was via a 506 uC and the pot/leds set for ADRES = 0x10

the width thus is (ADRES) * 32us ..... 16 * 32 = 512us
measured it/both w/ the scope cursors ..... about 535 us
the 508 code did not correct for the 506 -70 pulse width (1*32us)
so the Ch 1 output pulse width is then 512 + 32 = 544us
given the clock is the RC_OSC we know not to expect perfect agreement
as well as the line 54 dly32u subroutine not exactly 32us for a loop of one time
535 us is plenty close enough to 544 us to declare the exp results good

DS1Z_QuickPrint46.jpg

next will be the 508's code
 
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
Mar 24
508 code for post above

mar 24 exp no 4 508_tst_6 p. 1.jpg mar 24 exp no 4 508_tst_6 p. 2.jpg

tomorrow the other code method will be posted. it will use
the 508's TMR0 to measure the time between the LE's. ( -70 to -10 )
save this timer value as a variable. ( some multiple of 32us )
then after the 2'd pulse is in ( the -10 one ) the output pulse will be issued.
 
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
Mar 25
2'd way of catch the LE's of two incoming pulses , and then output a new pulse
with width = the time between the LE's.

the final CDI ignition code does this every revolution of the flywheel.
i.e. measure the time between the LE of the -70 deg flywheel pulse
and the following -10 deg flywheel pulse.

it is from this time measurement that all else follows. namely figuring out
the RPMs, then delaying some time from the -70 pulse until it is time
to issue a fire-the-spark-plug pulse.

DS1Z_QuickPrint44.jpg

the incoming Ch 2 pulse is the -70 deg one and the Ch 3 is -10 deg.
both arise from a '506 uC with the ADRES/pot set at 0x10
 

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
Mar 25
and the code. for a 12F508 uC

this method saves the TMR0 measurement of the time between the -70 to -10 LE's.
and once saved it can be accessed & worked with by other subroutines in the program

mar 25  exp no 4  p. 1 508 code.jpg mar 25  exp no 4  p. 2  508 code.jpg

this concludes the material for exp. no. 4
 

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
Mar 31
lets shift gears and look at the electronics side of this ignition project.
work with the CDI circuit is underway here again. it really is one complex piece of
circuitry. and exposes us all to another world to explore and discover.
first is the circuit diagram in *.pdf format

this is the only one i have that will download. and its a bit lo-fidelity. the better
hi-res ones are in files larger than this site allows.

the Ch 4 probe is in 10:1 mode and conn'd between the two 2.2M R's just to the left of C2 ,
there on the right side , upper half of the circuit.

being that C2 charges to about 300 VDC i am being conservative in exposing the
1054 scope to hi-V's. so the screen cursor reading is about half of the true value.

next is a scope image of C2 being charged. from the cursors table can be read
the V=149 ( 10 x 14.88 ) and time to charge is .046 sec.

so are these values realistic in terms of the engine running ?

first lets see the V on C2 having enough energy to make a spark. the rule of thumb
for a spark plug is it receiving 30 millijoules of energy. e=1/2*C*V*V
so e = .5 * 2.2exp-6 * 298*298 = .098 joule ... so this is plenty and the spark is a good fat one.

in fact we could reduce the size of C2 as it is over-charging . from 2.2uf to 1.5uF and still
have twice the 30 mJ of energy we need. even C2 = 1uF would be big enough (44 mJ )

the charge time is telling us how many times this can happen in one second.
1/.046 = 21.74 .............. and 21.74 x 60 = 1304 RPMs
so we have both a good spark and the engine running in its idle range.
thus this data is representative.

what i want to do is test the CDI circuit at the high-end of RPMs. and see where
the charge to 300 V. begins to fall off. and , too , how heated up the Q2 FET gets.



Vb=9 Vc2=149 Tchg = .046         3-31-17.jpg

however the board is being run with only one 9V battery. and cannot deliver the current
necessary to run much faster.

use of a 9V battery is a way to play it safe powering and testing out this board.
reason being it cant deliver enough amps to burn anything up.
 

Attachments

  • TA CDI ckt diag. dwg Nov 2012.pdf
    502.5 KB · Views: 72
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 1
this is the circuit diagram of the 2012 design of the CDI circuit board.
the original is a 354k *.png image. but the system flags an error msg about it being
too large when i try to upload it to here. so it was printed , then scanned and saved
as a *.jpg file. and its print here this morning looks better than the ckt diag. posted
yesterday.

truth ... on printing the ckt diag posted yest. it does look good. lots better than
the image on my PC lcd monitor . ?? plus its in better color than today's post.

so one way or the other you have the CDI circuit diagram for printing out.

next i will post both sides of the actual circuit board. in the event one of you
who knows Eagle s/w can take it , the circuit diagram and the parts list and
make the proper files so more boards can be ordered.




jpg scan of png 2012 CDI ckt    april 1 2017.jpg
 

Attachments

  • jpg scan of png 2012 CDI ckt    april 1 2017.jpg
    jpg scan of png 2012 CDI ckt april 1 2017.jpg
    178 KB · Views: 127
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 1
here are images of the CDI pc boards.
circuit board s/w is something i am yet to learn.
and want to.

consider this a request for assistance from one of you viewers of this forum who has a little
expertise. even just a partial start would be a big help. and, if you could, to be available after that for some support.

i'm thinking that with your help we will all have the files done that those board mfg'rs
who advertise on ebay require.
then after that we could make changes & improvements as our knowledge grows


the board is 60 x 96 mm.

and the parts list will be scanned and posted here. for the sake of this Eagle s/w idea
or for those of you who want the actual Mouser pn's for the circuit parts.
or have other ways of building a circuit besides sending gerber files to a vendor
 

Attachments

  • color CDI board of TA  parts nov 2012.jpg
    color CDI board of TA parts nov 2012.jpg
    159.9 KB · Views: 210
  • CDI TA pc bd doc 300 dec 14 001.jpg
    CDI TA pc bd doc 300 dec 14 001.jpg
    367.2 KB · Views: 181
  • CDI TA ckt bd pads and parts ID Nov 2012.png
    CDI TA ckt bd pads and parts ID Nov 2012.png
    45.9 KB · Views: 198
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 3
here are scans of the 2 pages of parts for the 2012 CDI design.
they were scanned in color so you could tell my red ink marks from the document
p. 2 was printed out in b/w on my hp 3636 inkjet prt and is totally readable

an error to report. on reviewing the parts list and comparing the capacitors
against the posted circuit diagram ( on mar 31 and april 1 )
... C13 and C17 are not to be found.
i mean they both are on the parts list. and on the PC board. buy i cant
locate them on the ckt diagram.

and no rev. no is seen on any of my ckt diag. copies. in hopes the author ,
dr. tony a. , caught this error and corrected it on a later rev.

thus i am working the PC bd. and once i get it sorted out will re-write
the circuit section so these 2 cap's are shown where they belong.
 

Attachments

  • 2012 parts list p. 1  4-2-17.jpg
    2012 parts list p. 1 4-2-17.jpg
    560.5 KB · Views: 117
  • 2012 parts list p.2  4-2-17.jpg
    2012 parts list p.2 4-2-17.jpg
    523 KB · Views: 117
Last edited:

zeropond

Apr 4, 2017
2
Joined
Apr 4, 2017
Messages
2

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 10
so far here you've seen 2 ways to circuit up a dc:dc switcher hi voltage for the spark.
one using the 3845 IC and a 2'd way designed by the late dr tony alfrey ,
the 2012 CDI circuit featured here .

and on searching the literature many more SMPS circuits can be found.
there is the MC34063 of ON semi, the 1606 of Maxim Integ'd and a whole family of
switcher ICs from Linear Tech. and many others. including ones in dr t's style of using
discrete parts rather than being IC-based.

this leads to the question of which one is the best for this ignition application.

back when this project was begun i made an effort to answer this which-is-best '?'.
with some characterization of the 2012 design.
first off i wanted to know how much current the circuit was using over its operating RPM range.
with this info i would be able to match a 3S1P lithium battery pack. with the expectation
it would run the circuit for at least an hour.

as well as knowing what the voltage on C2 was over this same range or RPMs.
this info is essential for adjusting the uF size of C2 so that there is enough charge
in it at hi-rpm to meet the spark 30mJ energy requirement

posted here today are graphs of the data from that inquiry.

there are other design factors besides these to consider. however as a beginner
in this area of electronics it is not easy to know what all they are. one is in that
catch-22 position of having to know what is important when everything is new.
with patience ones awareness of such matters develops over time

and even when one has a circuit built and tested that represents their
best thinking ... then comes the acid test.
to learn how well the design holds up and keeps you
moving along on your motorbike under real-world conditions.

... and the moment of truth is at that point along the trail when it crests
the saddle and drops into a gulch. knowing that if the ignition fails you've
got a major problem getting back up and outta there

CDI ckt - volts on C2 vs trig rate 10-200 Hz 001.jpg CDI ckt - current used vs trig rate 10-200 Hz 001.jpg
 
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 12
posted here today are 8 of 11 pages dr tony a. wrote up as a supplement to his CDI ignition kit.
he wrote & sketched out some background on how the flyback converter part of it works.

reading them is a little like having a college textbook in your hands.

one thing that stuck with me was his emphasis that T1 in the circuit is not so
much a 'transformer' as it is a 'coupled inductor'. to distinguish it from a device that
transfers power.

these pages have been laying about for several years. and are full of my notes in red ink.
so with Paint i've been editing them out. there are 3 to go. and will be posted in a few more days.

in places the originals use very small text sizes. let me know if you have trouble reading them,
and they can be re-worked
 

Attachments

  • p. 1 of 11.jpg
    p. 1 of 11.jpg
    314.1 KB · Views: 132
  • p. 2  of 11.jpg
    p. 2 of 11.jpg
    177 KB · Views: 128
  • p. 3  of 11.jpg
    p. 3 of 11.jpg
    186.8 KB · Views: 97
  • p. 4  of 11.jpg
    p. 4 of 11.jpg
    195 KB · Views: 121
  • p. 5 of 11.jpg
    p. 5 of 11.jpg
    142.1 KB · Views: 137
  • p. 6 of 11.jpg
    p. 6 of 11.jpg
    55.1 KB · Views: 115
  • p. 7 of 11.jpg
    p. 7 of 11.jpg
    74 KB · Views: 120
  • p. 8  of 11.jpg
    p. 8 of 11.jpg
    279.8 KB · Views: 120
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 13
here are the last 3 of 11 pages of the flyback tutorial.

some key ideas contained include ... on p.9 how the first coil can sense the 2'd coils magnetic field.
( our CDI design does not take advantage of this, instead using external discrete parts to
directly sense the voltage on C2 ... and thus know when to stop charging ).

on p. 10 is the term 'air gap' and how the magnetic energy is stored there. and not evenly along the
ferrite material around which the 2 coils of wire are wound. and that somehow this air gap keeps
the current from saturating the ferrite core with magnetic inductance energy.

leakage inductance (Li) too is introduced on that page. and on to p. 11 w/
how its damaging effects are offset with the addition of 'snubber' circuitry.


at present i am experimenting on a small breadboard with a 3845 IC for its FET driver.
and trying to re-create the p. 8 circuit on the bottom, and get the p. 5 waveform.
so far with a 5uS on-time i have got the input 12V boosted to 17V using the p. 5
component values. and lots of noise. horrible noise.
the IC mfg's warn you to not use a bd.bd.
for such a circuit that contains these sort of fast switching current changes.
and yet its a useful starting place. just to get some result that is in the ballpark.
this has me thinking how to re-do the circuit with a better ground plane.
and other layout tips the 3845 mfg'r recommends

impressed upon me too is how complex this high voltage circuitry is. between
reading the flyback tutorial and seeing this u-tube video the load of learning
it all is supported by knowing help is available from those who have gone ahead
along this path.

 

Attachments

  • p. 9  of 11.jpg
    p. 9 of 11.jpg
    387 KB · Views: 121
  • p. 10  of 11.jpg
    p. 10 of 11.jpg
    298.2 KB · Views: 127
  • p. 11  of 11.jpg
    p. 11 of 11.jpg
    133.2 KB · Views: 112
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 20

Capacitive Discharge High Voltage Pulser Kit - Assembly Instructions

next is the 23p. assembly instruction manual for the 2012 CDI kit design.
5 of those pages are being posted today.

its important for all of the material dr alfrey made for this circuit to be in
the hands of you who have an interest in it. you've read here that he is
gone. all the sand he had has drained through the hourglass of his life.

and i've looked for the documentation he had on his site
and struck out finding anything. so this is being done to ensure his good
work lives on . the CDI design information in particular.

oh , as he was targeting hobbyists and secondary schools science programs
he offered a host of other kits. one, a kettering ignition design, might be of
interest to you. although it is a method for spark ignition that i did not persue
some of its material was downloaded. and will be posted here as well.

it is from the early days of gas engine cars. before there was the electronics
for CDI type circuits. the kettering energy is stored in a magnetic field.
and draws a lot of current. as the spark happens when the flowing current is
switched off when the points in the distributor open.
 

Attachments

  • 2012 CDI kit assy instr p.1 of 23.pdf
    613.7 KB · Views: 59
  • 2012 CDI kit assy instr p.2 of 23.pdf
    364.4 KB · Views: 49
  • 2012 CDI kit assy instr p.3 of 23.pdf
    493.8 KB · Views: 51
  • 2012 CDI kit assy instr p.4 of 23.pdf
    574.9 KB · Views: 53
  • 2012 CDI kit assy instr p.5 of 23.pdf
    796.4 KB · Views: 46
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 20

it occurs to me that a list of all of the documents for dr alfrey's CDI design would be useful.
then you will know when you have gotten all there is.

this is something i will work on and post here. it shouldn't take me too long
 

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 22
more of the 23p assembly manual
plus a re-do of p.3 ... in color this time
 

Attachments

  • 2012 CDI kit assy instr p.3 of 23.pdf
    497.3 KB · Views: 55
  • 2012 CDI kit assy instr p.6 of 23.pdf
    654.7 KB · Views: 51
  • 2012 CDI kit assy instr p.7 of 23.pdf
    791.6 KB · Views: 55
  • 2012 CDI kit assy instr p.8 of 23.pdf
    677.2 KB · Views: 55
  • 2012 CDI kit assy instr p.9 of 23.pdf
    510.8 KB · Views: 46
  • 2012 CDI kit assy instr p.10 of 23.pdf
    667.1 KB · Views: 48
  • 2012 CDI kit assy instr p.11 of 23.pdf
    633.1 KB · Views: 48
  • 2012 CDI kit assy instr p.12 of 23.pdf
    497.8 KB · Views: 48
  • 2012 CDI kit assy instr p.13 of 23.pdf
    649 KB · Views: 49
  • 2012 CDI kit assy instr p.14 of 23.pdf
    643.9 KB · Views: 50
  • 2012 CDI kit assy instr p.15 of 23.pdf
    692.9 KB · Views: 50
  • 2012 CDI kit assy instr p.16 of 23.pdf
    505.7 KB · Views: 59
  • 2012 CDI kit assy instr p.17 of 23.pdf
    643.3 KB · Views: 53

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 24
the last 6 pg of the CDI assembly mnl
 

Attachments

  • 2012 CDI kit assy instr p.18 of 23.pdf
    506.1 KB · Views: 53
  • 2012 CDI kit assy instr p.19 of 23.pdf
    459.6 KB · Views: 48
  • 2012 CDI kit assy instr p.20 of 23.pdf
    606.5 KB · Views: 43
  • 2012 CDI kit assy instr p.21 of 23.pdf
    776.7 KB · Views: 50
  • 2012 CDI kit assy instr p.22 of 23.pdf
    423.2 KB · Views: 45
  • 2012 CDI kit assy instr p.23 of 23.pdf
    322.3 KB · Views: 55

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
TA proto bd 2012 cdi ckt.jpg
2012 cdi doc's 4_27_17.JPG
april 27

this is a follow up to the april 20 posted idea of making a list of doc's for the '12 cdi design

2012 CDI design documents april 27 2017 ................ date posted

1. 1p. circuit diagram ............. ........................... 3-31, 4-1-17

2. 2p. parts list ............... .............. ........................ 4-3

3. 3p. capacitive discharge pulser fun ............ ................. by may 15

4. 23p. capacitive discharge high voltage pulser kit
............................. assembly instructions ............................................... 4-20,22,24

5. 11p. flyback converter for high voltage capacitor charging ..................... 4-12,13

6. 16p. high voltage pulsers and spark generators ................................ by may 20

........................ the 1'st 6p. are on a kettering kit design

7. picture of 2012 design prototype on perf board ...................................... april 27


note - the 2014 design material posting plans are on hold for now
 
Last edited:

bob weir

Sep 10, 2014
235
Joined
Sep 10, 2014
Messages
235
april 29
cdi ckt diag apr 29 red circle U4.jpg

lately i been taking a closer look at the 2012 CDI circuit : the primary side of T1 .
in order to address areas of this circuit operation about which i have little understanding.
starting today with U4 , a CD4047 multivibrator IC set up in astable mode.
it outputs a square wave of 100khz.

here's a link to the datasheet for the 4047

http://www.ti.com/product/CD4047B/technicaldocuments

posted here is a scan off p.2 of this data showing a table of terminations for
the many modes this chip can be wired as.

4047 spec p.2  apr 29 red circle top table.jpg

since the U4 chip is set up as a free running 100khz clock that will be the limit of
our look at this for today. just to get that this chip is running in one of the many
ways that it could be.

it has something in common with the 16F506 uC you've seen in use here.
namely that it comes with extra abilities that force you to understand and
disable. this is so that our free-running mode runs w/o any interference.
and runs as though none of the other features are there anymore.


also posted is a scope screen shot of the 100k sqr wav signal coming out of pin 10.
note that the 4047 is a CMOS device and is powered here with a 12V battery.
this is done to match the 12V motorcycle circuits power.

DS1Z_QuickPrint31.jpg

given this IC has a bunch of ways it can work it took me some time to sort through the data
to find the information that applies to how our 2012 cdi circuit was designed.
then smiled on discovering what i wanted to know is on p.2 , that table circled in red.
the line that begins "free running ... " told dr tony and now you 'n me how to wire the chip.
this too is what one would do on a bread board for an experiment.

on p.1 of the 4047 data , in the "astable multi. features" section is read
that it can run , in astable mode, free-running or gated.
and that it works with a 50% duty cycle. so it is not user adjustable.

what caught my interest was the part about it being 'gatable'.
having just failed with some exp's on the 3845 IC trying to get a clean gatable
clock output. now my hope of finding a way to get what i wanted is revived.

to clarify ..... the 2012 cdi circuit U4 does not run in gated mode.
this matter of having a gatable Q output is for another purpose.
this will become clearer with the following posts on this U4 4047 chip
 
Last edited:
Top