I have a 24V brushed motor, a Raspberry Pi, and a Teensy 4.1 microcontroller all running off the same power supply (a 24V tool battery). I have a step down regulator that converts 24V to 5V:
https://www.pololu.com/product/3782
I'm thinking of having the battery connected to both my motor and the regulator. I'm then thinking of having the regulator supply 5V to my Teensy (instead of via the USB port) and my Raspberry Pi.
My main concern is that the noise and occasional high torque demands of my motor will cause random voltage spikes that in turn cause my Teensy and/or Raspberry Pi to reset. Is this a valid concern, and if so, what is a solution? Would separating grounds (how could I do that) or isolating the 5V circuit help? If this isn't a concern, why isn't it?