Knock sensing ideas and circuit designs

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: Knock sensing ideas and circuit designs

Post by davebmw »

There you go the listen to event is now triggered on the falling edge of the ignition event.

The first pair of flip flops has a permanent 1 on the D input which is clocked in and latched when the ignition event is over, this enables the second pair of flip flops to latch on a knock detected event. while and ignition event in the other bank of 3 resets the other banks flop flop and vice versa.
By moving the reset cap to the input side of the inverter I may be able to shave the width of the coil dwell off of the window what that relates to in degrees buggered if i know ;) time to whip out the breadboard methinks!
Printing KnockSensing-sch2.pdf
(16.24 KiB) Downloaded 919 times
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Knock sensing ideas and circuit designs

Post by jharvey »

One quick thought, perhaps we can make it PWM so we don't need the A/D, simply measure the time. Just a thought.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Knock sensing ideas and circuit designs

Post by Fred »

jharvey wrote:One quick thought, perhaps we can make it PWM so we don't need the A/D, simply measure the time. Just a thought.
Not so simple, needs rapid over sampling (which burns enormous resources) or a timer pin (which we don't have spare). A/D it is :-) Or just binary knock/no knock. We should discuss the pros and cons of each approach.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Knock sensing ideas and circuit designs

Post by jharvey »

Do we want one knock, or two? I know many vehicles have 2, which is nice for redundancy. I would expect we would mostly use one knock, but perhaps we should plan for 2 hardware.

Also I seem to recall the A/D can be configed for GPIO, so I think it can all fall on the same pin.

Dave, do you have a part number or perhaps electrical spec for your knock sensor? Also can you attach the KICAD file?
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: Knock sensing ideas and circuit designs

Post by davebmw »

I think that the BMW way of thinking is 2 sensors one to measure the front bank of 3 cylinders and the second to measure the back 3.
in my case its a long old block so one sensor would be a bit of a stretch to monitor the ping in 1 and 6.

I am at work at the moment so I cannot attach the file (I left it at home) what I have done is put it in the Knock sense sheet of the B type I have been working on.

The Bosch sensor is a standard BMW part i will have a look and see what i can dig up at home.

Having the option for digital or ADC would kick butt for future developments, but I think 2 inputs may be a bit of a waste of ADC. perhaps the use of a GPIO digital pin in addition to 1 ADC would suffice, any logic could be done externally if you wanted to detect knock on sensors 1 or 2 and detect amplitude on the ADC.

Just a thought ;)
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Knock sensing ideas and circuit designs

Post by jharvey »

Another thought about the 2 sensors, is that you can triangulate to help reduce false detections, but that's a bit farther down the road.
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: Knock sensing ideas and circuit designs

Post by davebmw »

OK the BMW part number for my sensor is 12 14 1 738 667 it is Bosch OEM.

it's DC resistance is in excess of 1MOhm

Bosch website gives these values:

sensitivity at 5KHz: 30 mV/G +- 6mV/G
Linearity of 5 - KHz Value +- 10 % ( not sure about what this is)
Frequency range 3KHz to 22KHz
Temp range -40C to +150C

Here is the KiCad schematic I haven't managed to sort the first hierarchy sheet yet:
FreeEMS_0.53_TypeB.01.zip
(265.31 KiB) Downloaded 864 times
Enjoy!
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Knock sensing ideas and circuit designs

Post by jharvey »

Well well well. Perhaps the super mc duper knock sensor isn't that hard to pull off. See this link and note it's from arduino.cc

http://www.arduino.cc/en/Tutorial/KnockSensor
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: Knock sensing ideas and circuit designs

Post by davebmw »

See told you it was easy! my circuit is more like "Fisher Price my first knock sensor" but it will do the job.

I have just realised that the low end crap I was seeing was whine from the alternator, I was using unscreened cables to the sensors doh! but thats good! because that means the actual signal will be loads cleaner and easier to determine what is knock and what is, well, normal.

If I have some time this weekend I'll get it built up on veroboard and record some signals on laptop audio.
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Knock sensing ideas and circuit designs

Post by Fred »

davebmw wrote:Having the option for digital or ADC would kick butt for future developments, but I think 2 inputs may be a bit of a waste of ADC.
User choice. I only have one sensor, so I'd only use one pin. If you had two you could use your fine idea, or two inputs (logic dependent). Either way, its 2 from 8 spares so you could still log extra map and iat sensors in strategic places without much hassle.
perhaps the use of a GPIO digital pin in addition to 1 ADC would suffice, any logic could be done externally if you wanted to detect knock on sensors 1 or 2 and detect amplitude on the ADC.
Good thinking. You could also potentially use a gpio pin to multiplex it somehow and read each other one on alternate cycles. Doing this in a single cycle likely won't work due to capacitances and time required to change voltage.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply