Bosch cj125 oxygen sensor interface

i'm currently working with a bosch cj125 and having problems with the Ri measurements.

i have seen a couple of posts related to the cj125 and was wondering if anyone has some experiences with it

the signal on pin UN appears to be distorted from the pump-current input at pin IA.

if there is anyone out there who worked with it it would be nice to share some thoughts.

i suspect that the chip is either internally damaged or the day code of the part i'm using has a problem.

also the bosch datasheet doesn't really explain which init1-reg bit to use for which phase of the sampling

i'm not asking for someone to do the design for me, just to share some common experiences

thanks and cheers, blue2u

i finally found what was wrong ... it was me

when the sensor is cold the wave forms on the sensor, measured on the board connector looked all ok ... when i turned on the pwm heating, the signal on AI appeared to feed through the sensor or something inside the cj125.

it was a broken connection on VM inside my connector connecting to the sensor connector.

i feel a bit dumb, but the correct behavior when cold fooled me into the assumption that the wiring is good. and i had the VM signal from the board also as stable on the scope.

cheers, blue2u

Do you have some working code to post so people have some for future reference?
Is there a library?
(The reason I ask is that I do not know of any code for this sensor)

sorry, no, not at the moment ... still working on it

also i switched from the avr to an arm cortex-m3 from nxp (lpc1347)

i inherited (licensed) initially an atmega 328 design where i didn't have the org source code and only some early publicly available source in avr "basic" or so ... since my hw had initial problems, i wrote my own test code in arduino C++ to diagnose my issues ... yes i had the broken wire already back then ... what a night mare ... feel kind of dumb but got over it.
gut tired of fighting the restrictions of the avr implementation of the harvard architecture (code and data space at same addr) ... and more ... having strings and const data put into code space and using printf in the same fashion was a const juggling act and standing on your head while doing it ... then for every 16 or 32 bit calculation worrying about how slow it's gonna be

the LPCXpresso IDE also offers a free C++ environment ... the code runs at 72 MHz on a 32 bit cortex m3 with divide instr.

a usb based jtag controller and target cpu board cost's less than $ 30.-- ... LPC1347 (yes with rom'ed USB api) is about $ 3.-- or so in moderate qtys.

since the LPCXpresso does not support the creation of a C++ projects out of the box, but it can be done, i dedicated a wiki page at my efiHacks.com wiki with a simple sample project for download ... sorry no cj code in the sample

link -> http://wiki.efihacks.com/index.php?title=LPCXpresso_CPP

it's an early snapshot of a LPC1347 project and should still work.

leave me a note if anything seems not to work

also ... back to the org question about code library for the cj125

not that easy in an embedded environment and i will explain why

even it's in highly modular C++ classes, i would have to provide between 48 and 64 k of interacting code

i have a timer running at 2400 Hz sampling all analog channels according to a channel select table ... every Nth time i switch this table to a UR and UA calibration table to read cali vals ... the 16 bit spi token is fast enough so that i can poll for it to finish. the adc vals can be filtered at the same time.

what this gives me is an independently running data acquisition system, where i only need to look at the data anytime i like without any more software overhead

now in main i use sw-timers from my timer isr to process a 20 Hz PID control loop for the heater control

at 100 Hz i run the PWM analog out calcs ... and so on

that's roughly where i'm about now

so can you imagine that it would not be too easy to follow ... or pack it into a stand alone portable library and provide an api for it

for search term purpose i mention again :

C++ with LPCXpresso, LPC1347

hope this helps for the moment

cheers, blue2u

p.s. i could possibly release the avr test code i wrote for the cj ... it follows the same strategy and gets the data from the cj ... i guarantee you it's gonna be a night mare to make it fit in the 32k / 2k on an avr and then how slow will it crawl along ... yes the "basic" code worked in less than 32 k but is was bare, bare minimum and hard to follow

as long as you don't want to ship 1000s / month it's prohibitive to use an 8-bit cpu for a project like this.

Hi

Can you share your work on the project?
Anything would be of value. I am trying to interface with an O2 sensor but personnaly have not had much experience with electrical circuits and therefore my finding my way out is kinda difficult.