Page 3 of 4

Re: hip9011 integration

Posted: Wed Jan 06, 2016 6:35 pm
by Spilly
Rhinoman wrote:What window are you using?
I am using 40-130 degrees ATDC.
Rhinoman wrote:How is the knock sensor mounted? it is very important that the mounting surfaces are flat and the sensor is correctly torqued.
It is mounted to block via factory knock sensor boss (just below the cylinder head between cylinders 2 and 3). It was tightened with a wrench but I have no idea on the actual torque.
Rhinoman wrote:In a previous job I used to design this type of sensor and interface circuitry, most of the issues that we had, even on the vibrator, were from the mounting of the sensor; even the weight of the wires can cause a resonance.
I've seen the warnings of resonance from the wiring in several datasheets for knock sensors. However, they do not provide much information in regards to preventing resonance. Would you care to explain how to prevent resonance of the wiring? The knock sensor uses the factory connector and a single conductor Tefzel shielded wire crimped to the appropriate terminal.

Edit:

Also, I am using the factory resonant sensor (not flat response).

Re: hip9011 integration

Posted: Wed Jan 06, 2016 8:23 pm
by Rhinoman
Everything has a resonant frequency, the weight of the wiring or the wiring moving around or vibrating can cause the response of the sensor to change which can lead to a non-linear response and amplification of unwanted frequencies. If the wiring follows the original factory wiring then it should be OK.
The TPIC8101 is really designed for a sensor with a 'flat' response, the input filtering reduces the amplitude of the knock frequency but will attenuate the unwanted frequencies by a higher amount, if your sensor is a resonant sensor then you shouldn't see much in the way of out of bound frequencies. Have you tested the sensor? if you can feed the output to a spectrum analyser and then tap the sensor you shouldn't see much output away from the resonant frequency and you can fine tune the filter parameters.
You may also have too much gain from the sensor, have you tried to induce knock? if so then how far above the noise floor is the knock signal.
Your sensor is likely to have a different internal resistance and capacitance so you could try tweaking the input stage to try and optimise the impedance match.
I don't suppose you have a datasheet for the sensor?
Do you know what your valve timing is? the inlet closes after TDC so, if possible, you should try to avoid sampling the knock sensor during that period.

Re: hip9011 integration

Posted: Wed Jan 06, 2016 8:33 pm
by Spilly
Rhinoman wrote: You may also have too much gain from the sensor, have you tried to induce knock? if so then how far above the noise floor is the knock signal.
Your sensor is likely to have a different internal resistance and capacitance so you could try tweaking the input stage to try and optimise the impedance match.
I don't suppose you have a datasheet for the sensor?
I've made an attenuator that I will be testing later today. I wish I had a datasheet for this sensor. That would make everything a lot easier.
Rhinoman wrote: Do you know what your valve timing is? the inlet closes after TDC so, if possible, you should try to avoid sampling the knock sensor during that period.
I cannot remember the exact timing but I believe my window is several degrees away from valves opening or closing.

Re: hip9011 integration

Posted: Thu Jan 07, 2016 8:17 pm
by Rhinoman
One if the advantages of a sensor with a flat response is that you can set a window to 'look' for the valve closing disturbance and then analyse it for disruptive frequencies. It may be worth changing the sensor temporarily to try and see what is going on.

Re: hip9011 integration

Posted: Thu Jan 07, 2016 11:40 pm
by Spilly
As I suspected, this sensor's voltage output is one or two orders of magnitude larger than the sensors in the application examples TI provided. The attenuator seems to have resolved the issue. However, I do I need to do a little more fine tuning. Here's the most recent log. This is with the digital gain set to 2 and an attenuation factor somewhere between 0.1-0.5. I will take an out of circuit measurement of the pot once I am happy with the circuit's performance.

Image

As you can see the output is considerably less at high RPMs. After a little more adjustment of the attenuator I will get some actual knocking datalogs.

Here's the attenuator circuit I am currently tweaking.

Image

Re: hip9011 integration

Posted: Fri Jan 08, 2016 7:05 pm
by Spilly
The only datasheet I could find for a resonant knock sensor is this: http://www.thirdgen.org/forums/attachments/diy-prom/143570d1188275299-knock-sensor-location-early-et_broadband.pdf The datasheet indicates that the sensor outputs 550-1050 mv/g into a 2k ohm load.

Delphi provides some information on their flat response sensors here: http://www.delphi.com/manufacturers/auto/sensors/engine-and-transmission/diesel-and-gasoline/flat-response-knock The page indicates the flat response sensor outputs 17-37 mv/g into a 100k ohm load.

