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 (105.08 KiB) Viewed 31026 times
2k2 external pulldown:
photo_2019-09-03_10-48-00.jpg (104.69 KiB) Viewed 31026 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
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
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:
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
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:
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