How to measure Vmax of PWM signal

Hi there,

I have a pwm signal out of ecu which has period length 63us and high pulse lenghth 14us (duty cycle 22%), logical 1 is 12V.
I need somehow measure voltage of logical high if it is correct with my arduino mega2560.
I need to find out how to use analog input when the signal sets to high.

Hope you understand me, I can´t speak english well :frowning:

I don't know why you need to know this but the best way is to use an oscilloscope.

The signal is too short to sample on an arduino's analogue input. If you feed it directly into an analog input it will blow it.

logical 1 is 12V

So if you already know it then why do you have to measure it. Unless you don't actually mean Vmax at all.

I need to measure Voltage peak-peak if it is not lower then 12V for example.

Yes i can use oscilloscope but the device is connected to pogo-pin test jig and the jig is connected to arduino. In ideal case i only change the measured device in jig and arduino check all outputs on device. It is for output check after refubrishing.

Ok in which case you needs peak detector on the pwm and a potential divider to cut it down to 5V.