If anyone has a resonant sensor, I would love to hear what output voltages you are seeing.

Re: hip9011 integration

Posted: Sun Jan 10, 2016 6:11 pm
by AndreyB
Is it knock or is it not?

[video][/video]

Re: hip9011 integration

Posted: Sun Jan 10, 2016 11:22 pm
by Spilly
On a cell phone ATM so sound quality is meh. What are value components are you using on the TPIC's input?

Re: hip9011 integration

Posted: Mon Jan 11, 2016 12:09 am
by kb1gtt
I'm not following how diesel in a gas engine will cause knock. Is it trying to increase compression which then speeds up the flame front? I know that gas in a diesel engine will knock as gas has a faster flame front than diesel.

Re: hip9011 integration

Posted: Mon Jan 11, 2016 12:19 am
by AndreyB
kb1gtt wrote:I'm not following how diesel in a gas engine will cause knock.
my hope was to reduce octane number since diesel has a lower one and likes to... well... detonate?

Re: hip9011 integration

Posted: Mon Jan 11, 2016 12:39 am
by AndreyB
Spilly wrote:What are value components are you using on the TPIC's input?
It's either 33K:33K or 39K:39R, I know it's a 1:1 ratio. Software gain 0.3

Re: hip9011 integration

Posted: Mon Jan 11, 2016 12:53 am
by kb1gtt
Can you connect the quad to the analog signal? You can use it's FFT to see if you have significantly more energy in the 5kHz range.

You could also use a PC to look at it with a water fall display. See this forum post for additional details http://www.efi101.com/forum/viewtopic.php?t=7972 You can get a spectrogram out of Audacity. See below where this guy talks about how to open and use it.



Can you post the audio file for that youtube video. I could look at it with Audacity and see what I see.

Re: hip9011 integration

Posted: Mon Jan 11, 2016 12:55 am
by kb1gtt
Oh, also what's the bore size of your test engine? You can predict your frequency with this equation. Just wondering what we should look for if we are looking at a spectrumgraph.

Knock Frequency = 900/(pi * 0.5 * bore in mm)

Re: hip9011 integration

Posted: Mon Jan 11, 2016 2:13 am
by AndreyB
kb1gtt wrote:Knock Frequency = 900/(pi * 0.5 * bore in mm)
This I have in the code already.

