Page 1 of 3

VR + knock module

Posted: Thu Nov 14, 2013 3:02 am
by AndreyB
Simply because the smallest board I can order is 2 square inches I want to combine a VR chip, I guess the MAX, with a knock chip, I guess the 9011.

Status update: MAX9926 VR chip + MAX9939 amp for DD.
Image
Image

Schematic.pdf

Re: [help needed] VR + knock module

Posted: Thu Nov 14, 2013 9:59 am
by kb1gtt
I'm not very impressed with the 9011. I would probably suggest a generic PGA like the MAX9939, then do the rest in software.

[edit] Most knock sensor chips are reasonably blah. The bandpass filters are poor and the energy detection circuits are limited. [/edit] The HIP9011 is better but still blah. It claims a Q of 2.4, and we are typically looking for a frequency of 5 to 6 kHz. From here http://www.sengpielaudio.com/calculator-cutoffFrequencies.htm I see that with a center frequency of 5600 Hz, and a Q of 2.4 we get a lower cut off of 4553.57 Hz and a higher cut off of 6886.904 Hz. Note that's the 3db point, in reality you're energy detector is going to pickup energy from beyond the 3db points, so a more realistic range of frequencies that would likely be picked up will probably start around 3500 Hz and up to 8500 Hz. Then you have a lack of control over the energy detection level. Such a filter is blah. A much better filter can be cone in software, as well as control over the energy detection level is handy. Basically you want something that will actively establish the noise floor, then look for the peak at a specific windowed time. To get that data from this 9011 chip is reasonably hard and convoluted, so I suggest the MAX9939 if we can convince the software folks that the software is manageable.

I understand that generic filter libraries can be found, so I see the key software to be developed as the energy detector, which I don't see as very hard. Basically you simply look at the amplitude after the filter and if above a threshold, in a window of time, it's a detected knock. I like this approach as you'll also have access to low level information that can be handy for diagnostics, which is lost with any of these knock chips.

Re: [help needed] VR + knock module

Posted: Thu Nov 14, 2013 8:11 pm
by erich
It's easy enough to bodge together a fixed function bandpass filter in code. Here is a good source: http://www-users.cs.york.ac.uk/~fisher/mkfilter/
Acoustic knock detection is still a weak way to go. Ion sensing is much better.
http://vvnet.fi/ville/ion/DIY-Ion-Sensing-2.pdf

Re: [help needed] VR + knock module

Posted: Thu Nov 14, 2013 8:13 pm
by AndreyB
erich wrote:Ion sensing is much better.
http://vvnet.fi/ville/ion/DIY-Ion-Sensing-2.pdf
You are not alone, I've got six Russians fighting about it at http://rusefi.com/forum/viewtopic.php?f=8&t=251 :)

Re: [help needed] VR + knock module

Posted: Thu Nov 14, 2013 9:51 pm
by kb1gtt
I've drafted some ion sense circuits. I'm interested in such an approach.

Re: [help needed] VR + knock module

