Page 10 of 13

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Mon Sep 02, 2019 9:50 pm
by kb1gtt
Yellow, purple, green traces???
What hardware is this? Pictures please. Is this Frankenso, Frankenstein, other? Do you have a schematic / repo for this hardware? What CJ125 board are you using?

I think you are saying that you have a problem with the digital SO line, as it is very rounded.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 7:52 am
by Fantomiaso
Not easy to me to communicate in English, because it's not my native language at all. Learned it in school much ten years ago and all practice during this period was reading datasheets and talking to Chinese on aliexpress, so if I missed something and you don't understand something, please feel free to ask additional questions.
Oscilloscope signals are SS, SI, SO, CLK from top to bottom. Now I don't have problems with digital part. Just thought it is good if I share some results I have found during debug process. As I understand, CJ123 keeps SO in HiZ state while register address is not recognized as valid. And if firmware tries reed its contents before CJ125 pulls line low, data may be corrupted.
But after I have checked all analogue values both on sensor and IC, I'm rather sure that it works fine.
That's how signals look (SO yellow, CLK green, same packet).
No pulldown:
photo_2019-09-03_10-47-52.jpg
photo_2019-09-03_10-47-52.jpg (105.08 KiB) Viewed 28902 times
2k2 external pulldown:
photo_2019-09-03_10-48-00.jpg
photo_2019-09-03_10-48-00.jpg (104.69 KiB) Viewed 28902 times
Seems if last bit of previous packet was 1, SO keeps weak 1 till next strong 1 in next package.

Schematic is partially based on frankenzo, but with changes made by my own based on components I can find and sensors I need. CJ125 schematic is taken from here: https://rusefi.com/forum/download/file.php?id=5077
Switching N-transistor changed to intelligent high-side switching IC, so DIAHD is inverted with OPAMP to match CJ125 current input requirements. Checked currents through pin and measurements show -650uA DIAHD current at heater on and 1500uA at heater off.

As I said before, CJ125 works fin (at least analog part of it). Voltages at UA and UR present, they change if I force sensor warmup and change atmosphere to pure CO2. But O2 channel readout in TS remains zero, like ADC measures didn,t start.
What are mandatory conditions for firmware to work with CJ125?

As I'm not a high-level programmer, my competence is hardware, ASM and HDL, I hardly understand firmware soucecode. I hope for the help of knowledgeable people.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 8:29 am
by Fantomiaso
Just found these:
https://rusefi.com/wiki/index.php?title=Manual:Debug_fields
Debug fields of CJ125 are:
f1: 0.15
f2: 0
f3: 0
f4: 1.47 (voltage after divider is 0.738V, on CJ125 pin 1.55V)
f5: 1.315 (1.3V after divider, real voltage on CJ 125 pin is 2.74)
f6: 1.426
f7: 0.2716
i1: 1
i2: 255

rst pin is 5v
Is it helpful?

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 10:03 am
by kb1gtt
In TS do you see an AFR noted on the gauge? It is still not clear to me what the problem is? I think you are expecting the gauge to indicate something and your gauge is not doing what you expect. What is the problem?

I think you are also saying you have configured code 25, and you see analog values which seem to match expectations.

I don't think the SO rounding is a concern. I think SO is simply not being driven, and kind of floats.

I'm American, so I don't know English either :)

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 10:14 am
by Fantomiaso
Exactly. AFR gauge shows zero and heater PWM doesn't change its duty cycle.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 4:04 pm
by kb1gtt
Can you log the values above in the code 25. Can you start the log, then with a cold WO2, let it heat up, then put a lighter or similar near it. Then post the log. If you could video what you are doing, that would be great as well.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 7:34 pm
by Fantomiaso
It doesn't heat up, because ecu doesn't change heater duty cycle. I can only do it manually with external power source. So it won't react on CO2 from lighter. But I'll try to make correct experiment.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 7:43 pm
by JRD McLAREN
..engine must run ...

try to use simulator - https://rusefi.com/wiki/index.php?title=Manual:Software:User/en

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 8:44 pm
by Fantomiaso
And it is (self ecu stimulation)

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 9:04 pm
by JRD McLAREN
Yes

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 03, 2019 10:45 pm
by AndreyB
Just implemented https://github.com/rusefi/rusefi/issues/914

Prior to this change we had a compile-time parameter for UR connection style, now this could be adjusted via Tuner Studio - hopefully this additional flexibility would not kill any sensors.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Wed Sep 04, 2019 10:12 am
by Fantomiaso
kb1gtt wrote:
Tue Sep 03, 2019 4:04 pm
Can you log the values above in the code 25. Can you start the log, then with a cold WO2, let it heat up, then put a lighter or similar near it. Then post the log. If you could video what you are doing, that would be great as well.
prescaler on UR is now removed, because i found these:
Снимок.PNG
Снимок.PNG (10 KiB) Viewed 28859 times
Video:

