Protecting input and filter lower wave

Hi,
I would like to use the input of an inductive engine sensor to trigger an interrupt on my Arduino Uno. A photo of the waveform is attached.
I want to remove the lower portion of the waveform and use just the upper one to trigger a “RISING” interrupt.
I tried my very best to design a circuit, but I am not the hardware guy… :confused:

Does that circuitry work?

SensorWaveformForum.JPG

[u]Protection Circuits[/u].

What voltage is that? I don't know how to interpret "1VDC 10:1" Is it 1V per division or 10V per division?

Do you need the transistor for "amplification"? The transistor itself should actually give you protection (the output won't go negative and it can't go higher than the applied collector pull-up voltage).

If you use the transistor, [u]enable the internal pull-ups[/u] and I assume you know the transistor will invert the signal so you'll be looking for a falling edge.

Enabling the internal pull-ups is the plan to do and in the code.
The upper part of the waveform is about 10V.
I am asking myself if I need to have a 1N4007 in parallel to the Zener or is the Zener is acting similar to the the 1N4007?
I propose to use the 500Ohm resistor to release the electrical energy from the sensor quick enough to keep the waveform.

|500x241 The zener in that will never become reverse biased because it is in parallel with the BJT's emitter-base junction. In that circuit, the base voltage can not become more than about 0.7V unless the input voltage to the 1k resistor is excessive (however the result of that would probably be the destruction of the resistor).

Consequently, it does nothing. You don't really need any diodes at all unless you want to protect against negative voltage at the input. The 1N4007 does that.

You only need the 1k resistor, the 1N4007 (a 1N4148 would be better/faster) and the transistor. Enable pull up on the pin. Might need software debouncing if the positive pulse is "dirty". Leo..

What sensor is this? Does it increase in frequency? How dirty does it get?

Wawa:
You only need the 1k resistor, the 1N4007 …and the transistor.

Thanks for your reply.
I think I need the 4,9V Zener, because the BC337 (I have available in my drawer) is not prepared to get Emitter − Base voltages >5V and the input voltage from the sensor is around 10V .

The signal is not dirty from what I saw on the oscilloscope. See my attachment from the first Topic

@ tinman13kup: The sensor is an inductive sensor. The measured frequency is <200Hz

soulid: Thanks for your reply. I think I need the 4,9V Zener, because the BC337 (I have available in my drawer) is not prepared to get Emitter − Base voltages >5V and the input voltage from the sensor is around 10V .

Don't you see? The 1k resistor prevents that from happening. Look up the V/I curve of a diode.

soulid: I think I need the 4,9V Zener, because the BC337 (I have available in my drawer) is not prepared to get Emitter − Base voltages >5V

Look at the symbol of an NPN transistor. What do you see between base and the emitter. I see a diode. That diode starts to conduct at ~0.5volt, and when current increases (throught the 1k current limiting resistor), that BE voltage might rise to ~0.7volt. Not much higher than that. The diode across BE is to protect the BE junction from negative voltages. If your signal is never going positive (only 0-10volt), then the diode is not needed. Leo..

aarg: You don't really need any diodes at all unless you want to protect against negative voltage at the input. The 1N4007 does that.

Since -5V is usually the absolute maximum for Vbe, and its easy to toast a BJT with reverse bias on the base, I'd definitely keep the 1N4007. Up the 1k to 10k for even more protection against higher voltage spikes perhaps?

Suggest

1\ use a 10k input resistor. 1mA is plenty to drive the transistor.

2/ Use a 1N4148. It'll handle the current easily, and the 1n4007 is very slow.

3/ use a 5k pullup to +5 on the collector of the transistor.

4/ perhaps use a smallish cap (1nF) on the transistors b-e to reduce HF noise.

Allan

I setup the circuit as described: - Interrupt pullup resistor active - 470R in series to the BC337 basis - after the 470R the Zener and the 1N4007 in parallel to GND.

@ allanhurst Thanks for the constructive feedback. I will add the cap and change the diode and I'll try the 10K in-series resistor and see if it works.

@ All Thanks for the help. For now...issue closed ;D

soulid: - 470R in series to the BC337 basis - after the 470R the Zener and the 1N4007 in parallel to GND.

Why did you ask here if you were planning to ignore all the advice. I wish there was a "remove Karma" button. Leo..