I have a circuit that has 12v in. The vcc goes directly to solenoid valves and also to a DC-DC regulator/buck convertor. This converts to 8V which goes to a IN14007 diode and then to the vin pin on the Arduino. The Arduino plugs in to a PC and is controlled via serial commands. This means The Arduino has power from the usb and also the vin pin as the same time. I have tested it and it seems to work fine just wanted somebody to confirm if this is acceptable.
2nd question. When the Arduino is powered by USB only I have about 3.5v on the vin pin as output. Is this correct?
MartynC:
I have a circuit that has 12v in. The vcc goes directly to solenoid valves and also to a DC-DC regulator/buck convertor. This converts to 8V which goes to a IN14007 diode and then to the vin pin on the Arduino. The Arduino plugs in to a PC and is controlled via serial commands. This means The Arduino has power from the usb and also the vin pin as the same time. I have tested it and it seems to work fine just wanted somebody to confirm if this is acceptable.
If you're talking about an Arduino UNO, then no problem [sorry, ChrisTenone, you're wrong]. There is, included in the UNO circuitry, very deliberate switching mechanisms to deal with just such things as power on both VIN AND on the USB connector. Which one wins? VIN!
Also, even the UNO Documentation refers to Power Switching: "The power source is selected automatically."
MartynC:
2nd question. When the Arduino is powered by USB only I have about 3.5v on the vin pin as output. Is this correct?
Don't know. VIN is NOT an output. So, there is no real need to know what voltage to expect on VIN, if nothing is connected to it.
UPDATE: I stand corrected [actually, I'm sitting]: I reread the UNO "Documentation" ["Documentation tab on: https://store.arduino.cc/usa/arduino-uno-rev3]. The VIN pin can serve as a source of VIN voltage if a suitablepower source is applied to the board's power jack connector. In that sense, it can be considered an output. But, NOT when nothing is connected to the power jack, and certainly when nothing is connected to VIN.
It should work ok on the generic Nano R3 as well. Power from USB goes through a diode to the output of the regulator. So if Vin is used, the regulator output will be 5V and the diode reverse biased. If only USB is connected, you may measure some voltage at Vin, but that's just current trying to flow backward through the regulator, and it's unlikely it can be used as a source for anything.
ReverseEMF: UPDATE: I stand corrected [actually, I'm sitting]: I reread the UNO "Documentation" ["Documentation tab on: https://store.arduino.cc/usa/arduino-uno-rev3]. The VIN pin can serve as a source of VIN voltage if a suitablepower source is applied to the board's power jack connector. In that sense, it can be considered an output. But, NOT when nothing is connected to the power jack, and certainly when nothing is connected to VIN.
That's correct. It was the second paragraph (the only question in the post actually) that I was answering. The Vin should not work as described in the original post. I use the output of the vin pin where I need a higher voltage when powering from the barrel jack (which I rarely do, except when I need to power the Arduino AND something like a 7 stepper motor for example, from the Vin pin.)