CDI gr8flyer55
#501
Senior Member
Join Date: Aug 2011
Location: Moscow,
ID
Posts: 144
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
ORIGINAL: jakestew
If you want to change this then change...
Also change...
Remember that the hall switch is active low, so falling edge = magnet approaching and rising edge = magnet leaving.
If you want to change this then change...
Code:
OPTION_REG = 0b00000000; // pullups on, falling edge, Tmr0 to OPTION_REG = 0b01000000; // pullups on, rising edge, Tmr0
Code:
else if(INTCONbits.INTF){ // ***** GP2 SENSOR INPUT ***** if(GPIObits.GP2 == 0){ to else if(INTCONbits.INTF){ // ***** GP2 SENSOR INPUT ***** if(GPIObits.GP2 == 1){
Remember that the hall switch is active low, so falling edge = magnet approaching and rising edge = magnet leaving.
The only thing I can see this change doing is wasting a couple degrees worth of time. If you want to use your existing sensor placement without moving anything it's easy enough to just change the Hall degree setting in the spreadsheet.
It's also not difficult to change the code if you want to trigger with the magnet leaving the sensor. If people really want the option I can write a setting to change this into the code.
The only problem is that in order to keep the timing the same I need to compile in as many variable options as I can, so I use defines to do this and the preprocessor figures out some of the settings at compile time. Because of this, I can't make the spreadsheet produce the hex for some settings because they're compiled in. I want to avoid making the spreadsheet too large and complicated because I have to change and test it for every code revision. Adding multiple hex files and code changing options is sure to result in more work, more errors, or probably both.
I just need to know what the reasoning is behind passing up the first opportunity (magnet triggering the hall) to time the spark in favor of the 2nd opportunity (magnet leaving hall)? It just doesn't seem to make sense to me.
-Jake
#502
Senior Member
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
It's for safety, you know when the magnet leave the hallsensor.
You don't know and not want a puls if a magneticfeeld activate the hallsensor.
It (have to) act like a set / reset funtion.
The magnet activate the sensor, set ready ignition, leave hallsensor is ignition.
You don't know and not want a puls if a magneticfeeld activate the hallsensor.
It (have to) act like a set / reset funtion.
The magnet activate the sensor, set ready ignition, leave hallsensor is ignition.
#504
Senior Member
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Be carfull Charlie, if the prop flips back you get also a spark, even if the prop don't goes true the TDC and the engine can be run reverse !
#505
Senior Member
RE: CDI gr8flyer55
The commercial units work this way
#506
Senior Member
Join Date: Feb 2010
Location: szarvas, HUNGARY
Posts: 133
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
ORIGINAL: COM
Well Not exactly. Looking with a scope at a few different boards what happens is at startup the pic is triggered at the rising edge if the input. at about 4 or 500 rpm the pic is then triggered at the falling edge of the input. I am not quite sure how this is done, but it works very well.
The commercial units work this way
Yes!
High-speed fixed-time of the algorithm.
The rising edge, falling edge time lapse between.
Ignition RCexl me this was my experience.
#507
Senior Member
Join Date: Aug 2011
Location: Moscow,
ID
Posts: 144
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
I don't think we can count on the magnet leaving as being a safety feature.
If a stray magnet goes by it will trigger the spark no matter what we do. Rising edge, falling edge, or even both will end up with the same effect. The only way to prevent accidental firing would be measuring the length of the activation and only firing if it fell within the proper range.
I don't think even that would work because transient magnetic fields would still set it off since they would likely be very short and fall within the timing range. If I can figure how to make the unit safer I certainly will. With the new 1840 chip we'll have the processing power to make more measurements and handle things in a smarter way.
-Jake
If a stray magnet goes by it will trigger the spark no matter what we do. Rising edge, falling edge, or even both will end up with the same effect. The only way to prevent accidental firing would be measuring the length of the activation and only firing if it fell within the proper range.
I don't think even that would work because transient magnetic fields would still set it off since they would likely be very short and fall within the timing range. If I can figure how to make the unit safer I certainly will. With the new 1840 chip we'll have the processing power to make more measurements and handle things in a smarter way.
-Jake
#508
Senior Member
Join Date: Aug 2011
Location: Moscow,
ID
Posts: 144
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
I just posted Eagle schematics of the timer board and HV board to the website. There's no board files yet, I haven't laid anything out for the board files.
I went straight from the pictures when punching this in. The only thing I changed was organizing the connectors. +5V should always be in the center, GND on one side, and signal on the other.
-Jake
I went straight from the pictures when punching this in. The only thing I changed was organizing the connectors. +5V should always be in the center, GND on one side, and signal on the other.
-Jake
#509
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Jake,I'm trying to post a revision of the CDI HV board schematic which should be used in the kit version. It's a revision of what Nyemi posted from RCCDI RC Ignition. I think it finally worked. I built 10 more today, tested and all spark great. I also tested the kill feature on the timer board with a servo operated switch, no RFI interferrence, even using an old 72 MHz. radio ! I used the throttle servo with a micro lever switch, and worked perfect.
Rob, this is the circuit you'll be building and testing with the rest of us. I included a few of the kits in your box.
Seems Murphy's law prevails! Got ahead of myself yesterday and uploaded a picture before I checked it out! Disregard the photo on the left! Use the one on the right which has an added resistor, 680 ohm to the signal coupling to the SCR. Sorry to confuse everyone again..Maybe this one is correct. Let me know if I made any errors, since we want this to be what we are all going to be using.
John
Rob, this is the circuit you'll be building and testing with the rest of us. I included a few of the kits in your box.
Seems Murphy's law prevails! Got ahead of myself yesterday and uploaded a picture before I checked it out! Disregard the photo on the left! Use the one on the right which has an added resistor, 680 ohm to the signal coupling to the SCR. Sorry to confuse everyone again..Maybe this one is correct. Let me know if I made any errors, since we want this to be what we are all going to be using.
John
#510
Senior Member
RE: CDI gr8flyer55
OK I did some testing on my engine and I see some things that I think need fixing. I have (in the spreadsheet) the multi spark turned off or at least set to 1 spark. I still multiple sparks at startup. I notice also that if the magnet stops at the hall sensor I get a continuous spark until I move the magnet off the HES. That could really hurt someone. The spark needs to be a one shot deal. Anyway these are just some things I have seen and I am just trying to help.
#512
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Charlie, I have the multispark feature enabled and it still does a steady fire at the plug, but not every time! Getting stuck in the loop somewhere when it recieves a signal to fire, definitly needs fixing!! It does a nice ignition spark test though! LOL
John
John
#513
Senior Member
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Try it with the diode I drawing.
I think the SCR isn't closed after firing.
I'm also missing the SCR protection, 22nF/ 600V and 22R/0.5W
BTW, the Bosch schematic is only for inspiration.
I think the SCR isn't closed after firing.
I'm also missing the SCR protection, 22nF/ 600V and 22R/0.5W
BTW, the Bosch schematic is only for inspiration.
#514
Senior Member
RE: CDI gr8flyer55
Hello Everyone,
I am not sure who has tested the software on a actual engine, but I made some adjustments to mine and the software works super. Other then the constant sparking when the magnet is on the HES everything else perfect. Good Job Jake.
I am not sure who has tested the software on a actual engine, but I made some adjustments to mine and the software works super. Other then the constant sparking when the magnet is on the HES everything else perfect. Good Job Jake.
#516
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Just as a test, I let it continue firing for about 15 seconds to see what damage it would do, well it heated up the transistor on the HV board and destroyed it!
This bug needs to be fixed for sure now. can't have things being destroyed that were working perfectly before.
John
This bug needs to be fixed for sure now. can't have things being destroyed that were working perfectly before.
John
#517
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Rob, I hope you get your box soon! It should be going thru customs right now. Lots of good stuff in the box. I can't wait till you see everything I sent.
John
John
#518
Senior Member
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
The Homy is ready for it, the garden not.....I missing a roof and it will be winter now.
I hope my son wil help me to welding the frame, it's also a winterplace for his (and mine) bike.
I buy a new prop 16x6 and the Homy is run now ~6000 rpm (28ccm)
For now I need a startrope, I hope it's over with the new CDI.
BTW, can / wil you test the CDI with the diode who I draw into the schematic ?
I think the SCR didn't close and open again if the voltage is enough to create a new spark.
A SCR is only closed if the Voltage is going true zero, reverse the HV-coil wil do this normaly.
The flaslight with xenontube is allmost ready, I just damage my last SCR.....broken lead.
Monday I can buy a new one and can test with my electronic engine ignition tetser
I hope my son wil help me to welding the frame, it's also a winterplace for his (and mine) bike.
I buy a new prop 16x6 and the Homy is run now ~6000 rpm (28ccm)
For now I need a startrope, I hope it's over with the new CDI.
BTW, can / wil you test the CDI with the diode who I draw into the schematic ?
I think the SCR didn't close and open again if the voltage is enough to create a new spark.
A SCR is only closed if the Voltage is going true zero, reverse the HV-coil wil do this normaly.
The flaslight with xenontube is allmost ready, I just damage my last SCR.....broken lead.
Monday I can buy a new one and can test with my electronic engine ignition tetser
#519
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
ORIGINAL: COM
OK I did some testing on my engine and I see some things that I think need fixing. I have (in the spreadsheet) the multi spark turned off or at least set to 1 spark. I still multiple sparks at startup. I notice also that if the magnet stops at the hall sensor I get a continuous spark until I move the magnet off the HES. That could really hurt someone. The spark needs to be a one shot deal. Anyway these are just some things I have seen and I am just trying to help.
OK I did some testing on my engine and I see some things that I think need fixing. I have (in the spreadsheet) the multi spark turned off or at least set to 1 spark. I still multiple sparks at startup. I notice also that if the magnet stops at the hall sensor I get a continuous spark until I move the magnet off the HES. That could really hurt someone. The spark needs to be a one shot deal. Anyway these are just some things I have seen and I am just trying to help.
#520
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Rob, just tried your 3 added parts and it still does the continous sparking. It's coming from the pic in the software.
Jeff, also tried the small cap at that juncton, also a no go. So it is in the software. Stuck somewhere in a loop until it sees a change of the hall signal because if you move the magnet away from the sensor, it then stops. Somewhere in that control loop lies the problem.
I replaced the burned out transistor and all is well with the HV board again. Ran the engine and it's fine. Just can't stop the magnet under the sensor or you get a buzz of sparks and the transistor heats up cause it is supplying too much current to the oscillator circuit.
Somewhere there's a problem with it, Maybe Jake can find it.
John
Jeff, also tried the small cap at that juncton, also a no go. So it is in the software. Stuck somewhere in a loop until it sees a change of the hall signal because if you move the magnet away from the sensor, it then stops. Somewhere in that control loop lies the problem.
I replaced the burned out transistor and all is well with the HV board again. Ran the engine and it's fine. Just can't stop the magnet under the sensor or you get a buzz of sparks and the transistor heats up cause it is supplying too much current to the oscillator circuit.
Somewhere there's a problem with it, Maybe Jake can find it.
John
#521
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
I meant for you to place the cap in series with the incoming hall signal between there and the R1,R3 junction, not from junction to ground.
#522
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Jeff, I placed it inline and same thing, so it is getting a signal to fire multiple times until you remove the magnet and that stops the signal.. What a mess, thought we had it nailed, otherwise it works great as Charlie said. Both switches work fine, good starting and handling characteristics otherwise. One last glitch...
John
John
#523
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
mmm...ok...just sent you an email with a mod for the input you can try. Should give you one, and only one , pulse as the magnet approaches the hall switch.
If it works like I think it should, I'll poke it in here.
If it works like I think it should, I'll poke it in here.
#524
Senior Member
Join Date: Nov 2005
Location: Hamburg,
PA
Posts: 805
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
Looks like it may work as a debounce circuit Jeff.
Will try in the morning and let you know. Going to play the slots tomorrow morning and hope to win something....never know.
John
Will try in the morning and let you know. Going to play the slots tomorrow morning and hope to win something....never know.
John
#525
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes
on
0 Posts
RE: CDI gr8flyer55
The way it works is, the cap normally has both ends at positive rail. When hall switch turns on, it pulls the one end of the cap to ground.
It gives a negative going pulse at R1,R3 junction as the cap begins it's charge, and then after tou time, the pulse at R1,R3 junction goes high.
It will stay in this state until another high to low transition of the hall switch.
Just have to select correct values of RC so that it doesn't interfere with other timing in the system. i.e. with 0.01uF and 4K7 should give approx. 32uSec.(if I'm not mistaken)
It gives a negative going pulse at R1,R3 junction as the cap begins it's charge, and then after tou time, the pulse at R1,R3 junction goes high.
It will stay in this state until another high to low transition of the hall switch.
Just have to select correct values of RC so that it doesn't interfere with other timing in the system. i.e. with 0.01uF and 4K7 should give approx. 32uSec.(if I'm not mistaken)