RE: CDI gr8flyer55    Gallery
View related threads: (in this forum | in all forums)

Logged in as Guest



Users viewing this topic: none
    Search This Thread  
 
Printable Version


TurboHeader Muffler
Seller:  RC Specialties
Details:   $69.95   |  4/28/2013   |  Classified Ad
We will rotate YOUR AD in this spot if you select "Forum Featured" when placing or editing your ad!

All Forums >> Glow Engines, Gas Engines, Fuel & Mfg Support Forums >> Engine Conversions >> RE: CDI gr8flyer55
Page: <<   < prev  12 13 [14] 15 16 17 18 19 20 21   next >   >>  

Tower Hobbies Get Coupon Codes Brands  
Login
Message << Older Topic   Newer Topic >>
RE: CDI gr8flyer55 - 9/18/2012 7:28 AM   
nyemi


 

Posts: 129
Score: 210
Joined: 2/19/2010
Last Login: 6/17/2013
From: szarvas, HUNGARY
Status: offline
Hi Jake
In the code, you can also wait for the Hall input (GP2) signal
when there is ignition timing delay is not ready?(Look at the picture.)

It's okay?
Not Cultivate the consequences?
Spark-ignition failure?

Solution:
Disable external interrupt input, ignition timing delay time?
What do you think about this?


Attachments
Click to see fullsize image.
Click for fullsize


< Message edited by nyemi -- 9/18/2012 8:52 AM >


_____________________________

Regards nyemi.

Hide Signatures

(in reply to jakestew)
       Post #: 326

RE: CDI gr8flyer55 - 9/18/2012 10:40 AM   
Gompy



Posts: 402
Score: 460
Joined: 7/3/2010
Last Login: 6/16/2013
From: Alkmaar, NETHERLANDS
Status: offline
Sorry, I don't take the time to read something important.

_____________________________

CU, Rob
http://www.electronics.gompy.net

Hide Signatures

(in reply to nyemi)
       Post #: 327

RE: CDI gr8flyer55 - 9/18/2012 12:33 PM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
If you look at the table I posted you will see that there are values bigger then what timer1 can hold.

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to lovefool)
       Post #: 328

RE: CDI gr8flyer55 - 9/18/2012 12:41 PM   
Gompy



Posts: 402
Score: 460
Joined: 7/3/2010
Last Login: 6/16/2013
From: Alkmaar, NETHERLANDS
Status: offline
Charlie, can you make a picture of the curve ?
I try any curve I know, but al the values are normal.

_____________________________

CU, Rob
http://www.electronics.gompy.net

Hide Signatures

(in reply to COM)
       Post #: 329

RE: CDI gr8flyer55 - 9/18/2012 4:52 PM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 6/4/2013
From: Moscow, ID, USA
Status: offline
Charlie, I don't know how you are getting that table. Maybe your hall sensor degree setting is wrong? When I set all the advance curve to 0 I get the following table...

5333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,272,293,314,335,356,377,398,419,440,461,482,503,524,
[...]
4997,5018,5039,5060,5081,5102,5123,5144,5165,5186,5207,5228,5249,5270,5291,5312

These should be the max values for waiting all the way to TDC with 30 degree hall sensor placement.


Nyemi said:
> But RC Ignition uses a Hall input rising edge.

The hall sensor is active low, like in your picture. So the falling edge comes right as the magnet is hitting the sensor. That's why I figured on using the falling edge. If I used the rising edge I would be getting the interrupt right as the magnet leaves the sensor.

> In the code, you can also wait for the Hall input (GP2) signal when there is ignition timing delay is not ready?

The interrupt only triggers on the falling edge. So it will only produce one interrupt per rev. The rising edge will not trigger the interrupt, so we don't have to worry about it.


> above table the first value is 1448075. how is that usable?

It's not. You must have an error in the spreadsheet. Everyone should check their numbers. There should be nothing larger than 5333 in the table if you hall is at 30 deg. If you hall is at 40 deg. then you should have nothing above 7125.


> In this particular example that first number is an issue....

I should have mentioned this. The first number is actually table value 256.
I'm using an 8-bit variable for CurrentRev. In order to get double the resolution (128 instead of 256 uS) I'm using the low 8-bits of Timer1 to round up or down. So we can get 255 for CurrentRev, but then if it gets rounded up it will go to 256, which rolls over to 0 since we're using an 8-bit variable. So a CurrentRev of 256 will end up being 0.

I figured this was a pretty slick way to do things. A real CurrentRev of 0 can never happen, unless you were running at infinity RPMs. So I use table value 0 to get an extra table value out of the same space, and it accounts for the chance of the max value of 255 getting rounded up to 256 and rolled over to 0.


> If you look at the table I posted you will see that there are values bigger then what timer1 can hold.

If you email me the spreadsheet I'll take a look at it to see what's going on. It's easy to accidentally change a wrong cell in Excel and have it screw up the whole sheet.


I'm working on the spreadsheet and should have a new version today or tomorrow with the features people have asked for. People also kindly sent me some example spreadsheets that show a slick way to make a button generate the code. Keep the examples coming! It really helps me to learn the spreadsheet tricks.

In the future, the spreadsheet will generate all the code, or at least the whole "User Settings" section. I'll also write some documentation to help people figure things out, and hopefully I can figure out how to protect all the cells that shouldn't be changed.

On the website I'm also going to start putting up new versions each time instead of replacing the old ones. And I'm putting up a "Dev release" download section that will link to the files I'm currently working on at the moment.

If you want to help work on the spreadsheet use the dev version to add changes, and email it to me as soon as you can so that we don't get out of sync. I added another sheet for the new curve that adds more control points (every 500 RPM instead of every 1K). It isn't linked to the table values yet.

http://www.electrofunnel.com/CDI-2012/index.htm


-Jake








_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to Gompy)
       Post #: 330

RE: CDI gr8flyer55 - 9/18/2012 4:54 PM  1 votes
CH Ignitions


 

Posts: 314
Score: 420
Joined: 8/20/2009
Last Login: 6/16/2013
From: West Palm Beach, FL, USA
Status: offline
Jack,

I look at the excel file , Last Rev3 ,I had a bit time today and in the Table value on the D3 for copy paste I look at the statement and reason for starting with the high number and then small is 
that it gets first cell G262 and then G7,G8....etc.

I change the beginning and the end of the statement and then all comes in order. Un less you need the G262 for some reason to be first. .
G262= 916RPM
As far as calculation all seams to be OK, I test it with a linear curve like in the last posting and all comes in order .
If you make a  wave curve then numbers are up and down to reflect that.




Before:

=TEXT(G262,0)&","&TEXT(G7,0)&","&TEXT(G8,0)&","&TEXT(G9,0)&",...............,"&TEXT('Table Values'!G261,0)

After:

=TEXT(G7,0)&","&TEXT(G8,0)&","&TEXT(G9,0)&",..........,"TEXT(G261,0)&","&TEXT('Table Values'!G262,0)


Thanks
Adrian

< Message edited by CH Ignitions -- 9/18/2012 5:31 PM >


_____________________________

www.ch-ignitions.com

Hide Signatures

(in reply to Gompy)
       Post #: 331

RE: CDI gr8flyer55 - 9/18/2012 6:44 PM   
nyemi


 

Posts: 129
Score: 210
Joined: 2/19/2010
Last Login: 6/17/2013
From: szarvas, HUNGARY
Status: offline
Hi Jake
quote:

The hall sensor is active low, like in your picture. So the falling edge comes right as the magnet is hitting the sensor. That's why I figured on using the falling edge. If I used the rising edge I would be getting the interrupt right as the magnet leaves the sensor.


The user should be seen as good.
Not the code.
Watch video:www.youtube.com/watch

quote:

The interrupt only triggers on the falling edge. So it will only produce one interrupt per rev. The rising edge will not trigger the interrupt, so we don't have to worry about it.


This is a practical problem.
High electronic smog in the PIC.
My engine is working. Your ignition code.
PIC is working badly.
Believe me.
I can only help you.
To be perfect in your code.




_____________________________

Regards nyemi.

Hide Signatures

(in reply to jakestew)
       Post #: 332

RE: CDI gr8flyer55 - 9/18/2012 9:12 PM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 6/4/2013
From: Moscow, ID, USA
Status: offline
> I change the beginning and the end of the statement and then all comes in order. Un less you need the G262 for some reason to be first.

The last table value DOES need to be first. CurrentRev can be 255 and get rounded up to 256. Since it's an 8-bit variable setting it to 256 rolls it over to zero. That's why the last value ends up in the first slot in the array.

Zero is not a valid revolution time, so I'm just making use of the zero slot in the array to handle the case where the highest value gets rounded up.


-Jake

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to nyemi)
       Post #: 333

RE: CDI gr8flyer55 - 9/18/2012 10:26 PM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
HI Jake,

The table I posted was from the code that John posted on your web site. I don't know how he got those values.

Charlie

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to jakestew)
       Post #: 334

RE: CDI gr8flyer55 - 9/19/2012 3:03 PM   
Gompy



