HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 03, 2012, 12:25 AM
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
226 Posts
Programmable Open Source CD Ignition PIC1840

Welcome to the CDI-2012 DIY Open Source Programmable CDI Project using the PIC12F1840.
This project started out on the RCU forum but problems with that forum has forced us to move here onto RCG. Which I don't mind at all. This project has been around for quite some time now also but, has matured very quickly lately. We are not starting from scratch but, we actually have a fully working setup, mind you right now it is kind of in pieces but, we are trying to straighten it out. Which is one of the reasons I am starting this thread, RCU doesn't allow very many file types to be up loaded and it keeps loosing posts, so here we are.


Since this is the first post I'll try and keep this post up to date with all the latest files as members post them. One thing I want to point out is that this it not a place for custom designs, there are companies for that. We designed basic boards and software that will get you and your engine running. If you want to change the board designs or modify the code then by all means please do so. In fact we encourage it but, be nice enough to post your changes and your results.


As of Dec. 2, 2012 we have a CDI ignition that will work on a single cylinder gas engine, the timing curve is programmable, it holds 2 curves that you can instantly switch between while running, a kill switch that can be used in-flight, magnet and hall effect sensor, 6.6v or 7.4v battery, timing LED. Why 2 boards? Well it is easier to keep RFI / EMI from interfering with the planes electronics.


I would like to say again that this is a DIY open source project and as such it is up to you to learn how the Timer and HV boards work and how to modify your own code. So it is just like all other DIY open source projects. It is not hard and everything you need for programming is free but the actual PIC programmer, that you have to buy. There are people that will help you if you need help and ask nicely. Remember no one here is getting paid anything so be nice, some of the people have been working on this for more than 10 years. Some are going to be offering DIY kits and others will be offering complete systems fully soldered up. As for the transformer and ignition coil you can wind your own or buy off the shelf.

Some History:
I'm not going to provide links to the very beginning but, to the last main thread on RCU: Original 'CDI gr8flyer55' On RCU. Forgive me if I get something wrong or left out, or someone’s name wrong, if it bothers you let me know and I will make the change/s. The beginnings is somewhat split up but, they slowly converged into a project and I’m still trying to sort it out so I’m going to fast forward it a bit. In the latest thread the ignition actually started off a add on to the CH-Ignition using the PIC12F683. I guess the coordinator of this version is gr8flyer55 (John) who has done a lot of testing, providing parts and info, and pushing us in the right direction. Nyemi wrote the first code for this version in ASM assembly language, not the easiest thing to do, I know I use to do it. He also has provided a lot of testing and suggestions. Gompy has done a lot of testing, board work and suggestions. IMHO jakestew (Jake) really set this project on fire when he ported the firmware from ASM to ‘C’. This made it easier for everyone to read and modify the code, he is also the one that got us to change from the PIC12F683 to the PIC12F1840. The 1840 has a lot more useable features than the 683. The code V1.00 can be used for both the 683 and the 1840 MCUs. There are a lot more people that contributed to this project and you should read the thread on RCU if you want a good history of who did what and when, along with how we got here.

Code numbering; right now the code went from ….. .98, .99 but, V1.00 is the first stable build and it can be used on both the 683 and the 1840. As far as we are concerned the 683 is done and will not be discussed here. As I said the 1840 has a lot going for it but, even it is running out of pins, and IMHO is the perfect MCU for getting your feet wet in embedded PIC design.


Ray
Nav_Aids is offline Find More Posts by Nav_Aids
Last edited by Nav_Aids; Dec 09, 2012 at 07:56 PM. Reason: Just an update.
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 03, 2012, 05:48 PM
CU, Rob - HVCAlkmaar.nl
Gompy's Avatar
The Netherlands, NH, Alkmaar
Joined Dec 2012
29 Posts
Have fun.
Gompy is offline Find More Posts by Gompy
Last edited by Gompy; May 05, 2013 at 04:54 PM.
Reply With Quote
Old Dec 03, 2012, 09:40 PM
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
226 Posts
Hi Gompy, nice to see you here and thanks for the help.

Ray
Nav_Aids is offline Find More Posts by Nav_Aids
Last edited by Nav_Aids; Dec 05, 2012 at 07:28 PM. Reason: Missed spelled name, what was I thinking
Reply With Quote
Old Dec 03, 2012, 11:00 PM
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
226 Posts
Important Links

