Page 2 of 12

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 12:56 am
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 973 times

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 11:59 am
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.

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 2:46 pm
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.

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 5:35 pm
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?

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 5:45 pm
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 ;)

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 9:52 pm
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.

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 10:35 pm
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 912 times
Enjoy!

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 11:44 pm
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

Re: Knock sensing ideas and circuit designs

Posted: Thu Oct 30, 2008 11:58 pm
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.

Re: Knock sensing ideas and circuit designs

Posted: Fri Oct 31, 2008 12:23 am
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.