Begining of project

This commit is contained in:
2025-12-23 17:31:41 -05:00
commit fbba9e731b
6 changed files with 323 additions and 0 deletions

43
DIODE_MODE.md Normal file
View File

@@ -0,0 +1,43 @@
# Diode Mode Implementation Details
To implement diode mode on a microcontroller like the Raspberry Pi Pico, follow this circuit and logic.
## Circuit Design
1. **Pull-up Resistor**: Connect a 10kΩ resistor from 3.3V to the common Signal pin of your Multiplexer.
2. **Measurement Point**: Connect an ADC pin (e.g., GPIO 26) to the same Signal pin of the Multiplexer.
3. **HDMI Ground**: Connect HDMI Pin 17 (DDC/CEC Ground) and the Shell to the Microcontroller's Ground.
## Logic (Pseudo-code)
```cpp
float measureDiode(int channel) {
// 1. Select the channel on the Mux
setMuxChannel(channel);
// 2. Wait for voltage to stabilize
sleep_ms(5);
// 3. Read ADC value (0-4095 for 12-bit ADC)
uint16_t raw = adc_read();
// 4. Convert to voltage
float voltage = (raw * 3.3f) / 4095.0f;
return voltage;
}
```
## Fault Logic for Intake Mode
The software uses the following logic to provide "Educated Guesses":
| Reading | Possible Fault | Hint |
|---------|----------------|------|
| 0.0V - 0.1V | Short to Ground | Check ESD protection diodes or internal IC short. |
| 1.0V - 3.2V | High Resistance / Open | Check for cracked solder joints on the HDMI port. |
| 3.3V (VCC) | Full Open | Line is completely disconnected. Port might be ripped. |
| 0.3V - 0.7V | Nominal | Line is likely connected to Redriver or APU correctly. |
## Redriver IC Testing
If all lines show nominal diode readings but there is still no video:
1. Check the **+5V line** (Pin 18). If it's missing, the console won't trigger the TV's HPD.
2. Check the **DDC lines** (SCL/SDA). If these are open, the console cannot read the EDID from the TV.
3. If Diode mode is perfect, the issue is likely the **Redriver IC** itself being powered down or having internal logic failure, or the **APU** encoder.

43
HARDWARE.md Normal file
View File

@@ -0,0 +1,43 @@
# HDMI Tester Project
## Overview
This project aims to create a handheld HDMI tester for console repair technicians. It features two modes:
- **Intake Mode**: Simple Pass/Fail with diagnostic suggestions.
- **Tech Mode**: Detailed diode mode readings for all 19 HDMI pins.
## Hardware Recommendations
To measure diode mode (voltage drop across a diode junction), we need a microcontroller with an ADC and the ability to source a small constant current or use a pull-up resistor.
### 1. Microcontroller: ESP32 or Raspberry Pi Pico
- **ESP32**: Integrated Wi-Fi/BT (good for future logging), multiple ADCs.
- **RP2040 (Pico)**: Great documentation, dual-core, very affordable, stable ADCs.
- **Recommendation**: **Raspberry Pi Pico** for its simplicity and 3.3V logic which is safer for HDMI lines.
### 2. Multiplexers (Mux)
Since the Pico doesn't have 19 ADC pins, we need multiplexers to switch between the HDMI pins.
- **CD74HC4067**: 16-channel analog multiplexer. We would need two of these to cover all 19 pins + GND checks.
### 3. Display
- **0.96" or 1.3" OLED (SSD1306/SH1106)**: Simple I2C connection, low power.
### 4. Input
- **Rotary Encoder with Push Button**: Ideal for switching between Intake and Tech modes.
### 5. HDMI Breakout
- A standard HDMI male/female breakout board to interface the pins to the Mux.
## Theory of Operation (Diode Mode)
1. Connect the Red probe (GND in Diode Mode) to the HDMI ground.
2. Connect the Black probe (Signal) to the data line.
3. The tester will simulate this by:
- Setting a pin to 3.3V through a precision resistor (e.g., 10k ohm).
- Measuring the voltage at the junction with the HDMI pin via the Mux.
- A healthy ESD diode or IC junction will show a specific voltage drop (typically 0.3V - 0.7V).
- Open circuit = ~3.3V.
- Short to GND = 0V.
## Next Steps
1. Define the Pinout mapping.
2. Create the software structure (C++ or MicroPython).
3. Implement the measurement logic.

