Automotive Air Conditioning Information Forum (Archives)

Provided by www.ACkits.com

We've updated our forums!
Click here to visit the new forum

Archive Home

Search Auto AC Forum Archives

Advice for a Knock Sensor filter circuitt

pettaw on Sun August 27, 2006 11:50 AM User is offline

Hello guys. I'm in the process of putting an aftermarket ECU into my Volvo called Megasquirt. Its basically a DIY system where you buy the PCB and then you solder all the components onto it, modifying if you want to etc etc.

Anyway, to my question. There is a capability for a knock sensor input into it, and I would kinda quite like to have it so that I don't run the risk of pinging and blowing up my nicely rebuilt engine.

They've got this circuit.

Which to my eyes is just an amp and timer circuit for the Megasquirt. The trouble is that Volvo used Bosch sensors on their blocks, which are a wideband type and so I need a filter to clean up the signal otherwise the thing is just showing constant knock all the time. Right, anyway, I've recorded the signal into my sound card and I've worked out the frequency of the ping is about 6kHz. Do any of you guys know of a circuit/IC that I can use to filter this signal into something useable? Or even someone/somewhere I can ask where they might be able to tell me?

Many thanks.

k5guy on Sun August 27, 2006 1:28 PM User is offline

A simple bandpass filter should work.

http://my.athenet.net/~multiplx/cgi-bin/3pole.main.cgi



-------------------------


Send me e-mail

pettaw on Sun August 27, 2006 2:09 PM User is offline

fantastic. thanks for the link. I've got the first two OK, but what do you set the impedances to? I've got no idea whatsoever what the impedance of the piezo knock sensor is and even less idea what the op-amp impedance is

NickD on Sun August 27, 2006 2:42 PM User is offline

The LM324 is acting like an adjustable threshold Schmitt trigger circuit with pin 5 having a positive voltage to keep pin 7 normally high, a pulse or an AC voltage applied to 6 would have to be more positive than pin 5 to cause the output of the LM324 to go low that in turn triggers the 555 timer.

The input impedance would be 10K ohm, but would vary widely depending on what you are using for a knock detector, typically like a ceramic cartridge on an inexpensive phonograph and the output would have to suit whatever the microcontroller is expecting.

In most EFI systems the knock sensor feeds directly into a multiplex input to the microcontroller where a software type of digital filter is used. The microcontroller under steady state conditions like cruising down the interstate at 55 mph will increment the spark advance to the point where it gets a signal from the knock detector, then backs it off. So the microcontroller has to determine whether the vehicle speed is constant or not generally by monitoring both Vss, and Cas in some fashion for changes over some predetermined period of time.

Know that K5guy is trying to be helpful, but can hardly recommend that bandpass filter, at the frequencies involved, those inductors would be quite large and expensive, and will still need a means to convert the AC pulse from the knock sensor into something the microcontroller is looking for.

You also have quite a bit engine modifications to make, LOL, could have purchased an EFI kit for my 82 454, but like things simple, can still do a lot with centrifugal and vacuum advance to get the ideal spark advance curve and play with the carb jets to get that stoichiometric mixture.

k5guy on Sun August 27, 2006 3:20 PM User is offline

True, the inductors are a bit ridiculous at 10K impedance. I like the butterworth due to the lack of ripple at the edges of the pass. The problem with a standard RC bandpass is that it will lower the amplitude of the desired signal.

The 555 is simple TTL timer chip with pin 2 as the trigger, and seems to be wired as a single shot.
http://www.uoguelph.ca/~antoon/gadgets/555/555.html

So Nick, what do you suggest?

-------------------------


Send me e-mail

pettaw on Sun August 27, 2006 4:47 PM User is offline

Ahh right, thanks guys. I think I've made as many mods as I want to for the moment. I've got full fuel and ignition control now, just have to type a number into a table and it all happens LOL. Also I've got a wideband oxygen sensor on the exhaust, so know exactly what the fuelling side of things is doing. Also means I can run closed loop settings for the whole time, rather than running open loop at high throttle and hoping that your mapping has set it all up right LOL.

Just wish it was so easy with ignition side of things. I guess the only way to get the ignition zero'd in is gonna be to get it on the dyno. Hopefully I can find a place where they're not so 'expert' they're not gonna start telling me what to do and let me do the tunings whilst the dyno operator drives the car on the dyno There's a lot of 'specialist' places around sadly, that treat common members of the public as idiots. "Just go and sit over there sir and we'll sort it out for you" Trouble is that most of these type of places are usually the type where you get the most problems

