Wiring an external mini USB to Arduino Nano

Hey everyone! I'm using an Arduno Nano for a project, and need to extend the reach of the mini usb to outside of an enclosure (whilst keeping the Nano inside). There is no room for an extension cable inside the enclosure. Is it possible just to get another separate mini usb connector and solder some wires from the separate connector pins, and directly onto the Nano's pins? If so, would this have to be to VIN and GND, or 5V and GND? I believe USB only provides 5V, which makes me think that using VIN wouldn't work? If I use 5V, I also need to use the 5V pin for a potentiometer which will be used to control several LEDs (30 to be precise) - would everything still work correctly, given my circuit?

I've attached my schematic for reference - what I'm trying to do is substitute the 7v power from a battery which you can see on the schematic, for powering directly through the Arduino's mini usb. Does this all sound like it should work?

I was also thinking I could solder directly onto the attached mini usb's pins, but this could go wrong quite easily.

7afbb1602613ec52b265d7a54ad27330_preview_featured.jpg

If so, would this have to be to VIN and GND, or 5V and GND? I believe USB only provides 5V,

Yes, USB provides 5V so you should connect to 5V.

You can wire parallel to the existing USB port. Just be careful to get the connections right. If you've got an Ohmmeter, plug-in a USB cable and make sure your added-connector is wired just like the original.

Of course, your LEDs won't be as bright running from 5V. Well... They'll be dimmer than a fully-charged 7V battery. :wink:

DVDdoug:
Of course, your LEDs won't be as bright running from 5V. Well... They'll be dimmer than a fully-charged 7V battery. :wink:

That may or may not be because of a major foul-up in the circuit!
7afbb1602613ec52b265d7a54ad27330_preview_featured.jpg
The controlled LEDs are driven by emitter-followers which also have base resistors. As a result, you are losing something like a Volt down, and that from 5 V, not 7 V, so for a given resistor value the LED current will be much lower.

The transistors should be wired as common-emitter with the LEDs in the collector, in which case for 7 V, you could use pairs of LEDs in series.

If you wire it to be supplied with 5 V down the USB cable, the USB source would need to be capable of supplying the full LED current, whatever that is. You connect the USB cable to the same connections as the original USB socket but you connect the LEDs (with their resistors) directly to the 5 V on that USB cable.

Why? Because there is a diode between the 5 V line on the USB connector and "5V" on the Nano and you do not want it dropping the voltage or being subject to the full LED current.