Posts: 402
Score: 460
Joined: 7/3/2010
Last Login: 6/16/2013
From: Alkmaar, NETHERLANDS
Status: offline
Table valuas from John (website Jake) without any changes, just open Exel-file and copy / past from cel D3 tab tablevalue

9272,2,44,86,128,170,212,254,296,338,380,422,464,506,548,168,174,167,160,152,145,138,131,124,116,109,102,83,63,43,39,41,44,47,49,52,55,57,60,62,89,117,145,173,200,228,256,290,368,445,522,599,676,753,831,908,985,1062,
1139,1209,1270,1330,1390,1451,1511,1571,1631,1692,1752,1812,1873,1933,1993,2053,2114,2174,2234,2295,2355,2397,2436,2475,2514,2553,2593,2632,2671,2710,2749,2789,2828,2867,2906,2945,2984,3024,3063,3102,3141,3180
,3220,3259,3298,3337,3376,3416,3455,3494,3533,3572,3611,3651,3690,3729,3768,3807,3847,3886,3925,3964,4003,4043,4082,4121,4160,4199,4238,4278,4317,4356,4395,4434,4474,4513,4552,4591,4630,4670,4709,4748,4787,482
6,4865,4905,4944,4983,5022,5061,5101,5140,5179,5218,5257,5297,5336,5375,5414,5453,5492,5532,5571,5610,5649,5688,5728,5767,5806,5845,5884,5924,5963,6002,6041,6080,6119,6159,6198,6237,6276,6315,6355,6394,6433,64
72,6511,6551,6590,6629,6668,6707,6746,6786,6825,6864,6903,6942,6982,7021,7060,7099,7138,7178,7217,7256,7295,7334,7373,7413,7452,7491,7530,7569,7609,7648,7687,7726,7765,7805,7844,7883,7922,7961,8000,8040,8079,8
118,8157,8196,8236,8275,8314,8353,8392,8432,8471,8508,8545,8581,8617,8654,8690,8726,8763,8799,8836,8872,8908,8945,8981,9017,9054,9090,9127,9163,9199,9236


_____________________________

CU, Rob
http://www.electronics.gompy.net

Hide Signatures

(in reply to COM)
       Post #: 335

RE: CDI gr8flyer55 - 9/19/2012 4:39 PM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
Rob,

The table came from the C code that John used, not the spreadsheet.

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to Gompy)
       Post #: 336

RE: CDI gr8flyer55 - 9/19/2012 5:34 PM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 6/4/2013
From: Moscow, ID, USA
Status: offline
Hang tight. I'm working on a major rework of the spreadsheet.

Safety Note: I've noticed the CDI can sometimes fire a random spark here and there. Sometimes a bit after you power it up, sometimes after you remove the power. I think this is probably a hardware issue due to the way the circuit is constructed, I don't think anything can be done about it in software. So be careful! You should power up the CDI before you start messing with the engine and stay clear even after you shut it down.

One feature I'm working on is a software kill switch. I'll probably have the unit fire a few sparks right after the engine stops just to make sure the cylinder can't accidentally fire from a random spark. This probably won't be 100% either as gas could vaporize over time and create fresh fumes in the cylinder.

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to COM)
       Post #: 337

RE: CDI gr8flyer55 - 9/19/2012 6:25 PM   
Gompy



Posts: 402
Score: 460
Joined: 7/3/2010
Last Login: 6/16/2013
From: Alkmaar, NETHERLANDS
Status: offline
OK, I have see the spreatsheet and the code are complet differend.

_____________________________

CU, Rob
http://www.electronics.gompy.net

Hide Signatures

(in reply to jakestew)
       Post #: 338

RE: CDI gr8flyer55 - 9/19/2012 11:19 PM   
bluejets


 

Posts: 234
Score: 205
Joined: 3/25/2009
Last Login: 4/15/2013
From: xnot applicable, AUSTRALIA
Status: offline
Unit firing at power up due to the way 150R (R7) is connected to positive rail and transistor collector (Q2) must pull down to turn off.

Same as with Gompy's old 16f628A ignition that had switching for either a CDI or TCI system. In John's CDI power board he shows an alternative connection for R7 depending on whether you use points, hall effect directly or input from a certain pic micro circuit.

If the circuit was changed so that 150R (R7) was connected to ground and the transistor collector (Q2)connected to the positve rail, then this would not happen. It probably requires software change on GP1 though.

Hide Signatures

(in reply to Gompy)
       Post #: 339

RE: CDI gr8flyer55 - 9/20/2012 12:06 AM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
Bluejets,

