Page 1 of 1

wideband AFR sensor interface

Posted: Fri Oct 18, 2013 5:26 pm
by AndreyB
My wideband AFR set is one of the cheapest on the marked - http://betterpartx.com/catalog/1 $99.99 for sensor + controller + a tiny digital display

This controller has a 9600-8-N-1 serial interface and a simpler analog interface which I currently use. The whole code is

Code: Select all

aft = interpolate(0, 9, 5, 19, voltageSignal);
Let's see who've got what :)

Re: wideband AFR sensor interface

Posted: Fri Oct 18, 2013 5:38 pm
by Sergey89

Re: wideband AFR sensor interface

Posted: Sat Oct 19, 2013 12:29 am
by kb1gtt

Re: wideband AFR sensor interface

Posted: Tue Oct 22, 2013 1:56 pm
by AndreyB
Ops, apparently my BPSX unit has some "publicity": http://forum.diyefi.org/viewtopic.php?f=6&t=2138

Re: wideband AFR sensor interface

Posted: Tue Oct 29, 2013 10:12 am
by mobyfab
http://www.14point7.com/

They have some really nice units.

Also there is the AEM UEGO which I've been using for a few years with my turbo civic, very good and the price it not that high.

Re: wideband AFR sensor interface

Posted: Tue Oct 29, 2013 2:48 pm
by Sergey89

Re: wideband AFR sensor interface

Posted: Sat Sep 12, 2015 4:03 am
by AndreyB
Jared, do you happen to know who has created that schematics?

As usual, it takes me two years to notice the cool stuff :)

Re: wideband AFR sensor interface

