NodeMCU & Ultrasonic Sensor

Thread Starter

y2jsh

Joined Oct 30, 2019
13
I wish to interface an ultrasonic sensor with 5V operating voltage to a NodeMCU 0.1v. I read somewhere that i need to make a voltage divider so that the sensor doesn't give 5V directly to the controller. Is this true or is the NodeMCU 5v compatible?
 

ericgibbs

Joined Jan 29, 2010
10,042
hi y2,
Reading the notes of other users, they say that it is not 5V tolerant.
Its easy to use a 2k in series with a 3k3 as resistive divider, 5V down to ~3.3v.
E
 

jpanhalt

Joined Jan 18, 2008
9,425
Do you need bi-directional communication? That is, will the NodeMCU be controlling the 5V device? If so, what voltage will the ultrasonic recognize as "high." If the MCU doesn't provide that plus a little headroom, you might simply implement a level shifter. Lots of ways to do that, and places like SparkFun and Adafruit plug and play units for several channels.

Here's one way:
https://www.nxp.com/docs/en/application-note/AN10441.pdf

and a review:
http://www.ti.com/lit/sg/scyb018f/scyb018f.pdf
 
Top