Notifications
Clear all

[Solved] Need advice on USB power

26 Posts
4 Users
9 Likes
353 Views
(@mazda6guy)
Member
Joined: 3 months ago
Posts: 3
Topic starter  

I have been making LED powered lights with my 3D printer.  Until now, I have just been using regular DC power jacks soldered to the LEDs so that a regular power supply can plug in an power the light.  I would like to be able to make lights that are usb powered though.  I purchased some USB-c plugs that had wires attached, but they would not work.  I'm wondering if I use something like this if I can get a different result:

https://www.amazon.com/Teansic-Type-C-Female-Connector-Transfer

I'm pretty new to all of this.  Can this style receive power from a USB cable plugged in to the wall or a hub and power things?  


   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1085
 

USB-C is a different beast than the previous versions of the USB standard. It's an "intelligent" power system that can supply many different voltages.

I'm actually planning an episode on doing exactly what you want to do, suffice to say it's more than connecting a couple of wires.

I would suggest using microUSB instead, if all you need is 5-volts. It is a lot easier to work with, and you can get adapters like the one you linked to for microUSB.

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
Mazda6guy, Inst-Tech, DaveE and 1 people reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@mazda6guy While I agree with Bill in general, those adaptors you linked to (especially the 1st and 3rd) will give you +5VDC on the V & G pins for choice 1, and also on choice 3. It is not clear to me about choice 2 though so I would stay away from that. If you have not seen the USB-C full pinout, I am attaching a diagram.

IMG 8199

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Mazda6guy reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi Ron @zander,

   Sorry, I am not entirely sure which of your choices are 1, 2 & 3, and I always hate relying on web photos for evidence, but so far as I can see, none of the choices have the capability of persuading a 'compliant' USB-C style power to provide with any power. As Bill says, it is an "intelligent" power system, and in the complete absence of any electronic components, it doesn't wake up.

There are ways of providing the necessary persuasion, but they involve more pins than just V and G (and D+/D-). I'll leave Bill to provide the full story to his usual exemplary standard.

