9 years, 6 months ago.

How to interface 5V devices

Hi, I am working in a project and I need to use a flow sensor, exactly this model http://www.seeedstudio.com/wiki/index.php?title=G1/2_Water_Flow_sensor

It works with a Vcc of 5V. The water speed is sent via a pwm signal, the frequency of this signal is just proprotional to water speed, so doing a calculation you get your real value. Obiously this signal is 5V.

I am using Lpc1768 so I would like to know how to interface it with 3.3V.

3 Answers

9 years, 6 months ago.

Hi Sergio, you can use a logic level converter like this:

https://www.sparkfun.com/products/12009

To interface 5v devices to 3.3v and 3.3v devices to 5v

I hope this help you

Greetings

Take care using that level shiftier for anything high speed, it is using a 10k pullup resistor to give the high levels, fine for most things but not what you want for high data rates or timing critical signals.

For 3.3V to 5V at high speeds you need to use a buffer IC of some sort.

For 5V to 3.3V you can normally get away with a series resistor and optionally a clamping diode. Or as Erik pointed out use a part which can take 5V inputs like the LPC1768.

posted by Andy A 28 Oct 2014
9 years, 6 months ago.

The LPC1768 is 5V tolerant on its (digital) input pins, so you can directly connect them. The other way arround many deviced (but not all!) will accept 3.3V as a logic high, even if they are 5V devices. For those who do not reliably accept this you indeeed need a level shifter.

You also need to ensure that the LPC1768 has power before the sensor starts to output. The inputs are only 5V tolerant once powered up, putting 5V onto an input pin when the CPU doesn't have power can damage things.

posted by Andy A 28 Oct 2014

You can configure pins as open drain and then pull them up with 10K resistors to 5v(up to5.5v) You do not need level shifters LPC1768 pins are 5v tolerant(input and output)

posted by mazyar seyedi 01 Mar 2015
9 years, 2 months ago.

You must be sure that never when lpc is powered off(VDD=0) the 5v signal comes to lpc because lpc1768 is 5v tolerant as long as it has 3.3v supply