AFR controller

Free Open Source Hardware discussion forum. Post your Free Open Source hardware projects here!
User avatar
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: AFR controller

Post by jbelanger »

toalan wrote:I said 2 channels because there is enough analog peripherials to drive 2 of them, more than 2 and you have to start using eternal components which takes away the elegance of using psoc in the first place.
Agreed. That's why I asked about the peripherals.
toalan wrote:All I have is lab grade gas and that is what I use to verify accuracy.
Seems reasonable and I understand that you have limited resources. Have you checked dynamic behaviour or is it only static? And if you've checked dynamic behaviour, how fast can the controller react? Could you see individual cylinder pulses in the exhaust with enough precision to be of use? And have you checked many different units to see how much variance there is between them?

Sorry for the multiple questions but it's easy to compare your WBO2 controller against the others on price. It another thing to compare on features and claimed performance and still even more complicated to compare on actual data (without having to perform the actual tests myself) since your volume is not the same as the big names so there's less user feedback on the net. Is there any objective and independent data available on the net which would include your controller? And I'm aware that objectiveness can be subjective...

Jean
toalan
Wideband Wizard
Posts: 241
Joined: Tue Jun 10, 2008 2:53 am
Location: Toronto Canada
Contact:

Re: AFR controller

Post by toalan »

jharvey wrote:Another feature of the PSoC5 is the ARM core. ARM's are known for being very price competitive. It wouldn't surprise me if the PSoC5 ends up being lower cost than the PSoC3.

Keep us posted, sounds like fun. I have the cube, but haven't fired it up since the original PSoC days. Can that program the new gen PSoC's? If so, you might have a beta tester waiting out here.
Thinking more about PSOC5, the biggest advantage I see is that you would not have to nickle and dime the PID algorithms for 8 bit performance, use 32 bit floats for everything.

The cube can not work with the new gen PSOCs, that is actually a good thing to me because I always found the cube flaky compared with other debuggers. The debugger for psoc is the miniprog3, it programs and debugs. The miniprog 3 is included in the psoc3 eval kit for $250, so I am guessing it would be ~$100 by itself compared with $400 for the cube. Also the new PSOCs have on chip debugging so no more pods + feet, I must have spent about 5k on pods and feet when developing the PSOC1 based controller.
toalan
Wideband Wizard
Posts: 241
Joined: Tue Jun 10, 2008 2:53 am
Location: Toronto Canada
Contact:

Re: AFR controller

Post by toalan »

jbelanger wrote:
toalan wrote:I said 2 channels because there is enough analog peripherials to drive 2 of them, more than 2 and you have to start using eternal components which takes away the elegance of using psoc in the first place.
Agreed. That's why I asked about the peripherals.
toalan wrote:All I have is lab grade gas and that is what I use to verify accuracy.
Seems reasonable and I understand that you have limited resources. Have you checked dynamic behaviour or is it only static? And if you've checked dynamic behaviour, how fast can the controller react? Could you see individual cylinder pulses in the exhaust with enough precision to be of use? And have you checked many different units to see how much variance there is between them?

Sorry for the multiple questions but it's easy to compare your WBO2 controller against the others on price. It another thing to compare on features and claimed performance and still even more complicated to compare on actual data (without having to perform the actual tests myself) since your volume is not the same as the big names so there's less user feedback on the net. Is there any objective and independent data available on the net which would include your controller? And I'm aware that objectiveness can be subjective...

Jean
I only have a static rig for testing, I am building a dynamic rig.

In theory based on the sample rate and PID algorithms, the response time is ~10 ms.

I use a ghetto method to compare my response times with others:
-I hook the Feedback signal, black wire of the LSU 4.2, to channel a of my digital scope
-I hook the linear voltage output of the controller to channel b and use that as a trigger for a 500ms capture. I capture when the linear output voltage is greater than ~0.5v, for a 10-20 afr linear output that would mean the trigger is @ 11 AFR.
-With a lighter I give the sensor some rich gas
-I wait until the unit start reading slightly above 10 and then with all my might i blow on the sensor to give it lean gas. The reason I wait until the unit reads more than 10 is because the lowest lambda the bosch sensor is rated for is ~0.68 (10 AFR). So below 10 AFR depending on the controller the behavior is different and it is up to the controller's designer to decide what to do; make the unit freak out, operate the controller at some extreme, etc...
- on the scope will be the captured waveform of the Feeback signal, my scope will capture ~100ms pre trigger and the rest is post trigger.
- You should see a slight blip on the pre trigger portion of the feedback signal, that blip is roughly the instance the lean air hits the sensor.
- Most wideband controllers run a closed loop PID controller to make sure the feedback signal is ~0.45v above virtual ground, (yellow wire on the sensor). You can get an idea of the response time by looking at the fluctation on the feeback signal. The shorter and smaller the fluctuation the faster the response time.

I have done this with my PSOC1 controllers, PLX, and the TE DIY. You can not do this with the innovate units because they do not close loop control the sensor, so looking at the feedback signal will yield no information.

