Digital programmable CDI ignition for 2-stroke engines

Discussion in 'Electronic Projects' started by dR.eXntriK, Jun 5, 2014.

  1. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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
     
    dR.eXntriK, Jun 5, 2014
    #1
    1. Advertisements

  2. dR.eXntriK

    KrisBlueNZ Sadly passed away in 2015

    Joined:
    Nov 28, 2011
    Messages:
    8,393
    Likes Received:
    1,258
    Location:
    Wellington, New Zealand
    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?
     
    KrisBlueNZ, Jun 5, 2014
    #2
    1. Advertisements

  3. dR.eXntriK

    Rick L

    Joined:
    May 21, 2014
    Messages:
    14
    Likes Received:
    3
    Location:
    SD, USA
    Rick L, Jun 5, 2014
    #3
  4. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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
     
    dR.eXntriK, Jun 6, 2014
    #4
  5. dR.eXntriK

    duke37

    Joined:
    Jan 9, 2011
    Messages:
    4,399
    Likes Received:
    523
    Location:
    Derbyshire. UK
    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
     
    duke37, Jun 6, 2014
    #5
  6. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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 6, 2014
    #6
  7. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    @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.
     
    dR.eXntriK, Jun 6, 2014
    #7
  8. dR.eXntriK

    duke37

    Joined:
    Jan 9, 2011
    Messages:
    4,399
    Likes Received:
    523
    Location:
    Derbyshire. UK
    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.
     
    duke37, Jun 6, 2014
    #8
  9. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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?
     
    dR.eXntriK, Jun 7, 2014
    #9
  10. dR.eXntriK

    duke37

    Joined:
    Jan 9, 2011
    Messages:
    4,399
    Likes Received:
    523
    Location:
    Derbyshire. UK
    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.
     
    duke37, Jun 7, 2014
    #10
  11. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    Thanks,
    I've got some rough ideas. Will come back with a few questions after I try out some stuff!! Thanks a lot!!:)
     
    dR.eXntriK, Jun 7, 2014
    #11
  12. dR.eXntriK

    dude

    Joined:
    Apr 15, 2014
    Messages:
    35
    Likes Received:
    6
    Location:
    Melbourne, Australia
    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.
     
    dude, Jun 8, 2014
    #12
  13. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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!
     
    dR.eXntriK, Jun 8, 2014
    #13
  14. dR.eXntriK

    dude

    Joined:
    Apr 15, 2014
    Messages:
    35
    Likes Received:
    6
    Location:
    Melbourne, Australia
    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.
     
    dude, Jun 8, 2014
    #14
    dR.eXntriK likes this.
  15. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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
     
    dR.eXntriK, Jun 8, 2014
    #15
  16. dR.eXntriK

    dude

    Joined:
    Apr 15, 2014
    Messages:
    35
    Likes Received:
    6
    Location:
    Melbourne, Australia
    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, Jun 8, 2014
    #16
  17. dR.eXntriK

    dude

    Joined:
    Apr 15, 2014
    Messages:
    35
    Likes Received:
    6
    Location:
    Melbourne, Australia
    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..
     
    dude, Jun 8, 2014
    #17
    AlenZGB likes this.
  18. dR.eXntriK

    dR.eXntriK

    Joined:
    Jun 5, 2014
    Messages:
    25
    Likes Received:
    0
    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!
     
    dR.eXntriK, Jun 9, 2014
    #18
  19. dR.eXntriK

    Rleo6965

    Joined:
    Jan 22, 2012
    Messages:
    585
    Likes Received:
    9
    Location:
    Quezon City, Philippines
    You might want to consider non programmable dc cdi circuit for your motorcycle. You can just start buying needed parts and play on it. No programming required. There are so many schematics in internet. Try this one. http://mastercircuits.blogspot.com/p/cdi-schematic.html
     
    Rleo6965, Jun 9, 2014
    #19
  20. dR.eXntriK

    dude

    Joined:
    Apr 15, 2014
    Messages:
    35
    Likes Received:
    6
    Location:
    Melbourne, Australia
    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.
     
    dude, Jun 9, 2014
    #20
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. phl
    Replies:
    3
    Views:
    3,017
    John Popelish
    Jan 8, 2005
  2. Jerry

    quesitions about a CDI ignition design

    Jerry, Jul 5, 2006, in forum: Electronic Design
    Replies:
    2
    Views:
    1,492
    Jim Thompson
    Jul 5, 2006
  3. mark krawczuk
    Replies:
    1
    Views:
    1,796
    Larry
    Aug 17, 2007
  4. THUNDERBOLT

    TCI / CDI IGNITION SYSYEMS - TESTING

    THUNDERBOLT, Sep 16, 2010, in forum: General Electronics Chat
    Replies:
    12
    Views:
    6,898
    THUNDERBOLT
    Sep 24, 2010
  5. amidis86

    Programmable CDI

    amidis86, Sep 8, 2012, in forum: Electronic Projects
    Replies:
    3
    Views:
    4,049
    Rleo6965
    Sep 10, 2012
  6. David M.

    programmable cdi, looking for a good project or kit

    David M., Apr 19, 2014, in forum: Electronic Projects
    Replies:
    4
    Views:
    1,053
    Bluejets
    Oct 10, 2014
  7. waterworks

    CDI ignition head scratcher

    waterworks, Jul 30, 2016, in forum: Electronics Repair
    Replies:
    10
    Views:
    474
  8. bob weir
    Replies:
    16
    Views:
    441
    bob weir
    Mar 7, 2017
Loading...