How to get 5v power from midi connection????

My arduino nano is sending midi msg to my synthesizer,when it is powered by USB Jack .
But I want to get it powered from my synthesizer via midi cable. Is it possible???

The regular round 5-pin DIN MIDI connector? It doesn’t carry power.

Midi in jack's pin 4,2,5 are used to receive msg from arduino nano . Now midi-out jack & midi-thru jack are Free. Can get power 5v from them for arduino nano ?????

The standard

You might get lucky
https://thefork.github.io/uMIDI/midi_pinout.html

But I'd be putting a schottky diode and current limiting resistor in there - maybe 20mA - so I don't blow the magic smoke out of my beloved gear. Probably not enough for your NANO if it's doing anythign else (LEDs etc)

Do you mean pin 3 & 1 giving 12v DC power??

No, the standard doesn’t acknowledge power over MIDI, but those examples show that it has been done by others.

It’s up to you to identify & protect the equipment if that power arrives in the wrong place.

Keep in mind not to exceed the power limits of the various components & devices. If you’re not sure, get a friendly (experienced) electronics friend to examine and measure what’s what.

Pins 2, 4 and 5 are used on all MIDI configurations IN/OUT/THRU. Only 1&3 are unused.

But what synthesizer do you have? I've never heard of any commercial synths that put power on the unused pins. Have you checked for power?

If you're able to arrange it yourself, since it is not part of the MIDI standard, you can do any non-standard thing you like within your own setup. 5V would be reasonable. You'll obviously need to make up your own "MIDI" cable because the extra two wires aren't in standard MIDI cables.

Steve

Here is reason why am asking. I have saw , my friend was charging his mobile using otg to USB midi cable on midi-out & midi-in port of SPD 20 octapad. So I seem midi port are serving DC current

At your own risk.
Non standard can work, but may cause grief.

I want to get it powered from my synthesizer via midi cable. Is it possible

It is only possible if you open up the synthesiser and add the power connections to the two spare connections on the socket.
Then you will need to make a special MIDI lead where these two connectors are wired up as well as the others.