Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   ECUs and Tuning (https://www.miataturbo.net/ecus-tuning-54/)
-   -   knock filter and amp (https://www.miataturbo.net/ecus-tuning-54/knock-filter-amp-31284/)

JasonC SBB 02-08-2009 12:54 PM

knock filter and amp
 
1 Attachment(s)
The circuit is meant to emulate a GM style tuned piezo knock sensor. It is meant for ECUs that can take a piezo knock sensor signal.

You take a 99/00 knock sensor, it filters and amplifies the signal. It is tuned to 13 khz IIRC, which is the peak frequency that I noticed when I did audio recordings of knock from my 00 sensor.

Zaphod 02-08-2009 01:33 PM

Do you still need the GM electronics (as described here:MS2-Extra Hardware Manual) to make the MS (MS2 in my case) acknowledge the knock or is the circuit alone enough (sorry, I am no expert in electronics - I suppose a look at the circuit would tell me )

Thanks

WestfieldMX5 02-08-2009 03:55 PM

thx Jason.
What is the value of C9?
Why is the pink part, uhm, pink?

JasonC SBB 02-08-2009 04:43 PM

C9 is a trim capacitor, a placeholder, if one were to hand trim the circuit to peak at 13 kHz.

The pink part is because I was cleaning up the schematic and the stupid Orcad software crashed, and lost my work; I saved a screenshot and the pink part is when you select a group of parts. I was in the middle of a move operation.

JasonC SBB 02-08-2009 04:45 PM


Originally Posted by Zaphod (Post 365306)
Do you still need the GM electronics (as described here:MS2-Extra Hardware Manual) to make the MS (MS2 in my case) acknowledge the knock or is the circuit alone enough (sorry, I am no expert in electronics - I suppose a look at the circuit would tell me )

Thanks

I'd have to see the MS knock input circuitry.

y8s 02-08-2009 07:42 PM

OK I'll re-ask my question here...

What's needed to share the sensor between the factory ECU and hydra?

JasonC SBB 02-08-2009 09:38 PM

Remove R19.

Does the Hydra take a GM style knock sensor instead of the 99's?

y8s 02-08-2009 10:03 PM


Originally Posted by JasonC SBB (Post 365527)
Remove R19.

Does the Hydra take a GM style knock sensor instead of the 99's?

it plugs into my stock sensor

JasonC SBB 02-08-2009 11:49 PM

So why do you need this circuit?

Zaphod 02-09-2009 02:52 AM


Originally Posted by JasonC SBB (Post 365381)
I'd have to see the MS knock input circuitry.

I hope this is sufficient:

From the MS2 Manuals:

A conditioning module is also required, such as GM's Electronic Spark Control (ESC) module (PN 16022621, 16052401), see above. These are also available as Standard Motor Products LXE6, LXE7, and LXE9. These are very common in recycling yards, they were used all virtually all GM vehicles from the mid-1980s to the late 1990s. You should match the sensor and module by application to ensure they will work together properly.

The ESC module sends a voltage signal (8 to 10 volts) when NO knock is detected by the knock sensor. If knock occurs, this signal is pulled low.

http://www.msextra.com/ms2extra/General_Pix/ewknock.GIF

This signal is fed to the MS2-Extra ECU via either Pin 3,4,5 or 6 of the db37 connector (SPR1,2,3 and 4 respectively) and linking that pin to either JS4 or JS5. However you need to reduce the module signal voltage since it is too high for the processor port directly. You can use the proto area on the V3 main board, a 1K Ohm resistor (1/4 or 1/8 watt), and a 4.7 Volt Zener 1W diode (Digi-Key 1N4732ADICT-ND, 36¢) to do this, as shown below:

http://www.msextra.com/ms2extra/Gene...roto_knock.GIF

Is this enough information for you?

Thanks again...

JasonC SBB 02-09-2009 10:20 AM

No, I need the input circuitry that the line "megasquirt" in the first diagram above goes to.

y8s 02-09-2009 10:36 AM


Originally Posted by JasonC SBB (Post 365593)
So why do you need this circuit?


Originally Posted by y8s (Post 365450)
OK I'll re-ask my question here...

What's needed to share the sensor between the factory ECU and hydra?

I dont know that I do need the circuit. I just dont know what the ECU(s) are expecting to see from the knock sensor. Is it just a sensor-generated signal or is it a biased resistor?

AbeFM 02-09-2009 01:03 PM

Over on MS forums, there are some implementations of knock chips.. Single, real time programable chips for reading knock.

The downside to them is most need something to speak SPI to them, though a $2 atmel chip will work.. it means you need to find code.

Two things MS is not going to do for you, now, is ignition windowing (only looking when you expect knock, so you can increase sensitivity, prevent "silent knock" death) and have an adjustable level (at least on MS-II beta. The released version supported analog knock signal, which should be a huge boon to anyone, relaxes the constraint on the band pass filter jason posted, and lets you be more sensitive down in your torque peak where you'd expect knock).

You might add an LED output, that's probably the best feature of my knocksense. :-)

Joe Perez 02-09-2009 01:13 PM

The MS is logic-level. It expects a low-impedance (to ground) when knock is present, and a high impedance (or +5) when there is no knock. Typically, the output is also held low for a few tens of milliseconds so the MS has time to capture it.

AbeFM 03-09-2009 02:27 PM

Possibly on the MS-I. And now on the MS-II, as well. It still goes into an analog in, but is read as a digital signal. Thanks once again for making more effort to make a product worse.

Whatever. How can you not give up on something like that. You should see what they did to support the guy who made an auto-trans controller out of a microsquirt.

Knock should definately be read analog. Meh.

JasonC SBB 03-09-2009 05:18 PM


Originally Posted by Joe Perez (Post 365792)
The MS is logic-level. It expects a low-impedance (to ground) when knock is present, and a high impedance (or +5) when there is no knock. Typically, the output is also held low for a few tens of milliseconds so the MS has time to capture it.

So it doesn't have a programmable "background noise voltage" vs. RPM setup?

AbeFM 03-12-2009 04:09 PM

They have Knock, or no knock.

WestfieldMX5 04-09-2009 02:28 PM


Originally Posted by JasonC SBB (Post 365379)
C9 is a trim capacitor, a placeholder, if one were to hand trim the circuit to peak at 13 kHz.

Did you actually build the circuit? I'm planning on trying it out once I get the MS up and running, but how would I tune it / determine the value of C9?

AbeFM 04-13-2009 12:51 PM

I'm really curious to see how this works, as well. It seems a good idea, but... knock sensing seems to be one of the harder things to pull off.

JasonC SBB 04-13-2009 04:09 PM


Originally Posted by f_devocht (Post 393655)
Did you actually build the circuit? I'm planning on trying it out once I get the MS up and running, but how would I tune it / determine the value of C9?

Yes.

JasonC SBB 09-09-2009 10:54 AM

To answer Zaphod's question, there needs to be an additional "AM type detector" circuit between my circuit and the MS, and it sounds like the above-mentioned GM circuit functions as such.

j_man 12-16-2009 05:42 PM


Originally Posted by JasonC SBB (Post 365292)
The circuit is meant to emulate a GM style tuned piezo knock sensor. It is meant for ECUs that can take a piezo knock sensor signal.

You take a 99/00 knock sensor, it filters and amplifies the signal. It is tuned to 13 khz IIRC, which is the peak frequency that I noticed when I did audio recordings of knock from my 00 sensor.


Would it work properly with a Bosch wideband sensor? Or OEM wideband Miata sensor only?

What is the recommended minimum power rating for the resistors? (If one is trying to stuff it in as small packaging as posible)


JasonC SBB 12-16-2009 06:53 PM

What does the Bosch sensor take for phantom power?

If you give me a datasheet I can tell you for sure.
2nd best would be an existing schematic for the front end of one -such as the old Link, which IIRC, uses the Bosch wideband.

GIGAPUNK 12-16-2009 08:17 PM


Originally Posted by JasonC SBB (Post 496569)
What does the Bosch sensor take for phantom power?

If you give me a datasheet I can tell you for sure.
2nd best would be an existing schematic for the front end of one -such as the old Link, which IIRC, uses the Bosch wideband.

here's a pdf of the datasheet

http://www.bosch-motorsport.de/pdf/s...knock/KS-P.pdf

What would your filter/amp increase the max output voltage of the 1v Bosch knock sensor to? Or would it?

JasonC SBB 12-17-2009 03:01 AM

The bosch sensor is a piezo non-resonant sensor. (No need for phantom power).

Therefore remove R19.

However I have to look at the size of the signal to decide if the "gain" of my circuit needs to be reduced.

JasonC SBB 12-17-2009 03:17 AM

Anyone have the miata knock sensor datasheet? I vaguely remember its signal is 1/30th of the GM resonant senors though...

GIGAPUNK 12-17-2009 02:52 PM


Originally Posted by JasonC SBB (Post 496725)
Anyone have the miata knock sensor datasheet? I vaguely remember its signal is 1/30th of the GM resonant senors though...

I can't find the msm knock datasheet anywhere.

Are you saying that the above circuit boosts a 0-0.033 volt signal to a 0-5v signal?

j_man 12-29-2009 07:23 PM


Originally Posted by JasonC SBB (Post 496721)
The bosch sensor is a piezo non-resonant sensor. (No need for phantom power).

Therefore remove R19.

However I have to look at the size of the signal to decide if the "gain" of my circuit needs to be reduced.

This is what John at J&S says about the output difference between the Bosch and the GM resonant ones:

"The output of a resonant sensor is about 500mv/g, while that of a non resonant sensor is about 20mv/g.
An example of a non resonant sensor is the Bosch sensor, which requires a shielded cable."

JasonC SBB 12-29-2009 11:28 PM

Hmm, that doesn't tell me the difference between either of them vs. the miata factory sensor, which is what I need to know.

I will guess that my circuit is in the ballpark. Its output is designed to mate with the AEM which I presume is designed for the resonant sensors, and its gain is close to 20x, and the bosch sensor is 1/25th the output of the resonant sensors.

WestfieldMX5 01-02-2010 09:48 AM

Maybe these can help

AbeFM 03-05-2010 04:17 PM

?

JasonC SBB 04-06-2010 12:08 PM

Hmm
http://expresspcb.com/ExpressPCBHtm/SpecsMiniboard.htm

The can do 3 pcx 3.8" x 2.5" boards for $51 + shipping sent out the next day.
Each one would probably fit 3 of the circuits, maybe more, so you get at least 9 for $51.
All we need now is someone to lay it out in their free software.

AbeFM 04-06-2010 03:39 PM

They are certainly not the only house which turns boards cheap. :-) I did a set of ~7x4" boards maybe 11 of them for $150? At least I didn't have to do it in their software.

So this circuit just does the filtering/amplification - i.e. no analog levels out, no RPM or angular dependent filtering?

ZX-Tex 04-06-2010 09:47 PM

Yep, just need a simple bandpass filter, perhaps adjustable with a simple pot to vary bandpass frequency a bit. Adjustable gain is probably not a big deal but it would be nice. Output signal should be low so it does not overdrive the Adaptronic's input. :2cents:

y8s 07-06-2011 02:48 PM

digging this back up for a couple reasons.

https://www.miataturbo.net/attachmen...4&d=1234115619

The latest MS3 alpha firmware has experimental knock sensor and windowing settings.

To reconfirm, this circuit provides a 0-5V amplified, bandpassed knock signal from the stock NB sensor, correct?

JasonC SBB 07-06-2011 03:46 PM

Yes, but the output is an AC knock signal, with the same amplitude as a tuned piezo sensor.

I would like to point out that the center frequency should be moved from 13 khz to 6.5 kHz. Higher RPM knock is more centered at 6.5 than 13 khz.

To change it quadruple the sum of the values of C9~C11, and approximately halve R20 and R21.

y8s 07-06-2011 04:29 PM

AC knock signal? as opposed to what?

Joe Perez 07-06-2011 04:44 PM


Originally Posted by y8s (Post 745722)
AC knock signal? as opposed to what?

Presumably as opposed to the binary 0 or 5v signal produced by the KnockSenseMS or the 0-10v signal produced by the original GM ESC module on which the MS's knock sense feature was originally based, which conveys a simple "knocking" or "not knocking" indication, rather than merely acting as a bandpass filter and amplifier as this circuit does.

In other words, the Megasquirt's knock-sensing capability is rather primitive. It is not able to read an analog signal (even one that's been filtered and amplified) and do the comparison to determine whether or not knock is present on its own. It needs to have an external device do the hard work, and then simply send a binary signal to the MS telling it whether or not knock is present. (At least, that's how it is on MS1 and MS2. I assume MS3 is the same.)

JasonC SBB 07-06-2011 08:21 PM

Correct. (1st paragraph)

y8s 07-06-2011 09:35 PM

ok but the AC is all happening from 0-5V... which sounds like what I'm after.

Here is the new knock settings dialog:

http://y8spec.com/megasquirt/images/...ha11knock1.png

and if windowing is desired:

http://y8spec.com/megasquirt/images/...ha11knock2.png

note that you can output the window to external knock devices for some reason.


Originally Posted by james@msextra
On/off vs. analogue:
The only circuits presently described provide an on/off yes/no type input. So for anything existing, this is what you need.
The analogue option allows you to feed in an analogue 0-5V signal that represents signal intensity. You can't just connect this to a raw knock sensor - you need to amplify it and utilise bandpass filters. A chip such as TPIC9101 does this but requires SPI to control it too. This analogue option is more for future development work.

A TPIC9101 does not show up when I google so therefore it doesn't exist to me.

y8s 07-06-2011 09:38 PM

oh but a TPIC8101 does exist.

http://focus.ti.com/docs/prod/folder.../tpic8101.html

JasonC SBB 07-06-2011 10:17 PM

Cool stuff on the windowing.

Matt, the output of my circuit isn't "0-5V". It's a bandpassed, amplified version of the knock signal. You'll need a peak detector or AM circuit after it.

Joe Perez 07-06-2011 11:02 PM


Originally Posted by y8s (Post 745882)
ok but the AC is all happening from 0-5V... which sounds like what I'm after.


Originally Posted by JasonC SBB (Post 745898)
Matt, the output of my circuit isn't "0-5V". It's a bandpassed, amplified version of the knock signal. You'll need a peak detector or AM circuit after it.

Also, the MS's knock input is kind of backwards. +5 indicates no knock, 0v means that knock is occurring.

Also II, this input goes directly into a pin on the microprocessor, so the threshold is pretty damned nondetermenistic. The specs for the '908 only guarantee that the threshold will be somewhere between 0.2 * VDD and 0.7 * VDD, which is pretty typical. And, of course, you need to hold the sample for long enough the the uP has a chance to actually read it. A quick transient is likely to get missed by the processor as it only polls the inputs on a "best effort" basis. The closest thing I've found to an official spec says you need to hold the low state for at least 400ms, which is an eternity for a high-frequency audio waveform. Granted, that spec was written for the MS1, but even the MS3 isn't polling those ports continuously.





Originally Posted by y8s (Post 745885)

Now that is damned cool.

I may have to build myself another MS and sacrifice the engine in my '90 on the altar of figuring out how to tune that little bugger.

Anybody know were I can buy some 70 octane gas?

JasonC SBB 07-07-2011 01:37 AM

A rectifier + peak detector + peak&hold circuit to process the output of the bandpass circuit is pretty simple.

y8s 07-07-2011 11:44 AM


Originally Posted by Joe Perez (Post 745940)

Now that is damned cool.

I may have to build myself another MS and sacrifice the engine in my '90 on the altar of figuring out how to tune that little bugger.

Anybody know were I can buy some 70 octane gas?

5 samples free on that tpic.

Joe Perez 07-09-2011 01:13 AM

It occurs to me that we are all complete idiots, myself included.

The time-window of interest to us can be expressed as either n degrees of crankshaft revolution or n number of milliseconds after the ignition event, right? (I'd need to do a bit of reading to recall which.)

How hard would it be to rig up a little external device to take, as inputs, a one-pulse-per-ignition-event signal and something resembling an RPM signal (which could be as simple as a freq-to-voltage converter, if we're working in the analog domain) and use it to drive a monostable multivibrator to gate the sensor signal?

JasonC SBB 07-09-2011 02:55 AM

Easy. Just use an analog CMOS switch e.g. CD4013B for gating.

You'll need a pulse train that goes 'hi' during said ignition window e.g. from 10* to 90* ATDC to gate the CMOS switch.

Since most knock occurs after the ignition event, just use the actual ignition event to gate the window. And since burn time is 3 ms max IIRC, use a 3 ms monostable.


All times are GMT -4. The time now is 02:13 AM.


© 2024 MH Sub I, LLC dba Internet Brands