What is wrong with this circuit?
I've performed the following tests in my circuit:
When I set the controller output pin PD7 to HIGH, the source/drain voltage is 0V (measured with oscilloscope). Signal is clean.
When I set the controller output pin PD7 to LOW, the source/drain voltage I get is a aproximate 0.5V and it's a sinewave. That means the MOSFET is not switching off (completely).
The signal from Arduino (digital OUTPUT) tested with oscilloscope, it is clean. Goes HIGH and LOW 5 V. And when I remove output wire from Arduino, MOSFET switches off and then I get clean 12V Vds.
Sensor that's wired to MOSFET is a ultrasonic sensor (VALEO Automotive). All I know about it is that the on signal wire (bidirectional, half-duplex) is 12V and 1mA.
Thank you guys! It was very helpful for me. I know that there is better solution for MOSFET then the one that I used.
I have rebuilt my assembly...I made all the wires short as possibly and voila it works!
I am not sure but I think there was a problem in Ground connection!
Also i had some confusing expirence month ago, with unloaded MOSFET and Osciloscope. That was a PWM Modulator (from PWM OCB - RMCyber..... i did some measure with osciloscope! Signal that i had with unloaded and loaded device was completly different. Signal with loaded device was OK, nice und clean PWM Signal. But PWM signal from PWM Modulator without any Load was confusing.
I thank your...i learned something new! Not everything, but step by step.