I need to create two isolated power supplies (so that one's electrical noise doesn't affect the other) out of my 12V battery. One has to be at 5V for some logic circuitry, and the other at battery level (12V nominal) for some motors.
For the 5V one, I used a classic linear regulator (L7805), but I don't know how to create one that outputs the same as its input and is isolated from it.
I'm asking this question because at first, I connected the motors directly to the battery. That resulted in my 5V dropping briefly every time the motors went from stopped to running (probably generating a current spike and consequently a voltage drop on the battery), resetting my microcontroller.
My first thought was to use some buck-boost regulator and adjust the output to be the same as the input. There would be some issues though, regarding size, price and the fact that it'd impose a current limit.
Edit: I'm asking for a way to achieve this isolation. For answers about my project specifically (capacitance and other ways to solve my problem), which I consider off-topic in this question, go to this chat linked in the comments below DKNguyen's answer.