What schematic are you referring to?

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to bluejets)
       Post #: 340

RE: CDI gr8flyer55 - 9/20/2012 3:35 AM   
bluejets


 

Posts: 234
Score: 205
Joined: 3/25/2009
Last Login: 4/15/2013
From: xnot applicable, AUSTRALIA
Status: offline

quote:

ORIGINAL: COM

Bluejets,

What schematic are you referring to?

This one Charlie.....I'm assuming they are still using it.

Attachments
Click to see fullsize image.
Click for fullsize


Hide Signatures

(in reply to COM)
       Post #: 341

RE: CDI gr8flyer55 - 9/20/2012 4:56 AM   
nyemi


 

Posts: 129
Score: 210
Joined: 2/19/2010
Last Login: 6/17/2013
From: szarvas, HUNGARY
Status: offline
Hi jake
I think a software error.
As is described above.
Solution.
The Hall signal, not the interrupt handler.
But it's easy to find out.
I RCexl code.docs.google.com/file/d/0BxQHqG9HPIj3LU1CaUliTi1xa1U/edit
The hardware is working well.
You have a 100% software problem.




< Message edited by nyemi -- 9/20/2012 5:44 AM >


_____________________________

Regards nyemi.

Hide Signatures

(in reply to jakestew)
       Post #: 342

RE: CDI gr8flyer55 - 9/20/2012 6:26 AM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 6/4/2013
From: Moscow, ID, USA
Status: offline
I think you may have a good idea there. I will add a check in the ISR to see if the signal is still driven low. That way the falling edge will cause a check 4-8 uS later. That should filter out any high frequency noise or transient signals.


-Jake

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to nyemi)
       Post #: 343

RE: CDI gr8flyer55 - 9/20/2012 7:03 AM   
nyemi


 

Posts: 129
Score: 210
Joined: 2/19/2010
Last Login: 6/17/2013
From: szarvas, HUNGARY
Status: offline
Hi Jake
I assembler: routine handles the Hall inputs. 
This bounce-free input.



Label_0003  BTFSC   GPIO      ,GP2      ;BTFSC = wait for high pulse on Hall switch (-_+).
                GOTO    Label_0002          ;BTFSS = wait for low pulse on Hall switch (+_-)  Alterable!!
                MOVLW   0x01                ;Hall input configuration (GP2)
                MOVWF   0x24               ;Auxiliary registers=0x24
                GOTO    Label_0003
Label_0002  MOVF    0x24      , F
                BTFSC   STATUS    , Z
                GOTO    Label_0003
                CLRF    0x24
Continue program execution.


_____________________________

Regards nyemi.

Hide Signatures

(in reply to jakestew)
       Post #: 344

RE: CDI gr8flyer55 - 9/21/2012 3:01 AM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 6/20/2013
From: Hamburg, PA, USA
Status: offline
Nyemi,
So we just have to convert this assembler routine into a "C" routine and the input routine should then function correctly.
I think I may have saved some of the old routines from the old project we can try.

Jake, would it help to have the old excel file that we had used to generate the c code after making the curve from the previous project, or have you already obtained a copy? It would probably have to be edited since the c code is using the data collected in a slightly different sequence but may be helpful. Nyemi had suggested the original routine when we had the problem before.

As for the numbers in the curve looking odd and being too large, the spreadsheet generated numbers do come out right if I do a flat curve. I didn't edit anything else that I can remember, just the curve. I started at 0 rpm and 0 degrees of advance if that is of importance. Just trying the curve in a compiled hex file showed no bad reactions during the running of the engine, so it must not be affecting the timer output to the ignition. Either way, it was a test run which gave us an idea of how it worked so far. A little tweaking here and there should have the code working as expected. It's come a long way in a very short time, there are bound to be some setbacks to overcome.

John


Hide Signatures

(in reply to nyemi)
       Post #: 345

RE: CDI gr8flyer55 - 9/21/2012 11:16 PM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 6/4/2013
From: Moscow, ID, USA
Status: offline
It's easy enough to include inline assembly in your C code. Advanced programmers often check the assembly that is generated from the C code and redo any parts they don't like with an inline assembly routine.

But the main issue is that Nyemi's code uses polling while mine uses interrupts. Polling repeatedly checks the pin to see if it's changed. With the interrupt it calls the interrupt service code when the hardware finds a falling edge. So I only get one interrupt.

I added an if statement to check if GP2 is low when the interrupt is called. It seems to work fine in the simulator until 81 Hz (about 4800 RPM). I'm not sure what's going on here and will have to do some real world testing. I have no idea if this is just a simulator artifact or if it is a real world problem.
-

