Hi folks,
I would love a double check on something. I’m working on a project that I’m reading a 5V PWM signal into a 3.3V only input. The PWM signal is actively driven between GND and +5V and is “active low”, meaning I will see 0V when the PWM output is high.
I’m trying to solve the 5V to 3V conversion, ideally without a true level shifter. I had originally looked at a simple resistor divider as shown here:
But I believe that then the PWM signal goes to +5V I’ll be dumping 5V into the input of my circuit.
So I’m thinking about replacing the lower resistor with a simple 1N4148, cathode towards the PWM signal. The top resistor would go to +3.3V. Like this:
My thought is that when the PWM signal goes to +5V the diode will be reverse biased, and the resistor will act as a pull up. My input should see +3.3V. When the PWM output goes low, the diode would conduct and pull my input to ground.
How’s my thinking?
Next question of course is can I lose the resistor entirely and just use the internal pull-up?
Thank you!
I would love a double check on something. I’m working on a project that I’m reading a 5V PWM signal into a 3.3V only input. The PWM signal is actively driven between GND and +5V and is “active low”, meaning I will see 0V when the PWM output is high.
I’m trying to solve the 5V to 3V conversion, ideally without a true level shifter. I had originally looked at a simple resistor divider as shown here:
But I believe that then the PWM signal goes to +5V I’ll be dumping 5V into the input of my circuit.
So I’m thinking about replacing the lower resistor with a simple 1N4148, cathode towards the PWM signal. The top resistor would go to +3.3V. Like this:
My thought is that when the PWM signal goes to +5V the diode will be reverse biased, and the resistor will act as a pull up. My input should see +3.3V. When the PWM output goes low, the diode would conduct and pull my input to ground.
How’s my thinking?
Next question of course is can I lose the resistor entirely and just use the internal pull-up?
Thank you!