To measure the Voltage and the voltage drop I needed a stable reference voltage. This means I can not power the ATtiny without regulation and use this voltage as a reference. Instead I’ve chosen to use the internal 1.1 volt reference the ATtiny offers. This way I need to split the voltages down so the are around that 1.1 volt area instead of the +5 volts of USB.
This Powermeter has a section of Testpoints where you can easily attach probes to different pars of the system, so it can be used to tap off any of the USB lines.
Also there is a switch that acts as a power switch for the meter and disconnects the shunt resistor so you can use your own multimeter to measure everything
1 × ATTiny 85
1 × TM1637 7 segment display module [7 segment version only]
2 × 10kΩ pull ups [OLED version only] for the I2C lines
1 × 0.96” OLED Display [OLED version only]
1 × USB Type A Print Connector male
1 × USB Type A Print Connector female
1 × 1Ω 2512 Shunt
1 × SPDT Switch SMD
4 × 10kΩ 0603 resistors
2 × 2kΩ 0603 resistors
2 × 100nF 0603 ceramic
1 × vertical tactile button