Best wishes, Dave


   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@davee mazda6guy @dronebot-workshop Perhaps I misunderstood but the OP is (I am reading a bit between the lines but with Bill's response acting as a filter see below quote) only wanting 5VDC power to light the LEDS.

I would suggest using microUSB instead, if all you need is 5-volts. It is a lot easier to work with, and you can get adapters like the one you linked to for microUSB.

Bill is of course correct a simple microUSB will also do the job, but I was just trying to point out that the 3 versions of USB-C part the OP's link referred to had the same USB-A connections we all know and love, namely (V)+5VDC and G (outside pins) in addition to the D- D+ data pins in the middle two spots. The exception is the middle part with 6 pins. I suspect the V+ V- D+ D- are the same as the 4 pin parts, with SH likely being the shell that may be also connected to V-. The definition and possible use of CC1 can be googled, but since it is not of use for the OP's requirements I didn't elaborate.

Screenshot 2024 03 03 at 15.17.59
Screenshot 2024 03 03 at 15.18.25
Screenshot 2024 03 03 at 15.18.12

 

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi Ron @zander,

  Sorry, but if a standard USB-C to USB-C cable is used to connect one of the modules you show to a compliant USB-C power supply, with no other electronics involved, I do not believe there will be any voltage between the V and G pins.

I think the V and G pins can be configured for a 5V output, by adding further components connecting to some of the other 'new' USB-C pins. But that is a more complex story, which Bill has stated will be one of his forthcoming presentations. 

I have only been intervening to minimise the chance of @mazda6guy being confused, as my understanding corresponds with Bill's reply, but unfortunately does not agree with your advice.

Best wishes and take care, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@davee Sorry, I have dozens of them. No electronics parts in any of them, some have USB-C on both ends, many have USB-A (4 wires) on the other. If as is likely (we are waiting on the OP to confirm) the OP only needs 5VDC then only 2 wires are required, G and 5VDC.

If you had looked at the OP's link or the pictures I grabbed from that link you would see these are USB-C connectors.

The name (not sure if official) for this arrangement is charging or power cable. It is generally used by plugging the USB-A end into a wall wart and the USB-C end is plugged into a device like my Mac or iPhone to charge it. This is exactly how I charge my iPhone 14.

My new MacAir has a power cable comprised of USB-C on one end and a MagSafe3 connector on the other. This cable is designed to just be plugged into a wall wart and the Laptop charge/power adapter.

I think you are thinking about the PD discussion we had a few weeks back, this is not like that at all. This is just a simple 2-wire charge cord, +5VDC and Gnd. The fact it is terminated in a USB-C STYLE plug is confusing you.

If you want, I can wire up one of those adapters myself since I have a few of probably every USB cable ending both male and female.

EDIT

Here are links to the Apple parts I will receive with the new Laptop

Cable

Wall wart

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi Ron,

  My understanding is that USB-C is designed to be used in a USB-C to USB-C cable "environment".

  USB-A, USB micro, USB Mini, etc is a different "environment".

  If the power supply has USB A connector, then it is not a USB-C compliant power supply. USB-A is effectively in the same group as micro USB that Bill mentioned. If you have such a power supply, then surely it is sensible to keep to USB-A, etc plugs and sockets, not suddenly convert to USB-C which has more complex requirements.

----------

I can quite believe you have cables that cross the boundaries between USB-C and the preceding USBs, and that in some cases, they will work. That does not mean it is good practice or even a good idea.

For example, if @mazda6guy uses such an arrangement for his LED project, with the USB-C socket boards you describe, then it may work with the USB-A power supply you are suggesting, but unless he builds in some USB-C support on his LED system, if he needs to swap to a USB-C power supply in the future, he may be surprised to find it doesn't work.

I would certainly not expect to see USB-A supplies as a recommended arrangement for most modern smartphones, MACs etc, as the ones I am aware of, have quite high capacity batteries, and are designed for considerably higher charging power levels than the 12 W (5V 2.4A) of USB-A. Of course, they may work as 'slow' chargers, and that might be fine for your purposes, but that is a personal choice.

Best wishes, Dave

 


   
ReplyQuote
(@mazda6guy)
Member
Joined: 3 months ago
Posts: 3
Topic starter  

Thanks for all the replies everyone.  I was looking at USB-c because most people seem to have one nowadays (but who doesn't have micro usb lying around?) but mainly because I do not like how small and flimsy the micro connectors feel to me.  But I think I will probably go the micro USB route for simplicity.

Thanks again everyone!


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@davee Are you trying to be funny? Others may read this and think you are being serious.

NOTE: I and the OP are only talking about USB2 power and data (marked on the attached screen print) we are specifically NOT talking about ANY Data or PD power pins.

Those USB-A to USB-C ALWAYS work because they only have 4 wires, 5VDC and G plus D+ and D-.

Again, LOOK at the pictures from the link, 2 of the varieties offered are 4 WIRE thus 5VDC and G plus D+ and D-. The 3rd one has an extra shield ground and one extra pin for unknown use. I am sure you can see the markings on the boards.

As far as

For example, if @mazda6guy uses such an arrangement for his LED project, with the USB-C socket boards you describe, then it may work with the USB-A power supply you are suggesting, but unless he builds in some USB-C support on his LED system, if he needs to swap to a USB-C power supply in the future, he may be surprised to find it doesn't work.

Of course it will work, the USB-C standard is backwards compatible and the 5VDC wire/pin and G wire/pin are in the right position on each end. I can't believe you don't have some of these cables.

I have even used several gender changers in order to change a USB-C to a USB-A because all I have is an old USB-A wall wart. 

Here is the best answer I found for how USB-C works at the high level.

Q: Is USB C backwards compatible with old USB ports?

USB C defines a particular connector profile, which is not physically compatible with USB A or USB ports (and in the case of USB B ports the various different versions).

The protocols such as USB1 through to USB4 are designed to be backward compatible so you can have a USB C connector at one end and a USB2 Micro-B connector at the other end of a cable, and this should support USB2 speeds. (USB1 is now almost extinct but still works at its slow speed when connected to other USB equipment.)

There are a couple of things to be aware of:

If you have a USB4 capable device this will only attain USB4 speeds through a USB C connector. USB4 operation is not supported by USB A or B connectors.

A USB A port has two main types. Both support USB2 operation, but there are extra contacts in some ports that are used for the higher speeds of USB3. When a USB2 device is connected to a USB3 capable port, only the contacts required for USB2 are used. There is a recommendation that USB3 capable ports have a blue coloured spacer/insert inside the connector. However, there are manufacturers who do not follow this recommendation, so use the colour only as a guide.

There are also cables that are specifically for charging devices such as phones. These can look identical but only have the power pins connected and cannot be used for data transfer.

As you can see the nitty gritty is to do with DATA. The power (NON PD) pins/wires are the same in all USB and cables. 

Attached is the USB-C pinout. NOTE they used a G where a C for Cable was meant.

Screenshot 2024 03 03 at 22.49.02

 

 

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi Ron @zander,

   Sorry, but I am not trying to be funny. As usual, I am just trying to be helpful and minimise anyone being frustrated by something, because they do not fully understand it. (And given the number and length of the USB requirements documents, I doubt if many people fully memorise and understand all of them. 🙄)

As always, I apologise for any mistakes I make. On this thread, I am not yet aware of any such mistakes, although that may be ignorance on my part.

----------

Of course, some cables will convert to one type of plug to another, and in many cases the arrangement will work. However, there are also examples in which it doesn't. By chance, I accidentally recently acquired such an example. I know about it, and I can work around it, but I use it as an illustration.

---------

I bought a new cheap rechargeable headlight from Amazon. Functionally, it is fine as a headlight, but the charging lead is a short USB Type A to USB-C, with the USB-C end plugging into the battery recharging port. Plugging the USB A plug into USB Type A port on a charger, charges the battery normally.

But if I try using a standard USB-C to USB-C lead, with a USB-C port on the charger, (the one I normally use to charge my phone), no power is transferred, because there is no support for the USB-C "intelligent" power requirements in the headlight battery charger.

Of course, this example is not dangerous, so this is not a safety issue. USB-C requirements have been designed to minimise the chance that power will be sent to a system that is not designed to handle it, so that they fall back to not supplying any power.

This is an example of how USB-C is not the same as the prior USB types, which would have defaulted to 5V output from the charger.

--------

My interpretation is that USB-C has been designed to overcome many of the limitations of the prior USB types, with improvements, including those aimed at increasing power levels, transfer speeds, plug mechanical design and convenience. However, whilst there is a fair degree of backward compatibility, inevitably there are limits to it. The increased power limits meant that the requirements have been designed to minimise the chance that cables and equipment are protected from voltages and currents beyond the limits they are designed to handle.

------

Conclusions:

  • Mixing and matching USB-C with the prior USB standards has limitations that can be ameliorated, but not totally overcome, by buying or making cables with different plug standards at each end.
  • I recommend keeping to "all USB-C", or "all pre-USB-C", in any given chain, as the preferred approach.
  • (My headlight will continue to be used as a "Deprecated and annoying exception" 😉)

Best wishes and take care my friend, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@davee Yes, we know this but this is not what was proposed. What is proposed (OP has decided to not use USB-C however) is USB-A (really USB2) to USB-C (physical connector) The USB-C standard maintains backward compatibility which is why it has pins labelled USB2 use.

But if I try using a standard USB-C to USB-C lead, with a USB-C port on the charger, (the one I normally use to charge my phone), no power is transferred, because there is no support for the USB-C "intelligent" power requirements in the headlight battery charger.

This only occurs if the source is PD wise. If it was dumb, then the USB2 pins would be used and it would work. I might even see if I have such a cable but I have other more important tasks.

I will even wager that there are some wall warts that have a USB-C connector but in fact only provide USB2 power. I have a bunch of these although I tend to only buy high quality so mine may all be PD compliant but I will check as some came with a product. I will do that when I have some free time.

Your conclusions may make sense to you, but I have several cables that came with a product that are wall wart, to USB-A to USB-C. Since the EU made laws re USB-C manufacturers are simplifying there manufacturing process and just making a single USB-C cable for power.

I thought I would show some USB info so I took some interesting pictures.

The first shows two USB-A to USB-C cables, the one on the left is a USB3 end and the other a USB1

IMG 8219

The next two show I am testing a USB1 with a USB-C on the other end using a USB-C tester.

The tester tells us this is about 5V using Apple 2.4A protocol (I did not know it was named after Apple)

IMG 8221
IMG 8220

The next two show I am testing a USB3 with a USB-C and the meter results are the same

IMG 8223
IMG 8222

Now a picture of a 40Gbps cable USB-C to USB-C. I think these are supposed to have some electronics in the ends, but if they do I can't see it. I have seen listings on Amazon where they are very visible.

IMG 8227

Now some funny cables. First a gender and type changer with a USB3 to female USB-C

IMG 8228

Now a dual purpose cable with a USB1 on one end and a microUSB on the other but can be inserted into an adapter so it becomes a USB-C.

IMG 8231
IMG 8230
IMG 8232

If you want more, here is most of my collection of cables, wall warts and misc power things. I have a few more that are either plugged in around the workbench or hanging on hooks because I use them a lot. The point is I have quite a variety, have never encountered a problem because there are standards and almost always am not surprised that something works or doesnt.

IMG 8225
IMG 8226
IMG 8224

Now the icing on the cake. Using my latest USB-C cable tester.

First the 40Gbps USB-C to USB-C cable. I am not sure if you can see it clearly, but all lights are on EXCEPT for the USB2 data in the middle ON ONE SIDE. Turn either cable end over, and the USB2 lights change sides as well. The smart electronics figures out what is what.

IMG 8233

Now for the USB-C to USB1 on one end and Micro-USB to USB-C on the other.

As you can see the only pins being used are G, VBUS (what we call 5VDC) and the D- and D+. The power is replicated on both sides and ends so the plug can be inserted in any orientation. Brilliant!!!

IMG 8235
IMG 8236

I am happy to try other combinations if anyone is still not sure how it all works together, but it is't that hard for most of us.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi Ron @zander,

  The OP has indeed decided to follow Bill's advice, so this discussion is no longer directly applicable in this thread.

------------

I don't know if there are any 'dumb' chargers with USB-C outputs on the market, but I hope any charger that supports power levels above the basic 5V 12-15W level will follow the PD protocol, as failing to do could present a danger in some circumstances.

(The USB/PD requirements documents have not prevented several companies, including Apple, producing their own proprietary "extensions". Hopefully, with the possible exception of the latest R-Pi stretching the 5V current limit, these will not cross our paths.)

Of course, the USB-C plug will connect the V and G wires to the USB micro plug, as you illustrate. This is not the issue.

The "issue" is a charger, with a USB-C (& hence PD) output, is now expected to be "intelligent" and will not supply any power along those wires before it has verified the nature of the load device, via the CC1/CC2 lines.

[I am not precluding the possibility of certain cables with USB-C connector at only one end, including components connected to the CC1/CC2 lines to 'fool' the charger. The components could be very small and easily buried in the moulded plug. I would view these as pragmatic 'fudges', which are probably worth avoiding if at all possible. I would hope they would be marked accordingly, but that might be wishful thinking.

Also do not confuse this with the requirements for cables designed to carry up to 5A, which also involve burying components within the USB-C plug. ]

[Similarly, I would expect a USB power tester to provide the necessary PD configuration support, as otherwise, it wouldn't have any power to report on.]

Thus, to use the USB-C sockets mounted on PCBs that you showed in a previous message, with off-the-shelf chargers with USB-C (PD) outputs, it is necessary to connect the CC1/CC2 lines to appropriate electronic components ... and that will hopefully be the subject of one of Bill's excellent forthcoming presentations.

Can I please suggest we draw this side-discussion to a close?

Best wishes, Ron


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@davee USB-C is a connector standard. VERY few wall warts are PD. I have all kinds of wall warts that work with USB-A to USB-C cables to provide 5VDC at 1A to 2.4A. This was NEVER a PD discussion until you mentioned it.

I feel you ignore the diagrams, pictures, links I post that are proof of what I say.

Did you just ignore me when I showed USB 1 cables (those with white markings) that had USB-C at the other end? I think every device I have bought in the last 5 years has a USB-C on one end and USB-A usually 2.0 on the other. NOBODY was suggesting plugging either the USB-C or USB-A into a PD charger (I doubt they even make one for USB-A)

I just purchased 2 power bars for my workbench that include 3 or 4 USB-A sockets and I daily plug a charge cable into them that terminates in a USB-C male end. I tested several of them with the USB-C tester to confirm they all  produce 5V and are capable of 2.4A. They are also used for SSD and I regularly use a USB-C to USB-A adapter cable because my Mac has only USB-C ports. This is also the power port and of course is using the PD protocol to charge the Mac. The USB-C pinsouts supports both.

All the wanted to know is if those devices he pointed out could power his 5VDC project. The answer is YES. Now can we move on?

EDIT: I forgot to address what may be your main point. Are there dumb (i.e Non PD) wall warts with USB-C outputs? the answer is YES, very common because it is allowed. I also tried intelligent USB-C wall warts and then tested them. I got NO voltage because it's intelligent.

IMG 8250
IMG 8249
IMG 8251
IMG 8252
IMG 8254
IMG 8253
IMG 8255
IMG 8256
IMG 8257

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi Ron @zander,

  I looked at, but didn't comment further on your photos power supplies with Type-A, USB micro and so on, outputs; or cables intended for use with these plugs going to USB-C cables, because I have already said, these will obviously output 5V, as they are constrained to the pre USB-C era.

They are also basically the same as Bill's suggestion, except you have cables that converted to a USB-C plug.

I also previously accepted there may be 'dumb' power supplies with USB-C sockets. I have never had any, and I would try to avoid acquiring any, as I would regard them as an obsolete design, which is unable to efficiently cope with the different equipment I have and/or likely to acquire in the foreseeable future.

----------------------------------

I only mention PD, as I haven't found a better term to describe the power related requirements that are now generally associated with the USB-C connections. Please advise if you know of a better term. Strictly, USB-C only defines the 'mechanical' connector.

-----------------------------------

My personal view, is that if a USB-C socket is used as the power input for a device design, including a homebrew design, then the device should support at least the basic USB-C power conventions, so that if someone uses a standard USB-C to USB-C cable with an 'intelligent' charger USB-C output, that covers the voltage and current the load device requires, then it should work.  This means addressing the pin configuration requirements, which are only present in the USB-C plugs.

--------------------------------------

I have various things with USB type A, USB type B, USB micro and USB mini sockets, that I will generally try to use with leads, etc. with similar 'era' plugs at both ends.

And I have a some things with USB-C, which I will generally connect with USB-C to USB-C cables.

I have one or two exceptions to contend with, where I need cables which convert from one group to the other, such as the unfortunate headlight I already mentioned, but hopefully they will remain gradually fade away.

--------------------------------

USB has changed massively since its first modest appearance. I believe we need to try to keep up with the changes. Sometimes, it is necessary to span the changes with a 'conversion' lead, but I think they are best avoided as much as possible.

Best wishes and take care, Dave

BTW In addition to about 3 old USB Type A wall warts that came with long forgotten phones, and limited to 1 A or less, I personally use just two wall warts .. both are 'intelligent' and have USB-C outputs. One also has a couple of Type A sockets. (The laptops are all 19-ishV bricks on wires.)


   
ReplyQuote
Page 1 / 2