I am giving up for now. Spectrograms is not what gives me joy :(

Re: hip9011 integration

Posted: Mon Jan 11, 2016 3:10 am
by kb1gtt
I tried to get the audio from recording the youtube, but no dice. It didn't make it well, it was even less noticeable than the youtube.

Re: hip9011 integration

Posted: Mon Jan 11, 2016 6:33 pm
by Spilly
TI recently updated the TPIC8101 datasheet. One of the lines that is interesting states: "For a flat-type knock sensor, the bandpass filter design equation can be used to determine where the center frequency should be set." Following that, they give the standard DSP biquad filter equation.

I assumed the center frequency should be set based on the bore of the engine when using either type of sensor (flat or resonant). Is this still the case for flat response sensors? Or am I overlooking something?
russian wrote:my hope was to reduce octane number since diesel has a lower one and likes to... well... detonate?
Isn't that the operating principle of a diesel engine? Compression and heat cause the combustion. Seems like a sound theory to me.
russian wrote:It's either 33K:33K or 39K:39R, I know it's a 1:1 ratio. Software gain 0.3
Are you using a capacitor on the input?
russian wrote:Is it knock or is it not?
Looking at the change in the integrator's output and your gain setting (0.3), it seems like you might have a signal integrity issue.

If you have the compatible firmware and hardware, can you use this http://www.seeedstudio.com/forum/viewtopic.php?f=22&t=2957 and record the knock sensor's output on your scope using FFT?

I will try to have some knocking data posted later today.

Re: hip9011 integration

Posted: Mon Jan 11, 2016 10:07 pm
by kb1gtt
The quad that russian has does have an updated version of the community firmware installed and it can do the FFT. Or at least updated for what it was about a year ago.

I have updated mine to use this firmware. The GUI is much more user friendly.

http://www.seeedstudio.com/forum/viewtopic.php?f=26&t=2362
https://github.com/gabonator/DS203

Re: hip9011 integration

Posted: Tue Jan 12, 2016 1:27 pm
by Rhinoman
Spilly wrote:TI recently updated the TPIC8101 datasheet. One of the lines that is interesting states: "For a flat-type knock sensor, the bandpass filter design equation can be used to determine where the center frequency should be set." Following that, they give the standard DSP biquad filter equation.

I assumed the center frequency should be set based on the bore of the engine when using either type of sensor (flat or resonant). Is this still the case for flat response sensors? Or am I overlooking something?
Its badly worded, I'm sure that what they mean is that the knock frequency should be in the centre of the pass band.

Re: hip9011 integration

Posted: Sun Jan 17, 2016 12:22 pm
by kb1gtt
Per this MIT paper https://dspace.mit.edu/bitstream/handle/1721.1/69496/775670245-MIT.pdf?sequence=2 I find this note interesting.
As explained in Chapter 1, the main method used to experimentally measure how much charge cooling takes place due to fuel evaporation is using knock as a diagnostic.
I've noticed that OEM vehicles seem to kind of hunt for knock. They seem to incrementally advance timing until slight knock then back down as soon as knock has been detected. I've see this happen some times as fast as once every minute or so. Perhaps this was more pronounced on the engines I've see as they have high miles and it's likely that carbon build up has increased compression. I've always thought of knock as an engine safety tool, I haven't really thought of it as a diagnostics tool.

I'm still reading that paper, but I currently believe it's indirectly indicating that knowing when you knock, lets you predict your octane, which then allows you to predict your fuel burning conditions. AKA after you fuel up, you'll have different octane which changes your peak HP, peak torque, etc from what you had at the dyno. You can use knock as a way to keep your peak power for that particular fuel. I could see how it might be handy for a just filled my tank button, or to get the fuel tank signal to the ECU, such that it can identify when new fuel has been added. Once it has, it could a check on when it knocks, predict the octane and adjust the ECU accordingly. Seems it might want to switch to a different spark and fuel tables based on the octane.

Re: hip9011 integration

Posted: Fri Jan 22, 2016 5:06 am
by Spilly
kb1gtt wrote:They seem to incrementally advance timing until slight knock then back down as soon as knock has been detected.
From my understanding, this is ideal only when an engine is octane limited. Meaning that the ideal ignition advance happens after the engine starts knocking. If the engine is not operating in an octane limited state, then the timing will be advanced greater than ideal when it starts knocking.

If my power stays on after/during the incoming snow storm and the roads are drive-able, then I will continue working on the current issues this weekend. My current data is pointing towards my worn out VVT pulley making a similar frequency sound. The VVT disengages and my knock output pegs out after 6500 RPM. I guess I need to make a few data logs with it disconnected.

Re: hip9011 integration

Posted: Fri Jun 17, 2016 12:01 am
by Dial0
How far did you get with the knock sensor chip?

I see that you have it outputting an analog voltage, but it looks like you are stuck trying to find out how to set the RPM against Knock threshold curve, to check it is working?

I found some interesting resources that might be of help, as this is something I have been looking into since before I found rusefi.

http://www.plex-tuning.com/products/plex-knock-monitor-v2-0-new
About halfway down the page, there is a couple samples of what knock sounds like and the effects of the bandpass filters.

I suspect the PLX is using the same knock chip or at least the same methodology to detect knock.

here is a video that shows setting gain and rpm-knock thersholds. (skip to about 4mins)
https://www.youtube.com/watch?v=v0ttwzR0kjs

Re: hip9011 integration

Posted: Fri Jun 17, 2016 12:08 am
by AndreyB
Dial0 wrote:looks like you are stuck trying to find out how to set the RPM against Knock threshold curve, to check it is working?
yes and no.

I have the code to adjust gain and threshold by RPM, I am unable to test because a) I do not trust my hearing to say if there is knock or not b) if I am driving I am too busy driving

I am hoping to meet the http://rusefi.com/forum/viewtopic.php?f=3&t=1030 guys and get some time at their dyno so that I have load in a controlled environment. but that's an engine dyno so it would be a POS to build a stand for my engine / bring my engine.

Best case scenario is if one day I get access to a chassis dyno but that's not happening so far.

Re: hip9011 integration

Posted: Fri Jun 17, 2016 12:19 am
by Dial0
OK right,

I am interested in having a play around with it,

Sorry if its been mentioned, but is it possible to datalog the integrator output against rpm?

My plan would be to set the timing to something conservative and use the data logging to setup the threshold table.
Then slowly advance the timing in low rpm high load areas and do runs on the street to see if the integrator output just slowly rises, or if it hits a certain timing advance and jumps significantly.

Re: hip9011 integration

Posted: Fri Jun 17, 2016 12:21 am
by AndreyB
all three ways of logging would have the knock decoder output voltage.

Re: hip9011 integration

Posted: Fri Jun 17, 2016 12:23 am
by Spilly
Dial0 wrote:How far did you get with the knock sensor chip?

