Serial communication of a sensor doesent work depending on PSU
Posted: Thu Nov 30, 2023 1:19 pm
Hello everyone,
I have a project where I am sending data from 5 sensors (2 hardware serial, 2 software serial and 1 i2c communication) via esp32 devkit v1 to my website/database. Im powering sensors via external 5V/2A PSU. While esp32 is connected via usb cable to pc (commong ground via external PSU and esp32 board is connected) everything is working fine. Then Im trying to switch and power esp via external PSU via Vin pin and one of the sensors that use software serial communicaiton starts sending erradic values that make no sense. Same thing happens when I power ESP32 via different external PSU or via usb port on esp when ends of cables go to PSU instead other end of usb that goes to pc. I am not sure what the problem is but it seems like something between board and PSU. I have tired different PSU and same problem occurs as well as different esp32 board. When I was using multimeter to check voltages or when I would unplug and then plug USB cable from esp port sometimes it would randomly start working properly. I dont know what the problem is, anyone has any ideas? Really not sure what to do or test anymore cause voltages seem stable on esp32, on esp32 and on sensors.
I have a project where I am sending data from 5 sensors (2 hardware serial, 2 software serial and 1 i2c communication) via esp32 devkit v1 to my website/database. Im powering sensors via external 5V/2A PSU. While esp32 is connected via usb cable to pc (commong ground via external PSU and esp32 board is connected) everything is working fine. Then Im trying to switch and power esp via external PSU via Vin pin and one of the sensors that use software serial communicaiton starts sending erradic values that make no sense. Same thing happens when I power ESP32 via different external PSU or via usb port on esp when ends of cables go to PSU instead other end of usb that goes to pc. I am not sure what the problem is but it seems like something between board and PSU. I have tired different PSU and same problem occurs as well as different esp32 board. When I was using multimeter to check voltages or when I would unplug and then plug USB cable from esp port sometimes it would randomly start working properly. I dont know what the problem is, anyone has any ideas? Really not sure what to do or test anymore cause voltages seem stable on esp32, on esp32 and on sensors.