Looking at the feedback signal will only tell you the response time of the controller in properly controlling the sensor. It does not tell you the total response time of from senor to linear voltage output.

The answers to you other questions are too subjective. The PSOC1 design is very rigorous in maintaining accuracy, that is I rely on the internal switch capacitor blocks and the internal voltage reference rather than external analog circuits and 1% resistors. Furthermore each unit is calibrated to remove linear and voltage offsets on the internal ADC, instrumentation amplifier and linear voltage output. There is one external component that is vital, the pump current measuring resistor, for that I use a 0.1% tolerance resistor.

In terms of response time, the sampling rate of my system is much higher than most competing units, I sample the pump current and feedback @ ~1k sps. This allows data to quickly feed data to the PID control algorithms for fast response. It also allows me to oversample and improve lambda resolution.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: AFR controller

Post by Fred »

Very interesting posts! Thanks, Alan! :-)
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
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: AFR controller

Post by jbelanger »

Thank you for the detailed reply. That is interesting indeed.

It does give a much better idea of how your controller can compare to others. It would be interesting to see a comparison with the Innovate units since they are using a different control method and they, of course, claim that it is superior to the PID method.

And just a little nit-picking: you should update your web page on the NAW_OEM (http://14point7.com/Widebands/NAW_OEM/NAW_OEM.htm) since you have it listed as the cheapest wideband controller @ $50 and then you say that it's $75 :)

Jean
toalan
Wideband Wizard
Posts: 241
Joined: Tue Jun 10, 2008 2:53 am
Location: Toronto Canada
Contact:

Re: AFR controller

Post by toalan »

thanks I will update that page, It used to sell at $50 but I am down to my last dozen and I wanted to reserve them for people looking to integrate the unit into an ECU.

There is no standard test for accuracy and response time so to compare apples to apples. Even running a lambda controller on a bench with a lab grade gas is not very good comparison for accuracy. Accuracy tests need to simulate the electrical noise of a typical automobile. Response time is close to impossible to measure absolutely, at what instance does the gas meet the sensor is anyone's guess.
User avatar
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: AFR controller

Post by jbelanger »

toalan wrote:thanks I will update that page, It used to sell at $50 but I am down to my last dozen and I wanted to reserve them for people looking to integrate the unit into an ECU.
I may talk to you about that at some point. But I'd be more interested in the dual sensor version.
toalan wrote:There is no standard test for accuracy and response time so to compare apples to apples. Even running a lambda controller on a bench with a lab grade gas is not very good comparison for accuracy. Accuracy tests need to simulate the electrical noise of a typical automobile. Response time is close to impossible to measure absolutely, at what instance does the gas meet the sensor is anyone's guess.
What about having a bunch of sensors with different controllers on the same tube and having gas composition change over time at different speeds? I think one magazine tested controllers that way and, if I remember correctly, the Innovate got the best results. Of course that won't test the electrical noise effect but there's almost always ways to deal with that in a real setup but you can't improve the controller design.

Jean
toalan
Wideband Wizard
Posts: 241
Joined: Tue Jun 10, 2008 2:53 am
Location: Toronto Canada
Contact:

Re: AFR controller

Post by toalan »

The modules have I2C so you have put a few on the same databus.

You are talking about the ford muscle article. I really have no idea how they determined the response time based on putting a bunch of sensors in the exhaust. I supposed if they graphed the output vs time and looked at which output changed the fastest that would be a reasonable test on the surface, if your output moves quickly but the output is incorrect then that is useless. You can make any PID based controller look like it has a fantastic response time by just turning up the proportional gain, the output will move like a bat out of hell but the output will not be accurate.

I really think the entire ford muscle article was skewed towards a particular controller, my guess is that the controller they wanted to have the best showing was grounded closest to the datalogger and the rest was grounded farther. There is probably a good correlation between the accuracy result and the distance the unit was grounded from the datalogger. All the units were run at the same time, so grounding could have been the primary factor for innacurate readings.

I have had the opportunity to test some of the units listed on the ford muscle article with my own lab grade gas, 0.8 lambda, and the results were quite good, i could not replicate the results of the article. Each unit was run alone.
toalan
Wideband Wizard
Posts: 241
Joined: Tue Jun 10, 2008 2:53 am
Location: Toronto Canada
Contact:

Re: AFR controller

Post by toalan »

electrical noise is where the battle is won and lost. The voltage and current signals from the sensor are very very weak mV and uA range, it is very easy for the signal to get swamped by electrical noise. The primary motivation for me to use PSOC was that you could do alot to combat noise with the switch capacitor blocks. Also since most of the analog peripherials are implemented inside the PSOC micro, I do not have a bunch of pcb traces acting as antenna for noise.
User avatar
EssEss
LQFP112 - Up with the play
Posts: 244
Joined: Thu Sep 10, 2009 9:23 am
Location: Dayton, OH

Re: AFR controller

Post by EssEss »

btw: that review was funded by innovate. lots may have changed since 3 years ago (especially firmware).
Post Reply