Maker Pro
Maker Pro

Digital programmable CDI ignition for 2-stroke engines

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
This is a fantastic forum. I came here because everyone I asked told me this was THE MOST active electronics forum on the internet and after coming here I have to agree. Coming to my project, this is a request for you folks to help me build a digital programmable/mappable ignition system for a two stroke engine.

1.) An ignition system controls the time at which a spark is generated inside an engine. In the earlier days it was done using points system. All details here: http://goo.gl/dwwuLp
2.) There are two types of electronic ignition Capacitive discharge ignition and Transistorized coil ignition. The circuit diagram, code and schematic for both of these can be found here.
3.) That is an old one with old components. Can you help me modernize it by making it suitable for multi cylinder engines where spark must be generated at different times for different cylinders.
4.) Can you help me make it USB programmable and design it to take input from various sensors like RPM sensor, throttle position sensor etc.
5.) It MUST be cheap! There are digital ignitions available in the market and they cost somewhere between 400-600$.
6.) Can you also mention about alternate open hardware boards that can be used for this purpose

A friend told me that I should pick up a pic18F dev board and start updating the CCS code to the XC8 compiler. (I am a n00b and I have no idea what he meant). He also said that adding USB is trickier because that means you need to build a software program to talk to the PIC. So he recommended the RS232. (Which I did understand and thought it was a good option)

Thank you for reading till here patiently. I look forward to hear from you soon

Another website randomexploits.com had info about it. But unfortunately it is DOWN! You can open a cached page but you wont see any images.
I request anyone on this forum to push me in the right direction. Thankyou
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
This sounds like a pretty advanced project for an electronics noob. Lots of things to get exactly right before the engine will run at all.

Can you give us some more information about the project? What components do you have? Have you chosen your coils? What's the battery voltage? Can you give us some information on the engine?
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
Hey @KrisBlueNZ
I know its a complex project, but I am in need of it for a competition taking place next year. It never hurts to do a bit of early prep right? :p :D

1.) The aim of the project is to create a CDI system for a 2-stroke motorcycle engine in general. It must be easily tune-able such that small modifications can be made to the ignition curve on-the-fly. It must receive input from a RPM sensor and a throttle position sensor and according to the inputs it must fire a spark.(Optional: A small display showing all the data i.e. engine RPM, speed and timing advance). The tuning must be user friendly such that I can give it a spreadsheet containing ignition curve data and it works on that. Algorithms can be found here.
2.) I have no components and I am willing to buy stuff as long as its not very expensive.

@Rick L
I have seen those systems as well, but as I have said earlier they are very expensive and above all they are not DIY! :D:D
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
The project is complex and it may be too late to start unless you work hard at it.
You will need to split the project into its sections and get each to work before combining them into one unit.
Power supply without spikes
Spark generation. Capacitor discharge or coil switchiing
Crankshaft position sensor
Type of processor and programming
etc
etc
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
What would be the cheapest, fastest and minimalist way to achieve this? could you please explain? and also can you give me a few ideas to improvise THIS CODE or THIS
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
@duke37 ,
Lets just say I built a power supply without spikes, crank position sensor etc etc.
Now I have to design a circuit for the following conditions

I have the following inputs:
1.) RPM information from RPM sensor.
2.) High Voltage (~3000V) coming in from the coils.
3.).Load sensor/Throttle position sensor information.
4.) Ignition curve (spreadsheet data) from the user.

I want the following output:
1.) Supply spark to the spark plugs. (In case there are more than one spark plugs, then each one should be fired separately at equal intervals)

NOw, please can you tell me how to go about this. i.e can you please give me a circuit for this requirement.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
1. There does not need to be an RPM sensor, you will need a sensor to determine the crankshaft position and then calculate the RPM from this information.
2. The high voltage from the coil(s) goes to the spark plug with a wire with very thick insulation. You have to decide whether to use inductive switching or capacitor discharge to put a pulse into the primary of the coil. This may well depend on the coil specifications. You do not want any high voltage input, if you inadvertently get some then it could mess things up big time.
3. Throttle position is now normally just a poentiometer.
4. The ignition needs to be advanced when the speed rises. I would do this by measuring the time between crankshaft pulses and output an ignition pulse early if necessary. I have no idea how spreadsheet data can be utilised in the micro.

1. Start with one plug, then when that works, you can complicate things.
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
Thanks a lot @duke37 ,
Thats really helpful. Can you please tell me what components I would need and how to go about with the circuit?
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
You can not decide on components until you have the circuit, then you will need to make a test to see if it works as expected and then modify as required.

If you are going to use capacitor discharge ignition, then you could read "Power Supply Handbook" by John Fielding
ISBN 1-905086-0
EAN 9781-9050-8621-4
This has an example of a high power supply for a multicylinder engine.
With your time scale, I think you may be better off to go for the switched coil method, replacing the points with a super dooper transistor or find a car module which will do the job.
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
Thanks,
I've got some rough ideas. Will come back with a few questions after I try out some stuff!! Thanks a lot!!:)
 

