I want to ask if it is possible to make the powering like this:
Nano would be connected to my PC (usb cable), but it would be plugged to an outlet as well. The project has some LEDs, which are controlled by Unreal Engine. I would like to use the power switch on my cable from the power outlet to turn on/off all the LEDs at once. But, when the swicth would be turned on, I would like to control the individual LEDs. I have the controlling part done, but I am trying to figure out the powering. Because, when the arduino is pluged in to my PC, it takes power from the PC as well, so the LEDs are on even when the power switch is off. Is there any way how to make this, please?
Yes, your LEDs can be powered from the "outlet" and your Arduino can be powered from the PC via USB.
By "outlet" I assume you mean a regulated AC-DC power supply, and you do not mean to power your LEDs directly with 120 or 240VAC.
For more detailed advice, you must provide more detail about your components and your idea. Read the forum guide in the sticky post and try to follow it the best you can, even if you don't yet have some of the things it asks for.
Welcome! Yes it is possible and not that complicated. There are many possible solutions depending on the exact hardware. Post an annotated schematic, that will make your project clear to all of us. Also post a link to your processor as Nano has become a generic term.
Hi, thank you for the answers. I am using the 5V 3A AC/DC adaptor. It has 5,5 2,5mm jack plug. From this it is wired to 5V and GND pins of Nano. The LEDs are powered by Nano pins.
Yes, it will be disconnected from the PC - when it is disconnected, the LEDs will only be on/off (depending on the power switch). When it is connected the LEDs will be controlled by Unreal Engine (Nano pins), but I would like them to depend on the power switch as well - if the power switch is off, the LEDs are off and cannot be controlled by Unreal Engine.
The power switch is on the 5V line from the adaptor.