So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By walrus
#96215 [This is a cross-post from the ESP8266 subreddit. Thanks for your help!]

I'm building a kind of speed measuring device using two ESP8266's (Sparkfun ESP8266 Thing https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/hardware-overview) and two TF-Mini Plus LiDAR sensors (https://www.sparkfun.com/products/15179). The sensor is attached to the ESP8266 through a buck-boost converter to feed the required 5V for the sensor to work. The sensor then send distance data back to the board via the green data wire via pin 12. The two boards communicate via an ESP8266 wifi network and various POST and GET routes.

The board's code runs fine and returns distance measurements successfully via the serial monitor when the FTDI USB-to-Serial programmer (https://www.sparkfun.com/products/9873) is plugged into the board. I can even connect to my ESP8266 wifi network and access a route. The problem is as soon as I disconnect the programmer, the board crashes. The ESP8266 wifi network is disabled, and I assume distance measurements are no longer being captured. Because of this, I can only run one of the two boards at a time, so I cannot actually calculate speed travelled between the two sensors.

Power: Currently, both boards are powered via their usb ports to a 5v wall outlet as advised by this hookup guide. I was able to measure 4.57V and between 0.16 and 0.28 A of current -- all what I would expect. I don't expect the board is getting extra power from the FTDI programmer (and therefore dying when disconnected from it), but it does die if I remove the VCC and GND connection from the programmer.

Why does the board & wifi network crash when I unplug the USB-to-Serial programmer, and how can I get both boards working simultaneously? Are the components getting enough power?

Thank you!

Github Repo: https://github.com/tbw875/roadrunners-revenge

Circuit Diagram: https://preview.redd.it/bvvifsaeqssa1.png?width=1906&format=png&auto=webp&v=enabled&s=e4c1303ebdb3a25b2c0826cee6d291628da8ffaa
User avatar
By btidey
#96223 When the board crashes you should get an error code on the serial which will indicate whether it is a software or power problem.

Power problems could be caused by several things. 4.57V sounds a bit low for something that is supposed to be 5V. That could either be the source itself or a USB cable with a high lead resistance. Some USB cables can have 1 Ohm lead resistance which can cause problems particularly during the high pulse draw that an esp8266 can consume. With the FTDI adapter in there might be enough reserve to keep it going.

On the software side if there is anything in the loop that could get stuck for a few seconds then it will trigger the hardware watchdog.