Port sub-menu greyed out when using Vin with "powerless" USB

Hi,
My Arduino Uno works fine when a standard USB cable is used. However, for my OBD project, I want it powered from the car’s OBD connector for convenience. However, to debug the code, I want the Serial Monitor available. I have a USB cable modified such that I can switch off the USB 5 volts (I use this with another project, but the power is then supplied by the barrel connector, and that too is fine). However, when I use 10 volts on Vin, and the “powerless” USB cable, the IDE does not show the port. It’s as though the USB chip is not responding. The schematics don’t seem to show it using anything other than standard 5 volts. Any ideas ?

Going to refer you to a post you passed on your way here.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Bob.

ballscrewbob:
Going to refer you to a post you passed on your way here.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Bob.

Bob,
Just a few questions :-

  1. How do you KNOW that I passed the trouble-shooting thread ? (I DID in fact go through it, and couldn't find anything which addressed my particular problem)
  2. If you KNEW that this guide DID address my problem, why didn't you just say so, and make the time I spent more productive ?
  3. If I CAN'T find the solution in the guide (as was the case), what do you suggest I do ? Create a post maybe ?
  4. What other "indiscretions" did I commit that warranted your assertion that I don't know how to use the forum ? ( I posted what I thought was a very succint and accurate description of my problem and fail to see how I could have made it any clearer)

I look forward to your explanations !

Which board? OOPs, missed that
Original or clone?
Which OS?
Which IDE version?

I’m not familiar with ODBC; how do you connect it? Shield? Breakout Board? Which one?

We know its a UNO with a modified cable.
That is all.

No schematics
No sketch etc etc etc..

All as mentioned in the links.

Bob.

ballscrewbob:
We know its a UNO with a modified cable.
That is all.

No schematics
No sketch etc etc etc..

All as mentioned in the links.

Bob.

Bob,
I don't understand your logic here - the setup is identical between the 2 situations:-

  1. UNO R3 with (USB 5 volts connected) and no Vin = Port displayed in IDE 1.6.9
  2. SAME Uno (USB 5 volts disconnected) and Vin of 10 volts = No port displayed in IDE

The O/S is Win10
Arduino is genuine R3
What schematics would you like for this setup ??
What sketch do you need when you can't download it ?

Please define the etc,etc,etc (if it is relevant to the problem)

Posting tips.

  • Always list the version of the IDE you are using and the board version if applicable.
  • How to insert an image into your post. ( Thanks Robin2 )
  • Add your sketch where applicable but please use CODE TAGS ( </> )
  • Add a SCHEMATIC were needed even if it is hand drawn [/li]
    - Add working links to any specific hardware as needed (NOT links to similar items)
    - Remember that the people trying to help cannot see your problem so give as much information as you can
    [/list]
    Bob.

DougButtimer:
I have a USB cable modified such that I can switch off the USB 5 volts

Is the switch only cutting the 5 V line of the USB cable, and the ground, data+, and data- are always left connected?

DougButtimer:
I use this with another project, but the power is then supplied by the barrel connector, and that too is fine

Just to be sure, by "is fine" do you mean that the Uno's port appears in the Tools > Port menu?

The only difference between powering the Uno via the barrel jack and powering it via the Vin pin is the barrel jack has a diode to protect against reversed polarity. This would make me suspect the problem is related to the power supply, rather than anything about the board or USB cable.

Does the power LED on the Uno turn on when you connect the 10 V to Vin?

What is the voltage of the power supply you are connecting to the barrel jack?

Can you try connecting the same power supply you had connected to the barrel jack to the Vin pin instead to check whether the problem is isolated to that 10 V supply.

Hi Pert,
Many thanks for your reply ! (I hope that the following answers slot in with your questions - if not apologies !)

pert:
Is the switch only cutting the 5 V line of the USB cable, and the ground, data+, and data- are always left connected?
Ans: Yes, I have just checked continuity that the ground and differential data lines are still connected. (I can use this cable successfully on my Mega which is barrel-fed voltage-wise)

Just to be sure, by "is fine" do you mean that the Uno's port appears in the Tools > Port menu?
Ans: Yes, the port is displayed and I can retrieve board info as well (and it runs with my Mega)

The only difference between powering the Uno via the barrel jack and powering it via the Vin pin is the barrel jack has a diode to protect against reversed polarity. This would make me suspect the problem is related to the power supply, rather than anything about the board or USB cable.
Ans: Since the original posting, I have now checked the barrel jack - it ALSO gives rise to the same symptoms when USB 5 volts is switched off (i.e. no port displayed in Tools > Port menu - as you point out, the only difference is the series protection diode, so that result is not surprising !)

Does the power LED on the Uno turn on when you connect the 10 V to Vin?
Ans: Yes, and a pre-loaded sketch runs correctly - but no SM messages obviously ! (Barrel-fed also runs - again without SM messages)

What is the voltage of the power supply you are connecting to the barrel jack?
Ans: I have to admit that when I originally posted the problem, I was using my homemade ODB ISO4191 shield which regulates the car battery voltage(nominally 12 volts but can reach 14V) down to 10 volts to safeguard the Uno) I have now removed the ISO4191 shield and used a wall-wart set to 12 volts to simplify the setup (Vin and barrel-fed). The symptoms remain the same - no port displayed when USB cable 5 volts switched off