Here are some important links:

Software:
Firmware:
Is on Jake Stewart's website for now. Plus he has a pretty good explanation on how to setup MPLab to get you going. Make sure you download the Excel spread sheets to get your timing table values and read the instructions. I find that with Excel 2007 I just right click on a page tab and left click on 'UnHide' then 'Table_Values:
http://www.electrofunnel.com/CDI-2012/index.htm

Spreadsheet:
Fixes to the spreadsheet only, no changes were made to the 683/1840 code. Lastest is Dated Jan 01-2013.
CDI-2012_v1.0-F1.1.xlsm

Pull-ups are turned off for the switches and the polarities are reversed CDI-2012_v1.0_B-F1.1.xlsm

Revisions and Fixes Jan 1-2013.txt


MPLabX Source Code Editor:
You will need this to modify and burn/flash the MCU.
MPLabX Down Load Page

You will also need the MPLAB XC8 Compiler. The 1840 has room to use the low-optimized free version.
MPLabXC 8 Windows Compiler

While it's free you should also download the XC32++ compiler.
MPLAB® XC32++ Compiler Software

I like to use this program for coding and then copy my code into MPLabX.
TextPad for 'C', 'C++', and 'Java'.

From lovefool (RCU):
To make the PICKit 2 compatible with the 12F1840.
“You need two files, PICkit 2 v2.61 and Device File 1.62.14 (New device support. Compatible with application version 2.61.)”
http://www.microchip.com/stellent/id...cName=en023805


Hardware:
More to come when testing is finished, which is in the process right now.
'B' Timer Board Layout is below, why 'B'? well we had a choice between boards and thought 'B' was the best. Thanks Gompy.

Member links:
Gompy's website (I really like the timing light):
http://www.electronics.gompy.net/

Timing light 1:
http://www.electronics.gompy.net/strobelight/index.htm

Timing Light 2:
http://www.electronics.gompy.net/ont...lamp/index.htm

A YouTube movie showing an older version of the firmware (0.96):

DIY CDI and software. (1 min 52 sec)



Here's the latest version (1.0) running and showing how the switchable timing works:

CDI-2012_v1.0 (2 min 0 sec)



More coming:
.
.
.
Nav_Aids is offline Find More Posts by Nav_Aids
Last edited by Nav_Aids; Jan 02, 2013 at 07:24 AM. Reason: Updated the Excel Spreadsheet
Reply With Quote
Old Dec 04, 2012, 02:28 PM
supreme being of leisure
ZAGNUT's Avatar
Tel Aviv, Israel
Joined Jul 2004
1,740 Posts
the conversions forum was great back in the day (i was one of those who petitioned for its creation) but lately i just seem to get lost there in endless disjointed threads...this is the right place for that ignition.

being mechanically inclined i just slap on a link between the carb and hall sensor.....BUT, in my dreams (where i know how to write code) a very simple and elegant electronic advance would be mixed as a slave to the throttle channel...between 1.000mS to 2.000mS you would get a certain amount of delay measured in time, so you just set endpoints to determine the advance and then throw in a multipoint curve to tweak it. maybe not as elegant as what's being shown in this thread but still way more advanced than all the off-the-shelf units.
ZAGNUT is offline Find More Posts by ZAGNUT
Reply With Quote
Old Dec 05, 2012, 09:26 AM
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
226 Posts
Why a Programmable CDI ?

Why a Programmable CDI ?

Well if you are converting an engine from glow to gas like I am (ASP 0.65FS) then you’re going to need an ignition. Another reason is that most OEM gas engine manufacturers don't set their ignition timing or timing curve to an optimized setting or one that produces max power. Why? Well they have to provide warranty for their products and that costs money. Another reason to have a programmable ignition is that if you change props you are changing the load and how that load is applied, so if you can make your own curve then you can make a more useable power curve. You can even save fuel with the right carb mixture and timing. A leaner mixture needs less timing and a richer mixture needs more timing. So what can the standard CDI-2012 setup do ?

• Can hold 2 different timing curves
• You can switch between those 2 curves in-flight
• Use an Excel sheet to produce your timing curves and the actual code
• Kill switch can be used in flight

We are working on a way to do in-circuit-programming and if you want to help then please do.

