@davee - a question for the experts
Hi Dave
The little usb passthrough device I show below mentions 'ideal diodes' as giving protection from being back fed. Do you think this sort of device will provide adequate protection to any circuit thats linked from the outbound usb connection for programming the circuits microcontroller if said device was to develop a fault (or a yours truly wiring cockup) resulting in trying to feed back, say 17 volts, back up to the jolly old computer? Is the info below sufficient to draw any conclusions?
Power USB-C devices from two USB-C power sources!
Where does power go? Power from each USB-C input (A/B) connector goes via a MOSFET "Ideal Diode" to the USB-C output connector.
What about back powering? The ideal diode prevents power from being fed back into either USB-C port (A/B power supply).
Which power supply is used? It will draw power from the supply with the highest voltage and if the voltages equalize (due to the current draw) it will share the load on the power supplies connected to both USB-C connectors (droop method).
This module is fixed to 5V - the PCB has 5.1k UFP Rd pull-down resistors on the CC pins of the inputs (5V@3A) and 10k UFP Rp pull-up resistors on the outputs CC pins (5V@3A)
Thanks.
Hi @byron,
At a first glance, I can see these boards on sale on Tindie, eBay, Pi-Hut, etc, but no real 'specifications or circuit, so my comments are based on a fair degree of speculation.
----------
As you may not have come across the concept of 'ideal diode', I'll start by trying to describe the concept ... skip or read as you wish.
A common trick to keep 'essential' (DC) equipment powered, whilst there is a system power failure outside of the equipment, is to provide two (positive) power input pins. Then inside the box, each of these two input pins is connected to the anode of a diode, and the two diode cathodes are connected together, and used as the positive internal power source.
Providing the diodes are not faulty, are suitably rated, and are of similar characteristics, then the unit will receive the majority of its power from the source which is at a higher voltage. Thus, if one power input is a power supply supplied from a generator/mains supply and the other from a battery, then if the generator/mains supply derived voltage is slightly higher than the battery voltage, then (almost) all the current will be from the generator/mains supply chain, but if this supply fails, then the battery will automatically be used instead.
(Many discussions on the web, e.g. https://product.torexsemi.com/en/technical-support/techinfo/doc_4296)
In addition, because the two diodes are connected at the cathode, (almost) no current can flow from one supply to the other, since one of the diodes will be reverse biased.
The easiest, and commonly implemented method is to use two power diodes, with the Schottky type often preferred as it has a lower voltage drop, resulting in a lower power drop.
However, 'real' diodes always drop some voltage, with a minimum of around 0.3V. As it now relatively easy to make relatively complex circuits in integrated circuits, 'ideal diode' circuits are becoming more popular, which are usually based on two MOSFETs, connected in a similar manner, accompanied by a control circuit for the gate drives, which are arranged to mimic the action of the diodes. As a MOSFET drain to source connection behaves like a low resistance resistor, when the gate is biased for conduction, the voltage drop can be much smaller than that of a diode, and hence behaves more like an 'ideal diode', with (almost) no voltage drop when the applied voltage in the 'forward' direction.
------------
In the simple 'real' diode case, it is fairly easy to determine the reasonable voltage limit capability of the circuit, assuming the diode types are specified. In particular, 'reverse voltage' limit. e.g, the data sheet for a very well-known small silicon diode, 1N914 includes:
(Extracted from https://www.vishay.com/docs/85622/1n914.pdf)
Thus, the absolute max reverse voltage it is specified to withstand is 100V, but it should not normally be subjected to more than 75V. In practice, a careful designer would only use it in a circuit with substantially lower voltages than 75V, because it is less likely to fail if it is not subjected to voltages near its limits.
The 'ideal diode' will probably have a considerable number of circuit elements, albeit most or all may be packaged as an integrated circuit. Thus, the whole circuit must be analysed to determine its characteristics. As I don't know the specific circuit of the board you are showing, this is obviously not possible.
-----------
However, as I mentioned above, this type of circuit is often used to enable two alternate supplies to be 'combined'. In this circumstance, it is likely that the incoming voltages will be fairly similar, and chosen to match the load. Thus, the reverse voltage limit may only be a small amount above the incoming voltages.
In this case, according to the description, the alternate inputs are USB-C, and have been 'fixed' to command USB-C style power supplies to only provide 5V. Thus, it is possible that the reverse voltage protection capability is less than 6V, because it does not expect to experience more than about 5.1V. Obviously, this will not be helpful in protecting against 17V.
-----------
Personally, if you are connecting an expensive piece of equipment, like an Apple Mac, I would suggest you look for isolation which does not rely on diodes, or other 'normal' conductive components, as unexpected faults, errors, etc. can be so destructive. Instead, look to insert a 'barrier'.
For the power line, this is typically a transformer with primary and secondary isolated from each other, as part of a power supply. Some switched mode power supplies naturally provide such isolation, but others, including the ubiquitous buck regulators, do not.
For the data lines, then typical choices are a transformer with isolated primary and secondary (wired Ethernet usually takes this approach), opto-couplers or specialised capacitive couplers. Analog Devices have several ranges of specialised devices, such as:
https://www.analog.com/en/products/adum3166.html
All of these will usually be designed to provide more than 1000Vdc isolation, which should protect against most events.
In the case of USB, as previously discussed, there are many 'packaged' solutions, based on such approaches, available at low cost. Of course, it is possible that some are based on a poor/compromised design, or even fake devices, but hopefully the majority are reasonably competent. Sorry, I am not in a position to comment beyond what I can guess from the web adverts.
----------
I hope this gives some useful information.
Best wishes, Dave
Very good information as I had not been aware of the term 'ideal diodes' so thanks for education.
I have an ali express order on its way for a usb protector but its a usb 2 type of connector. I was looking to see if I could find a usb C protection device and whilst I could use some usb connector type of converters from A to C I was wondering if this would actually be good enough for the connections found in a usb C device. Thus I came across the device I mentioned but I doubted if it would be up to the job as it did not specifically mention about being a protection device, but its good to have the opinion of one who knows about this and my search for usb c isolation devices now continues.
I've found another ali express device which appears to do the job, an ADUM4160 USB Isolator with usb c connectors for about £10, but a search can also find non ali ex devices in the £200 region. I guess I could get the ADUM4160 device and try to connect it to a test bed and back feed some higher volts but with a multimeter rather than a computer connected at the feed port to see what happens. I have some usb c breakout boards so I'm thinking I may give it a go and see I can provoke a puff of smoke. 😎
Hi Byron,
Although USB-C, combined with the PD (power delivery) extensions, provides a potential upgrade to the power and data capability, compared to the earlier USB, I don't think/(hope?) that will be a limitation for the sort of use you are considering, namely providing 5V and moderate speed data exchange for program uploading, debug, etc. to an "Arduino-like style" processor board,
At a minimum, I think all you will need is a simple conversion cable or connector, probably USB-C to Type A, which connects the 'basic' two data lines, plus 5V and ground., to complement (BUT NOT replace) a USB protector.
-------------------------------------
Of course, it is always hard to spot the things you don't know, so there may be more rabbit holes than I have foreseen, but the only tricky area I can spot is when the configuration requires 5V to be supplied from a device that strictly enforces the USB-C/PD rules of not providing 5V default power at a reasonable current of say up to 1 Amp, and hence the 'Arduino' board may not be powered, when you might expect it to be.
For example, the Amazon 'wall-wart' I am presently using has 4 sockets, two USB 3 style, and two USB-C style. The USB 3 style sockets provide 5V ... with 3.1A max marking, probably total for these two sockets, all the time, whilst the USB-C sockets are rated at 20W max (again total for two sockets I guess), but do not supply any power if the load doesn't follow the 'optional' PD rules. (I haven't needed to push the unit's performance to the limits, or experiment with it yet, so I am a little hazy about its specific power limits.)
--
And I haven't a clue how an Apple Mac will behave in the respect of being a power source. Hopefully it will offer at least a low current 5V supply without needing USB-C/PD load support to enable the power output, because the USB protector's 'input side' electronics will need some power, even if the protector's USB power output is provided by an external source. However, if the MAC does need some 'persuading' to release some 5V power, I think a couple of resistors may be all that is needed, albeit they will need to be connected to the USB-C plug's pins. I think Bill briefly mentioned how, in his recent USB power/PD video/blog, and there are many discussions on the web, like:
https://forum.digikey.com/t/simple-way-to-use-usb-type-c-to-get-5v-at-up-to-3a-15w/7016
I suspect ready-made cables are also available, but so far, I haven't needed one & hence, I have been too lazy to track one down.
---------------
I think if you use a USB protector similar to the one I referenced, then it is possible to provide a 'private' 5V supply to the terminal socket of the protector, which will be passed to the output USB sockets, whilst being isolated from the USB input which would be connected to the PC/Mac. (NB This does not affect the need for power on the protector's input side, discussed above, because input and output sides are isolated from each other.)
I noticed other cheaper units on AliExpress, from about £3-£4, which might also meet your particular needs, but may need some 'cheeky' soldering, to connect an external 5V power supply to drive the USB output(s). Alternatively, a cheap (i.e. disposable if the worst happens) 1 to 4 way, USB expander, with external power input, interposed between the output of the protector and the input of the "Arduino", might be equivalent, and probably cost about the same in total.
To be clear, I haven't actually connected my protector in this way, and if/when I do, I will proceed cautiously, checking continuity and isolation, certainly at least as far as can be achieved using a simple multimeter, together with some tracing of the protector's PCB tracks. As a minimum, I would advise you to do similarly with any device you procure, to ensure it provides the functionality you expect.
-----------
You may wish/choose to try 'forcing' some volts 'backwards' through a potential protector solution, as you suggest, but be aware, you may destroy the protective device in the process. Hopefully, the test would show that if PC/MAC had been connected to the input, then it would have remained unharmed, but the protective device's power and/or data outputs to the "Arduino" may be sacrificed. If the project was for my own amusement, I probably wouldn't intentionally go that far, but clearly there are other circumstances in which such testing would be essential. You can choose your own path.
----------------
I haven't looked for any protective devices in the £200 range, so I don't know what they claim, although they may be easier to sue, if their product fails to meet its claims. As I mentioned previously, I think the £3-£10 'AliExpress style' ones are also on sale in UK, albeit at substantially marked up prices, in the same manner as many other items. Whether they are identical products, is tricky to determine.
---------------
Another of my long waffles ... I hope that at least some of it is useful.
Please remember, I am only discussing cheap protectors for the limited purpose of trying to reduce the chance of you needing to prematurely replace a fried PC/Mac. If you were connecting to high voltages, which could endanger the lives of you and others, I would be a lot more cautious in my choice of suppliers, methodology, etc,
Best wishes, Dave
Thanks Dave for the good advice, I will keep the magic smoke for another day and just proceed with a moderate multimeter testing 😎.
Now the new mac mini has come out, and replacement computer for me is overdue, I will be getting one shortly, and of course there are only usb-C ports on the new macs. I think I will get a powered usb hub thats designed to work with the newer macs with C ports but has a mixture of usb C and usb A ports as powered outlets. I will then link the usb protector device from one of those usb A ports and from there to the electronic circuit. A plan has been formulated, and thanks again for helping me arrive at a reasonable solution
Hi Byron,
Sounds like a reasonable option.
Keep a watch on how much 5V current your robot's "Arduino-style" board needs, (when it is not powered by the robot, and will be relying on power entering on the USB socket from the PC/MAC), and the current output from the USB protector, to make sure the peak demand will not exceed supply.
I haven't looked at your board, but I think I have seen reports that ESP32 may run to 600mA with WiFi active, whilst the 5V isolator often built into the USB protectors is only rated at 1W, which is 200mA at 5V. Hence, my suggestion that you may need to 'help' the protector with an external supply, rated at say 1A or more.
In the worst case scenario, this power supply might be damaged by a voltage spike from the robot ... but it will be a lot cheaper than a Mac to replace.
BTW PC USB outputs (USB 2/3) usually provide at least 500mA, and will probably cope with spike demands above that, so they are often fine with ESP32 directly connected. I guess MACs will be similar, I don't know.
Best wishes, Dave