View Poll Results: Whatís the most important thing to you?
Lowest possible cost 3 23.08%
Make it as small and light as possible 6 46.15%
Battery longevity is very important 3 23.08%
Highest power possible 3 23.08%
Highest RPM possible 2 15.38%
Only use through hole construction 2 15.38%
No winding of transformers 4 30.77%
Group buy of components including boards 0 0%
Group buy of boards only 1 7.69%
Iíd rather buy a kit with everything in it 0 0%
I want to buy a pre-built & pre-programmed system 0 0%
I only want to use a 4.8v Ni-MH battery 2 15.38%
I only want to use a 2S battery 1 7.69%
I only want to use a 3S battery 1 7.69%
I want to use a 4.8v battery to 3S battery 5 38.46%
I want to use only off the shelf parts from Digi-Key or Mouser 3 23.08%
I want the Timer board to be separate from the HV board 6 46.15%
I want a combination Timer & HV board 1 7.69%
I want all the options possible using jumpers 3 23.08%
I want a USB connection 2 15.38%
I want a serial connection (DB9) and Iíll use my own USB adapter 3 23.08%
I want a ICSP connection 3 23.08%
I want a premade parts list (BOM) at Digi-Key 2 15.38%
I want a premade project parts list (BOM) at Mouser 1 7.69%
I want 1 design and 1 design only 1 7.69%
I want optional designs to choose from and Ill make the boards myself 8 61.54%
Multiple Choice Poll. Voters: 13. You may not vote on this poll

Thread Tools
May 17, 2016, 11:10 PM
Registered User

anyone still here ?


i tried modify the 12f683 code to charge a coil ( TCI ) for a bike ( reluctor pickup @ 34 deg BTDC)

dedicated Timer1 for RPM measurement.
Timer2 for spark and charging timing.
but i got some problem
the GP2 input interrupt keep on , spark continously after kick start.
I'm using MikroC.
modified checkpin function , change kill switch to demo spark mode.

anyone take a look in my source code for what is goin on ? i'm stuck
Sign up now
to remove ads between posts
May 19, 2016, 12:57 AM
Inventor&Genius Extraordinary
tune by tito's Avatar
Hello Shamino
1-What type of bike? 2 or 4 stroke, single or multi cylinders.
2-Do U had simulated the software in MPLab?
3-Do U had simulated the Reluctor(pick up coil) circuit in a circuit simulator software like "Tina-TI" or LTspice, usually reluctors generate from 0 ac volt when the engine is not running and up to 80-100 ac volts when the engine is running at up to max RPM, U need to simulate the reluctor circuit to know if is operating normal and not false triggering the Picmicro.
Also electro magnetic interference from the coil triggering can induce EMI into the pcb if U are not Using a double side PCB with one side dedicate only to the ground plane so the traces in the pcb do not behave like antenna picking up EMI noise from the coil spark event.

About U code this are the only two things can create a problem:
1-"static const unsigned short SparkTable1[256] = " this code should be SparkTable1[255] , 0 up to 255 decimal or 0xff in hex is 8 bits = 256 decimal count, 0 is index number 1 in binary.
using 256 decimal = 0x100 in hex making U spark table 9 bits indexed not 8 bits, also all U tables data is 8 bits so U should stick with 8 bits until the program is running up to U like.

2-"CurrentRev = TMR1H + (TMR1L >> 7); // 8 high bits of Timer1 + the highest low bit (rounding method)", in this code U are adding a 16 bit register to a 8 bits register, shifting to the right register TMR1L seven times can set the "msb" in register TMR1L creating a overflow in the registers, the MikroC should had give U a error or warning.

Let me know if this help or if I'm wrong about U code.
BTW very good code writing skill, very well commented program.

Best Regards Tito.
May 28, 2016, 12:59 AM
Registered User
Quote:
Originally Posted by tune by tito
Hello Shamino
1-What type of bike? 2 or 4 stroke, single or multi cylinders.
2-Do U had simulated the software in MPLab?
3-Do U had simulated the Reluctor(pick up coil) circuit in a circuit simulator software like "Tina-TI" or LTspice, usually reluctors generate from 0 ac volt when the engine is not running and up to 80-100 ac volts when the engine is running at up to max RPM, U need to simulate the reluctor circuit to know if is operating normal and not false triggering the Picmicro.
Also electro magnetic interference from the coil triggering can induce EMI into the pcb if U are not Using a double side PCB with one side dedicate only to the ground plane so the traces in the pcb do not behave like antenna picking up EMI noise from the coil spark event.

About U code this are the only two things can create a problem:
1-"static const unsigned short SparkTable1[256] = " this code should be SparkTable1[255] , 0 up to 255 decimal or 0xff in hex is 8 bits = 256 decimal count, 0 is index number 1 in binary.
using 256 decimal = 0x100 in hex making U spark table 9 bits indexed not 8 bits, also all U tables data is 8 bits so U should stick with 8 bits until the program is running up to U like.

2-"CurrentRev = TMR1H + (TMR1L >> 7); // 8 high bits of Timer1 + the highest low bit (rounding method)", in this code U are adding a 16 bit register to a 8 bits register, shifting to the right register TMR1L seven times can set the "msb" in register TMR1L creating a overflow in the registers, the MikroC should had give U a error or warning.