LOL I've gone off on a complete tangent now, but anyway, Nick what type of filter would you use? I'm not averse to some sort of digital device if there's an easy way to program it.

Edited: Sun August 27, 2006 at 4:48 PM by pettaw

pettaw on Sun August 27, 2006 5:01 PM User is offline

I should say that I tried this arrangement

Although I kept the adjustable voltage on the + side of the op-amp.

But that didn't seem to work too well for me either. It didn't seem to effectively filter out anything much at all tbh.

Edited: Sun August 27, 2006 at 5:02 PM by pettaw

NickD on Sun August 27, 2006 5:42 PM User is offline

You don't need a filter, and don't even want one, the first circuit you have shown is a level detector, normal engine noise should be below the threshold point, and knocking should be above it, you only want a pulse from the monostable circuit when you have a true knock that is caused by preignition.

Now that is going to be the trick to adjust that 10 turn potentiometer, if set too low, noises due to acceleration would get through, too high, and nothing will happen. The guys that do this have tons of equipment with tons of various sensors, the dyno, emission measurement equipment, fuel flow, combustion temperatures, calculation production tolerances, worse case scenario's, etc. And even with all this stuff may blow several engines when conducting the many tests, what the heck, just grab another engine.

Kids that do this blow many engines using a marked off 1/4 mile on some back alley with a couple of kids on the lookout for cops, one kid driving and the other playing with a notebook. Not the most ideal.

Would suggest getting a shop manual with spark advance curves and attempting to emulate that as close as possible, injector dwell is yet another problem. O2 sensors are very slow, luck to get ten pulses per minute, more like six, don't need a filter there either, all precise level detection.

pettaw on Sun August 27, 2006 6:06 PM User is offline

With a wideband oxygen sensor and controller installed I get instant feedback on my combusion mixtures, even down to the acceleration enrichment that I've set when I press the throttle. I can see the extra pulse of fuel it gives, so I'm confident that I'm not gonna screw anything up on the fuel side of things. You're right about the narrowband sensors though, hopeless for tuning anything except cruise. I've got all the manuals its possible to get. Haynes, and also the original Volvo manuals (I don't do anything by halves). They don't give the full spark curves unfortunately, I've got timing at 900 and 3000 rpm measurements, but with the vacuum hose disconnected from the ignition unit. I've been able to guestimate the rest using a spreadsheet someone else designed to help you set up Megasquirt.

I did try that circuit with no filters whatsoever, but trouble is as soon as you rev the engine up, the noise level goes up too and triggers the alarm. If I set it so it detected knock at say 1500rpm, then it wouldn't go past 4000rpm without a false positive coming from the circuit. A lot of sensors are mechanically set to chime at the relevant frequency for that engine. GM sensors being a good example. The difference is that these Bosch sensors are 'flat response' types and that means you need some sort of filtering to let the equipment see the difference between normal noise and pinging I could try using a GM sensor and try my luck, but no telling whether the characteristic frequency of that sensor is gonna match with my engine.

Edited: Sun August 27, 2006 at 6:08 PM by pettaw

bohica2xo on Sun August 27, 2006 6:23 PM User is offline

pettaw:

My brother has built a couple of the megasquirt units - they have evolved somewhat over the years.

The LED is used in conjunction with a small hammer to set the detector level on an idling engine...

Little brother says don't drive an MS equipped car beyond the "free towing range" of your auto club card - at least for the first year or so.

Good luck with your project.


Nick:

Actually the O2 sensor responds quite quickly - less than 100ms from zero to full scale. If you use a newer PCM like a ford A9L, you can see it compensate on a cylinder by cylinder basis. If you replace a single injector with a unit with a different flow rate, the PCM will adjust the pulsewidth to that injector. Moving the O2 sensor a couple of feet either way on the exhaust will make the PCM choke too. I believe that the PCM extrapolates above a certain rpm, but it can "see" the individual pulses at idle.


B.

-------------------------
"Among the many misdeeds of the British rule in India, history will look upon the act of depriving a whole nation of arms, as the blackest."
~ Mahatma Gandhi, Gandhi, An Autobiography, M. K. Gandhi, page 446.

pettaw on Sun August 27, 2006 6:38 PM User is offline

