Best way to read 18kHz PWM signal with wide V_pk-pk (5.5-18V)

level-shiftingmicrocontrollerpwmsensor

I am trying to design a circuit for level-shifting a PWM signal coming from a sensor and reading it with a 5V micro controller in an automotive environment. I will run my design by an EE at the end but I am trying to give it a good go myself. Here are the specs:

  • PWM signal has a frequency of 18kHz and operational peak to peak voltage of min 5.5V and max 15.5V. There are are conducted transients on the input line as well as possibility of ESD but I am using a TVS diode to clamp to a safe voltage (if possible to around 45V but I can clamp lower at a cost penalty). During transients/ESD, signal integrity is not important.

  • Since I am measuring the positive duty cycle (minimum 6.4us) I would like to keep the rising/falling edges of the signal sharp. Current rise time of the signal is 50ns and it can probably be degraded up to 200ns before accuracy becomes a concern

  • Maximum allowable current drawn from the PWM source is 1 mA (preferably less).
  • Cost should be kept as low as possible while satisfying the above constraints.

I can think of a few alternatives:

  1. PWM > series resistor > N-channel MOSFET in common-source configuration.
  2. PWM > series resistor > NPN BJT in common-emmitter configuration.
  3. PWM > series resistor > schottky diodes clamping to 5V and GND (cheap, but the current draw at 15.5V with 2.2K series resistor is 4mA which is too much. Any more than 2.2K and the signal is degraded too much)

What one of these alternatives (or others) do you guys recommend?

Best Answer

I would be inclined to use an NPN transistor. The gate capacitance of a MOSFET, combined with the limited current you can draw, is going to present some serious problems WRT edge timing.

schematic

simulate this circuit – Schematic created using CircuitLab

27k base resistor limits current to about 200 to 600 µA. Schottky diode between base and emitter clamps any negative-going input transients. Second one from base to collector, just like with Schottky logic, serves to keep the transistor from fully saturating, keeping the switching action fast.