My ECU build thread for Citroen ZX 1.6 gasoline

For people running FreeEMS to discuss it and ask any questions about using and adjusting it.
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

My ECU build thread for Citroen ZX 1.6 gasoline

Post by HotCat »

EMStudio is nice and easy to use, I use it to debug my A/D circuite and the MAP works fine and so is my MAX9924. My question is how to stimulate injectors

my MAP
Image

under normal ambient temperature
Image

Drain it and see how low it can reach
Image

This is the pressure my Buick Regal's GM 3.1 can reach at idle
Image

Use a function generator to stimulate tach input
Image

I can see the count increase again and again from 0-255
Image

Then I populate vnp10n07, but the leds don't blink but keep light on
Image

I use this firmware so far
Image

any way, can I use 60-2 decoder to run my engine?
Last edited by HotCat on Tue Jan 22, 2013 4:56 pm, edited 1 time in total.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: My recent work and some questions

Post by Fred »

Re your FETs, load them with a simple light bulb to ensure the outputs go to the 12V rail when off.

Re testing your FETs, you can use the BencTest firmware to switch them on and off. MTX still supports it AFAIK, but may crash. You can get SOME results from the prerolled bin packets in the lib dir without any tool, too.

Re 60-2, maybe. It needs work, and testing. You can certainly try, but if you do, do NOT rev above 2500. If you get it running and take 17th place with the low redline I'll prioritise the fix for that.

PS, good to see you around again! :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
malcom2073
LQFP112 - Up with the play
Posts: 211
Joined: Tue May 01, 2012 4:17 pm
Location: Shrewsbury PA
Contact:

Re: My recent work and some questions

Post by malcom2073 »

HotCat wrote:EMStudio is nice and easy to use, I use it to debug my A/D circuite and the MAP works fine and so is my MAX9924.
Yay! :)
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: My recent work and some questions

Post by Fred »

Give him bench test mode ;-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: My recent work and some questions

Post by HotCat »

Fred wrote:Re your FETs, load them with a simple light bulb to ensure the outputs go to the 12V rail when off..
Good idea, I'll try it
Fred wrote:Re testing your FETs, you can use the BencTest firmware to switch them on and off. MTX still supports it AFAIK, but may crash. You can get SOME results from the prerolled bin packets in the lib dir without any tool, too.
I don't like MTX, I prefer EMStudio. Or I can simply skip this step, load 60-2 firmware and use a 60-2 sin wave to stimulate it, is that feasible?
Fred wrote:Re 60-2, maybe. It needs work, and testing. You can certainly try, but if you do, do NOT rev above 2500. If you get it running and take 17th place with the low redline I'll prioritise the fix for that.?
I decide to do a parallel install, fuel only. A lot of work need to be figures out myself such as how to generate IAT and CHT curve for my OEM sensor. Does FreeTherm have windows binary like EMStudio. Also I would like to use my timing light to calibrate the ignition offset in 60-2
Fred wrote: PS, good to see you around again! :-)
I've read your milestone, I know how to participate my role, I have enough patient, I am your tester not simply a user
Last edited by HotCat on Wed Dec 26, 2012 6:32 pm, edited 1 time in total.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: My recent work and some questions

Post by Fred »

I don't like MTX, I prefer EMStudio.
MTX is good for what it is, and that's a MS app. EMStudio is good because it's a custom fit around our needs. IE, Mike listened to me :-)
Or I can simply skip this step, load 60-2 firmware and use a 60-2 sin wave to stimulate it, is that feasible?
Yes, if you can generate the pattern, it should work at low RPM at least.
Fred wrote:Re 60-2, maybe. It needs work, and testing. You can certainly try, but if you do, do NOT rev above 2500. If you get it running and take 17th place with the low redline I'll prioritise the fix for that.?
I decide to do a parallel install, fuel only.
The limitations apply to all uses, even just sensing RPM with no injection or ignition.
A lot of work need to be figures out myself such as how to generate IAT and CHT curve for my OEM sensor.
Neither of these are critical for getting up and running. Both only matter in terms of tune "portability" and can be semi ignored at first provided that they're closish.
Does FreeTherm have windows binary like EMStudio.
FreeTherm ONLY exists as a .exe :-) It's a mono C# app. The latest one works on Linux again, not just windows like the older ones (maintenance decision by mono maintainers).
Also I would like to use my timing light to calibrate the ignition offset in 60-2
Necessary step on any vehicle setup.
Fred wrote:PS, good to see you around again! :-)
I've read your milestone, I know how to participate my role, I have enough patient, I am your tester not simply a user
I wasn't complaining at all! Just saying that you've not been around for a while, and your presence has been missed! <3 :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: My recent work and some questions

Post by HotCat »

The limitations apply to all uses, even just sensing RPM with no injection or ignition.
I can see the rev above 2500, what's happend? very confused
Image

Image
Neither of these are critical for getting up and running. Both only matter in terms of tune "portability" and can be semi ignored at first provided that they're closish.
I don't understand the words "provide that they're closish", can I completely ignore the IAT and CHT, only have Tach, MAP to start the engine?
I wasn't complaining at all! Just saying that you've not been around for a while, and your presence has been missed! <3 :-)
I wasn't think that way, I just want to express I always to be the FreeEMS follower

My 60-2 interface seems OK, it's time to figure out how to configure firmware to accept my new engine
Image
What is the combustion Sync flag mean?
Image
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: My recent work and some questions