S'OK Bohica, I've had MS running fuel only for about 6 months and it hasn't once let me down, but then I set it up extremely carefully It did take months of tuning and fiddling around though to get it working smoothly. Ironically its the cruise and light throttle setups that always take the longest to do, cos the engine is going through transitions. The full power stuff, using the wideband was complete childs play. IMO a lot of the failures and engine blowups have been because people have got into them and driven them like they stole them before their engines were in a state of tune to enable them to do so. Also, as you say Megasquirt has evolved an awful lot from those early days of 8x8 tables and only being able to tune to stoich. Now you can set up a target AFR table and use your wideband, its becoming a lot more sophisticated.

Unrelated to Megasquirt, but two of my Volvo friends have had serious engine troubles, cracked plugs etc because they failed to get the basics right first and then carried on with the foot to the floor.

Some would call me anal but when I rebuilt my engine, I followed every spec laid out in the factory manual, angle tighten this one, torque tighten that one. I then ran it in properly for a good few thousand miles on the OEM setup before fitting Megasquirt and also before driving it hard. Two other people who did major engine work on their Volvo engines, one spun a rod bearing and the other one developed a serious oil leak. If he had stopped when it first started leaking maybe it wouldn't have caught fire and destroyed all his hard work. Mine has done over 10,000 miles faultlessly and is now on its second oil change.

Now I'm running fuel and ignition its smoother because there's no false tach signals from the coil to confuse the unit, but now I've got the extra headache of setting up the timing. That method of smack the block with a wrench and see what happens works well with the GM type of narrow band knock sensors, but doesn't work well with the Bosch wideband type cos it picks up on all noises so you need some type of 'software' or input filtering.

Edited: Sun August 27, 2006 at 6:40 PM by pettaw

bohica2xo on Sun August 27, 2006 6:59 PM User is offline

The MS is a fun hobby for some, but I need to get to work more often than my brother... Glad you like the MS.

I drive 10,000 miles in a few months. I put an SDSEFI unit on my 900 SPG, and it has been trouble free for 5 years. I got the saab for cheap, since it had cooked 2 PCM's in a year. After finding & fixing the harness fault that was killing the PCM's, I decided to go with the SDS unit. It passes emissions testing every year, at levels so clean the technician looks to see if the probe fell out of the tailpipe.

If the bosch KS is such a problem, why not switch to the other type of sensor? Try the sensor from a Contour SVT, that should be easy to come by on your side of the pond.


.

-------------------------
"Among the many misdeeds of the British rule in India, history will look upon the act of depriving a whole nation of arms, as the blackest."
~ Mahatma Gandhi, Gandhi, An Autobiography, M. K. Gandhi, page 446.

NickD on Sun August 27, 2006 11:20 PM User is offline

Ha, I will leave the response time of an O2 sensor to vehicle specific application and maybe time to get up to date on changes to these devices. Was referring to the more common zirconium oxide types with a response time that looks like this:



Perhaps a better term than response is cycle time for a complete change from zero to maximum back to zero O2. as you can see on the graph, this time is several seconds.

I see they have some newer planar types today that use the response time measurement in milliseconds, but didn't find anything on cycle times.

In a way, the standard O2 sensors are poor in that while maintaining an average 14.7:1 air fuel ratio, as they get older and slower, this translates to the engine running lean 50% of the time and rich the other 50%, and the older and slower they get, the longer these lean and rich periods last.

The reason injectors response so quickly is not the O2 sensor but the throttle position sensor, hitting the gas open the throttle body vane and shoots a voltage from the TPS to the computer telling it, hey buddy, I am taking control, and the computer is made to listen to this command before all others, kind of thing.

Computer is actually quite busy trying to figure all this stuff out, so much simpler in a carb setup where hitting the gas opens the throttle that decreases manifold vacuum to retard the spark, hits the acceleration pump to squirt gas into the venturi that is adjustable and releases the power piston for a 12:1 power AF ratio. Injectors also have a much higher dwell, still need that lower ratio for power. To emulate this with a program takes lots of code and a fast CPU, closed loop gives way to open loop, and of course fuel economy suffers.

Was a lot of debate to use an O2 sensor for each cylinder, but that gave way to the bean counters with only one or two being used, one fouled plug, sends a rich mixture that confuses the O2 sensor, so it leans out all the other cylinders causing high combustion chamber temperatures that can burn up internal engine components and the car runs rough and slow. Would have more respect for these systems if done correctly, but cheap is the name of the game.

