We are building a system that interfaces an approx 3-20 KHz square wave that comes from an engines crank position sensor. It is an open collector sensor, so we have a 1 KOhm pullup in our system to track it. We currently use a simple 74 series buffer to turn this into a "safe" signal for our 3V3 MCU, however, some slight electrical noise/ringing etc causes our MCU to miss trigger. The stock ECU of the car (and others) can "live" with this noise without issue, so must be using a decent filtering system. We will be scoping the system today to get a better picture of what the noise is.

Is there a simple hardware method to clean this up? I am thinking a schmitt trigger but open to ideas?

This is the signal presented to my conditioner, which is a MAX9926 IC into the +ve line only, -ve left floating

enter image description here

Here you can see for some reason always at a certain RPM, the VR conditioner "drops it" 9Yellow is signal into MCU after MAX9926:

enter image description here

Here is the Max9926 system. This signal is Fed into CAMVR+. CAMVR- is left open circuit (floating). Also, a 1K pullup is attached to CAMVR+ to 5v to give us our voltage due to the open collector nature of the sensor.

enter image description here

  • \$\begingroup\$ Would your case fit this question (and answers)? \$\endgroup\$ – a concerned citizen Dec 13 '18 at 11:12
  • \$\begingroup\$ Add a scope trace of your input signal when you have it. It may be possible to filter or create a schmitt trigger input depending on noise amplitude and frequency. \$\endgroup\$ – Warren Hill Dec 13 '18 at 11:25
  • \$\begingroup\$ logic IO usually already have their own schmitt trigger, since it misses the trigger, it might not help. Are you sure the MCU isn't missing the pulse because of software latency ? Also you can use a resistor voltage divider or serial resistor to go to the 3V3. \$\endgroup\$ – Damien Dec 13 '18 at 11:26
  • \$\begingroup\$ Its definately not due to software latencey as a generated 5v sq wave 9(clean) on the bench works up to 20kz \$\endgroup\$ – MattyT2017 Dec 13 '18 at 11:53
  • \$\begingroup\$ Will capture the signals from the scope now and will present what we can \$\endgroup\$ – MattyT2017 Dec 13 '18 at 11:53

"Here is the Max9926 system. This signal is Fed into CAMVR+. CAMVR- is left open circuit (floating). "

Don't leave the other side of the differential input floating, there's no path apart from the input leakage to charge/discharge the filtering caps. Tie the unused input to some reference near the middle of the input signal range with a resistive divider (you don't have access to the internal reference that the comparator is using).

  • \$\begingroup\$ Thats a good idea :) Will tie to a 2.,5 dividor see what we get :) \$\endgroup\$ – MattyT2017 Dec 13 '18 at 17:57
  • \$\begingroup\$ In tried a 1k/1k pot dividor into the floating pve, giving it 2.5v. The end result is we can now reach approx 60% higher engine (signal) speed before we start to "lose" data after the MAX9926. Any ideas? \$\endgroup\$ – MattyT2017 Dec 14 '18 at 13:26
  • \$\begingroup\$ Have you captured the input signal to the MAX9926 when that happens? Given the shape of the waveforms you show, it may be that the amplitude of the signal gets small enough (from the limited charging rate from the bias resistor) at higher frequencies to not pass the thresholds - you're using adaptive thresholds, but even so, the signal still needs to get past the reference + the min threshold value to trigger the change. If you lower the divider to the midpoint of the amplitude you get at max speed, you should have the best excursion to ensure you pass the thresholds. \$\endgroup\$ – Phil G Dec 14 '18 at 14:21
  • \$\begingroup\$ The signal always ends up at around 4-5v peak as per top yellow plot - regardless of RPM - thats the odd thing its like the 9926 just "gives up" every now and then \$\endgroup\$ – MattyT2017 Dec 14 '18 at 16:25
  • \$\begingroup\$ The second trace shows that the output is switching very late on the rising edge, so it's clear that it's barely getting to the threshold. Where is the capacitor that's slowing this rise down? Can it be replaced with a smaller one? Or can the sensor output tolerate a lower value pull-up resistor? \$\endgroup\$ – Phil G Dec 14 '18 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.