OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
#102
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
Well , I changed the code and added a macro to avoid using digitalWrite() function , this code works on Arduino NANO , I'm adding the picture using the NANO , which is smaller , I'm still figuring out where to mount it .
Digital Pin 3 -> DIODE -> COIL 1
Digital Pin 5 -> DIODE -> COIL 2
Digital Pin 6 -> DIODE -> COIL 3
Digital Pin 7 -> DIODE -> COIL 4
Digital Pin 8 -> 1k Resistor -> ICM
Digital Pin 12-> 1k Resistor -> INJ1
Also , I'm using 5v instead of VIN as power, 12v from the car is not that stable. So I connected the 5v power to D19 which is power source for MAP (5v power source) , so power goes like this :
5V PIN -> D19
GND -> B2 , ANY GND IS GOOD
Also , I'm not using the ECU Pins for coil output, I'm using direct cables with a connector , I guess its easier .
Attached the ZIP FILE with the code.
Cheers
Digital Pin 3 -> DIODE -> COIL 1
Digital Pin 5 -> DIODE -> COIL 2
Digital Pin 6 -> DIODE -> COIL 3
Digital Pin 7 -> DIODE -> COIL 4
Digital Pin 8 -> 1k Resistor -> ICM
Digital Pin 12-> 1k Resistor -> INJ1
Also , I'm using 5v instead of VIN as power, 12v from the car is not that stable. So I connected the 5v power to D19 which is power source for MAP (5v power source) , so power goes like this :
5V PIN -> D19
GND -> B2 , ANY GND IS GOOD
Also , I'm not using the ECU Pins for coil output, I'm using direct cables with a connector , I guess its easier .
Attached the ZIP FILE with the code.
Cheers
#103
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I'm waiting for someone to send me a test board for a new product, if that doesn't happen really soon I'm going to try this out with so,e ideas of my own.
In regards to what spadam was saying, the pins where the stock knock board connects carry timing signals for stock knock windowing
I am not sure if they've been processed to edges by then as I haven't scoped it yet but it makes sense that they would be. But who knows.
In regards to what spadam was saying, the pins where the stock knock board connects carry timing signals for stock knock windowing
I am not sure if they've been processed to edges by then as I haven't scoped it yet but it makes sense that they would be. But who knows.
#105
Honda-Tech Member
#107
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I read this post prob 5 times. Loving what im seeing here. Wondering if anything else been figured out. I have a Nano on the way and plenty of things to test with it Im looking forward to this!
#108
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
In code you mesure the icm signal and after this, you charging coil ~2ms. 1ms on 1000rpm is ~5 degr Drive shaft , but on 8000rpm 1ms is 48 degre. So how is it that the ignition is not delayed.
I'm sorry for my fatal English
I'm sorry for my fatal English
#109
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
Hi. Good day fellas. Need a help regarding the wiring diagram. Can you guys please share a diagram so that i can try it on my own. So many thanks in advance. Cheers
#110
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
i have thought about revisiting this but imho it would require proper pwm / timer manipulation on a microcontroller not just digitalwrites or similar to be reliable and good..
i might look into doing it this way again, if I do I'll post my results
#111
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
hate to say but if you need a diagram maybe you should use something more pre-made. Hondarulez has a cop board you can solder into the ecu.
i have thought about revisiting this but imho it would require proper pwm / timer manipulation on a microcontroller not just digitalwrites or similar to be reliable and good..
i might look into doing it this way again, if I do I'll post my results
i have thought about revisiting this but imho it would require proper pwm / timer manipulation on a microcontroller not just digitalwrites or similar to be reliable and good..
i might look into doing it this way again, if I do I'll post my results
#112
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I did some serious thinking about this over the weekend...If I'm not mistaken this can also be done with some CMOS logic. A CD4017 decade counter chip seems like a suitable solution. Anyone have thoughts on this? You'd use the tdc signal from the distributor to reset/sync the count. A circuit like this could be hidden inside a gutted distributor and the coilpacks wired directly to it.
This is this signal diagram for the counter:
I think this could also handle the tach output as well?
This is this signal diagram for the counter:
I think this could also handle the tach output as well?
#113
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I previously thought this, but now I'm pretty sold on the Honda Rulez setup. The CMOS logic falls short when you need to keep track of dwell. The holy grail next step imo is to utilize a delphi coilpack with ion-sensing capabilities to not only detect the onset of knock but also read out combustion chamber pressure.
#114
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I previously thought this, but now I'm pretty sold on the Honda Rulez setup. The CMOS logic falls short when you need to keep track of dwell. The holy grail next step imo is to utilize a delphi coilpack with ion-sensing capabilities to not only detect the onset of knock but also read out combustion chamber pressure.
I totally agree about the ion sensing, I was looking intomthings like this for a while.
Tbh if I can get a datasheet for those coil packs I could whip something up.
#116
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
helo fellow masochists
amadeuscr design is okish but im sure it created some huge delays between COILTR input and what arduino output
first of all he waits for pulseIn(); and code will not go trough until this commands turns out a duration of pulse what means we are already far after the coil should be triggered
then we go to next line of code which fires the coil and uses his own dwell time
this creates delay but it shouldnt matter right? because we just need to advance dizzy
well, no
first of all dizzy is important for injector timing in CoP conversion we need to align it for valve opening most prefferably not advanced
another reason is that durration will be different depending on battery voltage rpms and load what means there is different delay between ecu triggering and arduino firing a coil
i dont see a reason to take duration of the pulse we can just siply wait for input to go high set coil high then wait for input
for the code i redo a function FIRE_COIL and rather than using 4 functions for each cilinder im using variable to choose which cylinder to fire
you can try it out if you use the OG code
i wont test it because im working on different design
code bellow waits for the coil trigger input, because of this we dont have delay of trigger input happening when arduino is proccessing different code
ever thought about demultiplexer?
signal will only go trough a gate that is controlled by arduino
arduino will never create a trigger for coils
after syncing done aruino will choose to which output allow signal to pass after
this way we can keep original ecu dwell and dont create delays
BONUS
i will share with you something
ppl say that there are two ICM pins for a reason
OBD1 ecu have ICM on plug A pin 21 & 22
pin21 sends ICM for cyl 1&4
pin22 sends ICM for cyl 2&3
might be the other way round
but its literally a wasted spark
we can also use this to sync spark
all you need is connect coils corectly...
far much less work to do, no programming and should work pretty much the same I will probably test it out today since I dont have demultiplexer yet
amadeuscr design is okish but im sure it created some huge delays between COILTR input and what arduino output
first of all he waits for pulseIn(); and code will not go trough until this commands turns out a duration of pulse what means we are already far after the coil should be triggered
then we go to next line of code which fires the coil and uses his own dwell time
this creates delay but it shouldnt matter right? because we just need to advance dizzy
well, no
first of all dizzy is important for injector timing in CoP conversion we need to align it for valve opening most prefferably not advanced
another reason is that durration will be different depending on battery voltage rpms and load what means there is different delay between ecu triggering and arduino firing a coil
i dont see a reason to take duration of the pulse we can just siply wait for input to go high set coil high then wait for input
for the code i redo a function FIRE_COIL and rather than using 4 functions for each cilinder im using variable to choose which cylinder to fire
you can try it out if you use the OG code
i wont test it because im working on different design
int ORDER[5]={0,3,1,4,2};
int VAR[5]={0,3,5,6,7}; //pin numbers for cyl none,1,2,3,4
void FIRE_COIL(int a){
int VAR[5]={0,3,5,6,7}; //pin numbers for cyl none,1,2,3,4
void FIRE_COIL(int a){
digitalHigh(VAR[a]); //charges the coil
while(COILTR != LOW ){} //loop taht does nothing as long as trigger state is diffrent than LOW
digitalLow(VAR[a]); //fires coil
NEXTCOIL=ORDER[a]; //sets which coil to fire next using table
if (SYNCED == 1){
while (COILTR ==LOW){} \\ it will loop and do nothing as long as trigger signal is LOW its fastest way to react to signal value change
FIRE_COIL(NEXTCOIL);
}
while (COILTR ==LOW){} \\ it will loop and do nothing as long as trigger signal is LOW its fastest way to react to signal value change
FIRE_COIL(NEXTCOIL);
}
signal will only go trough a gate that is controlled by arduino
arduino will never create a trigger for coils
after syncing done aruino will choose to which output allow signal to pass after
this way we can keep original ecu dwell and dont create delays
BONUS
i will share with you something
ppl say that there are two ICM pins for a reason
OBD1 ecu have ICM on plug A pin 21 & 22
pin21 sends ICM for cyl 1&4
pin22 sends ICM for cyl 2&3
might be the other way round
but its literally a wasted spark
we can also use this to sync spark
all you need is connect coils corectly...
far much less work to do, no programming and should work pretty much the same I will probably test it out today since I dont have demultiplexer yet
Last edited by Rokita_S; 08-22-2022 at 09:16 AM. Reason: mistake in posted code
#117
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I did eventually wrote the whole code...
I'am providing it for u as HEX code you can upload it to arduino by windows cmd or Xloader, there are tutorials online for this.
I will eventually create a github for this project where I will share the actuall code, for now i dont see a reason to... I already made a post explaining how my code works and with some thinking you can copy paste what i wrote and make it work
here is the pin list so you can wire your arduino acordingly
if someone wonders - pinout is kept same as amadeuscr
3 - COIL1
5 - COIL2
6 - COIL3
7 - COIL4
8 - (1KΩ) - ICM
12 - (1KΩ) - INJ1
I suggest using this code only to ppl that had already working CoP conversion based on amadeuscr code
my code is a direct replacemmet for his it needs only distributor timing adjustment (most probably a few degrees retard)
in case of any errors or something not working properly DM me and i will provide changes in the code as soon as possible
I do not take any responsibility for damage you might cause to your property
be realistic we all mess with timing of your engine
CoP increases power mostly because it decreases timing delay that happens on higher rpms i recomend checking github page of miniCoP project there is an table comparing ignition delay between distributor and miniCoP
in some cases it might be enough to cause knocking
Everything you do is at your own risk...
Tune your car acordingly!!! 🏎️
I'am providing it for u as HEX code you can upload it to arduino by windows cmd or Xloader, there are tutorials online for this.
I will eventually create a github for this project where I will share the actuall code, for now i dont see a reason to... I already made a post explaining how my code works and with some thinking you can copy paste what i wrote and make it work
here is the pin list so you can wire your arduino acordingly
if someone wonders - pinout is kept same as amadeuscr
3 - COIL1
5 - COIL2
6 - COIL3
7 - COIL4
8 - (1KΩ) - ICM
12 - (1KΩ) - INJ1
I suggest using this code only to ppl that had already working CoP conversion based on amadeuscr code
my code is a direct replacemmet for his it needs only distributor timing adjustment (most probably a few degrees retard)
in case of any errors or something not working properly DM me and i will provide changes in the code as soon as possible
I do not take any responsibility for damage you might cause to your property
be realistic we all mess with timing of your engine
CoP increases power mostly because it decreases timing delay that happens on higher rpms i recomend checking github page of miniCoP project there is an table comparing ignition delay between distributor and miniCoP
in some cases it might be enough to cause knocking
Everything you do is at your own risk...
Tune your car acordingly!!! 🏎️
Last edited by Rokita_S; 08-24-2022 at 04:39 PM.
#118
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I see no interest in this thread...
but anyway
here is my githhub https://github.com/R0KITA/Honda-CoP-conversion-
i posted some code there but most of it is garbage im very bad at keeping files organised...
from now on there will be 2 versions of the code
one simplified using arduino libraries
second one wrote in assembler
im considering throwing out dwell map there is really no need to unless someone would want this diy convertion on his b18c or something like that we are talking about +9000rpm at which point you should just get aftermarket ecu
assembler is going to make code much faster
there is no more sync
this part of code was useless
i just set nextcoil as 2 whenever inj1 in active using just if function
engine is not dying any more at cutoff
pinout is now totally different
9 - COIL1
10 - COIL2
11 - COIL3
12 - COIL4
3 - (100KΩ) - ICM
A3 - (100KΩ) - INJ1
i dunno how resistor affect signal reading but i had only 100k in my box so i used them i didnt have any issues
only issue i faced is tacho in my car not working
ecu reads signal perfectly but not the gauge
thats it
i plan to make plug&play conversion but im not a circut designer type of guy i preffer to write stuff
so idunno if someone located in europe would be interested in helping and sharing eventual profits then im up to it
but anyway
here is my githhub https://github.com/R0KITA/Honda-CoP-conversion-
i posted some code there but most of it is garbage im very bad at keeping files organised...
from now on there will be 2 versions of the code
one simplified using arduino libraries
second one wrote in assembler
im considering throwing out dwell map there is really no need to unless someone would want this diy convertion on his b18c or something like that we are talking about +9000rpm at which point you should just get aftermarket ecu
assembler is going to make code much faster
there is no more sync
this part of code was useless
i just set nextcoil as 2 whenever inj1 in active using just if function
engine is not dying any more at cutoff
pinout is now totally different
9 - COIL1
10 - COIL2
11 - COIL3
12 - COIL4
3 - (100KΩ) - ICM
A3 - (100KΩ) - INJ1
i dunno how resistor affect signal reading but i had only 100k in my box so i used them i didnt have any issues
only issue i faced is tacho in my car not working
ecu reads signal perfectly but not the gauge
thats it
i plan to make plug&play conversion but im not a circut designer type of guy i preffer to write stuff
so idunno if someone located in europe would be interested in helping and sharing eventual profits then im up to it
The following 2 users liked this post by Rokita_S:
#119
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
i get ngk r8 coils i will test your code this night and i will report.....i will use ardino due with ARM processor this 10x faster than arduino mega and uno....but im really interested with your hex file. how can write it to due?
#120
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
I see no interest in this thread...
but anyway
here is my githhub https://github.com/R0KITA/Honda-CoP-conversion-
i posted some code there but most of it is garbage im very bad at keeping files organised...
from now on there will be 2 versions of the code
one simplified using arduino libraries
second one wrote in assembler
im considering throwing out dwell map there is really no need to unless someone would want this diy convertion on his b18c or something like that we are talking about +9000rpm at which point you should just get aftermarket ecu
assembler is going to make code much faster
there is no more sync
this part of code was useless
i just set nextcoil as 2 whenever inj1 in active using just if function
engine is not dying any more at cutoff
pinout is now totally different
9 - COIL1
10 - COIL2
11 - COIL3
12 - COIL4
3 - (100KΩ) - ICM
A3 - (100KΩ) - INJ1
i dunno how resistor affect signal reading but i had only 100k in my box so i used them i didnt have any issues
only issue i faced is tacho in my car not working
ecu reads signal perfectly but not the gauge
thats it
i plan to make plug&play conversion but im not a circut designer type of guy i preffer to write stuff
so idunno if someone located in europe would be interested in helping and sharing eventual profits then im up to it
but anyway
here is my githhub https://github.com/R0KITA/Honda-CoP-conversion-
i posted some code there but most of it is garbage im very bad at keeping files organised...
from now on there will be 2 versions of the code
one simplified using arduino libraries
second one wrote in assembler
im considering throwing out dwell map there is really no need to unless someone would want this diy convertion on his b18c or something like that we are talking about +9000rpm at which point you should just get aftermarket ecu
assembler is going to make code much faster
there is no more sync
this part of code was useless
i just set nextcoil as 2 whenever inj1 in active using just if function
engine is not dying any more at cutoff
pinout is now totally different
9 - COIL1
10 - COIL2
11 - COIL3
12 - COIL4
3 - (100KΩ) - ICM
A3 - (100KΩ) - INJ1
i dunno how resistor affect signal reading but i had only 100k in my box so i used them i didnt have any issues
only issue i faced is tacho in my car not working
ecu reads signal perfectly but not the gauge
thats it
i plan to make plug&play conversion but im not a circut designer type of guy i preffer to write stuff
so idunno if someone located in europe would be interested in helping and sharing eventual profits then im up to it
Hello Rokita,
I tried to DIY COP with arduino, but i have many miss..
1st, my engine hard to start, need many times crank..
2nd, after engine on, when i throtle up.. going to 4000rpm, it turn off the engine, and hard to crank again..
Did i miss something?
Thankyou
#121
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
first of all test the og code from guy that started the thread
then use my code
give me feed back if it worked on the og code
also check out my github im sure one of the codes there was working perfectly fine
your car is hard to start after it turns off itself because its not synced then and need to sync it again
long cranking is normal
it needs 4 revolutions to sync
i will shorten it to 2 revs for now 4 revs is to make sure everything works fine
then use my code
give me feed back if it worked on the og code
also check out my github im sure one of the codes there was working perfectly fine
your car is hard to start after it turns off itself because its not synced then and need to sync it again
long cranking is normal
it needs 4 revolutions to sync
i will shorten it to 2 revs for now 4 revs is to make sure everything works fine
#123
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
first of all test the og code from guy that started the thread
then use my code
give me feed back if it worked on the og code
also check out my github im sure one of the codes there was working perfectly fine
your car is hard to start after it turns off itself because its not synced then and need to sync it again
long cranking is normal
it needs 4 revolutions to sync
i will shorten it to 2 revs for now 4 revs is to make sure everything works fine
then use my code
give me feed back if it worked on the og code
also check out my github im sure one of the codes there was working perfectly fine
your car is hard to start after it turns off itself because its not synced then and need to sync it again
long cranking is normal
it needs 4 revolutions to sync
i will shorten it to 2 revs for now 4 revs is to make sure everything works fine
Yes first i test the code CoilonPlugRe and CoilOnPluFAST code..
the result is hard to crank,
and when i throtle up to when rpm reach 4000 engine is sudenly off.. when i modified the value of DWELL, MAXDWELL and MINDWELL it can reach maximum rpm 8000
but still hard to crank..
then i tried your code 0.2.4
It wont programing because the "delay" value before "while" maybe you can check the code..
if i delete "delay" string before "while" it can programing to the chip.. iam using UNO btw..
but after finish programing i tried to crank, it not working..
engine wont start
Then i tried to put led on coil output from UNO for simulation, then i tried to crank, but the led dont want to switched 1,3,4,2
Only steady on at output coil 2
did i missed something?
thankyou verymuch for your reply
#124
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
Hi Rokita,
Yes first i test the code CoilonPlugRe and CoilOnPluFAST code..
the result is hard to crank,
and when i throtle up to when rpm reach 4000 engine is sudenly off.. when i modified the value of DWELL, MAXDWELL and MINDWELL it can reach maximum rpm 8000
but still hard to crank..
Yes first i test the code CoilonPlugRe and CoilOnPluFAST code..
the result is hard to crank,
and when i throtle up to when rpm reach 4000 engine is sudenly off.. when i modified the value of DWELL, MAXDWELL and MINDWELL it can reach maximum rpm 8000
but still hard to crank..
what are your settings?
all i can think off is arduino is too slow to process all sparks and still charges the coil when next coil should be charged
if your car works now i have new version of the code
but its pretty much its completly new code wrote mostly in assembler it should get rid of long cranking and even if engine dies it should be able to start back up because of constant synchronization
its only tested on emulator
but take note
its now port manipulated so u need to find correct pin map for your UNO
then i tried your code 0.2.4
It wont programing because the "delay" value before "while" maybe you can check the code..
if i delete "delay" string before "while" it can programing to the chip.. iam using UNO btw..
but after finish programing i tried to crank, it not working..
engine wont start
Then i tried to put led on coil output from UNO for simulation, then i tried to crank, but the led dont want to switched 1,3,4,2
Only steady on at output coil 2
did i missed something?
thankyou verymuch for your reply
It wont programing because the "delay" value before "while" maybe you can check the code..
if i delete "delay" string before "while" it can programing to the chip.. iam using UNO btw..
but after finish programing i tried to crank, it not working..
engine wont start
Then i tried to put led on coil output from UNO for simulation, then i tried to crank, but the led dont want to switched 1,3,4,2
Only steady on at output coil 2
did i missed something?
thankyou verymuch for your reply
as long as microcontroler is the same my code will run fine
unless u use my asv code which uses ports and not arduino pin map in this case u need to find port map online and connect cables correctly
but thats weird because 0.2.4 is still on arduino library i will check the code of that version im pretty much sure i tested it and it worked fine
UPDATE
I was playing with BMtune recently and found out it has implemented CoP functions
like SYNC signal on ALTC output
i have not yet tested how it works but i will
i already depined ALTC for that
#125
Honda-Tech Member
Re: OBD1 ECU COIL ON PLUG MODULE - TROJANTUNING
and to better illustrate for you how much difference writting code using port manipulation makes
here is shortest possible signal from arduino
here is shortest possible signal from arduino