Can you try connecting the same power supply you had connected to the barrel jack to the Vin pin instead to check whether the problem is isolated to that 10 V supply.
Ans: As mentioned above, connection of the wall wart power supply (at 12 volts) to the barrel jack produces exactly the same symptoms

I must also admit that I gave an incorrect answer in an earlier post - it is an original genuine Uno - not Rev 3 (got confused with my Mega !!)
I am currently looking for a schematic and board layout for this Arduino so that I can chase this problem, but do you know whether the power selection circuitry protects from simultaneous USB and Vin/Barrel supplies ? Obviously, if it does, then I don't need to disconnect USB 5 volts on the cable, and the "problem" is bypassed !

Thanks for your help - restores my confidence in the forum !

I believe I now understand what is going on here !

Having downloaded the schematic for the original Uno and for the Mega Rev 3, I now see that the USB 5 volt line is fed directly to the ATMEGA8U2MU chip (pin 31). This is the USB receiver/transmitter chip on both boards. This pin feeds an on-chip regulator which provides the supply to the USB RX/TX data pads and therefore determines whether the shield responds to messages.

The Uno comparator (U5A) compares the output from the 3.3v regulator with half of Vin. If Vin (or barrel jack) is active, then the comparator output is ‘high’ and, being fed to the gate of the MOSFET (T1), causes T1 to become non-conductive (i.e. USB 5 volts does not power the main 5 volts and input to the 3.3v regulato). The converse is that if neither Vin nor the barrel jack input are active, then USB 5 volts feeds the main 5 volts/3.3 volt regulator.

So far, you would expect the Uno and Mega to react similarly if the USB 5 volts is removed.

HOWEVER, the MOSFET on the Uno is part number (p/n) FDN304V whereas it is p/n FDN340P on the Mega. I believe (although I cannot find a datasheet for the latter) the difference is that the FDN340P has an inherent “body diode” which allows reverse conduction when in the “non-conducting” state. This has the effect that the main 5 volts can percolate back through the device to appear on the USB 5 volts and therefore activates the USB function on the ATMEGA8U2. I suspect that the other MOSFET doesn’t have the body diode and therefore, in the “disconnected USB 5 volts” state, leaves the USB function unpowered. I have proved this by measuring the voltage on USBVCC to the USB chip (when USB 5 volts is switched off) - it was 4.95 volts on the Mega and 0.35 volts on the Uno.

Ironically, the MOSFET is performing the same function as the switch on my cable but allows SM to work as well !! Oh well, at least I understand what’s going on !