Knock Detection with variable sensitivity over RPM

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

Re: Knock Detection with variable sensitivity over RPM

Postby Trev16v » Thu Jan 22, 2009 10:19 am

Agree about the ~6.4kHz. That's about where my audio software showed me a significant peak. You may have noticed there are also many other frequencies also associated with the knock going right up to about 15kHz.

The amplifier was simply a three-transistor circuit that I quickly designed and put together that evening. It just amplifies the knock signal sufficiently to drive the 32ohm headphones and provide another output to the laptop. It wasn't designed to perform any filtering. A bit of a crap amplifier really but at least it did the job. It's hard for me to recall what amplification it would have had. However, I estimated the peak signal from the sensor to be about 100mV (by just whacking it and looking at the 'scope) and I wanted about 1V into the headphones, so I aimed for a figure in the order of 10.
Golf MK2 G60 Syncro with 16VG60 on MSNS-E

MSDroid :: MegaSquirt tuning on Android

Image
Trev16v
Master MS/Extra'er
 
Posts: 401
Joined: Tue Apr 08, 2008 1:30 pm
Location: Oxfordshire, UK

Re: Knock Detection with variable sensitivity over RPM

Postby dougie3 » Thu Jan 22, 2009 10:41 am

That's excellent Trev!

Today I filtered the WAV File with a software Band-Pass and a center-frequency around 6,3kHz. With this, every knock can be identified easily by monitoring the average noise level and compare it with the peak level.

Now, the rest seems to be software. The microcontroller needs to adjust the input amplifier and the slew rate of the integrator stage to be the signal at optimum level.
Only thing I'm not sure about is, if the rpm signal is necessary or helpful for this as well.

Because the center frequency will change from engine to engine, I'll put a 6 Bit DIP switch on the PCB, where the user can configure the center frequency along his needs.

Will do further tests over the weekend.

BR
Ralf
dougie3
MS/Extra Newbie
 
Posts: 11
Joined: Tue Jan 06, 2009 10:06 am

Re: Knock Detection with variable sensitivity over RPM

Postby AbeFM » Sat Jan 31, 2009 11:53 am

It would seem if you could monitor RPM via the trigger signals, you could do windowing pretty easily, a little circular buffer, and you'd only need one number to describe when you're masking events.
2000 VVT Miata turbo, MS3Pro

Contact me if interested in a MS-II 2nd gen NB Miata PnP board.
AbeFM
Super MS/Extra'er
 
Posts: 874
Joined: Wed Dec 05, 2007 1:40 pm
Location: San Diego, CA

Re: Knock Detection with variable sensitivity over RPM

Postby Zaphod » Thu Feb 19, 2009 8:36 am

Hi - any updates on the knock circuit?

Would like to fit one to my car in the spring... :D
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
Zaphod
Experienced MS/Extra'er
 
Posts: 365
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

Re: Knock Detection with variable sensitivity over RPM

Postby AbeFM » Fri Feb 20, 2009 5:18 pm

Apparently in the latest beta, the ability to do threshholding in software has been entirely removed. I'm not yet sure if you'd have to put the signal in on a different pin, it might mean a lot of swapping around inputs.

A circuit like this is even more necessary now. :-)
2000 VVT Miata turbo, MS3Pro

Contact me if interested in a MS-II 2nd gen NB Miata PnP board.
AbeFM
Super MS/Extra'er
 
Posts: 874
Joined: Wed Dec 05, 2007 1:40 pm
Location: San Diego, CA

Re: Knock Detection with variable sensitivity over RPM

Postby Quan-Time » Fri Mar 06, 2009 4:07 am

With the knock frequency, its going to be different for each engine. The freq at which a knock occurs is based on your engine bore.
http://www.phormula.co.uk/KnockCalculator.aspx
Simple java app to calculate your frequency. How is this being tackled, and is progress between anyone still going forward ?
join the (non official) Megasquirt IRC chat channel
##megasquirt @ irc.freenode.net
http://webchat.freenode.net/?channels=% ... irt&uio=d4 - click here to join live via java web-client, its instant !
http://www.msefi.com/viewtopic.php?f=92 ... de#p204682
User avatar
Quan-Time
Helpful MS/Extra'er
 
Posts: 130
Joined: Sat Feb 02, 2008 9:21 pm

Re: Knock Detection with variable sensitivity over RPM

Postby dirtytorque » Thu Mar 12, 2009 12:08 pm

I am currently in the process of installing EDIS on my system so that I can use the trigger wheel to be able to window knock detection using a tpic8101knock detection chip made by texas instruments.It is basically a clone of the HIP9011 which is no longer available.

