Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I need help with interfacing to D1 mini with USB-C breakout and charging board

Status
Not open for further replies.

BraveWart

Member
I have a project where the USB port on the MCU wont be accessible from the outside.
The idea is to extend the port with a USB-C breakout module. But I don't manage to make a working connection.

This is my setup:
PXL_20220722_172112100.jpg


The USBC breakout is connected to a TP4056 LiPo charger via V, GND pins. The V+ and V- pins are connected to V+ and V- pins on a microUSB breakout on the D1 mini. The TP4056 is in turn hooked up to the D1 mini and the Lipo battery.
What seems to work: When plugging a USB charger to the USBC breakout, the TP4056 charges the battery properly and provides power to the D1mini. I also measure 5V voltage on V/GND on the USB-breakout.
When I disconnect the USB charger, the battery provides power to the D1mini.
BUT: When I instead connect my Macbook Air to the USBC breakout via a USBC2USBC cable, nothing happens at all. There is no voltage on the V/GND pins on the USBC breakout, the TP4056 is not charging - but the D1mini is still running when battery power is applied.

Where am I going wrong here? IS there something fundamental I don't understand about USB? Is it a Mac thing? A faulty component maybe?

Note: I have all the appropriate drivers installed and working on the mac. I can hook up the D1min directly to the mac via a USBC2microUSB cable to upload sketches.

Note2: I have tried witching the D+ and D- connections between the USB breakouts
 
Bad cable ?

MAC powering down port to save power....or BIOS disabled.....

I googled "macbook air usb port problems", quite a few hits.


Regards, Dana.
 
I have now connected a USBC Hub to the mac and a USBA2UBSC (USB-2) cable from there to the USBC breakout. This does provide power! What ist strange though, is that the USBC2USBC cable from before works like a charm when connecting my phone to the mac.
So, there is power now, but still no connection to the D1mini. I have again tried both D+toD+ and D+toD- wiring.
One thought: could it be that the USB connection fails because the D1mini actually gets 3.7V power from the TP4056 and the 5V power from the USB cable is not directly connected to it? Maybe the CH340G on the D1mini needs the 5V USB power? It does sound unlikely though.
 
Battery charge / protection modules often switch the negative side for isolation or protection; there may not be a functional ground for the USB data, with it going via the battery charger module.

Try removing the charge module so you have a direct ground and direct battery power, to see if that works? If it does, you may have to re-think the battery charge system.
 
I have just gone even more basic than that to check out the USB breakouts. I made a simple microUSB(m) to USBC(f) cable with both breakouts as the ends. VtoV, GNDtoGND, V+toV+ and V-toV-. And switched testing to my trusty PC.
I know that directly connecting the D1mini to the PC via a microUSB cable works. When I use my new breakout-cable, first nothing worked [note: might have to do this variation again, as it must be the right V/GND configuration]. Then I switched V and GND around and I now have a device detected on the PC. But it says the device registration failed. Then I switched D+ and D1 around with the same result. I am now starting to think I have a bad batch of USBC breakouts.
Would you know the best way to test these?
 
There are multiple V+, gnd, D+ and D– contacts on a USB-C connector. Depending on which way around the connectors are mated, you may not have all the connections made.
 
I'd guess that your USB C sockets are not suitable.

Looking at this one, it states it has resistors to certain signals for direction and to configure whatever its connected to for 5V power output. The ones such as you appear to have, from the photos I can find, do not have that facility?


 
Thank you for your replies. My patch cable did work after all, so the connectors do work:
PXL_20220724_120225446.jpg


But when aplying this to the original setup, I still only get power, but no connection.
As for rjenkinsgb comment about not having common ground: I have tried patching the ground connection in two spots, but that didnt do anything either.
PXL_20220724_120232547.jpg


I'ill now order new connectors as rjenkinsgb suggested.
It's still very odd though. I would have thought with the GND patch, I would have almost the identical connection as with the patch cable I made? I didnt try to patch GND AND V, as I am missing an additional hand... Could that do the trick?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top