Page 2 of 4

Re: hip9011 integration

Posted: Sat Jul 11, 2015 7:38 pm
by AndreyB
now I need some knock, any ideas?
[video][/video]

Re: hip9011 integration

Posted: Sun Jul 12, 2015 2:29 am
by AndreyB
1.5 years in the making... we have knock detection on a real car! I need to thank everyone involved, guys, this would not happen without you :)

[video][/video]

Re: hip9011 integration

Posted: Sun Jul 12, 2015 2:30 pm
by Spilly
russian wrote:1.5 years in the making... we have knock detection on a real car! I need to thank everyone involved, guys, this would not happen without you :)

Re: hip9011 integration

Posted: Mon Jul 13, 2015 1:10 am
by kb1gtt
Now that it's working, It's probably a good time to remind people about the stuff found here http://www.ti.com/product/TPIC8101/toolssoftware

It has some things we may have started to forget over the last long battle.

Re: hip9011 integration

Posted: Mon Jul 13, 2015 1:17 am
by AndreyB
kb1gtt wrote:Now that it's working, It's probably a good time to remind people about the stuff found here http://www.ti.com/product/TPIC8101/toolssoftware
What exact stuff? too much stuff there!

Re: hip9011 integration

Posted: Mon Jul 13, 2015 1:22 am
by kb1gtt
I would say mostly these two PDF's

http://www.ti.com/lit/ug/tidu285/tidu285.pdf
http://www.ti.com/lit/ug/tidu286/tidu286.pdf

Seems there is some math, and process flow notes that might be handy to remember now that things are working reliably.

Re: hip9011 integration

Posted: Mon Jul 13, 2015 2:35 am
by Spilly
kb1gtt wrote:I would say mostly these two PDF's

http://www.ti.com/lit/ug/tidu285/tidu285.pdf
http://www.ti.com/lit/ug/tidu286/tidu286.pdf

Seems there is some math, and process flow notes that might be handy to remember now that things are working reliably.
I believe we have the math part dialed in. Sadly I have the equations burned into the back of my skull from staring at the datasheet for this IC for almost two years.

I'm not sure if this document and research was done before or after TI started producing the TPIC. It is still an interesting read with lots of good info on knock, digital signal processing, and harmonics. http://www.ti.com/lit/an/spra039/spra039.pdf

Re: hip9011 integration

Posted: Thu Jul 23, 2015 9:49 pm
by AndreyB
crystal hardware issue sub-thread is now http://rusefi.com/forum/viewtopic.php?f=4&t=903
logic levels hardware issue sub-thread is now http://rusefi.com/forum/viewtopic.php?f=4&t=904

Re: hip9011 integration

Posted: Thu Oct 15, 2015 7:21 pm
by RasPL
The middle frequency of bandpass filter depends from engine geometry and is constant for all the time. You can calculate it Knock frequency (kHz) = 1800/(PI * D) where D is cylinder bore diamater in mm.
Then you need to setup up Gain parameter that You have 2.5-3V knock voltage whitout knock and Integrator value set at about 100-200uSec.
Now next parameters like knock window and knock window start - advance angle ATDC from which You start searching knock for current ignition event and the lenght of this window in Degrees or just end angle
Next thing is to build engine noise table which is just knock voltage(rpm) function
And now You are ready to calculate knock level=knock voltage(rpm) - engine noise(rpm)
From knock level depends all corrections for next ignition event at this cylinder like ignition retard,fuel addition,boost reduction.

Good to start is read MS Mega Manual or just some standalone ECU manual. Here is manual for our polish ecumaster emu standalone ECU, knock sensing pages 80-82
http://ecumasterusa.com/downloads/emu-manual.pdf

With this manual You can very easy add other functions to rusefi ECU ;)

Re: hip9011 integration

Posted: Thu Oct 15, 2015 7:29 pm
by AndreyB
RasPL wrote:Next thing is to build engine noise table which is just knock voltage(rpm) function
This. This looks to be the part rusEfi is currently missing and this matches my experience while playing with rusEfi - I was getting higher output the higher RPMs were.

Once I add the noiseTable the last remaining part is for rusEfi to end up in hands of somebody who can definitively induce knock and test all this. It looks like rusEfi would happen once I move to nowhere and get a dyno in my 12 car garage...

Re: hip9011 integration