I did some more testing with a real spark plug and the CDI seems able to spark continuously at 63 uS between sparks. I used a trigger pulse of 3 uS, then a delay of 63 uS for each spark. That was the fastest it could spark reliably. So about 66 uS between sparks.

So the unit can spark every 5 deg. up to 12,300 RPM!!!
Or every degree up to 2,500 RPM!

This is without the added resistance of cylinder compression, but it bodes well for the multispark idea!


-Jake

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to gr8flyer55)
       Post #: 346

RE: CDI gr8flyer55 - 9/22/2012 12:02 AM   
bluejets


 

Posts: 234
Score: 205
Joined: 3/25/2009
Last Login: 4/15/2013
From: xnot applicable, AUSTRALIA
Status: offline
So you are prepared to live with the fact that the hardware in present configuration and with the software switching off, will give a spark when the CDI powers up..?? Will not create problems further on with software..??


Hide Signatures

(in reply to jakestew)
       Post #: 347

RE: CDI gr8flyer55 - 9/22/2012 5:28 AM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 6/4/2013
From: Moscow, ID, USA
Status: offline
I'm not sure yet why it sometimes throws a spark a bit after you connect the power. It seems reasonable that since the hall input is normally high and the output is also normally high that either one could falsely trigger when powering up or powering down.

When powering down, the output pin from the processor is going to drop off before the capacitors discharge. I don't see any way to prevent this. It will happen no matter what the software does.

On power up I can add a delay before turning on interrupts. That should give the circuit time to stabilize. I'm not having much luck with checking the status in the interrupt. It seems like the interrupt gets triggered on the falling edge, but before the input actually goes to zero. That seems to be what the simulator thinks anyways.

In any case, this really isn't much of a problem. I'm not worried about it.


-Jake

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to bluejets)
       Post #: 348

RE: CDI gr8flyer55 - 9/22/2012 6:42 AM   
nyemi


 

Posts: 129
Score: 210
Joined: 2/19/2010
Last Login: 6/17/2013
From: szarvas, HUNGARY
Status: offline
Hi Jake
My suggestion. Not unused pins. You are created to output. (Gp4-GP5).
The GP3 Connect GND. (CONFIGURATION: MCLR = OFF)

Multi-spark optimum.
Minimum spark energy = 20 mJ
1W = 1J / s
10W power inverter. (6V * 1.7A = 10.2 watts)
Energy is 10J per second (1000ms).
10J/1000mS = 0.01J = 10mJ * 2ms!=20mJ

Consequences: 10W inverter -20mJ sparks=2ms!
Capacitor charging.
The charging time is another approach.
5T(Tau)=2mS=99,3%=~19,86mJ spark energy

4T(Tau)=1,6mS=98%=~19,6mJ spark energy
3
T(Tau)=1,2mS=95%=~19mJ spark energy
2T(Tau)=0,8mS=86%=~17,2mJ spark energy
1
T(Tau)=0,4mS=63%=~12,6mJ spark energy

I hope so. I know.


< Message edited by nyemi -- 9/22/2012 7:26 AM >


_____________________________

Regards nyemi.

Hide Signatures

(in reply to jakestew)
       Post #: 349

RE: CDI gr8flyer55 - 9/22/2012 9:47 AM   
bluejets


 

Posts: 234
Score: 205
Joined: 3/25/2009
Last Login: 4/15/2013
From: xnot applicable, AUSTRALIA
Status: offline
One way would be to turn micro on first and off last with respect to CDI section.

But as you say, not really a problem.

Hide Signatures

(in reply to nyemi)
       Post #: 350

Page:   <<   < prev  12 13 [14] 15 16 17 18 19 20 21   next >   >>  
All Forums >> Glow Engines, Gas Engines, Fuel &amp; Mfg Support Forums >> Engine Conversions >> RE: CDI gr8flyer55
Page: <<   < prev  12 13 [14] 15 16 17 18 19 20 21   next >   >>  





Jump to:


 
Google 



Search | Marketplace | Event Calendar | Local Clubs | Magazine | Product Ratings | New Products | Discussion Forums

Photo Gallery | Instructor Search | Field|Track|Marina Search

Advertisers | Hobby Vendor Resources | Rate Manufacturers | Sign In/Sign Up

SITE MAP!   : :   FORUM RULES

RC Universe is a service of Internet Brands, Inc. Copyright © 2001-2013.

Charities we support that also need your help
Yorkie Rescue | Humane Society | ASPCA | Crohn's-Colitis America


0.797RCU1