Let me know if this help or if I'm wrong about U code.
BTW very good code writing skill, very well commented program.

Best Regards Tito.
Thanks for your help.

Its 4stroke single cylinder
pcb is homemade ,1 sided.

Tried simulate in proteus , but pic not running in there. I'll try another simulator software.

The lookup table is just preload value for pr2 .
Maybe the noise from pickup generate false trigger ,if i disable gp2 input interrupt after intf is set , it spark correctly but only 1 Because inte=0.
May 28, 2016, 07:58 PM
Inventor&Genius Extraordinary
tune by tito's Avatar
1 sided pcb can create all kinds of Gremlins specially when engine is running.

The lookup table can over write some of the ram if no properly setup creating problems too.

The pickup coil circuit can be oscillating due to extra capacitance in the wire harness, so U must simulate it to know if the problem is some where else.

Also make sure U are clearing the Interrupt flag register after each interrupt request a flag may be pending.

I will look U program one more time.
May 31, 2016, 09:37 PM
Registered User
i mess it up with timer2 PR2 loading , running at 8mhz , so clock will be FOSC/4 = 2mhz
but when calculating in excel , i got mistake by calculate with 2mhz/4 =0.5mhz.
so timer2 will get interrupt on match PR2 so soon .....
thinking about another mcu like 16f723 or 18f2550 with more IO , and using timing gear ( using higher clock speed , more accurate).
Aug 07, 2016, 02:13 AM
Registered User

nyemi:New software 12f683 8Mhz ,


Hello everyone.
New software 12f683, four ignition delay curve.
My friend tested:"I'm tested the firmware in Proteus. Behaves as expected: 0 ... 5 Hz(0...300 rpm) - no spark, then 6 ... 15 Hz(360...900 rpm) - 3 spark and then higher, than 16 Hz(960 rpm), only one spark till to 200 Hz(12000 rpm) and higher, than 210 Hz(12600 rpm) is no spark.
I tried to change the voltage on the 3rd pin 12F683 and curves clearly switched just in the specified voltage range, because noticeable change in the pulse position of the output relative to the input."
Please, test your well. If you have any ideas program changes.
Thanks in advance.
Sep 15, 2016, 09:02 AM
Registered User
Hi everyone.
I will help you change the hex code.
Check out the image.
Thank you.
Regard nyemi
Sep 17, 2016, 07:45 AM
Registered User
Hello Nyemi,

Thanks for taking the time to do this. I hope you are well.


Regards

Charlie Moore
Sep 17, 2016, 08:08 AM
Registered User
Gompy's Avatar
Hi Charlie, everything OK ?

Rob / Gompy
Sep 17, 2016, 01:44 PM
Registered User
Hello Rob,

Everything Is Good. I am taking another go at the CDI advance. How are things with you?
Sep 19, 2016, 04:01 AM
Registered User
Hi Charlie
Thank you for your question.
Health is OK. Only time goes quickly.
I pulled out my old project. At the request of Russian users. The ignition delay raising table four. They used the program, improving factory CDI box.
Тюнинг зажигания на Zongshen zs200gs

Regards nyemi
Oct 08, 2016, 05:22 PM
Entropy is happening!
Jim.Thompson's Avatar

Long thread; which posts to read?


I've just found this thread and would like to start researching a proven design for a self made CDI. I don't mind tackling the winding of a transformer.
Can someone direct me to the posts that might expedite the process of finding a proven circuit and instructions for me without reading all 92 pages of this thread?
Or, is it important that I do so?
Oct 08, 2016, 07:44 PM
Registered User
If you just want a standard CDI ignition then the power section operated either by hall effect or points.....if a standard micro controller unit then the same power section controlled by a 12F683 micro via a hall effect or in searching through here ( rather difficult as many variations as you've found)then units with dual ignition maps.

Let me know which and I'll try to point you in the right direction.
Still not 100% but .........
May 23, 2017, 04:36 AM
Registered User

Cdi 2012


Hi,
I'm trying to program another 12F1840 with the CDI 2012 project.
I've just installed the latest MPlabx and xc8 on my windows 10 pc and it is failing to build.
When I go back to my old hard drive and use MPlabx 1.7 it builds ok.
Not much activity here these days but if there's anyone still around I would welcome any advice.
Don
Last edited by Don m5aky; May 23, 2017 at 09:28 AM.
May 29, 2017, 06:31 AM
Registered User
Please post the errors you get.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion CD Ignition lead and fixed plug .... solentlife Engines 10 Feb 18, 2014 12:03 PM
For Sale NIB 52cc Gas engine w/CD-Ignition 3.2kw kukntra Aircraft - Fuel - Engines and Accessories (FS/W) 4 Jul 23, 2012 08:10 AM
Discussion Best open source autopilot vs commercial solution syncra Multirotor Drone Talk 0 Apr 12, 2012 01:35 PM
Discussion Any Open Source / CC CAD Files for gliders? DrFragnasty Composites Fabrication 8 Apr 09, 2012 05:36 AM
Discussion I'm designing an open source quad frame. Inclusions anyone? Physics_Dude Multirotor Drone Talk 3 Mar 11, 2012 12:22 PM