I'm a beginner in the field, and I'm working in a IoT application, especifically with sensor HCSR-04 and the WiFi module ESP8266.
ESP8266 works with 3.3v in the Vcc pin and HCSR-04 works with 5v, so I need to take down the 5v to 3.3v with a resistor. Searching on Internet I figured out I needed a Voltage Divider Resistor so I found this online calculator, put the values:
Input Voltage : 5v R1 : X R2 : 10 Output Voltage: 3.3v
Note that I put in R2 a
10k Ohm resistor, because I only have 5k, 10k, 15k resistors available. So, according to this calculator,
X = 5.15k Ohm.
Is it ok if I use this resistors to take down the 5v input to 3.3v output? Will it work in real life? (not theoretically), or there is something I'm missing?