In a carb engine, loose a little power, but will still get you there with a fouled plug, and no damage to the good cylinders will occur.

Saw a Continental aircraft engine with direct combustion chamber injection for some really nice power, thing is, these engines don't have to comply with EPA regulations on NOx production. But this engine had other problems, with that high pressure, got a leak and burnt out the rest of the engine components, lucky the pilot wasn't killed, but he is going to get a rather huge bill.

pettaw on Mon August 28, 2006 1:26 AM User is offline

Haha yeah I need to get to work everyday as well, and the car has never let me down in that respect. Also cost me less than half that price for that SDS unit with exactly the same functionality. Only slight problem is a lack of processor power which means that certain things aren't being processed with a high enough resolution, leading to occasional problems, particularly at those light throttle low revs situations I described earlier. Obviously its a bit of PITA and had to spend several days soldering all the components into the PCB and also designing circuits for all those 'extra' functions. Of course, you can get systems that are more convenient, but pay a cost premium for those LOL. There is though, the new powerful processor out, but the bods haven't quite coded the 'extra' software for that yet, so I can't use that one yet, but very shortly....

That was something I worried about Nick. uneven running confusing the O2 sensor, luckily on MS you can see how much EGO correction is being applied from the base map so then you would see if the thing is constantly correcting to lean the engine would hope to pick up problems like that. Mercifully haven't had to deal with those things yet.

Good idea on getting a different type of knock sensor. Have to find out from Karl or UK Tech what the UK name for a Contour is I think its a Mondeo? Why can't car manufacturers make things simple?

[I can't believe I'm having a discussion about MS and knock sensors on an A/C board! Fantastic]

Edited: Mon August 28, 2006 at 1:31 AM by pettaw

bohica2xo on Mon August 28, 2006 3:52 AM User is offline

pettaw:

Yes, your Mondeo is our Contour / Mystique. I have some experience with the KS on the SVT model, and it is a very reliable sensor.

I am not an EE, so I went with a unit I could deal with. The SDS was actually cheaper than a new PCM for that car at the time. I like having the dedicated programer, and the mixture override knob too. I used a fried PCM for the connector, and made the SDS box a plug in unit. Until gas prices got stupid recently, I could run the 100 octane Unocal stuff at 18 psi of boost.


Nick:

For a better look at the automotive O2 sensor, try HERE. Wideband units respond even quicker to small changes.
Your mileage complaints about oxygenated fuels are directly related to closed loop running. The PCM is trying to achieve a mixture of 16:1 at cruise by measuring the oxygen in the exhaust stream. Since there is roughly 21% oxygen in the intake air stream, calculations are not too complicated - unless you add oxygenate to the fuel. With no way to measure the total oxygen in the reaction, the PCM adjusts the fuel for the target oxygen level - ADDING fuel to reduce the EGO. The frugal 16:1 cruise becomes a clean 14.7:1 . Oxygenates were mandated for all of the vehicles still on the road without sophisticated control systems. Oxygenated fuels will help lean out a carbureted vehicle, but can actually have the opposite effect on an closed loop system.

.

-------------------------
"Among the many misdeeds of the British rule in India, history will look upon the act of depriving a whole nation of arms, as the blackest."
~ Mahatma Gandhi, Gandhi, An Autobiography, M. K. Gandhi, page 446.

NickD on Mon August 28, 2006 8:16 AM User is offline

Had to blow up a scope picture to read it, the response time or change of state is 100 ms, but see the cycle time can be as high as 55 cycles per minute that is quite impressive, about five times faster than the older O2 sensors.

Ford's logic was to measure the distance between CAS pulses, if an increased occurred due to a fouled spark plug, would trigger an error code. At first they made it too sensitive and had to back down as were getting false codes due to normal rpm changes.

Good point about oxygenated gasoline fooling the O2 sensor into thinking the engine is running lean, seems like a different program is needed for each different grade of gas. My body tells me that the emissions in the Chicago area are worse then ever, so much for the EPA and DNR, think they are solving one problem but create a dozen more.

Removing the C from HC would solve a lot of problems.

Back to Off Topic Chat

We've updated our forums!
Click here to visit the new forum

Archive Home

Copyright © 2016 Arizona Mobile Air Inc.