05d9eed452a8226eb7123e31ced841d1c25c4e0c
Tech-dat/Interface-dat/USB-SDK-dat/USB-type-c-dat/USB-type-c-dat.md
| ... | ... | @@ -16,6 +16,8 @@ |
| 16 | 16 | |
| 17 | 17 | - [[USB-OTG-dat]] |
| 18 | 18 | |
| 19 | +- [[displayport-dat]] - [[audio-dat]] |
|
| 20 | + |
|
| 19 | 21 | ## apps |
| 20 | 22 | |
| 21 | 23 | - [[type-c-to-ethernet-dat]] |
| ... | ... | @@ -134,6 +136,64 @@ If you are DIY-ing a power source and want the phone to recognize the 5V supply, |
| 134 | 136 | * **Voltage Sag:** If your 5V source isn't stable, the phone might repeatedly connect and disconnect as the voltage drops under load. |
| 135 | 137 | * **Heat:** Cheap DIY connections can have high resistance, leading to heat at the connector. |
| 136 | 138 | |
| 139 | + |
|
| 140 | +### SBU SDK info |
|
| 141 | + |
|
| 142 | +Repurposing USB-C SBU Wires |
|
| 143 | + |
|
| 144 | +In the USB-C standard, **SBU1** and **SBU2** are "extra" wires. While they were originally intended for DisplayPort or Analog Audio, they are perfect for adding custom features to a small robot like your [[ESP32-S3-dat]] quadruped. - [[robotic-dat]] |
|
| 145 | + |
|
| 146 | +#### 1. Electrical Constraints (Safety First) |
|
| 147 | +| Constraint | Limit | Reason | |
|
| 148 | +| :--- | :--- | :--- | |
|
| 149 | +| **Max Voltage** | **3.3V** | SBU wires connect to ESP32 GPIOs; 5V will fry them. | |
|
| 150 | +| **Max Current** | **< 50mA** | These wires are extremely thin (30-32 AWG). | |
|
| 151 | +| **Best For** | **Logic Signals** | Buttons, I2C, UART, or Analog Sensors. | |
|
| 152 | +| **Avoid** | **Power Delivery** | Never use SBU to power servos or bright LEDs. | |
|
| 153 | + |
|
| 154 | +--- |
|
| 155 | + |
|
| 156 | +#### 2. Practical DIY Examples |
|
| 157 | + |
|
| 158 | +##### A. External "Kill-Switch" (Safety) |
|
| 159 | +If your robot's gait code fails and it starts running into a wall: |
|
| 160 | +- **Wiring:** Connect a button between **SBU1** and **GND** at the cable end. |
|
| 161 | +- **Code:** Set the ESP32 pin to `INPUT_PULLUP`. |
|
| 162 | +- **Action:** If the pin goes `LOW`, the code stops all servos immediately. |
|
| 163 | + |
|
| 164 | +##### B. Remote I2C Debugging Screen |
|
| 165 | +Since your robot is small and space is limited, you can keep the screen outside the robot: |
|
| 166 | +- **Wiring:** Use **SBU1 for SDA** and **SBU2 for SCL**. |
|
| 167 | +- **Usage:** Connect a tiny 0.91" OLED display to the end of your USB cable. |
|
| 168 | +- **Benefit:** You can read real-time "Leg Degrees" or "Battery Voltage" while the robot moves. |
|
| 169 | + |
|
| 170 | +##### C. Remote "Boot" or "Reset" Button |
|
| 171 | +If the ESP32-S3 is hidden inside a chassis: |
|
| 172 | +- **Wiring:** Connect **SBU1** to the **EN (Reset)** pin or **BOOT (GPIO 0)** pin. |
|
| 173 | +- **Benefit:** You can put the robot into "Upload Mode" or Reset it without opening the shell. |
|
| 174 | + |
|
| 175 | +--- |
|
| 176 | + |
|
| 177 | +#### 3. Using SBU for Audio (Important Logic) |
|
| 178 | +While a PC will not "read" analog audio from SBU pins automatically, you can |
|
| 179 | +build a custom point-to-point system: |
|
| 180 | + |
|
| 181 | +- **Legacy Audio Mode:** In custom hardware, **SBU1** is often used for the |
|
| 182 | + **Microphone** signal and **SBU2** for **Analog Ground**. |
|
| 183 | +- **DIY Implementation:** 1. Send a low-voltage analog signal from a microphone through SBU1. |
|
| 184 | + 2. Use an ADC (Analog-to-Digital Converter) pin on the ESP32-S3 to read it. |
|
| 185 | + 3. **Note:** You must use a **0.1µF capacitor** to filter out the electrical |
|
| 186 | + noise caused by your SG90 servos, as they share the same ground. |
|
| 187 | + |
|
| 188 | +--- |
|
| 189 | + |
|
| 190 | +#### 4. How to Identify SBU Wires |
|
| 191 | +Since manufacturers use different colors, use a Multimeter in "Continuity Mode": |
|
| 192 | +1. Touch one probe to **Pin A8 (SBU1)** or **Pin B8 (SBU2)** on the USB-C plug. |
|
| 193 | +2. Touch the other probe to the stripped wires until you hear a "Beep." |
|
| 194 | +3. **Label them immediately** with tape to avoid mixing them up with VCC/GND. |
|
| 195 | + |
|
| 196 | + |
|
| 137 | 197 | ## ref |
| 138 | 198 | |
| 139 | 199 | - [[USB-type-c]] |
| ... | ... | \ No newline at end of file |
Tech-dat/robotic-dat/robotic-dat.md
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | |
| 13 | 13 | - [[Quadruped-Locomotion-dat]] |
| 14 | 14 | |
| 15 | +- quadruped |
|
| 15 | 16 | |
| 16 | 17 | ## Electronics |
| 17 | 18 |