Propeller EFI
jaw0001
Posts: 7
Am relatively new to microcontrollers. I have programming and industrial controls experience.
Was wanting to build an EFI and electronic governor controller for a small garden tractor engine. The unit would take the following analog·inputs (I think all 0-5v):
- Manifold Absolute Pressure
- Inlet air temp
- engine coolant temperature
- O2 sensing
would take the following on/off inputs:
- ignition event
- stepper motor end of stroke (qty 2)·or rotary encoder
and the following comms
- terminal support
would provide the following outputs:
- stepper motor control (unipolar)
- injector pulse width
- output to terminal
There maybe a PID algorithm to determine where to step the stepper motor to as it tries to maintain engine speed through variable loading, and maybe how fast. I would have a counter step the motor at regular intervals to control speed.
One cog (or more) would constantly update hub variables with voltages from the various inputs. One cog would control the motor. The main cog would calculate the pulse width based on engine rpm and analog inputs, then fire the injector for the calculated time.
Questions:
1) Is spin perceived fast enough to keep up with a 3600rpm max 4-stroke engine (1800 ignition, fuel events per minute)?
2) Which propeller object and ADC (or combo) would be fast enough to populate all the variables (to the hub?) a few hundred times a second?
3) I think this has been answered, but can 12v (probably more like 13.8v) be supplied to the prop demo board? Or can I just desolder the regulators and solder on some different ones to take the regulated alternator voltage from the engine.
Was wanting to build an EFI and electronic governor controller for a small garden tractor engine. The unit would take the following analog·inputs (I think all 0-5v):
- Manifold Absolute Pressure
- Inlet air temp
- engine coolant temperature
- O2 sensing
would take the following on/off inputs:
- ignition event
- stepper motor end of stroke (qty 2)·or rotary encoder
and the following comms
- terminal support
would provide the following outputs:
- stepper motor control (unipolar)
- injector pulse width
- output to terminal
There maybe a PID algorithm to determine where to step the stepper motor to as it tries to maintain engine speed through variable loading, and maybe how fast. I would have a counter step the motor at regular intervals to control speed.
One cog (or more) would constantly update hub variables with voltages from the various inputs. One cog would control the motor. The main cog would calculate the pulse width based on engine rpm and analog inputs, then fire the injector for the calculated time.
Questions:
1) Is spin perceived fast enough to keep up with a 3600rpm max 4-stroke engine (1800 ignition, fuel events per minute)?
2) Which propeller object and ADC (or combo) would be fast enough to populate all the variables (to the hub?) a few hundred times a second?
3) I think this has been answered, but can 12v (probably more like 13.8v) be supplied to the prop demo board? Or can I just desolder the regulators and solder on some different ones to take the regulated alternator voltage from the engine.
Comments
As far as the speed of spin, I'm not sure as I have programmed only in assembly as speed has been my top priority. Spin is pretty easy to use though. You could probably mock up your code and then read cnt before and after your calculations to see how long they are taking. That would be a good way to test it before possibly screwing up an engine.
My suspicion is that spin is fast enough especially if you work things out so that your spark timing and injector pulse timing are calculated in another cog and just read from HUB RAM when they are needed by the COGS that control them.
3) The regulators on the Prop Demo Board are designed for automotive use, so they're fine with a 13.8V input voltage. The issue is how much power they have to dissipate and that depends on the current drawn. The 5V regulator sees the input voltage, so the power to be dissipated = (14V - 5V = 9V) x current. There are graphs in the Propeller datasheet that show the current drawn vs. clock frequency depending on the number of cogs active. Most of the current drain will depend on what's connected to the Demo Board.
Seriously consider adding some external power filtering, at least a series choke designed for automotive electrical system filtering and a large electrolytic capacitor (1000uF 25V) across the input terminals.
The first reply is interesting to me too, as I am a hot-rodder. However, my goal is to have a stepper control the throttle, to replace a governor on a small 14hp engine. Notice there is no Throttle Position Switch. Whoops, I do need a TPS (linear or rotary pot). There is also no drive like an idiot mode (which I would want on my 68 Firebird!).
You might want to have a look at the Megasquirt project (I currently running a Megasquirted VW engine in my sandrail). It's an opensource DIY EFI computer. It is not prop-based (in fact I have no idea what the CPU is), but there are schematics for all of the peripherals, such as the ignition coil drivers, hall-effect pickups for the rpm sensor, fuel injector drivers, steppers for idle air control, etc. I've thought about taking the megasquirt schematic, yanking the CPU out of of and substituting a prop. I think it'd be a fun project.
You'll also probably want to get a wideband O2 sensor (narrowband O2 sensors are a pain to tune with), and those typically have their own embedded electronics as well. They can get a bit pricey, but really help with seeing what's actually going on with the mixture.
Admins: I apologize if this is a bit OT!
Since I also intend to govern the engine, I debate about how I want to measure engine RPM. I wouldn't want the propeller to get the wrong idea the engine is turning too slow.
There is another guy on the propeller forums who built an efi controller for a chevy 350 tbi with an SX. He used an equation instead of lookup tables. I was thinking of doing that.
I thought Megasquirt used logic compatible with narrowband O2 sensors (since the narrow band O2 is non-repeatable away from stoich, it would simply lean/richen the mixture by a small delta every cycle until it measured stoich, it would not try to calculate the correct delta). You would therefore waste your money on a wide band O2 sensor. As I would not have a performance engine, there would be little need to tune the engine away from 14.7. May need an O2 with a heater though.
I focused in on the Propeller for a·few reasons. Raw speed, ready-made objects, no need for interupts (all of my variables are less than a long long), and a great forum. I am a little concerned with power up, power down and retaining stepper position.
Ok, I am not going to post too much too soon as I don't want to be "one of those guys".
·
Yes, definitely. My interest is limited to tinkering around with the design, and a project that's relatively far down on my wish-list of propeller projects... [noparse]:)[/noparse]
@jaw0001: I think you are right that the megasquirt does work with narrow band, although I thought there was some variant of the code that allowed for specific AFR targeting using wideband, even supporting automatic tuning of the fuel tables (it's been a few years and a few code versions back since I get mine up). Regardless, I did find the wideband to be a handy diagnostic tool in and of itself. It's nice when something isn't working right to be able to look at the fuel mixture and see just how rich or how lean you are. It's true the narrowband sensor can provide some of this information but its response curve is much more binary in nature. It was a bit of piece of mind that while in open loop mode under boost to know the engine was going excessively lean due to incorrect fuel table programming. Sounds like you'll mostly be running in closed loop with a closely governed rpm, so your application will be much simpler.
I'm also a bit of a gauge-a-holic, and if I can justify having another gauge, I will do so!
My Project:
83 Firebird
350 TPI Chevy / TH350 Tranny
Soon to be twin turbo
Also, you could easily build an injection system based off a throttle position sensor, crank or cam gear sensor, and a cylinder head thermocouple. Covering just those 3 sensors, you could easily control an electronic injection system, or a simple or complex mechanical injection, or a carburated system.
last time I looked, megaSquirt was using a Pic.
On second thought, a simple EFI would only need a TPS, and a CHT.
I find I like to use propbasic to spit out a few lines of assembly, then modify for my needs. It would be nice to be able to have one project with a mixed bag of assembly, SPIN and PropBasic, but the IDEs do not seem to fully accomodate.
1. Fuel Injector is toggled with a PWM throughout every 720' cycle. Basically the injector is always pumping in fuel, regardless of piston position or if the intake valve is open or not.
2. Create a program that follows a very general map to control the fuel air mixture. The program only needs two basic sensors to modify the map; (1) a potentiometer to measure throttle valve opening,(2) a cylinder head temp sensor to sense if you are rich or lean, and to determine the load on the engine.
With the addition of a hall sensor (like the one Parallax sells), the map can easily be derived by experimentation. That same "basic" map can be developed into a complex map as your data acquisition and external inputs improve.
3. Initially any 10k pot will work for the tps, and the thermocouple needs to be a type K, that mounts under a spark plug (should use braided wire instead of solid wire). A more permanent solution can be installed later.
4. If you want a coolant sensor, a type k thermocouple will work fine for that.
5. Rev limiter; you can easily create a rev limiter with one of the Props counters and an inductive pickup (a wire wrapped around the spark plug lead). To be accurate, convert your desired rpm to one revolution (times 2 on 4-strokes). At 3600 rpm, you need to create or allow an event to occur at every .033ms. Then with a Fet or similar, just ground the kill switch wire every-other spark (1 spark every 1440 degrees).
6. Most EFI's and I have worked with use 40+ psi. So if you plan to use off the shelf components, a fuel pump and pressure regulator for that range would be a good starting point. However, there is a workaround for everything.
7. Spin or Prop Basic is well suited for this project
Post Edited (Capt. Quirk) : 7/27/2010 12:17:21 AM GMT
The first fuel injection systems simply replaced the carb and just increased its pulse-width with rpm. Later they came out with "Bank Style", this configuration just turned on all the left bank cylinders on at the same time, then the right bank. This is a common configuration, and as you can imagine, they don't care to much about when they inject. Just how much fuel they inject at that moment.
A servomotor is used to control throttle opening and engine governance (milliseconds is proportional to throttle position). A linear pot controls desired engine speed. A coolant temp sensor or washer style CHT like above determines whether engine is warm. The desired engine rpm and servo position are the x and y of a fuel map. A wideband O2 sensor is used to populate the fuel table as the prop constantly learns the appropriate pulse width. Two target O2 voltages are set, one for warmup and one for running. Bingo, eliminate Idle air motor, inlet air temp sensor and MAP sensor. Servo motor eliminates throttle end position switches, and the transistorized ignition I already have eliminates a hall effect switch.
http://sourceforge.net/projects/freeems/
·
When I first read your proposal I was prepared to respond that you have to know MAP or MAF in order to set the fuel flow, but after reading your last post I think I am beginning to understand the complexity of what you are saying.· Knowing the MAP or MAF is the easy way to do this, you don’t need a propeller for that.·
·
What I think you are saying is that you should be able to compute fuel requirements by calculating the operational mode of the engine from five specific inputs:
·
1)· engine speed command (from a potentiometer)
2) ·throttle position information (from a servo)
3) ·engine RPM (from the ignition module)
4)· fuel mixture (from EGT or O2 sensor)
5)· engine temperature (from a thermocouple).··
·
After a lot of mental calisthenics I am starting to believe that a highly functional and very robust (yet extremely simple from a hardware point of view) fuel injection system can be built around the propeller. ·
·
For example, when the little engine is running properly on a level surface and then it begins to transition up a hill, ·I presume the propeller would sense the additional torque requirement somehow from the input data and that it would then reposition the throttle and the corresponding fuel map to maintain the desired engine speed. ··There will be a lot of simultaneous equations that have to be solved, involving the first, second, and third derivatives, and all of this math will have to remain time-aligned and be performed in real time, which is just the sort of thing the propeller should be very good at.· ·I think we’re talking about real parallel processing here.
·
I don’t really have any of the math or programming chops to be of much use on a project like this one, but I would be really interested in any low-parts-count fuel injection system that can be developed using this scheme for small industrial engines.· I think Tillotson, Bing and a few others would also be very interested.
I was prepared to let this post die, and then resurrect it months from now when I've made progress on it. I am geographically separated from the donor tractor and I have 4 small children. I am an aerospace engineer. It's just a hobby. Nevertheless I have made substantial progress in understanding on the myriad aspects of this task.
I am a mechanical engineer and am playing with Parallax units for hobby and to further my learning in the high-performance automotive field particularly with engine control system development and optimization. Ironically, I don't have difficulties with the code and programming philosophy, but I have had to do substantial learning on the Electronics side of things! Safely going from digital low voltage outs to actually powering an end-device accurately was far tougher than I initially thought! Anyway, forgive me if I make suggestions that may sound silly to EE's or CE's.
What I can bring to the table, however, is a pretty vast knowledge of engines, responses to REAL WORLD tuning and what needs we will have for a system like this.
I started this project with a BASIC stamp 2 (wow that thing was EASY to learn on and oh so powerful), but quickly learned the limits and then saw that I would definitely be moving to the propeller unit (cheaper, FAR superior speeds and capability, better timing control = no-brainer). So I am currently going through the tutorials and learning from there - I'm still in process here so again please bear with me.
My thoughts on a single-cylinder EFI unit.
Speed-Density based system, Using:
a) Manifold pressure (few samples, quickly averaged)
b) Engine cylinder head temperature (quick sample)
c) Air intake temperature (quick sample)
d) CAM trigger signal (from Hall trigger or magnetic proximity sensor on rocker arm of intake or exhaust valve?) in my application. As rocker rotates to open or close this signal will be high/low.
e) RPM signal - Can be calculated by measuring time between CAM SIGNAL events and x 2, or can use signal from coil and reported as is.
f) *TPS - throttle position sensor. You "can" add TPS to this and more easily tune tip-in for crisper throttle response as well as add decel fuel cut option to the system, but you "can" do it with a MAP if tuned very carefully on both the hardware and software sides of the problem - I'd probably opt for more sensors in this case and use decel and tip-in
Output would be to control a Saturated type high-ohm fuel injector to reduce load (1A) and to simplify power consumption and the circuitry required to operate it. One injection event would happen PER cam angle signal (I would like to see effects of changing injector firing timing on power). This is nice because you could use the exhaust valve as a trigger and set a timed delay for when the injector should squirt as the intake valve opens (to promote atomization and efficiency). Also add a readout of RPMs, other sensors, and duty cycle to an LCD display.
The whole system will probably be Battery run in a completely lost system. I plan to use some sort of rechargeable battery packs for cordless drills or something initially that way I can run my kart on one battery while charging another and switch them out.
While not the "safest" solution, I would use an air-filled volume bottle that would be used to pressurize a fuel tank. The volume bottle could be pumped up to 100 or so psi and regulated down to hold 40 psi on the fuel tank bottle. Like I said, pressurized fuel tanks aren't the safest things, but could be designed to work in this case. It also eliminates all power consumption for a fuel pump on the system. Change battery, refuel the tank, and add air to the volume bottle.
Ideas comments?
Thanks,
Patrick