Powering arduino

Hello.
I have basic knowledge in Arduino programming and electronics. I want two Arduinos to communicate with each other (Serial or I2C in a way of hotplug - i think it is the right term). Both of them will have their own power supply (2S LiPo battery). Master will send (upload) some parameters to slave and then I will disconnect communication. The slave will then be used as a standalone unit and use those parameters to drive some servos.

Now the problem and question:
I want that master is powering slave during upload of parameters (battery on slave disconnected), but I don't want that slave is powering master (slave battery connected / master battery disconnected). I can solve this with diode on 5v rail but if I use Serial communication is the second Arduino still powered up through TX and RX lines. If I use I2C then by disconnecting communication master sometimes freezes.
How to avoid powering master Arduino through Serial pins or how to avoid freezing of master if I use I2C?

I hope I gave you enough info of what I want to help me solve this problem.

Thank you.

Hello and welcome to the Arduino fora.

If you leave any kind of connection between the Arduinos, such as I2C or serial connection wires, then there is the possibility of phantom powering through the protection diodes.

Before you do anything else please read General guidance
And
How to use this forum

Then post a schematic of what you have. Circuits are best explained in a schematic, not in words.

Sasho39:
I want two Arduinos to communicate with each other (Serial or I2C in a way of hotplug - i think it is the right term). Both of them will have their own power supply (2S LiPo battery). Master will send (upload) some parameters to slave and then I will disconnect communication. The slave will then be used as a standalone unit and use those parameters to drive some servos.

Thinking you need multiple Arduinos is usually a beginner's mistake.
You could use a single Arduino with PCA9685 servo expander boards.
The boards are detected/powered/controlled (I2C) by the main Arduino, and only the servos receive power locally.
Note the I2C is designed for short distance. More that 5 meters (total) I2C wiring could be problematic.
Leo..

Hello and thank you for your quick replys.

PerryBebbington:
Before you do anything else please read General guidance
And
How to use this forum

I have read it before posting and I have read it again. Please direct me to particular section of How to use this forum, because I don’t know where I went wrong (I am new to forums - never posted anything).

Please let me further explain my implementation and use of two Arduinos (long and boring, but I want you to understand me):
For the last 25 years I have been modeling and competing with free flight aircrafts (in short: models).
These models fly on their own, meaning they glide trough air with no external power assistance and no radio controll (everything has to be preset).
This sport (category F1A of Fédération Aéronautique Internationale) has become very hi-tec and expensive. Wings and fuselage build out of carbon fiber (not balsa wood as in the old days) and “mechanical timers” were swapped for micro controllers and servos (servos are controlling wings, rudder and horizontal stabilizer). There are few micro controllers developed especially for this category, but the cheapest one costs around 150 Euros (I have one build in my model). Minimum weight of model must be 410 grams and we (the competitors) are trying to come close to that limitation. Battery, micro controller, servos and some other things are all built in a fuselage with minimum space available.
2 or 3 years ago I was writing scripts for this project, then computer disk went corrupted and I have lost everything - even will to start all over again. Communication between Arduinos was through I2C. Maybe this time I will try with Serial communication (because of occasional freezing of master Arduino by unplugging the communication cable). It was even possible to drive servos (controlled by slave Arduino) and setting their position with a slider on LCD connected to master Arduino.
My goal is to lower the costs of a model and to compete with something that I created and developed (but I need your help to achieve that). Maybe in the future - if someone has an interest of having one build in their model, I would build them one (if I ever come so far with my skills and knowledge, I would like to build my own Arduino-based micro controller for use in F1A models.) for the costs of the parts required.

I have attached a photo of fuselage where I have a built in micro controller called Black magic which is connected with a Palm handheld. You can see there is not much space available. One photo attachment shows my connection of two Arduinos (sorry but I don’t have any schematics program).

Sorry for my sloppy English.

OPs pics



I know it would add a tiny bit of weight, but have you given any thought to adding SIM support or possibly WiFi to communicate?

Sasho39:
Hello and thank you for your quick replies.
I have read it before posting and I have read it again. Please direct me to particular section of How to use this forum, because I don't know where I went wrong (I am new to forums - never posted anything).

Hello, thanks for asking. I did actually say what I thought was needed when I said

Circuits are best explained in a schematic, not in words.

While I didn't directly ask for a schematic I would have thought that would have been enough of a hint. If you read 'How to use this forum - please read' then you will have seen part 15 which suggests including a schematic. Given that you were asking about how to power things, and powering things means wiring things and the way things are wired it generally shown on a schematic then surely a schematic is the obvious thing to include, or so I would have thought.

Sorry but I don't have any schematics program

Pencil and paper is fine, no one minds if it's rough, not having any kind of schematic is what makes helping difficult or impossible.

It's not so much about forums as it's about providing the information likely to help us to help you. You know what you have and what you've done, the only way we are going to know is if you tell us.

Maybe I've not read your post properly but I can't see why you (think you) need 2 Ardunos. I really don't think you do, and you should avoid it if possible. Having 2 means writing extra code for both of them to communicate, something that's not needed when there is only 1.

BTW,
I am well impressed by what you have achieved! Well done for that.