Skip to main content
1 of 5

How to use 12 V devices with a 3.3 microcontroller

I have some Hall Effect flowmeters that pulse their input voltage on their signal line appear to work more accurately at the top end of their input voltage range (5 - 12 V). The problem is my controller is an RPi with 3.3 V GPIOs which reportedly will fry with a 12 V input.

I am a novice with electronics. It appears that a voltage divider would work if I can find an appropriate pair of resisters; 3.3 V from 12 V is the target, but I believe the RPi will perceive anything above 2.2 V to be "High" and register the pulse. My main problem is finding room on my project board for four pairs of resisters.

My question is: Is a voltage divider "the" way to do this (reduce a potential 12 V PWM down to a 3.3 V PWM signal) or is there a better way?