dude

Apr 15, 2014
35
Joined
Apr 15, 2014
Messages
35
I designed an ECU for a two stroke engine a couple of years ago, expandable to multi-cylinder, auto throttle, auto shutdown, all parameters programmable via a panel or USB, used for a hydrogen fuel setup. It may seem like an easy thing to program at first thought but ended up not so easy and a stack of code. That's the first half of the story. Running an MCU circuit in an environment as antipathetic to it as an engine ignition system presents it own problems, some of which not so easily solved.
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
Hey @dude
Thats nice! Could you please share your work here. Atleast I could learn something from it!
And ya, like you said there are a lot of problems associated with it. It would be great if you could provide your material too!
 

dude

Apr 15, 2014
35
Joined
Apr 15, 2014
Messages
35
Not something I can share as someone paid through the nose for it and they might get pee'd if I was to do that as they have commercial interests in it. But happy to give you my 2c on how to generally approach various aspects of it as you progress through it if you PM me.
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
Oh that is not a problem AT ALL @dude
However it would be really helpful if you could help me by clearing my doubts along the way!
Can you please start by telling me what you think about the CDI given here
 

dude

Apr 15, 2014
35
Joined
Apr 15, 2014
Messages
35
Looks ok although it was not my job to design the ignition system, it was to design the ECU and integrate it. In my case I did not use tables but calculated on the fly, that's just how I did it.
You could use that project as a starting point but don't expect it to run without problems from EMI, that is something you need to address for you particular application, board and wiring layout. Every wire will become an antenna that will couple to the discharges. There is a difference between designing something that works most of the time to designing something that works all of the time, its not something that you can just draw up, its done by trial and error.
 

dude

Apr 15, 2014
35
Joined
Apr 15, 2014
Messages
35
Look I don't want to sound pessimistic (if indeed I sound that way), that is not my intent. I encourage you in this project but you have to realize that its not an easy one and that there are several fields of electronics involved in it. The only way you are going to do it is by grabbing the bull by the horns and just doing it and if you keep at it you will eventually have a product. Yes you can ask questions and some answers may be helpful but in the end the things you understand will be the ones you actually confronted to the point where the circuit works in your mind, lights flashing, beeping, bells ringing etc. A good mechanic for instance can see the pistons of an engine going up and down, the valve train clattering away etc. It's the same with electronics. What would I do if I was in your shoes? Take it one piece at a time. Start with the basic pic circuit, feed it a variable pulse from a signal generator and make it respond to your specs. Working with someone else's code? I hate it, takes me longer to decipher it than to write my own and I have been programming for a long time, DOS, DOSSHELL, Windows, C/C++, Assembly. My advice, learn how to program and write your own code rather than using someone else's code that you can't make heads or tails from. There really aren't many "plug in" solutions insofar as code unless you are going to be doing exactly what they have done (with anything). If you need to modify it then you need to understand their program first. Hell I can't even understand my old stuff most of the time without sitting down and studying it (and yes I comment a lot), but it made perfect sense to me when I wrote it. Then when you have the pic circuit responding to the dummy signal design a prototype board for it and populate it. There is no way a breadboard is going to work as a prototype for this with wires and legs hanging all over the place, it would not work in a friendlier environment than an ignition system even. It's all about confronting one thing at a time. If you try to solve the whole thing in one swoop then yes you will feel like you are treading into deep water..
 

dR.eXntriK

Jun 5, 2014
25
Joined
Jun 5, 2014
Messages
25
Hey @dude

You're amazing man! y RESPECTS to you. Thanks a lot for the word of advice. Your words prove that you're a person who has been there and done that! Thanks a lot telling me how to go about the project and YES I have to agree, your own code is always better than someone else's code.
I will do it as you have told and will come back with a few questions. In the mean time please tell me what are the main problems that I should watch out for. Thanks a lot mate!
 

dude

Apr 15, 2014
35
Joined
Apr 15, 2014
Messages
35
Hey @dude

You're amazing man! y RESPECTS to you. Thanks a lot for the word of advice. Your words prove that you're a person who has been there and done that! Thanks a lot telling me how to go about the project and YES I have to agree, your own code is always better than someone else's code.
I will do it as you have told and will come back with a few questions. In the mean time please tell me what are the main problems that I should watch out for. Thanks a lot mate!

Problems are solved as they come up, your problems will be different to someone elses, its not something that can be predicted. For instance, when we had the whole thing running to what we thought was a finished product the weather started to change to damper conditions and this threw a whole new spanner into the works. While the filtering in dry conditions had been adequate, not so in the damp. Like I said earlier, one step at a time.
 
Top