How to combine different circuits?

Hi, I have several circuits: Mega 2560, Motor driver to turn the motor and remote control. Each with its own power source since I am concerned about interference among the components. How can I use a main switch to turn on and off all three circuits together? Perhaps a circuit diagram would help. Thank you.

Use a 3PDT switch or 4PDT.
Or relay.

.

Thank you. Why do I need a 3PDT switch or 4PDT rather than just a simple on/off switch and connect the circuits serially with the on/off switch somewhere in the circuit? Is it possible to use a SPST (2P) switch to do it? I already bought a SPST (2P) switch and custom made the frame.

You normally break each power supply separately
Ex. if you have: two 5 volt supplies and one 24 volt, a 3PDT switch can be used to break the + leads.
You could use one SPDT switch and break the AC inputs to the three supplies, but there may be an issue in power up/down response between the three power supplies.
.

Thank you.

Actually, to avoid unexpected behavior of the motor, is it better to turn on the electronic circuits first before turning on the motor driver circuit which supplies power to the motor? I use LIPO battery rather than an AC source to supply the power.

Your control circuit needs to be designed to take powering up into account.
For example, a MOS FET may need to remain dissabled or off until for a set period of time.
You may have to sequence your supplies.
.

I have several circuits: Mega 2560, Motor driver to turn the motor and remote control.

The only thing that makes sense short of individual on/off switches, is 5V relays to control the power to the two other devices. The Mega should be powered up first and it can then (under software control) turn on the relays (K1 and K2), which have the two devices connected to the Normally Open contacts (N.O.). They can be powered off in any order you wish.

bbqq:
Thank you. Why do I need a 3PDT switch or 4PDT rather than just a simple on/off switch and connect the circuits serially with the on/off switch somewhere in the circuit? Is it possible to use a SPST (2P) switch to do it? I already bought a SPST (2P) switch and custom made the frame.

You have confused the issue by lack of critical detail.

How many independent power sources do you have? What are they? How many primary power sources do you have, perhaps supplying separate regulators?

If all the "power sources" are regulators which derive from one main power supply, then clearly you put a single switch in that main supply. If however, you are using separate power supplies, then you need one switch "pole" for each.

It is also relevant to know why you want to switch the system off in the first place. Most microcontroller systems - such as routers and hubs - use minimal amounts of power and tend to be left operating. If the motors and such are not active most of the time and you are operating from the power mains, the power consumption is likely to be inconsequential. If on the other hand, you are operating from a battery, then it may be appropriate to turn off the control and sensing circuits while if designed correctly, the motor control circuit will draw no power at all whilst inactive and therefore requires no switch.

But again, without detail, we can give no specific answers.

My power sources are just batteries. LIPO for motor controller which drives the motor and two AA battery boxes (with a small switch in each box) for remote control system and Arduino Mega 2560. There is no switch for the LIPO and motor controller. So, three independent power sources. There is regulator. I am trying to make a remote controlled wheeled car. So, if I don't play with it, I switch it off.

Well, if the motor controller draws no power when the other parts are switched off, it arguably does not require a switch and since it likely carries heavy currents, it would be preferable not to insert any switch other than the battery connector.

If the other two batteries already have switches, you really do not need another, do you?