This is the MCU I am using. Power to the MCU is +5V.
With the above circuit connected to the MCU, I am getting the below waveform at the MCU input. Negative voltage of -4V I am getting. Can someone tell me why I am getting -4.8V of negative voltage and what can be done to remove it?
Input PWM is between 0 to 12V. PWM duty cycle can vary anywhere between 10% to 100%.
* C2 causes high current pulses on the input PWM. I´m not sure if this is meant this way.
* Without the diodes .. it would cause 0.6V / 10.5V levels
* But diodes make it to 0.6V / 0.6V levels ... so basically about no signal at all.
A nonsense circuit. And besides this you are doing something wrong or use a different circuit, because it simply can´t generate negative voltages.
Honestly ..Why don´t you just use a simple simulation tool like LTSpice and try it on your own?
* C2 causes high current pulses on the input PWM. I´m not sure if this is meant this way.
* Without the diodes .. it would cause 0.6V / 10.5V levels
* But diodes make it to 0.6V / 0.6V levels ... so basically about no signal at all.
A nonsense circuit. And besides this you are doing something wrong or use a different circuit, because it simply can´t generate negative voltages.
Honestly ..Why don´t you just use a simple simulation tool like LTSpice and try it on your own?
What you should get at "T1" is a positive voltage (12V divided by R1, R2, R3 and D3) when the PWM is high and a low of about 0.6V (D2 Vf) when the PWM is low. If you are seeing a negative voltage at the MCU I suspect it comes from the T1 Signal being clamped by D3 and C3 but to do so relies upon stray capacitance in the signal path. What also looks suspicious is how clean the PWM waveform is when shunted with C2, I would have expected a more rounded edged waveform.
Make photos of the REAL circuit, your measurement setup, your measurement results. (100kBytes each should be sufficient.)
Show a scope picture with input and output on different channels.