Log:
2019-09-04_10.54.48.zip
(88.6 KiB) Downloaded 473 times

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Wed Sep 04, 2019 10:36 am
by kb1gtt
Can you manually control the heater with the console? That would help show that this is not a wiring issue.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Wed Sep 04, 2019 10:50 am
by Fantomiaso
I don't know how... What is the command I shall execute?
And I take heater signal shape directly from sensor heater pin, wiring was checked first. And more then one time. Much more...

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Wed Sep 04, 2019 12:05 pm
by JRD McLAREN
so ... you need to have backup battery ...

and then try to run "cj125_calibrate" command in rusefi console on cold lsu sensor ...
..after successful calibration try to "run engine" .. and see whats happened ...

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Wed Sep 04, 2019 1:35 pm
by Fantomiaso
EngineState: cj125: Check ident=0x60 diag=0xFF init1=0x89 init2=0x10
EngineState: cj125: Starting calibration...
EngineState: cj125: Done! Saving calibration data (6138 1546).

After 15 seconds of ecu runnung:
EngineState: cj125 ERROR: Sensor overheating.
EngineState: cj125: Controller Shutdown!

Afr gauge now shows 14,7 on cold and growing while heating, f1 (duty cycle) growth is linear. Heater PID I Term & Heater PID Err remains equal zero.
TS log:
newlog.zip
(37.8 KiB) Downloaded 470 times

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Wed Sep 04, 2019 4:33 pm
by JRD McLAREN
Same scenario as my ... :roll:

Heater PWN grow to 80%, and then you will see "overheating" message .. right ..?

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Thu Sep 05, 2019 5:22 am
by Fantomiaso
JRD McLAREN wrote:
Wed Sep 04, 2019 4:33 pm
Same scenario as my ... :roll:

Heater PWN grow to 80%, and then you will see "overheating" message .. right ..?
Depends on UB

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Thu Sep 05, 2019 12:54 pm
by AndreyB
Fantomiaso wrote:
Wed Sep 04, 2019 10:12 am
prescaler on UR is now removed, because i found these:
This compile-time option was removed two days ago to reduce confusion - this is now a configurable runtime parameter, see https://github.com/rusefi/rusefi/issues/914

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Thu Sep 05, 2019 10:35 pm
by kb1gtt
I'm more of a hardware guy. It sounds like the hardware is good so I'll comment less now. Cool to hear your doing cool things. Keep it up.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Sun Sep 08, 2019 4:55 pm
by Fantomiaso
I'm hardware engineer too. Prefere making CPUs rather programming them ) After 7 years of FPGA/CPLD experience and logic automata synthesis it makes me to convulse when trying to understand high-level programming languages )

Today I'll take the latest firmware and try it. If it still will not work, then I don't know what to do. I think there is some problem in PID coefficients.

Added:
Yeap, problem still persists

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 10, 2019 8:59 am
by Fantomiaso
Oh, how hard is to be an idiot... Finaly, it works. Now I know, that if it is 301 marking on SMD resistor, double check it is not flipped 10E one...

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 10, 2019 1:13 pm
by stefanst
Fantomiaso wrote:
Tue Sep 10, 2019 8:59 am
Oh, how hard is to be an idiot... Finaly, it works. Now I know, that if it is 301 marking on SMD resistor, double check it is not flipped 10E one...
In my extensive experience, being an idiot is one of the easiest things....

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 10, 2019 3:36 pm
by JRD McLAREN
Fantomiaso wrote:
Tue Sep 10, 2019 8:59 am
Oh, how hard is to be an idiot... Finaly, it works. Now I know, that if it is 301 marking on SMD resistor, double check it is not flipped 10E one...
Which one is it ..??

..I have some problem..maybe...

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 10, 2019 6:39 pm
by Fantomiaso
I used existing schematics just for reference, but build my own schematic. Yours may differ from mine.

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 10, 2019 9:48 pm
by AndreyB
russian wrote:
Thu Sep 05, 2019 12:54 pm
This compile-time option was removed two days ago to reduce confusion - this is now a configurable runtime parameter, see https://github.com/rusefi/rusefi/issues/914
@JRD McLAREN did you have a chance to look around there? with different setting on latest firmware where it's flexible?

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Tue Sep 10, 2019 9:59 pm
by JRD McLAREN
I'm so busy at this time ... and have no energy to test new firmware and CJ125 WBO2 controllers. (on frankenstein)

The actual problem "in my setup" is voltage readings "by rusefi" ..
I will it explain tomorrow ..

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Thu Sep 19, 2019 10:29 am
by Ahmad
Are you sure CJ125 works with 3.3V SPI?

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Thu Sep 19, 2019 10:56 am
by JRD McLAREN
SPI works from 0.7V to VVC+0.3V ...
..if VCC = 5.0V , then HIGH level for SPI can be 5.3V maximum...

Here is some prinscreen of my IMF WBO2 control program ...
..see voltage levels ...

Re: rusEfi own wide band controller board add-on using CJ125

Posted: Thu Sep 19, 2019 11:02 am
by Ahmad
Thanks a lot.
Gui is excellent :shock:
but 0.7VCC = 3.5V