Posted: Fri Nov 15, 2013 3:20 pm
by AndreyB
kb1gtt wrote:I've drafted some ion sense circuits. I'm interested in such an approach.
No chance I would have a split second to check this in 2013 :(

Re: [help needed] VR + knock module

Posted: Fri Nov 15, 2013 3:48 pm
by AndreyB

Re: [help needed] VR + knock module

Posted: Fri Nov 15, 2013 7:55 pm
by erich
russian wrote: You are not alone, I've got six Russians fighting about it at http://rusefi.com/forum/viewtopic.php?f=8&t=251 :)
It's all greek to me.

Re: [help needed] VR + knock module

Posted: Fri Nov 15, 2013 8:00 pm
by AndreyB
erich wrote:It's all greek to me.
I know. Part of this was a joke, but they are really fighting about Saabs and ions. In my view, this project is not there yet :(

Re: [help needed] VR + knock module

Posted: Fri Nov 15, 2013 8:14 pm
by kb1gtt
Those circuit don't look bad to me. The op-amp VR sensor isn't my preference, I know the MAX chip has a well proven history, and allows for both VR and hall. It looks like this chip can do the same, but might require some filtering and such in software. I'd stay with the MAX chip because I'm comfortable with it and it's proven history. There aren't any real issues jumping out to me in the circuit. I would suggest using two series 5k's to make the 10 k resistors, as that will allow better creepage. As it stands with one resistor, on a humid day ect, they can allow high voltage to jump where it shouldn't be. As well those clamping diodes can get hot, so I would probably use something lower than 20k. It's all minor variations that I really wouldn't know unless I got to test it in a jig.

As for the HIP9011, I don't like the on board filters and energy detectors, I would prefer that done in software to get more control over the low level diagnostics. However this circuit is better than nothing and it's one of the better hardware solution for knock sensing. I just think more of that should be done in software than in hardware.

Re: VR + knock module

Posted: Tue Nov 19, 2013 1:26 am
by mobyfab
Why not use a simple buffer + DC bias to the ADC and do the rest in software?

The F4 has DSP capabilities so it's totally possible.

Re: VR + knock module

Posted: Tue Nov 19, 2013 1:44 am
by AndreyB
mobyfab wrote:Why not use a simple buffer + DC bias to the ADC and do the rest in software?

The F4 has DSP capabilities so it's totally possible.
Laziness Efficiency

Re: VR + knock module

Posted: Tue Nov 19, 2013 2:13 am
by kb1gtt
On the IO board I already have a generic PGA the MAX9939 done in KICAD. I could trim it down to a proto board in a matter of minutes. I also have the MAX9926 VR circuit. Should I make this into a small proto board? Two channels of VR/HALL, one channel of generic PGA.

Re: VR + knock module

Posted: Mon Dec 02, 2013 5:14 pm
by AndreyB
kb1gtt wrote:On the IO board I already have a generic PGA the MAX9939 done in KICAD. I could trim it down to a proto board in a matter of minutes. I also have the MAX9926 VR circuit. Should I make this into a small proto board? Two channels of VR/HALL, one channel of generic PGA.
Here is a trimmed version
https://svn.code.sf.net/p/rusefi/code/trunk/hardware/knock_VR_Art_ELectro/
Looks like MISO should be renamed to MOSI - for Master Out Slave In

Re: VR + knock module

Posted: Thu Dec 05, 2013 2:35 am
by AndreyB
I have ordered this board yesterday, should get it around Xmas.

Re: VR + knock module

Posted: Sat Dec 07, 2013 8:46 am
by Mad Max
Here is my version of VR-module.
It doesn't matter what the type of sensor will be- VR, Hall or optic
Input sensitivity is 50 mV. It's enough to start any car normally at low-battery cranking.
It's possible to make jumper settings of sensitivity- High VR- low VR- Hall/Optic (100kOhm resistor).
Maximum input voltage up to 100V.

Limiting diodes in my case аre Si, fast switching, 100 V, 0,25 А, 4nS, I don't remember exact type but it doesn't matter. There are lot of them.
OP is Rail-to-Rail single supply low noise precision МАХ4252. But you can use any Rail-to-Rail single supply OP.

Re: VR + knock module

Posted: Tue Dec 17, 2013 3:08 am
by AndreyB
The board has arrived around 8pm, but that's too late for me to solder anything today.

Image

Re: VR + knock module

Posted: Fri Dec 20, 2013 2:40 pm
by AndreyB
Seems like the VR part works - at least it looks like that with a sensor on a bench.

Image

How do I use the same circuit for Hall cam sensor - do I just plug it instead of VR sensor and it just works?

Re: VR + knock module

Posted: Sat Dec 21, 2013 2:09 am
by kb1gtt
Unplug one side, it should float to 2.5V, then connect the other lead to the hall. It will go from 0V to 5V, when it crosses over the 2.5V threshold, it will toggle the output.

Re: VR + knock module

Posted: Fri Jan 03, 2014 10:00 pm
by TheHeckler
With the VR inputs ( and hall inputs also ) you need to be wary of catching the correct crossing point or the missing tooth will be off by almost 1 tooth. MS manual ref: Image

Maybe a comparator with hysteresis like that MAX99.. series devices

I noticed one thing, the MEMS microphone built into these boards would be a good knock input device if it could take the heat.

Re: VR + knock module

Posted: Sat Jan 04, 2014 1:16 pm
by AndreyB
TheHeckler wrote:the MEMS microphone built into these boards would be a good knock input device if it could take the heat.
Only if someone smarter than I am would implement the processing :)

Re: VR + knock module

Posted: Fri Nov 28, 2014 2:23 pm
by AndreyB
Hate soldering. I've just soldered the VR section of a board, all the components are in place. Negative side of both channels is ground (set for Hall)

For a test, I ground the positive side. CAM side works as a charm - output is ~5v as expected. Crank side output with positive side ground: 3.3v. WHAT? How is that possible?

I've really checked that none of the pins are soldered together and all the pins are connected with what they should be connected.

Re: VR + knock module

Posted: Fri Nov 28, 2014 9:26 pm
by AndreyB
russian wrote:For a test, I ground the positive side. CAM side works as a charm - output is ~5v as expected. Crank side output with positive side ground: 3.3v. WHAT? How is that possible?
Shoot. I've wasted three hours before I've realized that this is expected behavior. It is 3.3 because of the arm chip on the discovery. Without the chip, it does output 4.5 as expected.

Re: VR + knock module

Posted: Fri Mar 13, 2015 1:25 am
by AndreyB
How come MAX9927 (not MAX9926) is not mentioned on the forum even once?

Is it of any use for us? All I know is that MAX9927 is twice cheaper then MAX9926, and both use the same package.

Image

Re: VR + knock module

Posted: Fri Mar 13, 2015 2:57 am
by kb1gtt
That's because the MAX9927 has around half the stuff in it. You would need to add several external components to get the same features. The 9927 is designed for specialized options. Basically if you make your own hardware, you might need to control some very specific things. The 9927 allows control over those specific items.

Re: VR + knock module

Posted: Tue Apr 21, 2015 2:24 am
by AndreyB
I hate soldering MAX9926, I can barely solder it in the morning while my eyes are fresh and it's a torture after work. I am probably not the only one. Which makes me think if we should make a small board maybe even pin-compatible with jbperf and solder that little board to our boards. This case we can offer pre-soldered VR board as part of the kit, and also offer an option of using the http://forum.jbperf.com/viewtopic.php?f=6&t=1089

Re: VR + knock module

Posted: Tue Apr 21, 2015 10:37 pm
by Number-One
You are getting old :D .

Re: VR + knock module

Posted: Wed Dec 30, 2015 6:24 pm
by AndreyB
Speaking of MAX9926 again.

Problem: there are two different and equally popular configurations: with a 0R pull-down (VR use-case) or with a 1.5K pull-up (Hall use-case). This part about soldering different resistors for different configurations makes it a usability HELL. Also pretty challenging in terms of supporting people who have these boards.

What amount of additional circuitry would make it possible to switch between VR and Hall programmatically? Is it even possible to re-route this on the input side? Second option would be addressing this on the output side by switching signal source from MAX9926 routed for VR and op-amps set for Hall.

Re: VR + knock module

Posted: Thu Dec 31, 2015 1:15 am
by kb1gtt
First thoughts include, DIP switch, SSR, PIN diode.

Do we want to burn IO for one time programmed features? Perhaps we would be better to make it a DIP selected feature.

I currently design with a 300V rating for VR, which is per a datasheet I think noted in this thread. However typical VR's are really below 50V. If I change the design constraints to closer to 50V, we could potentially use this DIP switch directly.
http://www.mouser.com/ProductDetail/ALPS/SSGM740101/?qs=sGAEpiMZZMv%2f%252b2JhlA6ysBMIeXxf9fkx1cpG5j5vc7A%3d

If we look to keep the 300V, we could get that via the below SSR.
http://www.mouser.com/ProductDetail/Panasonic-Industrial-Devices/AQH0223A/?qs=sGAEpiMZZMsUriz2CNI3Exmm9O23aLOUGQj0fTx361c%3d

We could also use a DIP to control a SSR. Or the SSR could be driven by MCU.

PIN diodes are less common so less options if we want to change to a different MFG or different component. Also less people have experience with with them, so smaller talent pool. Also they are typically used for RF not for this kind of thing.

Would people squawk about adding the $ to make them easier of use. I suspect that it's small $ compared to the over all. I suspect we should create it as the option on pre-assembled boards, making them easier to use, then for those that are concerned with the $, they can make their own and install a jumper wire for hall, and if VR then don't populate the parts.

Re: VR + knock module

Posted: Thu Dec 31, 2015 1:24 pm
by AndreyB
How automotive would a DIP switch be? Would it switch itself once one hit some rumble strips? inertia switches are definitely causing issues.
Do we want to burn IO for one time programmed features?
This issue is bad enough to be worth of a couple IO lines. Also if one REALLY need to get these back, he can hard-solder the inputs and get his life back. Speaking of IO shortage, we need to move to the 176 chip. Once we move to the 176 pin chip, we have more timer input pin options and if it's electrically acceptable to run Hall via the op-amps, we will only use MAX9926 for VR and that would solve the usability issue.