Serial cable voltage should actually be 3.0V, with mod!
I recently (early January) got my ANSI keyboard PBP, including the serial console cable I ordered. Based on other threads I knew the cable had an incorrect 5V signal level, but I wanted to investigate the situation a bit more myself.

So I looked at the schematics and RK3399 SoC datasheet, and realized that the UART signal voltage isn't 5V, but it isn't 3.3V either, as other threads have said... It's actually supposed to be 3.0V!

If you trace the signal from the headphone jack through the schematic, it leads you to the lower right corner of page 10:

[Image: uart-page10-lower-right.png]

This helpfully shows this group of pins on the SoC can be configured as 1.8V or 3.0V, but based on the connection of pin APIO4_VDD to 3.0V (see green circle) and a quick look at the datasheet, I concluded that in the PBP the correct voltage is 3.0V. These UART signals do go through U7002 to switch the jack between headphone and serial modes, but that does nothing to convert voltages.

I double-checked the voltage with a voltmeter on the PBP's TX line, which also indicated 3.0V.

My next question was whether the SoC could tolerate 3.3V on these pins, but I checked the datasheet and it indicates a maximum of 3.15V:

[Image: rk3399-gpio.png]

So not only is 5V too high, but so is 3.3V!

Unfortunately, 3.0V isn't a standard voltage for USB serial cables, and I didn't find any commercially available (but I didn't look too hard). And since I already had the 5V one from Pine64, I decided to mod it!

Here's the schematic of my mod. Original is in pencil; my changes are in blue:

[Image: pbp-uart.png]

There are conceptually two changes:
  1. Previously, the receive line had a 4.7K pullup resistor to 5V. I changed this to use a voltage divider that pulls up to 3V and has roughly the same impedance as the original, using an 8.2K resistor to 5V and a 12K resistor to ground. You could probably get away with leaving the 4.7K resistor in and just adding a 7K resistor to ground instead.
  2. I added a voltage divider on the transmit line to create 3V output signals using a 240 ohm series resistor and a 360 ohm resistor to ground.
The resistor values aren't super critical, but the ratios should be kept the same to ensure the right voltage.

The resulting cable shouldn't interfere with boot or WiFi, and it doesn't for me I verified that it works fine even at the crazy high 1.5Mbit/s speed used by the PBP, and the signals look pretty clean on a scope too.

Signal going from USB cable to PBP:

[Image: SDS00020.png]

And from PBP to USB cable:

[Image: SDS00021.png]


1. Pry the plastic of the USB connector end open with a screwdriver or spudger. It's friction fit but a bit tight. Twisting the cable strain relief may help get it open.

2. Remove the 4.7K surface mount pullup resistor, which was originally in the red circle:

[Image: IMG_1081.jpeg]

3. Wire the four new resistors in like this, making sure to insulate wires that cross using heat shrink tubing (black in the picture):

[Image: pbp-uart-wiring.png]

[Image: IMG_1084.jpeg]

I also cut out the red wire since it isn't needed and was getting in the way.

3. Insulate the resistor pairs with heat shrink tubing (blue in the picture) to ensure they don't short to each other or the metal crystal can to their left:

[Image: IMG_1085.jpeg]

4. Squeeze the plastic case back together.

Good luck! Seriously though, Pine64 needs to ship the proper cable!!!

Messages In This Thread
Serial cable voltage should actually be 3.0V, with mod! - by jhiesey - 01-23-2020, 05:55 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)