54
PINOUT.md Normal file
View File

@@ -0,0 +1,54 @@
# HDMI Pinout Mapping
This document maps the 19 HDMI pins to the multiplexer channels.
## HDMI Type A Connector Pinout
1. TMDS Data2+
2. TMDS Data2 Shield
3. TMDS Data2-
4. TMDS Data1+
5. TMDS Data1 Shield
6. TMDS Data1-
7. TMDS Data0+
8. TMDS Data0 Shield
9. TMDS Data0-
10. TMDS Clock+
11. TMDS Clock Shield
12. TMDS Clock-
13. CEC
14. Reserved (HEAC+ in 1.4)
15. SCL (DDC)
16. SDA (DDC)
17. DDC/CEC Ground
18. +5V Power
19. Hot Plug Detect (HEAC- in 1.4)
## Multiplexer Mapping (2x CD74HC4067)
We use two 16-channel muxes.
### Mux A (High Speed Data)
- Channel 0: Pin 1 (Data2+)
- Channel 1: Pin 3 (Data2-)
- Channel 2: Pin 4 (Data1+)
- Channel 3: Pin 6 (Data1-)
- Channel 4: Pin 7 (Data0+)
- Channel 5: Pin 9 (Data0-)
- Channel 6: Pin 10 (Clock+)
- Channel 7: Pin 12 (Clock-)
### Mux B (Control & Power)
- Channel 0: Pin 13 (CEC)
- Channel 1: Pin 14 (Reserved/HEAC+)
- Channel 2: Pin 15 (SCL)
- Channel 3: Pin 16 (SDA)
- Channel 4: Pin 18 (+5V)
- Channel 5: Pin 19 (HPD)
## Expected Diode Mode Values (General Guide)
- TMDS Lines (1, 3, 4, 6, 7, 9, 10, 12): 0.3V - 0.7V
- DDC Lines (15, 16): 0.5V - 0.8V
- CEC (13): 0.6V - 0.9V
- +5V (18): Usually high or varies depending on console (check for shorts!)
- HPD (19): 0.6V - 0.9V
*Note: Shields (2, 5, 8, 11) and GND (17) should be tied to common ground for the measurement.*

40
UI_UX.md Normal file
View File

@@ -0,0 +1,40 @@
# UI/UX Flow for HDMI Tester
The tester uses a 128x64 OLED and a Rotary Encoder.
## Boot Screen
- Display Logo: "HDMI Tester v1.0"
- Prompt: "Select Mode"
## Menu Navigation
- Rotate Encoder: Scroll between "INTAKE MODE" and "TECH MODE".
- Click Encoder: Confirm selection and start test.
## Intake Mode Screen (Result)
```
+---------------------+
| INTAKE RESULT |
| |
| [ FAIL ] |
| |
| Data1- is SHORTED |
| Check ESD Diodes |
+---------------------+
```
## Tech Mode Screen (Scrolling List)
```
+---------------------+
| P1 Data2+ : 0.51V |
| P2 Shield : GND |
| P3 Data2- : 0.52V |
| P4 Data1+ : 0.50V |
| P6 Data1- : 0.02V* |
| P7 Data0+ : 0.51V |
+---------------------+
```
*(User can scroll down to see all 19 pins)*
## Fault Indicators
- **Asterisk (*)**: Indicates a value out of range.
- **Red/Blinking (if Color LCD)**: Highlights failures.

91
src/main.cpp Normal file
View File