I have already interfaced a pic to this device and it is trivial to set gain/center frequency etc.
I just need to come up with a good windowing stratergy.
I was wondering if any of the files indicate that knock intensity is increased by MAP(i.e load) rather than by just RPM alone.
If so I'd like to be able to vary the gain of the TPIC8101 cct to take into consideration different engine loading.
The 36-1 trigger wheel obviously has a 10 degree spacing so I was figuring on a 20 degree ATDC window to listen to knock to help manage against false triggering.
dirtytorque
Helpful MS/Extra'er
 
Posts: 50
Joined: Thu Mar 12, 2009 11:01 am
Location: Berkshire UK

Re: Knock Detection with variable sensitivity over RPM

Postby HOODEY » Sun Mar 15, 2009 6:29 am

dIRTYTORQUE I have a lot of experience with the PIC16f877a and has always been interested in that knock interface chip.
I have also intefaced these controllers to PC to display information in a graphicall format(guages etc) using JAVA.
The last project was an inertia dyno for an RC engine.

I am currrently developing a high energy ignition system with dwell control to replace a distributor on a toyota.
This has a 24 tooth wheel . In the near future I am looking to include knock detection.

Any chance you can send me the code for the interface to the knock I.C.(Hoodey@hotmail.com)

I think there is an article on the net regarding the knock window algorithm..

How do you listen in the knock window? Do you start the integration in the knock window or do you pass the signal during knock window
using an electronic device?

How do you do surface mount stuff?

With my experience I am willing to help out in anyway possible.
HOODEY
Helpful MS/Extra'er
 
Posts: 115
Joined: Sat Feb 21, 2009 5:18 pm

Re: Knock Detection with variable sensitivity over RPM

Postby dirtytorque » Wed Mar 18, 2009 1:31 am

HOODEY wrote:dIRTYTORQUE I have a lot of experience with the PIC16f877a and has always been interested in that knock interface chip.
I have also intefaced these controllers to PC to display information in a graphicall format(guages etc) using JAVA.
The last project was an inertia dyno for an RC engine.

I am currrently developing a high energy ignition system with dwell control to replace a distributor on a toyota.
This has a 24 tooth wheel . In the near future I am looking to include knock detection.

Any chance you can send me the code for the interface to the knock I.C.(Hoodey@hotmail.com)

I think there is an article on the net regarding the knock window algorithm..

How do you listen in the knock window? Do you start the integration in the knock window or do you pass the signal during knock window
using an electronic device?

How do you do surface mount stuff?

With my experience I am willing to help out in anyway possible.


:0)

I'll be in touch.
Streched a bit thin at the mo with all aspects of my car build but this is a feature I have wanted to develop for the longest time.
I think the timing of the integration period and things of this nature will have to be trialled on a live system.
I am going to buy a pc based scope so I can do some real world tests on the road and have the results recorded on a pc for later analysis.
I managed to solder obe of the surface mount chips onto a breadboard mountable adapter for the proto type process.
I just joined all the pins together and then used solder wick to isolate the individual pins.
worked a treat.
:)
dirtytorque
Helpful MS/Extra'er
 
Posts: 50
Joined: Thu Mar 12, 2009 11:01 am
Location: Berkshire UK

Re: Knock Detection with variable sensitivity over RPM

Postby AbeFM » Wed Mar 18, 2009 1:40 pm

while I like using real oscopes, there are some software based ones which work with some laptops, using the line in for the speakers. figure if you have 24 bit, 80khz hardware in there already, why not use it...?
2000 VVT Miata turbo, MS3Pro

Contact me if interested in a MS-II 2nd gen NB Miata PnP board.
AbeFM
Super MS/Extra'er
 
Posts: 874
Joined: Wed Dec 05, 2007 1:40 pm
Location: San Diego, CA

Re: Knock Detection with variable sensitivity over RPM

Postby dirtytorque » Wed Mar 18, 2009 11:51 pm

AbeFM wrote:while I like using real oscopes, there are some software based ones which work with some laptops, using the line in for the speakers. figure if you have 24 bit, 80khz hardware in there already, why not use it...?

what software are you using buddy? :)
dirtytorque
Helpful MS/Extra'er
 
Posts: 50
Joined: Thu Mar 12, 2009 11:01 am
Location: Berkshire UK

Re: Knock Detection with variable sensitivity over RPM

Postby HOODEY » Fri Mar 27, 2009 4:00 pm

So Doug are you going to send the code...

Spent the last week reading up on the mssp of the pic16f877 and the tpic8101 i.c. :RTFM:

Save me the burden and send me the code..hoodey@hotmail.com
HOODEY
Helpful MS/Extra'er
 
