Self made USB cable with Teensy41

roncos

Member
I am struggling with a modified USB cable on my Teensy41 project.

I need the USB cable to pass through a sealed bulkhead. I've potted two wires in a threaded connector and then cut a USB cable and soldered the D+ and D- (green and white) cores to each end of the potted wires. The assembly has a USB-A at one end and a USB-micro at the other end. The Teensy is powered from a battery so I only connected the D+ and D- wires.

Testing with a multimeter shows that the wires are connected properly and not shorted to each other of the body of the threaded connector. Can test continuity from the pads on the underside of the Teensy board to the middle 2 pins in the USB-A plug.

But no serial data is showing up in the serial monitor and the Arduino IDE can't see the board, doesn't list a port.

Any suggestions for what to do to get it working? Do I need to connect the ground as well? Is there any requirements with respect to resistance or impedance that I need to satisfy to get it working?
 
And you may have impedance problems with the home-brewed section.

What potting material was used?
 
Confirm ground is critically important for USB. It will not work with only D+ and D-.

If it still doesn't work with ground connected, you might try editing usb.c for force only 12 Mbit/sec speed. Look for this line in usb.c. Arduino IDE installs this file in a hidden folder. Once you find it, recommend first adding a syntax error and click Verify in Arduino IDE to make sure you're editing the file it's actually using. Then uncomment that line and upload with a direct USB cable. When Teensy runs your freshly written code, it will use slow 12 Mbit speed. Testing with Teensy programmed this way can help to test whether the connection problem is signal quality (assuming 12 works where 480 can't) or some other problem like a connection error where nothing works.
 
To give just a bit more technical detail, USB is not a truly differential signaling system, like you might expect based on experience Ethernet or PCIe. With fully differential signals, you can AC couple the signals with capacitors (common with PCIe) or magnetic coupling through a transformer (always used with Ethernet).

During communication, USB uses 3 states, called J, K, SE0. The J and K states are differential signals, as you'd expect with D+ and D- signals. But SE0 is not. Both D+ and D- are low during this state.

USB also deviaties from fully differential signals during device detection. The host side usually has 10K pulldown resistors to keep both lines low before any device is connected. USB devices connect a 1.5K resistor to either D+ and D- to indicate to the host that a device is connected. USB 1.1 used only these resistors to indicate whether to use 12 or 1.5 Mbps speed. When USB 2.0 added 480 Mbps speed, another mechanism was added to detect 12 vs 480 Mbps speed. USB 3.0 and later added new pins for higher speeds, so D+ & D- are still used exactly the same way for 1.5, 12, 480 speed in newer USB standards.

The SE0 state and device detection mechansism are the reason why you must have ground connected for USB.
 
It works now with ground added back in. I assumed it would work like RS485 with just 2 wires. Unfortunately I don't have enough pins in my connectors now, but the work around is to connect the grounds to the enclosure lid rather than through the connector pins.
 
Back
Top