Page 1 of 1

Simple ECU

Posted: Thu May 15, 2008 12:53 am
by robertofonte
Hi ,
I would like to accompany you in the project.
But I am not accustomed to programming these super-processors! Neither ever had a project of this scale!
What we propose in this topic is to develop a code with the minimum for the engine work ...

I think a very help those who want to start that is my case and certainly others will be added..

I think the minimum requirements for the engine work will be:


inputs needed in ECU:

TPS
IAT
ECT
CRANK POSITION
CAM POSITION
MAP

output necessary in ECU:

Spark
Injector
Fan
Fuel pump


I think that we could study the code for a 4-cylinder engine


Even now I apologise for my English ...
That is not the best ...

Re: Simple ECU

Posted: Thu May 15, 2008 3:46 am
by shameem
You missed O2 sensor...

Also i think the spark & fuel should be sequential at the minimum.....

Re: Simple ECU

Posted: Thu May 15, 2008 7:13 am
by Fred
Hi Roberto :-)

With regards "English" just do your best, and so will we do our best to understand you :-)

With regards the current code for the XDP512, your aim is much the same as mine. I want the code to be properly structured from the start though so that no/minimal rework is necessary down the line to make it right.

Currently there is code that could be adapted and improved to read cam and crank signals. It already reads the ADC inputs in a nice way.

What is required for this to function is :

Make decoder robust (I know what to do)
Add glue math/structure (This will take some work, but should not be hard)
Build serial interface (EMS and PC, started the basics last night)
Flash burning code (haven't looked at this yet)
Finish ignition code or for a 4 cyl, use two channels of fuel logic for the same purpose. (I have a few ideas about what is wrong with it now)

Additionally, for it to run something other than a Toyota/Mazda the decoder will need to be rewritten/modified to suit.

So, just time and work really. If you want to take one of the early empty releases and start from scratch in your own way, be my guest :-) Useful parts of your code can be merged back in later if required :-)

Fred.

Re: Simple ECU

Posted: Tue Jun 10, 2008 6:02 pm
by newgas
Forgive me. I'm playing catch-up on a lot of things.

First off, as a fan of anything open-source I commend you for a very worth-while and admirable project.

I have not dealt with ecu programming or megasquirt but I see a very real need for hobbyists and inventors to not be constricted by closed-source and proprietary schemes which only hold back progress. My specific interest in programmable ecu's is not massive horsepower gains but massive efficiency gains. I'd like to see the internal combustion engine live a long life for years to come.

With that in mind, I had a question. What is the current status of DIYEFI? What is it's learning curve like?

Is anyone familiar with the Arduino/Freeduino project? It is an opensource hardware/software solution, has wide support already and can be used in many applications. I have no idea whether or not it can be applied to vehicles as a programmable ECU. It is however, completely hackable, meaning if it cannot currently be applied as-is, it might be later.

Re: Simple ECU

Posted: Tue Jun 10, 2008 7:47 pm
by Fred
newgas wrote:First off, as a fan of anything open-source I commend you for a very worth-while and admirable project.
Thanks :-) There are quote a few people that have made it what it is so far, and more will come to be important as time goes by :-)
I have not dealt with ecu programming or megasquirt but I see a very real need for hobbyists and inventors to not be constricted by closed-source and proprietary schemes which only hold back progress.
It's good to see someone acknowledge the issues present in MS land.
My specific interest in programmable ecu's is not massive horsepower gains but massive efficiency gains. I'd like to see the internal combustion engine live a long life for years to come.
Massive HP and Massive efficiency both require the best accuracy possible, so our goals are actually almost identical :-)
With that in mind, I had a question. What is the current status of DIYEFI? What is it's learning curve like?
Status is pre-alpha/prototype code with only conceptual stuff around hardware at this stage. The code is around the 5000 line mark and heavily commented so that most anyone can see what it is doing. A number of aspects of it need to change quite a bit at the moment, and I'll get to them all sooner or later. It's pretty far from running an engine, but the foundations are growing strongly and in the right direction.
Is anyone familiar with the Arduino/Freeduino project?
I have been pointed at that before, or found it searching. It is a bit under powered for what we are trying to achieve here. Some of the hardware versions are also not totally suitable. With 5000 lines of code and many many hours reading and learning about the HCS12 core I'd be very reluctant to change tack so drastically without very good performance reasons. In terms of those boards/chips the performance is not as good as what we have.

I hope that answers your questions, welcome along :-)

Fred.

Re: Simple ECU

Posted: Sat Jun 14, 2008 12:19 pm
by robertofonte
In the continuation of this topic.

I am thinking in using the new pic of the microchip (pic 32).

This ecu will be developed for a vehicle for the project Formula Student.

It wanted to begin to organize code but I am with many doubts.

Which do I start to quote:

To opt for lookup tables or to put the ecu to do calculations?

Regarding the sensor of the cam and of the crank is the reception of these signs done by interruption?

From now I thank

Re: Simple ECU

Posted: Sat Jun 14, 2008 12:35 pm
by Fred
robertofonte wrote:To opt for lookup tables or to put the ecu to do calculations?
This is up to you, markistuff has done it with a math model. We will be doing it with lookups of some sort or other.
robertofonte wrote:Regarding the sensor of the cam and of the crank is the reception of these signs done by interruption?
I don't know what your PIC has, but on the HCS12 this is done with the ECT module and Input Capture followed by an interrupt to handle the value recorded at the time.

Fred.

Re: Simple ECU

Posted: Tue Aug 19, 2008 6:14 pm
by nitrousnrg
robertofonte wrote:In the continuation of this topic.

I am thinking in using the new pic of the microchip (pic 32).

This ecu will be developed for a vehicle for the project Formula Student.

It wanted to begin to organize code but I am with many doubts.

Which do I start to quote:

To opt for lookup tables or to put the ecu to do calculations?

Regarding the sensor of the cam and of the crank is the reception of these signs done by interruption?

From now I thank
Hi Roberto! I've been missing for a long time here.
Check out the DSPIC30F4011's datasheet. I think it is ideal for a EMS. It's a little hard to burn if you don't have the right hardware, but it worths the effort. I have 2 of these dspics here, i'm waiting for the usb programmer. BTW, it cost something around $5, plus shipment.

You'll have to do both lookup and calculation at some point of the project, I started with lookup.
And yes, crank and cam sensor signal must interrupt the micro. In those signlas relies most of the precision of the system.
Hope you find this useful.

Marcos

Re: Simple ECU

Posted: Wed Aug 20, 2008 6:22 pm
by Delta
newgas wrote:Forgive me. I'm playing catch-up on a lot of things.

First off, as a fan of anything open-source I commend you for a very worth-while and admirable project.

I have not dealt with ecu programming or megasquirt but I see a very real need for hobbyists and inventors to not be constricted by closed-source and proprietary schemes which only hold back progress. My specific interest in programmable ecu's is not massive horsepower gains but massive efficiency gains. I'd like to see the internal combustion engine live a long life for years to come.

With that in mind, I had a question. What is the current status of DIYEFI? What is it's learning curve like?

Is anyone familiar with the Arduino/Freeduino project? It is an opensource hardware/software solution, has wide support already and can be used in many applications. I have no idea whether or not it can be applied to vehicles as a programmable ECU. It is however, completely hackable, meaning if it cannot currently be applied as-is, it might be later.
I'm a member of the Arduino/Freeduino community, infact the duinostamp was my design. Its no where near powerful enough to run an engine. It could be used to control a gearbox though (or so I hope, its one of my projects and so far its doing ok).