We will be using an ESP32 to do everything on a robot, e.g. motor control, position tracking, reading different sensor values and making decisions based on that information. I'm just trying to match the speed of both motors so the robot moves in a straight line because there is a small difference between the ones we already have. I'm trying to get 4 pulses per Revelation just for the added accuracy not because the 2 PPR is too slow.
We also want to monitor the motor current so if the robot is stuck on something (e.g. one side hits a corner of a wall or goes on a steep rock) and the motor is stalling, we know it's drawing too much current to shut it down and go in reverse or something like that. I'm just not sure how much of a load all the interrupts from the encoder would put on the ESP32 cause as I said, it should be doing other things in the background as well. And again, for current sensing, I'm not able to find a chip that's easily soldered by hand. If there's a THT chip that would be great but larger pitch SMDs are good enough as well (all I could find were 0.4mm or smaller pitch). I'm also not sure how to implement a good current sense amplifier which has common mode rejection and how to implement one myself. There is a simplified diagram of the INA213 which basically shows two 1 meg resistors, a DC offset and two 20k resistors to get a gain of 50. are there any additional components needed or is that actually all there is in a current sense amplifier?