Fuel Injection
markistuff
Posts: 20
The SX chip is amazing.· First off I would like to thank everyone who posts to the forums here,· huge amount of info is here and it has helped me out so much doing my little project.· I have a little dunbuggie/gokart with a twin· 840 cc engine on it.· the carb on it was really really bad,· so i had the bright idea, "why dont i put fuel injection on it",· so after about 2 weeks of work· ive got it up and running,· still kindof in the testing stage but the sx chip is running the engine!· it reads from all the sensors then calculates the correct amount of fuel to inject.· this is the first project ive really ever built with the sx/28 or any microcontroller for that.· just keep up the good work on the forums,· they answered alot of my questions.· ill post some more photos in a few days once i get all the wires cleaned up and everything looking nice. but this is the ECU
Mark
Mark
Comments
I would have no idea on how to control a FI motor. (I guess that makes me old school)
Some guys were talking about this very thing on the BS2 forum.
http://forums.parallax.com/showthread.php?p=649820
Maybe you should go show them how it's done. I'd like to see more detail too. (looking to change schools)
Nice work
Chris
How about posting the schematics for SXers who know nuts about ECU?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Since you feel that 75 MHz is overkill, I'm curious what speed you ran the clock at on the fuel injection control unit you designed? Have you designed many of them before, or just one?
Thanks,
PeterM
If you read my post, I have already noted that I have never designed an ECU before.
The 75Mhz being too fast is just my opinion, I could be wrong.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
but what is on it is basicly 4 MOSFET Drivers, 2 for driving the injectors and 2 for the coils that go to the sparkplugs.
has a 4K memory for storing errors/ tunning variabls
2 a/d converters,· one is for 0-5 volts the other is 0-2.5
on the 2.5 volt i run:
-·2 temperature sensors, one for manifold air temp the other for engine temp
- O2 sensor input
on the 5V:
- TPS sensor (a pot hooked up to the throttle)
- Map sensor
and i have extra inputs for anything i want to add later
use the "poor mans searil in/out http://forums.parallax.com/showthread.php?p=632557
and i have 2 hall sensors, on on the crank and one on the cam
i used to voltage reguators,· KA317 to drop it to 8.5 volts , i used that for driving serial port output.· and from 8.5 i use the LM2940 to bring it down to the 5v and before it all thier is a 4001 dioide for protection/help drop the voltage some more.·· probably a bad way of doing things but im new at this
its still in the building prosses, but i wrote a simple program that gets the engine to run and uses the O2 sensor to set the correct air fuel ratio. this isnt the final program, it still needs alot of work. and features to add to it.· ·and if thiers any programing sugestions/ enhansments that would be appresated. only been using this stuff for alittle over a month, pretty steep learning curve
im not sure if 75 Mhz would be over kill or not but i did run some "benchmarks"· with the chip doing a bunch of calcuations looping, and i figured that 75 would be right, sould beable to handle about 14000 RPM just for running the fuel injectors, perfect for my motocycle ,· but this engine its·being built for·shouldnt run past 5000rpm.·· i plan on adding alot more of a load to·the prossesor,· haveing it also control the spark advance.· drive a lcd display with the engine temp and rpm· load· etc.· and i also want·to be able,·while its running, to·connect·to a computer·by serial port so that i can tune it or adjust things while its running.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I guess I misunderstood. You seemed so certain that 75 MHz was overkill that I figured you must have designed an ECU before. I mean, how else would you know with such certainty unless you had done it before? When you referred to "SXers who know nuts about ECU," I assumed you must mean the other people on this forum who had no ECU experience. My mistake.
I guess you include yourself in the group of SX'ers who know "nuts" about ECUs. If that's true, I'm curious what lead you to the conclusion that 75 MHz was too fast? My personal rule of thumb when I have absolutely no knowledge on a topic is to ask a question instead of making a statement. For example, I wouldn't have said, "I think 75Mhz is too fast ( overkill )." I would have asked a question like, "I'm curious why you're running the ECU at 75 MHz."
Thanks,
PeterM
Are you trying to pick a fight with me? If you are, please say so.
I may have given my opinion without all the formalities, protocol or niceties... but that's what I am, not a politician.
Your efforts to ridicule my opinion given in ernest to help with the board design is itself not very diplomatic.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
The reason why you need 2 regulators is because your board uses too much 5V current.
My estimate of your ECU's 5V current consumption is 170 - 220mA.
This may overheat the power regulators if you put the board into a casing without forced convection or heat sink.
Putting the 2 regulators so close together is also a bad idea, considering the heating.
My humble advice would be to run the SX at 20Mhz instead.
This will drop your total (whole board) 5V current consumption to less than 50mA, then you only need one 5V regulator without a need for any heatsink.
I assume you must be using assembly for this project, b'cos if you use SX/B, it would be difficult to talk to a PC while managing the engine in real time. So at 20Mhz or 20 MIPS, running an engine at 10,000 rpm, you will get 2000 instructions per engine revolution, which I think is a workable proposition.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I would gladly pick a fight with you, anytime, and I'm probably 20 years older than you are. I inadvertently killed another guy 17 months ago. The second in this long life of mine. You see, when I did my unarmed combat training in the notorious SADF, they never taught me to hurt a person so death is usually quite quick. (Our laws are a bit looser here in South Africa and the crime is called manslaughter, in both cases involuntary and I was unarmed while the agressor was armed so no charge has been made. Yes, I am not sleeping much at night and I have another serious case of depression)
Now Chan, this site usually operates with a high level of civility. Most of the geeks round here use brains, not muscle. The only reason a psychopath like me is allowed on the site is that I live in Darkest Africa at the bottom of the world far away from the USA.
So please would you be a good little boy, apologize to the civilized Mr Monty, and while you’re at it, GET A REAL BIKE...
OH and to the other users, be careful what you post. That slightly slow and simple old Blogger (or is it bugger) isn't always everything he appears to be...
John Bond
Military Service No 685 24 586BT
Unit - SA Army Loss Control Unit
Awards - SA Army Good Service Medal - Bronze, Pro Patria with Cuneni Clasp
Rank 1st Lieutenant, Previously Sergeant in the artillery
Served under the notorious Major Hopeful in both the Angolan and Namibian/SWA wars
Mustering, sharp shooter.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have been thinking about building a ECU for a long time...
Way to go ! This is quite an accomplishment !
I think I will be using the Propeller for my project. But that will not be any time soon !!!
I am very interested in your project and would like if you keep
posting you progress and documentation...
How about a video of the motor running
Keep the fuel spraying and the sparks flying !!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*.*
Ibsen
" It's nice to be important, but
·· more important to be nice... "
I am working on an ECU controller myself and would like to help out any way I can, I plan to use the SX48 because of the internal Timers I think will be better for PWM control so I have been told. I have a chevy truck with a V6 in it I plan to use as a test bed. I will this weekend get out my Oscope and trace the various signals on the fuel injectors and other sensors and use that info to help design it. The megasquirt sight has lost of info on teh HEI distribitor in my truck and how to make the timming advanced work. I like your ECU and would be able to help you out with a VB.net program to tune your controller I plan to make my VE table be a 12 *12 and the timing a 12*12 also then I can make changes to the VE table on my laptop and then send them to the SX also I will set my table up so you can see where the PWM and Timming curve is at in real time. Hope I can be a helping hand.
A question, you say you have the engine running but does it just idle or will run throught the entire engine RPM?
Also have you thought about using a wideband O2 sensor?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
What program did you use to draw the board above? Doesn't it have a schematic option?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
The distribitor on the engine I have has a hall sensor pusle output of 6 pulses per revolution and has an input that accepts a PWM input that is used to fire the coil to the spark plug. What the OEM ECU does is it take the Hall input pulse then Dwells that then sends out a pulse to the coil so that it will fire the next sparkeplug inline thats how you can change the timming advance on your motor.
The question is can I read the Hall pulse with a regular pin the calculate the dwell then send the Pulse out the second internal timer? The input pin would be pulsed a max of 6000rpm * 6pulses per revolution / 60seconds with would be 600 pulses per second..
Post Edited (bennettdan) : 5/24/2007 9:35:44 PM GMT
http://www.youtube.com/watch?v=8nj2nXmgwC8
William Chan - i didnt use any TO-220 package mosfets,· i got them in the 8pin dip style,· only because that was all that was in stock were i got it.
John Couture - i used pcb wizard to make the silkscreens or whatever their called for etching.· i looked and thier isnt a way to convert·the pcb·layout to a circiut design
bennettdan - as to the wideband o2 sensor, i could have put one on but i was trying to save some money.· but my brother wants me to build him a device that used the wideband o2 sensor and you put it in the exsause and it shows you on a lcd screen what air/fuel ratio the car is.· he wants to tune the carbs on his cobra.·· when i said i have it running, it will idle perfectly, and once i added in the coding to increase the pulswidth when you hit the gas it is very responsive.· but right now·for some reason it will not hold a high rpm without backfireing alot.· not to sure whats causing that.· its running the stoikiometric(how ever you spell it) 14.7 to 1, well at least the o2 sensor says it is.· i think that my ignition is way out of wack,· to much advance.· its still running off the old ignition system not my ecu. i figured only work with one part of the system at a time so its easer to get all the bugs out.
on the little white breadboard i put some lcds for debugging,· the video is pretty crappy i know·but one will turn on when the engine is warm,· then i have two one that turns on when the O2 sensor says its lean, so the computer makes it richer and visvera,· does what its supost to,· jump back and forth between the two really quickly when its running the right mixture.
i guess next is figure out if its my ignition or the fuel injection that is causing the backfiring, then from thier i can get the info to make the VE tables.· bennettdan, im not sure if it would be better to have tables made and stored in the eeprom or just let the sx calcuale it out based on some predetermined verables?
I thought they are Mosfet drivers only, ie. they are supposed to drive larger mosfets.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
The way I understand it, there are a number of factors affecting your fuel flow in a motor. In an ideal engine management system, I guess these would be:
- Throttle setting, The wider the throttle the greater the fuel flow
- RPM, The higher the speed, the greater the flow. This is probably not
linier because low RPM, wide throttle, heavy torque needs a good flow
- Acceleration, you need a spurt as you open the throttle. The quicker
you open it the bigger the spurt, (remember the tuners rule – run
engine rich on acceleration)
- Temperature of the air, atmospheric pressure and humidity.
- Temperature of the motor. Remember the bigger the difference
between engine temperature and inlet air temperature, the more air the
engine breaths so you need a bit more fuel
- Valve timing, the more aggressively the exhaust valve opens the more
fuel you need. Trouble is this is not uniform over the full RPM range but
varies depending on the harmonics on the exhaust valve and the
exhaust manifold. The same is true on the inlet valve.
- Engine condition, compression, wear, how clean the air filter and plug
are, etc
- Quality of fuel, RON number (for knock) and calorific value (power of
the fuel), how well it atomizes. (probably not a problem in the USA)
Now obviously you’re not building an Indy 500 engine so a lot of these can be left out. I have two questions:
Is it possible to address most of these by monitoring only throttle, RPM, temp and CO2?
If you were to add sensors, what would they be?
To think you’re doing all this with just 1 microprocessor chip!!! All the new commercial systems I’ve seen seem to favor one controller for ignition, one for injectors one for peripheral components, (and often one specifically for the gear box!!!).All this is tied together with LinBus or some bastardized CanBus.
John Bond
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
william chan -· yes the nic4422 is directly driveing the injectors.· not till you pointed itout did i realize they are fore driving the mosfets, miss read the data sheet, put they are supost to handle 9 peak amps and about 2 hold amps, thats plenty for driving ingectors and ignition so i think ill be ok running that.· the reson why i picked them is they were some of the first that showed up in the parts search and they could run off logic level and handle a fair amount of current.·
John bond - you asked if its possable to get the pulsewidth from monitoring only the throttle, RPM, temp and O2.· yes you can, but it wont be near as good as haveing a map sensor to detect the manifold abu(expletive)e pressure.· with out a map or maf, it will inject a pre determind amount according to throttle and rpm, but it dosnt account for engine load and altitude.· so the o2 sensor will work away to correct the ratio( a narrow band O2 sensor only works a low rpm.· thats the problem i think i·had, at high rpm my engine leans out and back fires)· so for sudden changes in opporating conditions it wount work as good.· but detecting the air comming into the engine gives a pretty good indication of whats going on therefor it can adjust the pulswidth accordingly.· well as far as i understand.
· if i were to add sensors it would be a humittity sensor.· it would help out in calcuatling air comming into the engine. thats probably about it
Some days I just have too much time on my hands (grin).
Anyway, here is a stab at Mark's board.· Attached are the schematic, a new board layout and a parts list.
Many, many more things need to be done to it and there are errors in it because there are places where I could not figure out where the traces went.
I did the board in Eagle 4.16r2.· This is a freeware program that allows you to make up to 80 x 100 mm boards.· The fancy thing about this is the autorouter which I'm sure Mark will appreciate because once you create the schematic and roughly place stuff on a board, the computer figures out how to get the traces to the components.· Program is available at·http://www.cadsoft.de/· Note that the learning curve is a little steep but well worth it!
My design skills are minimal so please check the following:
1) Connectors may be upside down.· I still haven't figured out which way is up.
2) cross signal interference.· I laid out the board to make it look pretty.· That may not work in real life when you have high frequency signals near other signals.· Someone needs to double check that.
3) Obviously, Mark needs to look it over and determine if I am even close!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
I had a problem programing it for a while. would say sxchip communication failed.· looked round and it was sugested to put a small cap really close to the vdd and vss pins.· so on the reverse side i sodered a .22uf cap on the pins of the connector and now it works great.
Eagle sounds like a good program, ill have to give it a try.· heres the files back
The backfiring my be comming from your ignition the ignition can be converted over to the 4 prong HEI module and controls spark advance very well the megasqurit has some wiring details for that modification on the forum..
Also most injectors are wired with a 5amp inline fuse the high side so the mosfet drivers may not be driving the injectors correctly and might cause some of the high RPM backfire problems...when a mosfet gets hot is does not flow current as well
What is the highest steady RPM you can take it to and not backfire?
Thank you for looking it over.· I've attached the files so you can start playing around with it in Eagle.· Presumably the goal for this is to produce a PCB that others can easily duplicate (i.e. a group project).· A couple of questions:
1) you mentioned that Q3 is a A1015 transistor.· The pinout is different (ECB vs EBC) than the 2N3906 and the A1015 is not in the symbol library.· Do you want to keep it as a 3906 as I have it so that people will not have difficulty finding that part?
2) again note the orientation of the connectors.· I flipped AN1 in the schematic to match the way you have it on your board.· I am not sure if orientation of others are critical or is it just a matter of getting used to the way it is.
3) Datasheet recommends EEPROM address lines to·ground and not left floating, so I grounded them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
Don't need CO2 if you have the other 3
Since bennettdan has also suspected insufficient drive coming from the 4422s, why don't we change the design to use IRL510 mosfets which can be driven at logic level ( 5v ) and can handle more than 5 amps continuous.
They cost less than USD 1 each.
If you put the TO-220 mosfets standing up, they actually use less PCB space than the DIPs.
What is the SR8 port used for?
John,
How about extending the board to cater for 4 cylinder car engines as well.
This way, we can pool PCB resources and make more boards in one go for more people.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
You dont need the O2 sensor to make a ECU work but then its a speed density unit and its only as good as the tune you install in the ECU and unless you have a dyno to make full power then using the O2 sensor will keep it in the optimal 14.7 to 1 ratio with a regular o2 sensor but the real power is made with about 12.5 to 1 or 13 to 1 AFR in most performance engines so a wide band O2 will make the most HP in theary...For most of us going to a Dyno is not an easy and the O2 sensor will make the motors run pretty good.
markistuff,
I really think that the small mosfet drivers you have are not up to the job.I like the IRL510 and should work very nice and I would even add a heatsink to handle heat. You can parrallel two of the mosfets together and up your available current handling and also one good thing about parralleling two mosfets together is that if one gets a little to hot and wont conduct as much the other will take over and let the first one cool and that way you never will be shy of the current you need. The only other thing I might suggest about your backfiring problem is the reason why I plan to use the SX48 is that the PWM the SX28 generates is not the best for a motor or solenoid this might be causing you some headache, do you have acess to a Oscope to check any of your signals?
We brought up megasquirt in an earlier post, I plan to use the SX48 also to make my V6 in my truck run. I am sorting out the wiring and going to test some of the signals on my truck with an Oscope this weekend if the weather holds out..Mark has a nice bit of code you should look at and his is already running and I think he use the info on the megasqurit sight has a helping hand. He uses the SX 28 to make his run so the internal timer on the SX 48 should be that much better..
Great idea! As I know nothing about fuel injection, I'll proceed as the group suggests.
The free Eagle CAD program has a size restriction of 100 x 80mm so we'll have to fit it on that footprint; modularize it or convert to a multi board design.
I'm just having fun using the Eagle CAD program. The more I use it the more I learn. I actually had a board made by PCBCart using the program and they came out looking beautiful! PCBCart not only creates the board but also lays down a colored (i.e. green, red, blue, yellow, etc) soldermask layer along with a silkscreen layer for less per board than PCB FAB Express or ExpressPCB (qty 5) so I'm sold on them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College