Ray
Nav_Aids is offline Find More Posts by Nav_Aids
Last edited by Nav_Aids; Dec 16, 2012 at 07:39 AM. Reason: spelling
Reply With Quote
Old Dec 05, 2012, 09:40 AM
CU, Rob - HVCAlkmaar.nl
Gompy's Avatar
The Netherlands, NH, Alkmaar
Joined Dec 2012
29 Posts
: )
Gompy is offline Find More Posts by Gompy
Last edited by Gompy; Dec 05, 2012 at 04:18 PM.
Reply With Quote
Old Dec 05, 2012, 09:53 AM
Registered User
United Kingdom
Joined Aug 2008
1,439 Posts
: )
SadSack is offline Find More Posts by SadSack
Last edited by SadSack; Dec 05, 2012 at 02:14 PM.
Reply With Quote
Old Dec 05, 2012, 10:00 AM
CU, Rob - HVCAlkmaar.nl
Gompy's Avatar
The Netherlands, NH, Alkmaar
Joined Dec 2012
29 Posts
: )
Gompy is offline Find More Posts by Gompy
Last edited by Gompy; Dec 05, 2012 at 04:18 PM.
Reply With Quote
Old Dec 05, 2012, 11:53 AM
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
226 Posts
Quote:
Originally Posted by Gompy View Post
This code have to be copy / past into the Exelsheet befor you can use it.
I show the code and hope some one will be smart enough to see if I make the right changes.

Set internal resistants OFF (external use)
Set GP4 and GP5 reverse (jumper or switch must be closed - high)
MCLRE_ON (pin4 of the PIC will be a RESET - low)

BTW, the wrong schematic is showing above !

Schematic changed

Yup that's 1 of the problems, we have to sort everything out. I updated the file Gompy.

Ray
Nav_Aids is offline Find More Posts by Nav_Aids
Last edited by Nav_Aids; Dec 05, 2012 at 07:30 PM.
Reply With Quote
Old Dec 05, 2012, 02:48 PM
CU, Rob - HVCAlkmaar.nl
Gompy's Avatar
The Netherlands, NH, Alkmaar
Joined Dec 2012
29 Posts
: )
Gompy is offline Find More Posts by Gompy
Last edited by Gompy; Dec 05, 2012 at 04:19 PM.
Reply With Quote
Old Dec 05, 2012, 03:51 PM
supreme being of leisure
ZAGNUT's Avatar
Tel Aviv, Israel
Joined Jul 2004
1,740 Posts
Quote:
Originally Posted by Gompy View Post
GRompy thank you.

And Gompy quit with this forum.
It'seems to me a playgarden for children.
as opposed to RCU?

haha
ZAGNUT is offline Find More Posts by ZAGNUT
Reply With Quote
Old Dec 05, 2012, 04:48 PM
Registered User
Joined Dec 2012
48 Posts
Ray, I was testing the new timer board with my original ignitions with the toroid transformer on it and ran into a snag. There must be a resistor value change or the inverted signal from the optocoupler output will not fire the ignition. If you have the schematic and can re-post it, I will tell you which resistor number it is. I can't seem to find the combo board schematic with the problem resistor. It all boils down to the positive bias with too low of a resistor value. It's a 150 ohm I believe shown in the schematic. This must be changed to a 680 ohm to correct the situation.

John
gr8flyer55 is offline Find More Posts by gr8flyer55
Reply With Quote
Old Dec 05, 2012, 06:43 PM
Registered User
Joined Dec 2012
48 Posts
There have been inquiries as to the possibility to switch the table via a connection to the receiver thru a servo function lead. To me, I think it would be possible only with an opto kill switch arrangement to prevent the possibility of the dreaded RFI. Anyone have views on this arrangement?

John
gr8flyer55 is offline Find More Posts by gr8flyer55
Reply With Quote
Old Dec 05, 2012, 07:31 PM
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
226 Posts
Sorry Gompy, I don't know what I was thinking.

Ray
Nav_Aids is offline Find More Posts by Nav_Aids
Reply With Quote
Reply

Castle Creations      DRIVE / FLY / SUPPORT  

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Discussion CD Ignition lead and fixed plug .... solentlife Engines 4 Nov 15, 2012 06:40 AM
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 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 Talk 3 Mar 11, 2012 12:22 PM