I see that you have it outputting an analog voltage, but it looks like you are stuck trying to find out how to set the RPM against Knock threshold curve, to check it is working?

I found some interesting resources that might be of help, as this is something I have been looking into since before I found rusefi.

http://www.plex-tuning.com/products/plex-knock-monitor-v2-0-new
About halfway down the page, there is a couple samples of what knock sounds like and the effects of the bandpass filters.

I suspect the PLX is using the same knock chip or at least the same methodology to detect knock.

here is a video that shows setting gain and rpm-knock thersholds. (skip to about 4mins)
https://www.youtube.com/watch?v=v0ttwzR0kjs
Due to relocating and starting a new job I have been a ghost around here.

If my memory serves me correct, the issue I ran into is that the signal amplitude increases seemingly exponentially in relation to RPM increase. Thus, decreasing the time constant linearly with RPM increase is inappropriate. Setting the time constant to a fixed value so that 1k-2k RPM are just above the integrator's minimum output, the integrator's output was maxed out by 6k RPM. This was with very conservative timing, fresh 93 octane fuel, and a narrowband knock sensor. I tried lowering the gain as RPM increased but that made little difference. The next step would be to increase the value of the time constant (reduces the integrator output) as RPM increases.

Perhaps I am seeing substantial mechanical or electrical noise and others will not have this issue. However, I have not had time to look into this.

Re: hip9011 integration

Posted: Fri Jun 17, 2016 1:56 am
by kb1gtt
For @Dial0, there was an effort to use I think it was like 80% diesel fuel to help enhance the chances of knock. Diesel is specifically looking to detonate, and has an octane that's good for knock. I seem to recall russian had some troubles with that effort and I don't think he got knock, but I recall he was also fighting hardware issues. Now that the hardware is more ironed out, perhaps this mixture thing can help generate knock for testing purposes.

Re: hip9011 integration

Posted: Fri Jun 17, 2016 4:30 am
by Dial0
Spilly wrote:
Dial0 wrote:How far did you get with the knock sensor chip?

I see that you have it outputting an analog voltage, but it looks like you are stuck trying to find out how to set the RPM against Knock threshold curve, to check it is working?

I found some interesting resources that might be of help, as this is something I have been looking into since before I found rusefi.

http://www.plex-tuning.com/products/plex-knock-monitor-v2-0-new
About halfway down the page, there is a couple samples of what knock sounds like and the effects of the bandpass filters.

I suspect the PLX is using the same knock chip or at least the same methodology to detect knock.

here is a video that shows setting gain and rpm-knock thersholds. (skip to about 4mins)
https://www.youtube.com/watch?v=v0ttwzR0kjs
Due to relocating and starting a new job I have been a ghost around here.

If my memory serves me correct, the issue I ran into is that the signal amplitude increases seemingly exponentially in relation to RPM increase. Thus, decreasing the time constant linearly with RPM increase is inappropriate. Setting the time constant to a fixed value so that 1k-2k RPM are just above the integrator's minimum output, the integrator's output was maxed out by 6k RPM. This was with very conservative timing, fresh 93 octane fuel, and a narrowband knock sensor. I tried lowering the gain as RPM increased but that made little difference. The next step would be to increase the value of the time constant (reduces the integrator output) as RPM increases.

Perhaps I am seeing substantial mechanical or electrical noise and others will not have this issue. However, I have not had time to look into this.
Wow. Thanks for that, really interesting info.

I am surprised that reducing the gain with RPM didn't have much of an effect. As that would be the first thing I would think to try.

Do you know how the integration time constant works? Does it average all the samples taken in that time frame, then integrate/sum them all of those time constant values during the integration window of the INT/HOLD signal?

Have you tried to increase the frequency of the INT/HOLD signal with RPM? As from what I understand if the INT window is shorter then the integrator will have less time to count up, so the output will be lower.


Just as an a side, let me say that I am really surprised at how many features are implemented into rusefi. While all the kinks may not be fully worked out yet, its very impressive.

Re: hip9011 integration

Posted: Sun Apr 15, 2018 12:27 am
by Abricos
I think it will be interesting to know
by rotation of the crankshaft determine in which cylinder the detonation
9m13s


Re: hip9011 integration

Posted: Sun Oct 21, 2018 8:27 pm
by AndreyB

Re: hip9011 integration

Posted: Mon Oct 22, 2018 4:45 am
by kb1gtt
Reply comment, moved to here as the reply was more hardware related than software https://rusefi.com/forum/viewtopic.php?f=4&t=903&start=33