Posted: Fri Oct 16, 2015 10:00 am
by RasPL
Maybe just connect secound knock sensor to Mic input of PC/Laptop and use headphones or build/use some audio amplifier?
http://home.netcom.com/~bsundahl/knock/listen/listen.htm

here is some sound record of knocking engine

Re: hip9011 integration

Posted: Fri Oct 16, 2015 1:48 pm
by AndreyB
russian wrote:
RasPL wrote:Next thing is to build engine noise table which is just knock voltage(rpm) function
This. This looks to be the part rusEfi is currently missing and this matches my experience while playing with rusEfi - I was getting higher output the higher RPMs were.
https://sourceforge.net/p/rusefi/tickets/228/

Re: hip9011 integration

Posted: Fri Oct 30, 2015 4:36 pm
by KaxLon
Ok time for my first post on this forum. :)

I have been coding for the stock Mitsubishi ECU that is used in the 1G DSM and GVR4 cars. We have a knock sensor that is connected to a interface board that generates a signal for the processor to use.
The way a "standard" knock scheme works is by detecting abnormal, filtered sound levels at ignition events. The so-called event window.
For a long time there has been dispute over if we have a windowed mode ECU or not. I set out to find out lately and sure enough the knock is windowed.
I used a Arduino to generate the 6-7 kHz noise synced to the ignition event. The signal was set to the weakest possible knock detectable by the ECU.
Here's a video of the results:
Please watch in HD.

So to answer Andrey's question about how to generate knock. You can do this in many ways. Advance timing until the engine knocks, use a signal generator that has a sync trigger or by simply hooking up a Arduino to generate the noise.

Re: hip9011 integration

Posted: Fri Oct 30, 2015 4:41 pm
by AndreyB
KaxLon wrote:You can do this in many ways. Advance timing until the engine knocks
Would it knock @ idle? If not, would it knock while revving with no load? If not, would it knock at 20 mph?

At this point I am satisfied with bench testing but still do not trust my results on the vehicle.

Re: hip9011 integration

Posted: Fri Oct 30, 2015 5:24 pm
by KaxLon
Yes you can get it to knock at idle and very light loads. The degree of timing is different depending on engine. I know there's a MIT paper on this with calculations.
When I wish to provoke knock I play with the timing and fuel settings until I see knock. Give it a shot.
Just keep in mind that if you get knock at idle you can NOT drive the car as load will make the knock even worse with risk for disaster. ;)

Re: hip9011 integration

Posted: Fri Oct 30, 2015 5:31 pm
by AndreyB
KaxLon wrote:When I wish to provoke knock I play with the timing and fuel settings until I see knock.
Can you give me at least some examples for some engine, just to know the ballpark. 40 advance & 17 AFR?

MIT paper... Any chance you point me at it? :)

Re: hip9011 integration

Posted: Fri Oct 30, 2015 5:47 pm
by KaxLon
Hmmm I have to look for that document on my harddrives.
In the meanwhile you might enjoy this on knock and ethanol: http://www.kaxlon.com/dsmecu/2015/PDF%20Books/2008-32-0020%20Effect%20of%20Ethanol%20on%20Knock%20in%20Spark%20Ignition%20Gasoline%20Engines.pdf

LoL 40* @ AFR 17 would certainly knock. :)

Re: hip9011 integration

Posted: Fri Oct 30, 2015 5:59 pm
by RasPL
Yes engine can knock at idle without playing with fuel amount only one thing what you need is retard ignition too much. Engine will start knocking. Too much retard will make bum and engine can make revolution in oposit side and stops. This knows all users with normal dizzy.

Knocking depends from engine combustion chamber, some engines knocks easlyer some harder but i dont know engine which can handle 40deg retard at idle speed.

Next thing. My stock ecu (digifant df1) have knock gain(rpm) map not a knock noise(rpm) map. But this gives almost the same final result.

Re: hip9011 integration

Posted: Sat Oct 31, 2015 12:05 am
by kb1gtt
I believe knock at idle can also be effected partly by carbon build up. My first car used to knock so bad it would diesel when turned off. A friend drove it around the block even though I had the key in my hand. I believe that carbon build up was causing the compression ratio to be much higher than expected, which was acting like a diesel engine. When I turned off the ignition, it would continue to have ignition just like a diesel. So that particular engine would have had very little difference by varying the timing.

