How is my Arduino getting power

So I have not a problem but a strange thing that I can't understand .

I have a setup that is roughly like this :

Arduino - not powered by USB or barrel jack

I have a 12 V PSU -> DCDC converter -> 7.6 V to 2 DC ESC connected to 2 DC motors
The Signal wire from the ESC is connected to 2 pins on the Arduino

I have 3 servomotors connected to the 5V, GND, and 3 pins on the Arduino

I have an A4998 stepper driver connected to 5V, GND on the Arduino and to 12 V from the PSU and also some signal pins from the Arduino

I have a HC-06 Bluetooth module connected to the TX RX from the Arduino

Initially I tested my code with the Arduino connected to USB and it worked .

Then I put the robot into my garage and the only thing that I am powering is the 12V PSU .

But somehow it is still working !

I can't understand where is the Arduino getting 5V from, and also from where are the other devices getting 5V from, as the only active power source is the 12 V PSU which is going to the stepper driver and the DCDC converter ...

Sometimes when I plug the 12V PSU, the robot is doing some strange stuff, like the servos are going crazy or some motor is turning ON/OFF like crazy ...

If you have any ideas it would be interesting to check how this whole thing is being powered up ... also maybe it's better to power it up properly ...

A proper schematic if you please !

Connecting signal lines of powered devices to an unpowered Arduino could power the Arduino through it's pin protection diodes (bad).
Commonly known as phantom-powering.
Leo..

Commonly known as phantom-powering.

Or parasitic powering, and is a good way to damage a device. Don't let it happen.

bbogdanmircea:
I can't understand where is the Arduino getting 5V from, and also from where are the other devices getting 5V from, as the only active power source is the 12 V PSU which is going to the stepper driver and the DCDC converter ...

If you turn off the 12V supply, and if everything (arduino etc.) stops working, then that will very likely be where your arduino (and other devices) are getting their power from.

EEVblog covered this.

Still as mentioned, this is a good way to damage your devices. Never send signals to an unpowered device.