Posts: 115
Joined: Sat Feb 21, 2009 5:18 pm

Re: Knock Detection with variable sensitivity over RPM

Postby Big Thurs » Sun Apr 12, 2009 11:03 am

Moving backwards...
I remember years ago when the extra code with knock sensing was released, and many people seemed to have success using the simple amp/filter circuit in the megamanual. The issue was that it could be used up to a certain rpm where mechanical noise exceeded the knock level, which effectively cut the usable rev range to 1/2 or less; people revving to 7000 often ignored knock above 4-5k.Well, I just had a light bulb come on; what about using two of those circuits tuned to different noise levels and switching between the two by using a programmable output from ms? It seems to me like this may be an extremely simple solution to an old problem.

FYI I think that all the development that has gone into this subject is great and I am in no way attempting to slow it down, only find a cheap, effective solution until the next generation of knock sensing comes around.

Also, I noticed that my previous layout (knock_eagle.zip on page 2) was downloaded 40 times, yet nobody responded. This leaves me under the impression that my layout does not work since I could not get the thing to work properly. I know others have made layouts for the passive filter schematic but where are they?
91 MR2 Turbo on V3 MSNE-e HR11d
Big Thurs
Helpful MS/Extra'er
 
Posts: 62
Joined: Thu Jul 15, 2004 11:17 am
Location: Eatonton, GA

Re: Knock Detection with variable sensitivity over RPM

Postby Quan-Time » Sun Apr 12, 2009 5:12 pm

its not that it didnt work, its more likely that many of those people didnt test it.

I myself downloaded it, and have not built it. It was more "oh, so thats how it was done" rather than "im going to build it and help".

Im crap at electrics, sure i can follow any guide or kit, thats fine, but prototyping ? ill leave that to people a bit smarter than me. I do indeed want this to work tho.
join the (non official) Megasquirt IRC chat channel
##megasquirt @ irc.freenode.net
http://webchat.freenode.net/?channels=% ... irt&uio=d4 - click here to join live via java web-client, its instant !
http://www.msefi.com/viewtopic.php?f=92 ... de#p204682
User avatar
Quan-Time
Helpful MS/Extra'er
 
Posts: 130
Joined: Sat Feb 02, 2008 9:21 pm

Re: Knock Detection with variable sensitivity over RPM

Postby HOODEY » Thu Apr 23, 2009 1:55 pm

???.
Last edited by HOODEY on Sun Nov 13, 2011 8:47 am, edited 1 time in total.
HOODEY
Helpful MS/Extra'er
 
Posts: 115
Joined: Sat Feb 21, 2009 5:18 pm

Re: Knock Detection with variable sensitivity over RPM

Postby AbeFM » Thu Apr 23, 2009 2:58 pm

Having an analog in (as we did until a couple betas ago) would let you do that filtering pretty easily. So it seems, I'm likely wrong. :-)

I haven't built the test circuit either, though I'd like to.
2000 VVT Miata turbo, MS3Pro

Contact me if interested in a MS-II 2nd gen NB Miata PnP board.
AbeFM
Super MS/Extra'er
 
Posts: 874
Joined: Wed Dec 05, 2007 1:40 pm
Location: San Diego, CA

Re: Knock Detection with variable sensitivity over RPM

Postby jsmcortina » Thu Apr 23, 2009 4:32 pm

We took out the analogue input as it appeared not to be working and all the knock input systems in the Megamanual were digital. It works now as a digital input.

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33907
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Knock Detection with variable sensitivity over RPM

Postby HOODEY » Mon May 11, 2009 12:40 pm

Prototype under construction
Last edited by HOODEY on Sat May 08, 2010 4:34 pm, edited 1 time in total.
HOODEY
Helpful MS/Extra'er
 
Posts: 115
Joined: Sat Feb 21, 2009 5:18 pm

Re: Knock Detection with variable sensitivity over RPM

Postby richyvrlimited » Mon May 11, 2009 1:07 pm

Looking good, I can't wait for MS to have a quality knock detection solution.
2003 MX5. Coldside MP62
-
MS3, RTC, & Knock board, Release 1.2. LC-1 Wideband.
richyvrlimited
Master MS/Extra'er
 
Posts: 568
Joined: Mon Jun 26, 2006 1:03 pm
Location: Warrington, NorthWest England

Re: Knock Detection with variable sensitivity over RPM

Postby Zaphod » Tue May 12, 2009 12:20 am

Wow! Keep it coming!
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
Zaphod
Experienced MS/Extra'er
 
Posts: 365
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

PreviousNext

Return to Expansion boards

Who is online

Users browsing this forum: No registered users and 3 guests