Posted: Sat Sep 12, 2015 8:17 am
by kb1gtt
That schematic has not been tested yet :( However I have physically validated the footprint, so the chip fits on the PCB. Also it wouldn't take much to make that into it's own PCB. I seem to recall I have a CJ125 kicking around somewhere.

Re: wideband AFR sensor interface

Posted: Sat Sep 12, 2015 2:16 pm
by AndreyB
I've created a blank project & copied the schematics, looks like the CJ125 would need to be extracted into a separate file https://svn.code.sf.net/p/rusefi/code/trunk/hardware/CJ125_board/

Re: wideband AFR sensor interface

Posted: Sat Sep 12, 2015 6:48 pm
by AndreyB
russian wrote:looks like the CJ125 would need to be extracted into a separate file
Now with proper symbol - schematics looks good now. https://svn.code.sf.net/p/rusefi/code/trunk/hardware/rusefi_lib/cj125.lib

Re: wideband AFR sensor interface

Posted: Thu Jun 23, 2016 12:54 pm
by AndreyB
http://www.open5xxxecu.org/viewtopic.php?f=44&t=101 has the full 40 page datasheet for CJ125

Re: wideband AFR sensor interface

Posted: Fri Jun 24, 2016 1:25 am
by AndreyB
http://www.msextra.com/forums/viewtopic.php?f=123&t=54150#p401147
mariob wrote:The implementation was not that hard as the datasheet for the sensors is quite informative and the CJ125 does the bigger part of the work. One just needs to take the both analogue values (temperature and mixture), calculate lambda (ok, this was a 6th order polynom but no black magic), send lambda to a pwm output (with a scaling the MS understands) and feed a small pid controller for the heater. This is also the right place to take care of not destroying the sensor by heating it up too quickly. (i always assume -40°C here, this wastes some seconds of usefull sensor data on hot starts but is always safe)

Re: wideband AFR sensor interface

Posted: Fri Jun 24, 2016 1:54 am
by AndreyB
http://www.turbo-mopar.com/forums/showthread.php?74106-Connectors&p=1036486&viewfull=1#post1036486 has some data on 4.2 and 4.6 connectors
Turbo SOB wrote:Bosch LSU 4.2 Wideband O2
936142-1 (TE, Micro Timer, 6-way connector) HAVE
144431-1 (TE, Junior Power Timer, 17 - 22 gauge tin terminal) HAVE
12157739 (Delphi, 2.8 Timer, tin terminal) HAVE
15324976 (Delphi, Metri-Pack 150, White Cable Seal) HAVE

Bosch LSU 4.9 Wideband O2
1599620-2 (TE, Housing, Micro-Timer, Available from OnlineComponents.com) HAVE and verified to work with Bosch sensor p/n 17025.
284716-4 (TE, Housing, Micro-Timer, Mouser) HAVE and verified, but is more difficult to disconnect than the 1599620 (may be good or bad, depending on what you want).
964274-2 (TE, Female Terminal, Micro-Timer, Available from OnlineComponents.com) HAVE
1241732-2 (TE, Female Terminal, Micro-Timer II, Mouser) HAVE, appears to be identical to 964274, but is pre-gapped a tiny bit (reduces connection force).
962876-2 (TE, Female Terminal, Micro-Timer, Mouser) HAVE, I can't tell any difference to 964274.
968015-2 (TE, Female Terminal, Micro-Timer, Mouser) HAVE, slightly different tang design (though, for what benefit?).
964972-1 (TE, Cable Seal, Micro-Timer, Yellow, 1.9 - 2.4 mm Insul. O.D, Available from OnlineComponents.com) HAVE
963530-1 (TE, Cable Seal, Micro-Timer, Gray, 1.4 - 1.9 mm Insul. O.D) HAVE
964971-1 (TE, Cable Seal, Micro-Timer, Red, 1.2 - 1.6 mm Insul. O.D) HAVE
Update: see also http://wbo2.com/cable/lsuconns.htm

Re: wideband AFR sensor interface

Posted: Tue Jul 26, 2016 1:04 am
by AndreyB

Re: wideband AFR sensor interface

Posted: Tue Jul 26, 2016 8:23 am
by puff
I couldn't find any source codes for that controller (I mean software)

Re: wideband AFR sensor interface

Posted: Tue Jul 26, 2016 8:25 am
by puff
oops. sorry. actually, I could. that was code in basic.

Re: wideband AFR sensor interface

Posted: Tue Jul 26, 2016 12:48 pm
by KLAS
russian wrote:another open source cj125-based controller including source code and gerbers: https://www.elektormagazine.com/magazine/elektor-201201/19791

Looks like the article has leaked to http://uploadkon.ir/uploads/4b5782ba531bb58ff30ceeaa383a9212.pdf and/or http://d1.amobbs.com/bbs_upload782111/files_49/ourdev_707565DNEIR9.pdf
if i'm not mistaken, this evolved to http://breitband-lambda.de/

Re: wideband AFR sensor interface

Posted: Sun Jul 31, 2016 2:03 am
by AndreyB
First bump with rusEfi CJ125 integration:

I've populated only the chip and R1 which is the RST line pull-up. My logic analyzer shows that https://svn.code.sf.net/p/rusefi/code/trunk/firmware/hw_layer/sensors/CJ125.cpp is sending the IDENT_REG_RD 0x48 command but I get no response from the chip.

What do you think I am missing?

Re: wideband AFR sensor interface

Posted: Sun Jul 31, 2016 9:58 am
by kb1gtt
To me it is unclear at what voltage the CJ125 will register as a 0 vs a 1. Your LA will trigger at something like 1V or 1.5V. However the CJ125 is 5V for VCC, so you probably need to get close to 5V before it registers as a 1. I believe you STM is driving at 3V. Is that correct? If so then we may need a level shifter, something to prove the concept could be purchased from sparkfun. https://www.sparkfun.com/products/12009 If that turns out the be the problem, I can add those to the PCB easy enough.

Other things to check, did you get 5V at the CJ125 pin? I know that the footprint is mangled, so verifying it made it to the pin might be a good validation that all is well. Also do you see these signal pulses at the SPI pins? Again I know the footprint is mangled. Just because you see these signals on the discovery pins, doesn't mean they are making it to the CJ125. Is C8 installed? Is C1 installed?

Re: wideband AFR sensor interface

Posted: Sun Jul 31, 2016 10:08 am
by kb1gtt
Ah, just found the voltage levels in cj125a.pdf. For SCK on pg 31, it notes 0=vcc*0.3=1.5V. Then 1=VCC*0.7=3.5V.

What happens if you put 3V to VCC instead of 5V? I know this would not have proper accuracy, but it might allow the SPI logic to start working. I would expect that VCC needs to be 4.28V or lower before it would start to potentially work with 3V SPI signals. Can you drop your VCC voltage to 4.28? Do you still have one of those adjustable 5V power supplies which the 5V switch regulator was based on? Those had a POT which allowed you to set the voltage.

Re: wideband AFR sensor interface

Posted: Sun Jul 31, 2016 5:13 pm
by AndreyB
Now with

engineConfiguration->spi2SckMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32

next step capacitors and finding my DSOQuad

Re: wideband AFR sensor interface

Posted: Wed Dec 28, 2016 12:47 am
by AndreyB