Shop OBEX P1 Docs P2 Docs Learn Events
C3 power and USB usage — Parallax Forums

C3 power and USB usage

schillschill Posts: 741
edited 2011-09-23 02:05 in Propeller 1
The C3 documentation specifies that you can't connect to USB (to computer) and external power at the same time.

"The Propeller C3 Is designed to accept power from the USB port or from an external power supply. Do not
simultaneously supply power from more than one source. Before supplying external power be sure to
remove the USB cable, otherwise damage to the C3 and your computer may occur."

http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/UnleashingPropellerC3v1.0.pdf (pp. 4, 18)

So, if we want to use external power and still communicate with a computer, we will need to connect a separate USB/logic-level adapter to the C3.

This would be something like a Prop Plug connected to the TX, RX, and GND of the System/Power Header if we want to use the same Prop pins (30, 31). Is it ok to do this? I.e., to have two FTDI chips both connecting to the same pins of the Prop (but only one connected to a PC)?

Otherwise, we will have to use up two more pins for USB i/o to avoid conflicts.


(I am anxiously awaiting the arrival of my first C3.)

Comments

  • David CarrierDavid Carrier Posts: 294
    edited 2011-01-12 10:22
    schill,
    If the FTDI chip is not powered, it will load the Propeller I/O pins that it is connected to, making communication with an external prop plug difficult, if not impossible. If you need to communicate with, but not reprogram, the Propeller, you can connect the Prop Plug to another set of I/O pins. Otherwise, your best option may be to cut the Vcc (+5 V) line in a USB cable, so that it does not draw power from the computer. This way, it would isolate the C3's power from the computer's power so you could, for example, power servos and the C3 using an external power supply.

    — David Carrier
    Parallax inc.
  • schillschill Posts: 741
    edited 2011-01-12 11:09
    Thanks for the replay, David.

    Can I put in a request for an update for the C3 v2 ? :)

    It seems reasonable to add a jumper between the 5v leaving the USB/FTDI section of the board and where it joins the 5V from the regulator (for external power) and before it reaches the power switch. This way, we can isolate the two power sources by removing the jumper. The board can be powered externally but still hooked up to a PC. Otherwise, the USB port really becomes just a programming port if the device needs to be powered externally.

    The FTDI chip could be fed 5v from after the switch if it needs to be powered up at all times. Otherwise, it could be fed from the USB connection (before the jumper). If pins 30 and 31 can't be used for anything else anyway, maybe it should always be fed from the USB connection.
  • Al BoothAl Booth Posts: 137
    edited 2011-01-12 12:35
    Could this have been avoided by simply adding 2 low forward voltage drop Schottky diodes to the Power Summer circuit on Page 18 of the document mentioned above?

    I don't really see having non-standard USB cables as a reasonable solution.

    Al
  • AndreLAndreL Posts: 1,004
    edited 2011-01-12 12:46
    @Shill,

    On the C3 you can actually connect both the external and USB power, but its possible under some conditions to cause damage to the USB or computer in a 1 in a million scenario. However, we used this same design on the chameleons, its on the arduinos, and not a single unit in 1000+ units in the wild of ours with the same design has had a problem.

    I hot plug the USB and external power all day long for months on end. Nonetheless, Parallax has had other products with similar designs (not the same design) that caused damage in the lab and they were worried about this issue. But, we tested this design on 20+ machines here and 20+ hubs and usb ports, laptops, etc. and never could get any problems or errant currents to flow with all kinds of tests I ran on the C3 with hot plugging both supplies, heavy loads, powered hubs, laptops, etc.different PC power supplies, etc.

    That said, the next version of the C3 will have a little protection diode, so the or'ing of the power supplies won't ever under any circumstances cause a problem.

    So the official Parallax advice is don't connect both, but the unofficial advice is we haven't had any problems at all in over 1.5 years of the same power supply design on the Chameleons which are very similar to the C3s and of course the Arduinos all used this same design initially since its simple and cheap. The USB power supplies on the PC or hub are pretty robust and protected themselves, so for a problem to occur a very specific set of conditions has to occur and we couldn't make them happen in months of testing, never a fault. So, take it for what its worth.

    Andre'


    Either way
  • schillschill Posts: 741
    edited 2011-01-12 13:35
    Andre:

    Thanks for the info. I know the Arduinos do something similar - it caused a bit of a flap a little while ago. There were also reports of computers that would not boot if the device was powered up and plugged in.

    I'm not terribly concerned, and your response helps. But, I really don't want to accidentally plug it into one of my USB 3 ports and kill that controller :) . I've got a million or so USB 2 ports, but only two USB 3.

    What protection diode are you thinking of using? Would a little bit of trace cutting and soldering on the C3 be an acceptable hack to add this protection?

    In case you can't tell, I don't have my C3 yet (it's been ordered) so I'm just reading the documentation and thinking about possibilities here.
  • AndreLAndreL Posts: 1,004
    edited 2011-01-12 14:12
    First, NEVER plug any kind of embedded development system from anyone into a nice new USB 3 port on your new PC until you are comfortable with it. These things aren't consumer devices and personally, I just always use a hub for ANY EE work since I am shorting things out, pulling too much power, and hacking the hell out of things etc. -- that should be a no brainer.

    Never plug anything into your PC that you are actively messing with electrically as a development system, you could short it, overload it, etc. and the PC would feel it. So, a $5 powered hub done, problems all go away. That's just my opinion, my computer is too expensive :)

    That said, I still plug my C3 into my PC all the time with both supplies, in fact, its plugged in right now -- :) Probably have plugged in in and out and both supplies, hot swapping 100 times in the last couple days during development and testing of other stuff. So, I am 100% confident this works, and the other 1000+ customers that have my other boards haven't had a problem either.

    Of course, all the USB ports that I tested on modern computers, laptops, hubs have protection diodes in the power supply regulation and can't be back fed anyway or damaged, so this is redundant, but if you want to add another diode then you can on the back of the PCB easily.

    Take a look at the attached pic. This is a vishay MSS1P2U-M3/89A, just cut the trace and then scrap some resist off and solder it it, cathode down as shown. But, like I said, this isn't needed, and is redundant. But, can't hurt.

    It will be some time before we do a rev B, we want to add or change anything else any other customers comment about in enough volume to make it worth it.

    Andre'
    800 x 590 - 121K
  • AndreLAndreL Posts: 1,004
    edited 2011-01-12 14:19
    @Al booth,

    The problem is in the 40 total USB devices I tested including PCs, hubs, and laptops, the 5V varied from 4.7 to 5.2 loaded and unloaded. Thus, many USB power outputs are already VERY low on that 5V and with a diode drop of 250-350mV at high current, we push into the 4.5V territory for the 5V supply on the device. So, my decision was that I really want that 5V to be FIVE VOLTS when the system is under USB power, and not 4.5V in many cases. For example, assume a user is powering something from the C3 and assumes that 5V is FIVE VOLT. Alas, used some very robust regulators on the C3 and tested the hell out of it without the additionally diode on the USB 5V mains, this worked, tested, passed all my test computers, laptops, and hubs. So, that's the design decision, I really wanted that 5V as high as possible and didn't want to take even a 200-300mV hit with a diode. All said, it all works perfectly, so its not an issue and Parallax's official warning is just a warning and disclaimer. My Chameleons that use the same design are recommended to swap the power supplies hot, and use both at the same time.

    But, as I mentioned, if you are going to draw 100's of mA by any USB powered device that you are hacking on as an electronics hacker with an open PCB, then I would always use a nice powered hub for $5 and start there, that way no matter what you aren't going to damage your PC under any conditions at all.

    Andre'
  • schillschill Posts: 741
    edited 2011-01-12 14:20
    Thanks, again, Andre.

    It definitely won't be plugged into the USB3 ports (at least not intentionally but it's always a possibility by accident, I guess) or the combined esata/USB ports for that matter. They are all hidden away in the back and when I'm too lazy to use a hub I'm using the front ports.

    I also usually use a hub for these things, but not always.

    For a v2, I don't think I have a problem if there is just a jumper to disconnect the USB 5V from the external 5V. Let the FTDI chip be powered from the computer and the rest of the device from the external power.
  • Al BoothAl Booth Posts: 137
    edited 2011-01-12 15:18
    @AndreL,

    Thank you for explaining your design decision. I did not realize that the 5 volts on the USB was so sloppy.

    Looking at the power circuits on page 18 of the document, where are you adding the Vishay MSS1P2U-M3/89A diode mentioned above?

    Thank you and keep up the great design work.
    Al
  • AndreLAndreL Posts: 1,004
    edited 2011-01-12 17:47
    The diode is added upstream above everything right as the +5V comes from the USB.

    Bottom line is that "specs" mean nothing, as engineers you really have to go OUT IN THE WORLD and test. I never assume anything works as its supposed to. USB is VERY sloppy, everything is. My god, have you ever written SD card drivers or designed the electronics for them? They are horrible...

    Those are TERRIBLE specs that NO ONE follows. What about RS32? People still have trouble with this :)

    Same with NTSC. This is why when I build a product I ACTUALLY go out and buy 10-20 TVs, or 10-20 SD cards, or 10-20 HUBS -- and test test test. Then my EE design, my intuition, and my physical tests all agree -- I am happy.

    So, never assume anything as an engineer, get out the scope, the probe, and test. And when you develop a product, hardware or software, just because it works on your PC means nothing -- try it on at least 100 systems, that means "beta testing" with a test group.

    Engineers are VERY lazy, they assume things "should" work and I think this comes from their lack of mechanical skills, fixing cars, building houses, and software guys are even worst!!! :)

    I can't tell your how many 1000's of times, people have sent me games, demos, whatever, and they don't work -- then I ask "did you try them on another machine? Did you try them on a vanilla machine? Did you try them on all flavors of windows? etc." and the answers are ALWAYS a resounding NO -- in fact, most people run software on a dev machine with all kinds of extra DLLs and never realize these are part of the runtime for the dev tool and NOT part of the installation --

    Anyway, I could go on and on with this soapbox.

    But, bottom line, as a designer, you are fighting time, cost, functionality, and you can always make things better, but at some point when something works -- it works.

    And the C3 works PERFECTLY :)

    Andre'


    Andre'
  • AribaAriba Posts: 2,682
    edited 2011-01-12 18:23
    How about using the Power ON switch to choose between USB or DC-in ?
    In this case you have no Diode and the two 5V sources are never connected together.
    Here is what I mean:
    attachment.php?attachmentid=77171&d=1294885397
    OK, if you have USB and DC-In connected, you can not really swith off, but I think this is not a big problem (just disconnct one of theme).

    Andy
    500 x 238 - 2K
  • Al BoothAl Booth Posts: 137
    edited 2011-01-12 21:05
    @AndreL

    I have worked on hardware and software issues on custom automated test equipment for (too) many years. I totally agree with you on specs vs. reality. Oscilloscopes have save me more times than I can remember.

    Sorry if I triggered you to get out your soapbox. I never meant to offend you, if I did.

    I think the C3 is a great product and I will probably buy several in the near future.

    Also, I really like your suggestion to use a powered USB hub. I have been risking my PC for too long without one.

    Al
  • FriedVFriedV Posts: 77
    edited 2011-09-23 02:05
    Hi,
    thanks Andr
Sign In or Register to comment.