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