Re: hip9011 integration

Posted: Fri Jan 01, 2016 11:50 pm
by AndreyB
russian wrote:This. This looks to be the part rusEfi is currently missing and this matches my experience while playing with rusEfi - I was getting higher output the higher RPMs were.
Progress:
Image

Re: hip9011 integration

Posted: Sun Jan 03, 2016 3:16 am
by AndreyB
This one in Russia and Celsius. No knock with no load, lean mixture and 50 degree advance :(

[video][/video]

Re: hip9011 integration

Posted: Sun Jan 03, 2016 7:12 pm
by sasha.kams
No load, not hear the detonation. And impoverish the mixture is not necessary, the sudden opening of the throttle he is depleted.
Translated by Google, Sorry if it is not correct.

Re: hip9011 integration

Posted: Sun Jan 03, 2016 7:43 pm
by Spilly
Perhaps you should try to create an audible knock (you can hear it with your own ears) and then take a look at the TPIC output.

I am doing some on car testing myself today. My hardware and algorithms are a little bit different, but the data should still be relevant. I'll report back when I have more data.

Re: hip9011 integration

Posted: Sun Jan 03, 2016 11:31 pm
by AndreyB
Spilly wrote:Perhaps you should try to create an audible knock
I think this has been proven good enough for a bench test already, eventually a real test would be needed.

My next step is to try running on gas+diesel mixture and help me god.

Re: hip9011 integration

Posted: Mon Jan 04, 2016 1:41 am
by Spilly
russian wrote: I think this has been proven good enough for a bench test already, eventually a real test would be needed.

My next step is to try running on gas+diesel mixture and help me god.
Take the car for a drive to put a load on it. If your exhaust isn't too loud, do a wide open throttle run and listen for knock. The more cylinder pressure you can generate, the better.

Re: hip9011 integration

Posted: Mon Jan 04, 2016 3:11 am
by Spilly
I've been pulling my hair out all day trying to figure out what is going on here. Wide open throttle pulls on the road and free revving the engine results in the integrator output increasing with the rpm. I'm about 90% confident that the engine is not knocking. Since the car has no sound deadening, very stiff motor mounts that make everything rattle, and a noisy exhaust, it is difficult to hear knock.

I can't afford to invest in a new ECU at the moment, so my setup is a bit different. I'm running a megasquirt 2 ecu and I am feeding one of its ADC's the output from a sample and hold circuit (holds the previous voltage while INT/HOLD is active and updates to the new voltage when INT/HOLD is inactive) fed by the TPIC's analog output.

I'm using a different microcontroller and RTOS to control the TPIC. However, the algorithms are very similar.

Here's a recent datalog.

Image

Re: hip9011 integration

Posted: Mon Jan 04, 2016 11:27 am
by AndreyB
Spilly wrote:Wide open throttle pulls on the road and free revving the engine results in the integrator output increasing with the rpm. I'm about 90% confident that the engine is not knocking.
I believe that's expected behavior - engine noise increases with increase in RPM so you need your knock detection threshold to be a curve based on RPM, see above? That's assuming this is the part you are pulling you hair about :)

Re: hip9011 integration

Posted: Mon Jan 04, 2016 6:51 pm
by Spilly
russian wrote:
Spilly wrote:Wide open throttle pulls on the road and free revving the engine results in the integrator output increasing with the rpm. I'm about 90% confident that the engine is not knocking.
I believe that's expected behavior - engine noise increases with increase in RPM so you need your knock detection threshold to be a curve based on RPM, see above? That's assuming this is the part you are pulling you hair about :)
I guess my concern is that the usable RPM range is rather narrow. I believe my integrator's output is maxed when the datalog says 78% (output appears to flatten). I'm going to play with adjusting the gain inversely with RPM in an attempt to widen the usable RPM range.

Re: hip9011 integration

Posted: Mon Jan 04, 2016 8:17 pm
by AndreyB
I've noticed the same and I am on gain 0.3
You remeber that 6.8 gain divider in older revisions? I believe it was influenced by some OEM schematics

Re: hip9011 integration

Posted: Tue Jan 05, 2016 8:40 pm
by Rhinoman
What window are you using? you will need to adjust that to suit your engine. How is the knock sensor mounted? it is very important that the mounting surfaces are flat and the sensor is correctly torqued. 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.