Post by Fred »

HotCat wrote:I can see the rev above 2500, what's happend? very confused
That doesn't mean that it's safe or working correctly, though! Beware!
I don't understand the words "provide that they're closish", can I completely ignore the IAT and CHT, only have Tach, MAP to start the engine?
You can't leave the inputs floating/badly wrong, unless you hard code it in the config. Which is easy to do. HOWEVER, CHT will need a potentiometer so you can track engine temperature to control enrichment. Cold setting won't work when hot and vice versa. Cold enrich is a big value for most engines.

So, on that basis:

CHT: Get it working within 5 degrees of reality or so before you try to run it.
IAT: Put a resistor in its place, or set the config to fixed value or approximate weather conditions where you're at. Or hang a spare sensor off the front bumper and wire that up.
I wasn't think that way, I just want to express I always to be the FreeEMS follower
I appreciate it! I hope it continues into the future.
My 60-2 interface seems OK, it's time to figure out how to configure firmware to accept my new engine
If you have any questions, please ask. :-) Andy, Sim, Peter, Sean, Mike, and likely others all know how to do it :-)
What is the combustion Sync flag mean?
Unused in your installation, so ignore it. Ditto cam sync.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: My recent work and some questions

Post by HotCat »

You can't leave the inputs floating/badly wrong, unless you hard code it in the config. Which is easy to do. HOWEVER, CHT will need a potentiometer so you can track engine temperature to control enrichment. Cold setting won't work when hot and vice versa. Cold enrich is a big value for most engines.
I know how to do it in firmware now
If you have any questions, please ask. :-) Andy, Sim, Peter, Sean, Mike, and likely others all know how to do it :-)
By 3 years evolution, FreeEMS source code had significant changed from 0.0.1. The comments are rich and easy to understand. I can see Fred put so much effort to encapsulate the basic data structures in order to keep the code clean and high level abstract, I hardly find a hardwired code around, I think Fred definitely want FreeEMS to be run on all the gas engines every build. I start to believe FreeEMS don't need document, the source code is the best document. By searching the CONFIG == PRESTO_ID, I quickly sorted out how to make FreeEMS to schedule my injectors and ignition pins. Also I can construct my own VE table based on Fred's truck. Other parameters that I don't understand can always get the answer reading the source code

Code: Select all

#elif CONFIG == CATPOWER_ID // HotCat's Citroen ZX
		anglesOfTDC: {ANGLE(0), ANGLE(180), ANGLE(360), ANGLE(540), ANGLE(0), ANGLE(180), ANGLE(360), ANGLE(540)},
		outputEventPinNumbers:       {0,1,0,1,2,3,2,3}, // Wasted spark, semi-sequential TODO migrate this to sequential
		schedulingConfigurationBits: {0,0,0,0,1,1,1,1}, // First four ignition, last four injection
		decoderEngineOffset:      ANGLE(144.00), // need to prove with timing light
		numberOfConfiguredOutputEvents:              8, // See two lines above
		numberOfInjectionsPerEngineCycle:            2  // Semi-sequential, for now.
ADC reading, generateCoreVars, generateDerivedVars, calculateFuelAndIgnition, scheduleOutputs, this is how the FreeEMS works
Image

At last, Merry Christmas
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: My recent work and some questions

Post by Fred »

HotCat wrote:By 3 years evolution, FreeEMS source code had significant changed from 0.0.1. The comments are rich and easy to understand. I can see Fred put so much effort to encapsulate the basic data structures in order to keep the code clean and high level abstract, I hardly find a hardwired code around, I think Fred definitely want FreeEMS to be run on all the gas engines every build. I start to believe FreeEMS don't need document, the source code is the best document.
Thank you very much for the very kind words! ♥
By searching the CONFIG == PRESTO_ID, I quickly sorted out how to make FreeEMS to schedule my injectors and ignition pins.
Great, but there are some "gotchas" there. Please make sure you're rebased onto the latest and then push a clean change set to github for review before you try to fire it up.
Also I can construct my own VE table based on Fred's truck.
Structure/format, OK, fine. But the values in the table are mostly wrong - even for my truck :-)

Code: Select all

#elif CONFIG == CATPOWER_ID // HotCat's Citroen ZX
		anglesOfTDC: {ANGLE(0), ANGLE(180), ANGLE(360), ANGLE(540), ANGLE(0), ANGLE(180), ANGLE(360), ANGLE(540)},
		outputEventPinNumbers:       {0,1,0,1,2,3,2,3}, // Wasted spark, semi-sequential TODO migrate this to sequential
		schedulingConfigurationBits: {0,0,0,0,1,1,1,1}, // First four ignition, last four injection
		decoderEngineOffset:      ANGLE(144.00), // need to prove with timing light
		numberOfConfiguredOutputEvents:              8, // See two lines above
		numberOfInjectionsPerEngineCycle:            2  // Semi-sequential, for now.
This looks correct :-) I'd recommend putting the angle at either 0 or 180 as a base, though. Make the math simpler when it comes time to sort out the real number.
ADC reading, generateCoreVars, generateDerivedVars, calculateFuelAndIgnition, scheduleOutputs, this is how the FreeEMS works
For now! I really dislike the way it's done, so it'll be changing a lot in future. It'll stay similar in some ways, though :-)
M$ Visual Studio, well I'll be damned, I never thought I'd see the day! :-o
At last, Merry Christmas
To you too, hotcat! :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply