So in general when you have a noisy actuator and a sensitive you run them on separate supplies and try and keep the two electrically isolated. I use a circuit like this when I try and opto-isolate a transmitter and a receiver:
This will give you a non-inverted output of the input waveform, and will actually work with any voltage on the input and output side so long as you can still turn on the LED (i.e. the input voltage is high enough) and you are within the operating voltage of the output transistor.
Isolating the two supplies is actually good in a lot of ways. It means you don't have to worry about surges in current on the actuator supply causing issues on the microcontroller (fewer decoupling caps, etc), and it also means that if the actuator battery dies, the actuator won't try and run off the input signal from the microcontroller.
Hope that helps!
The issue with using linear regulators (LM78xx) is that each regulator dissipates as heat the power represented by current to the load x Voltage dropped by regulator
.
For at least the servo motors mentioned, this would be substantial: 6 x Servo Current x (12 - 5)
. For one thing this will need a good heat sink on the LM7805, for another, the battery will discharge quickly as a lot of power is just being wasted as heat.
A scheme that could work is to use DC-DC buck regulators powered from the 12 Volt battery for the 9 Volt camera and the 5 Volt servo motors, and (optionally, if needed) a linear regulator instead of a buck regulator, from the 9 Volt camera rail, for a clean 5 Volt supply to the microcontroller.
Also, one would use separate 5 Volt regulators for the microcontroller supply rail and the servo supply rail, to avoid EMI from the servo motors messing with the microcontroller.
Buck or switching regulators do not waste as much power or generate as much heat as linear regulators, they have efficiency in the 80% to 92% range. Thus batteries would last longer too.
There are integrated buck regulators available as drop-in replacements for the 78xx series. See the Murata OKI-78SR series as one option, there are others as well:
Best Answer
Wherever possibe use a seperate power supply. (We do in a 4kg robot)
Use a proper noise filter if you must share a power source. An isolated DC-DC converter to supply the electronics is very effective (active filter).
Opto-isolate from the MCU to servo power amplifier.
It's the rule in industrial, where reliability matters.
Never share grounds.