I build circuit which take proximitiy sensor as input to circuit (24V). With this 24V we switch on and off NPN transistor.
On the side is Arduino with interrupt enable when pin is LOW. So I need circuit that convert 24V pulses to 0V and 5V pulse for Arduino input. Switching speed is 3kHz.
So we can take 24V and with NPN transistor turn it ON/OFF?.
This is circuit in multisim.
and results:
Yellow: Input signal (signal generator)
Blue: Voltage base of the transistor Violet: Output NPN Voltage As input is
Why is there so much spikes? Should i use different circuit for this purpose?