I fried my ESP8266
Hi, I'm a beginner when it comes to electronics. I built a circuit around an HC SR04 proximity sensor. It's a 5v device, and I copied a circuit I found on the Adafruit website that shows how to make a voltage divider to lower the signal's voltage to something that the ESP8266 can handle.
It worked fine for a couple of days, and then one morning I plugged it in, the ESP got quite hot and stopped working. Can anyone see what I did wrong?
It looks like you are trying to adjust the 6v to a lower value AFTER you've killed the 8266....
I think you should be reducing the 6v Ahead of the 8266, not After... and Check the voltage for proper voltage BEFORE feeding it to the 8266.
Using a small voltage regulator might be the best way to do it... (??)
Thanks for the reply!
The 8266 is supposed to have a built-in voltage regulator at Vin that can handle up to 20V or something. But I wonder about the trigger line - it's in output mode, I don't know if that makes that line safe.
Your voltage divider is set up wrong. The signal from the HC-SR04 should feed into the 550 ohm resistor then into the the 1K resistor to ground. Then feed a signal to the ESP8266 from the junction of the 550 ohm and the 1K. The way your circuit is set up the 1K resistor is not reducing the output voltage from the sensor at all and you are feeding the 5 volts from the sensor directly through the 550 ohm resistor into the ESP8266.
I typically use larger resistors which will reduce the chance of feeding too much current into the chip in case there is temperaty over voltage. More like a 10K and 5K unless there is a long distance between the sensor and the MCU.
Thanks so much, I'll try that!
Also since your circuit indicated you are using 6 volts instead of the typical 5 volts you really need to change the ratio of the resistors to be safe. In your circuit with a total of 1.55K there will be 4 mA flowing and the voltage drop across the 1K resistor will be 4 volts. That is over the 3.3 specs of the ESP8266.
With 6 volts it will work very well to just use 2 10k resistors in series to ground then the center connection will be 3 volts, well within the high voltage range.
Thanks again, I'll make that fix.