@@ -0,0 +1,91 @@
#include <iostream>
#include <vector>
#include <string>
#include <map>
// Mock classes for Pico/Hardware
class OLED {
public:
void clear() { std::cout << "[OLED] Clear Screen\n"; }
void print(std::string text) { std::cout << "[OLED] " << text << "\n"; }
};
struct Measurement {
std::string pinName;
float voltage;
};
class HDMITester {
private:
OLED display;
bool techMode = false;
// Simplified thresholds
const float TMDS_MIN = 0.3;
const float TMDS_MAX = 0.7;
public:
void setMode(bool tech) { techMode = tech; }
std::vector<Measurement> runTests() {
// Simulate reading from ADCs via Muxes
return {
{"Data2+", 0.51}, {"Data2-", 0.52},
{"Data1+", 0.50}, {"Data1-", 0.02}, // Fault here
{"Data0+", 0.51}, {"Data0-", 0.51},
{"Clock+", 0.49}, {"Clock-", 0.49},
{"CEC", 0.65}, {"SCL", 0.70}, {"SDA", 0.71},
{"+5V", 1.20}, {"HPD", 0.66}
};
}
void displayIntake(const std::vector<Measurement>& results) {
display.clear();
bool pass = true;
std::string faultHint = "All lines nominal";
for (auto& m : results) {
if (m.voltage < 0.1) {
pass = false;
faultHint = "Short detected on " + m.pinName + ". Check ESD diodes.";
break;
} else if (m.voltage > 1.0 && m.pinName != "+5V") {
pass = false;
faultHint = "Open circuit on " + m.pinName + ". Check HDMI port solder joints.";
break;
}
}
if (pass) {
display.print("STATUS: PASS");
display.print("Console ready for intake.");
} else {
display.print("STATUS: FAIL");
display.print("Hint: " + faultHint);
}
}
void displayTech(const std::vector<Measurement>& results) {
display.clear();
display.print("--- TECH MODE ---");
for (auto& m : results) {
std::string status = (m.voltage < 0.1) ? " (SHORT)" : (m.voltage > 1.0 && m.pinName != "+5V") ? " (OPEN)" : " (OK)";
display.print(m.pinName + ": " + std::to_string(m.voltage).substr(0,4) + "V" + status);
}
}
};
int main() {
HDMITester tester;
std::cout << "--- Simulating Intake Mode ---\n";
tester.setMode(false);
auto results = tester.runTests();
tester.displayIntake(results);
std::cout << "\n--- Simulating Tech Mode ---\n";
tester.setMode(true);
tester.displayTech(results);
return 0;
}

52
src/pico_tester.c Normal file
View File

@@ -0,0 +1,52 @@
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/adc.h"
// Pin Definitions
#define MUX_S0 2
#define MUX_S1 3
#define MUX_S2 4
#define MUX_S3 5
#define ADC_PIN 26 // ADC0
void init_hardware() {
stdio_init_all();
// Init Mux Select Pins
gpio_init(MUX_S0); gpio_set_dir(MUX_S0, GPIO_OUT);
gpio_init(MUX_S1); gpio_set_dir(MUX_S1, GPIO_OUT);
gpio_init(MUX_S2); gpio_set_dir(MUX_S2, GPIO_OUT);
gpio_init(MUX_S3); gpio_set_dir(MUX_S3, GPIO_OUT);
// Init ADC
adc_init();
adc_gpio_init(ADC_PIN);
adc_select_input(0);
}
void set_mux(uint8_t channel) {
gpio_put(MUX_S0, channel & 0x01);
gpio_put(MUX_S1, (channel >> 1) & 0x01);
gpio_put(MUX_S2, (channel >> 2) & 0x01);
gpio_put(MUX_S3, (channel >> 3) & 0x01);
}
float read_voltage() {
uint16_t raw = adc_read();
return (raw * 3.3f) / 4095.0f;
}
int main() {
init_hardware();
while (true) {
printf("\n--- Starting HDMI Scan ---\n");
for (int i = 0; i < 16; i++) {
set_mux(i);
sleep_ms(10);
float v = read_voltage();
printf("Channel %d: %.2f V\n", i, v);
}
sleep_ms(5000);
}
}