├── CAD ├── 3D File RRAC3M-X-000.stp ├── DPS-1200FB-1 A.stp ├── Heatspreader Laser.dxf ├── PSU Back Left.stl ├── PSU Back Right.stl ├── PSU Front Left.stl ├── PSU Front Right.stl ├── SSD1303_Breakout.step ├── Side Holder L.stl ├── Side Holder R.stl ├── XT60BE-F.png ├── c-1761468-1-b-3d.stp ├── kW PD BackPlate.step └── kW PD FrontPlate.step ├── PDBrick_Software ├── .gitignore ├── platformio.ini └── src │ ├── HP_DPS.h │ └── main.cpp ├── README.md └── doc ├── HP_HSTNS-PL11_PS-2122-1C.pdf ├── SW3518P Module Bot.jpg └── SW3518P Module Top.jpg /CAD/Heatspreader Laser.dxf: -------------------------------------------------------------------------------- 1 | 0 2 | SECTION 3 | 2 4 | HEADER 5 | 9 6 | $INSUNITS 7 | 70 8 | 4 9 | 9 10 | $ACADVER 11 | 1 12 | AC1014 13 | 9 14 | $HANDSEED 15 | 5 16 | FFFF 17 | 0 18 | ENDSEC 19 | 0 20 | SECTION 21 | 2 22 | TABLES 23 | 0 24 | TABLE 25 | 2 26 | VPORT 27 | 5 28 | 8 29 | 100 30 | AcDbSymbolTable 31 | 0 32 | ENDTAB 33 | 0 34 | TABLE 35 | 2 36 | LTYPE 37 | 5 38 | 5 39 | 100 40 | AcDbSymbolTable 41 | 0 42 | LTYPE 43 | 5 44 | 14 45 | 100 46 | AcDbSymbolTableRecord 47 | 100 48 | AcDbLinetypeTableRecord 49 | 2 50 | BYBLOCK 51 | 70 52 | 0 53 | 0 54 | LTYPE 55 | 5 56 | 15 57 | 100 58 | AcDbSymbolTableRecord 59 | 100 60 | AcDbLinetypeTableRecord 61 | 2 62 | BYLAYER 63 | 70 64 | 0 65 | 0 66 | ENDTAB 67 | 0 68 | TABLE 69 | 2 70 | LAYER 71 | 5 72 | 2 73 | 100 74 | AcDbSymbolTable 75 | 70 76 | 2 77 | 0 78 | LAYER 79 | 5 80 | 50 81 | 100 82 | AcDbSymbolTableRecord 83 | 100 84 | AcDbLayerTableRecord 85 | 2 86 | 0 87 | 70 88 | 0 89 | 6 90 | CONTINUOUS 91 | 0 92 | ENDTAB 93 | 0 94 | TABLE 95 | 2 96 | STYLE 97 | 5 98 | 3 99 | 100 100 | AcDbSymbolTable 101 | 70 102 | 1 103 | 0 104 | STYLE 105 | 5 106 | 11 107 | 100 108 | AcDbSymbolTableRecord 109 | 100 110 | AcDbTextStyleTableRecord 111 | 2 112 | STANDARD 113 | 70 114 | 0 115 | 0 116 | ENDTAB 117 | 0 118 | TABLE 119 | 2 120 | VIEW 121 | 5 122 | 6 123 | 100 124 | AcDbSymbolTable 125 | 70 126 | 0 127 | 0 128 | ENDTAB 129 | 0 130 | TABLE 131 | 2 132 | UCS 133 | 5 134 | 7 135 | 100 136 | AcDbSymbolTable 137 | 70 138 | 0 139 | 0 140 | ENDTAB 141 | 0 142 | TABLE 143 | 2 144 | APPID 145 | 5 146 | 9 147 | 100 148 | AcDbSymbolTable 149 | 70 150 | 2 151 | 0 152 | APPID 153 | 5 154 | 12 155 | 100 156 | AcDbSymbolTableRecord 157 | 100 158 | AcDbRegAppTableRecord 159 | 2 160 | ACAD 161 | 70 162 | 0 163 | 0 164 | ENDTAB 165 | 0 166 | TABLE 167 | 2 168 | DIMSTYLE 169 | 5 170 | A 171 | 100 172 | AcDbSymbolTable 173 | 70 174 | 1 175 | 0 176 | ENDTAB 177 | 0 178 | TABLE 179 | 2 180 | BLOCK_RECORD 181 | 5 182 | 1 183 | 100 184 | AcDbSymbolTable 185 | 70 186 | 1 187 | 0 188 | BLOCK_RECORD 189 | 5 190 | 1F 191 | 100 192 | AcDbSymbolTableRecord 193 | 100 194 | AcDbBlockTableRecord 195 | 2 196 | *MODEL_SPACE 197 | 0 198 | BLOCK_RECORD 199 | 5 200 | 1B 201 | 100 202 | AcDbSymbolTableRecord 203 | 100 204 | AcDbBlockTableRecord 205 | 2 206 | *PAPER_SPACE 207 | 0 208 | ENDTAB 209 | 0 210 | ENDSEC 211 | 0 212 | SECTION 213 | 2 214 | BLOCKS 215 | 0 216 | BLOCK 217 | 5 218 | 20 219 | 100 220 | AcDbEntity 221 | 100 222 | AcDbBlockBegin 223 | 2 224 | *MODEL_SPACE 225 | 0 226 | ENDBLK 227 | 5 228 | 21 229 | 100 230 | AcDbEntity 231 | 100 232 | AcDbBlockEnd 233 | 0 234 | BLOCK 235 | 5 236 | 1C 237 | 100 238 | AcDbEntity 239 | 100 240 | AcDbBlockBegin 241 | 2 242 | *PAPER_SPACE 243 | 0 244 | ENDBLK 245 | 5 246 | 1D 247 | 100 248 | AcDbEntity 249 | 100 250 | AcDbBlockEnd 251 | 0 252 | ENDSEC 253 | 0 254 | SECTION 255 | 2 256 | ENTITIES 257 | 0 258 | CIRCLE 259 | 5 260 | 100 261 | 100 262 | AcDbEntity 263 | 8 264 | 0 265 | 100 266 | AcDbCircle 267 | 10 268 | 9.0750000000000099 269 | 20 270 | -145.89999999999998 271 | 30 272 | 0 273 | 40 274 | 0.99999999999999645 275 | 210 276 | 4.5578725179902665e-64 277 | 220 278 | 9.8607613152626476e-32 279 | 230 280 | 1 281 | 0 282 | CIRCLE 283 | 5 284 | 101 285 | 100 286 | AcDbEntity 287 | 8 288 | 0 289 | 100 290 | AcDbCircle 291 | 10 292 | -27.225000000000041 293 | 20 294 | -145.89999999999998 295 | 30 296 | 0 297 | 40 298 | 0.99999999999999645 299 | 210 300 | 4.5578725179902665e-64 301 | 220 302 | 9.8607613152626476e-32 303 | 230 304 | 1 305 | 0 306 | CIRCLE 307 | 5 308 | 102 309 | 100 310 | AcDbEntity 311 | 8 312 | 0 313 | 100 314 | AcDbCircle 315 | 10 316 | 27.224999999999973 317 | 20 318 | -145.90000000000001 319 | 30 320 | 0 321 | 40 322 | 0.99999999999999645 323 | 210 324 | 4.5578725179902665e-64 325 | 220 326 | 9.8607613152626476e-32 327 | 230 328 | 1 329 | 0 330 | CIRCLE 331 | 5 332 | 103 333 | 100 334 | AcDbEntity 335 | 8 336 | 0 337 | 100 338 | AcDbCircle 339 | 10 340 | -9.0750000000000011 341 | 20 342 | -145.89999999999998 343 | 30 344 | 0 345 | 40 346 | 0.99999999999999645 347 | 210 348 | 4.5578725179902665e-64 349 | 220 350 | 9.8607613152626476e-32 351 | 230 352 | 1 353 | 0 354 | LWPOLYLINE 355 | 5 356 | 104 357 | 100 358 | AcDbEntity 359 | 8 360 | 0 361 | 100 362 | AcDbPolyline 363 | 90 364 | 4 365 | 70 366 | 1 367 | 43 368 | 0.0 369 | 10 370 | 47.999999999999126 371 | 20 372 | -129.50000000000006 373 | 10 374 | -48.000000000000036 375 | 20 376 | -129.50000000000006 377 | 10 378 | -48.000000000000036 379 | 20 380 | -149.50000000000006 381 | 10 382 | 47.999999999999126 383 | 20 384 | -149.50000000000006 385 | 0 386 | ENDSEC 387 | 0 388 | SECTION 389 | 2 390 | OBJECTS 391 | 0 392 | DICTIONARY 393 | 5 394 | C 395 | 100 396 | AcDbDictionary 397 | 3 398 | ACAD_GROUP 399 | 350 400 | D 401 | 3 402 | ACAD_MLINESTYLE 403 | 350 404 | 17 405 | 0 406 | DICTIONARY 407 | 5 408 | D 409 | 100 410 | AcDbDictionary 411 | 0 412 | DICTIONARY 413 | 5 414 | 1A 415 | 330 416 | C 417 | 100 418 | AcDbDictionary 419 | 0 420 | DICTIONARY 421 | 5 422 | 17 423 | 100 424 | AcDbDictionary 425 | 0 426 | ENDSEC 427 | 0 428 | EOF 429 | -------------------------------------------------------------------------------- /CAD/PSU Back Left.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/PSU Back Left.stl -------------------------------------------------------------------------------- /CAD/PSU Back Right.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/PSU Back Right.stl -------------------------------------------------------------------------------- /CAD/PSU Front Left.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/PSU Front Left.stl -------------------------------------------------------------------------------- /CAD/PSU Front Right.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/PSU Front Right.stl -------------------------------------------------------------------------------- /CAD/Side Holder L.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/Side Holder L.stl -------------------------------------------------------------------------------- /CAD/Side Holder R.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/Side Holder R.stl -------------------------------------------------------------------------------- /CAD/XT60BE-F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/CAD/XT60BE-F.png -------------------------------------------------------------------------------- /PDBrick_Software/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode/.browse.c_cpp.db* 3 | .vscode/c_cpp_properties.json 4 | .vscode/launch.json 5 | .vscode/ipch 6 | 7 | README 8 | .vscode -------------------------------------------------------------------------------- /PDBrick_Software/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:wemos_d1_mini32] 12 | platform = espressif32 13 | board = wemos_d1_mini32 14 | framework = arduino 15 | monitor_speed = 921600 16 | lib_deps = 17 | leodj/SSD1303 @ 1.0.1 18 | build_flags = 19 | -std=c++17 -------------------------------------------------------------------------------- /PDBrick_Software/src/HP_DPS.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | class DPS { 5 | public: 6 | 7 | static const int dpsValues_len = 9; // ughhh 8 | typedef union { 9 | struct { 10 | float inV; 11 | float inA; 12 | float inW; 13 | float outV; 14 | float outA; 15 | float outW; 16 | float intakeTemp; 17 | float internTemp; 18 | float fanRpm; 19 | }; 20 | float raw[dpsValues_len]; 21 | } dpsValues_t; 22 | // static const int dpsValues_len = sizeof(dpsValues_t) / sizeof(float); 23 | 24 | const uint8_t registersForValues[dpsValues_len] = {0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0D, 0x0E, 0x0F}; 25 | 26 | typedef struct { 27 | const char *name; 28 | float factor; 29 | } dpsRegisterEntry_t; 30 | 31 | // actual registers are at address * 2 32 | const dpsRegisterEntry_t dpsRegisters[16] = { 33 | {"", 0}, // 0x00 34 | {"flags", 0}, // 0x01 35 | {"", 0}, // 0x02 36 | {"", 0}, // 0x03 37 | {"in_volts", 32.0}, // 0x04 38 | {"in_amps", 128.0}, // 0x05 39 | {"in_watts", 2.0}, // 0x06 40 | {"out_volts", 256.0}, // 0x07 41 | {"out_amps", 128.0}, // 0x08 42 | {"out_watts", 2.0}, // 0x09 43 | {"", 0}, // 0x0A 44 | {"", 0}, // 0x0B 45 | {"", 0}, // 0x0C 46 | {"intake_temp", 128.0}, // 0x0D 47 | {"internal_temp", 128.0}, // 0x0E 48 | {"fan_rpm", 1}, // 0x0F 49 | }; 50 | static const int dpsRegisters_len = sizeof(dpsRegisters) / sizeof(dpsRegisters[0]); 51 | 52 | enum class WriteRegs : uint8_t { 53 | FAN_RPM = 0x40, 54 | }; 55 | 56 | 57 | // Checksum calculation used by the DPS (simple addition) 58 | uint8_t _calcChecksum(uint8_t *data, size_t size) { 59 | uint8_t checksum = 0; 60 | checksum -= _addr << 1; 61 | for (int i = 0; i < size; i++) { 62 | checksum -= data[i]; 63 | } 64 | return checksum; 65 | } 66 | 67 | 68 | // Read from DPS register 69 | uint16_t _read(uint8_t reg) { 70 | // uint8_t checksum = (0xFF - ((_addr << 1) + reg) + 1) & 0xFF; 71 | Wire.beginTransmission(_addr); 72 | Wire.write(reg); 73 | Wire.write(_calcChecksum(®, 1)); 74 | Wire.endTransmission(); 75 | // printf("> %02X %02X %02X\n", _addr, reg, checksum); 76 | 77 | delayMicroseconds(1000); 78 | 79 | Wire.requestFrom(_addr, 3); 80 | uint8_t msg[3]; // LSB, MSB, CS 81 | Wire.readBytes(msg, sizeof(msg)); 82 | // printf("< %02X %02X %02X\n", msg[0], msg[1], msg[2]); 83 | return (msg[1] << 8) | msg[0]; 84 | } 85 | 86 | 87 | // Write to DPS register 88 | void _write(uint8_t reg, uint16_t val) { 89 | uint8_t msg[] = {reg, val & 0xFF, val >> 8}; 90 | 91 | Wire.beginTransmission(_addr); 92 | Wire.write(msg, sizeof(msg)); 93 | Wire.write(_calcChecksum(msg, sizeof(msg))); 94 | Wire.endTransmission(); 95 | } 96 | 97 | 98 | // Get all important values 99 | dpsValues_t getValues() { 100 | dpsValues_t vals = {0}; 101 | // float vals[dpsValues_len] = {0}; 102 | 103 | for (int i = 0; i < sizeof(registersForValues); i++) { 104 | uint8_t reg = registersForValues[i]; 105 | 106 | if (reg < dpsRegisters_len) { 107 | uint16_t val = _read(reg * 2); 108 | float factor = dpsRegisters[reg].factor; 109 | if (factor != 0) { 110 | vals.raw[i] = (float)val / factor; 111 | } 112 | } 113 | 114 | } 115 | return vals; 116 | } 117 | 118 | // Set minimum fan speed 119 | void setFanSpeed(uint16_t rpm) { 120 | printf("Setting RPM to %5d\n", rpm); 121 | _write((uint8_t)WriteRegs::FAN_RPM, rpm); 122 | 123 | } 124 | 125 | 126 | DPS(uint8_t i2c_addr) : _addr(i2c_addr) {}; 127 | 128 | private: 129 | uint8_t _addr; 130 | 131 | }; -------------------------------------------------------------------------------- /PDBrick_Software/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include // better text 5 | #include // better numbers 6 | #include // futuristic 7 | 8 | #include "HP_DPS.h" 9 | 10 | #define DISP_SCK 26 11 | #define DISP_MOSI 18 12 | #define DISP_RES 19 13 | #define DISP_DC 23 14 | #define DISP_CS 5 15 | 16 | #define PSU_SCL 17 17 | #define PSU_SDA 16 18 | #define PSU_ADDR 0x5F 19 | 20 | SSD1303 disp(128, 64, &SPI, DISP_DC, DISP_RES, DISP_CS); 21 | DPS psu(PSU_ADDR); 22 | 23 | DPS::dpsValues_t curStats; 24 | 25 | void dispPrintCentered(int16_t xOffset, int16_t y, const char* text) { 26 | int16_t textX, textY; 27 | uint16_t textWidth, textHeight; 28 | disp.getTextBounds(text, 0, 0, &textX, &textY, &textWidth, &textHeight); 29 | int16_t x = disp.width() / 2 - textWidth / 2; 30 | disp.setCursor(x + xOffset, y); 31 | disp.print(text); 32 | } 33 | 34 | uint8_t dispScreen = 0; 35 | 36 | void updateDisplay() { 37 | disp.clearDisplay(); 38 | 39 | // Input watts were the most accurate < 200W (still complete guesswork tho) 40 | float watts = curStats.inV * curStats.inA * 2; 41 | 42 | switch (dispScreen) { 43 | case 0: { // Overview 44 | int16_t yPos = 6; 45 | // Header 46 | disp.setFont(NULL); 47 | disp.setTextSize(1); 48 | // disp.setTextColor(BLACK); 49 | // disp.fillRect(0, yPos - 2, disp.width(), 11, WHITE); 50 | dispPrintCentered(0, yPos, "PDBrick 2400"); 51 | disp.drawFastHLine(0, yPos += 9, disp.width(), WHITE); 52 | yPos += 7; 53 | // yPos += 9; 54 | // disp.setTextColor(WHITE); 55 | 56 | // Watts 57 | disp.setTextSize(2); 58 | char buf[32]; 59 | sprintf(buf, "%4.2f kW", watts / 1000); 60 | dispPrintCentered(0, yPos, buf); 61 | yPos += 16 + 2; 62 | 63 | // Bar graph 64 | int16_t barOffset = 6; 65 | disp.drawRoundRect(barOffset, yPos, disp.width() - 2 * barOffset, 8, 1, WHITE); 66 | int barMaxWidth = disp.width() - 2 * (barOffset + 2); 67 | int16_t barWidth = barMaxWidth * watts / 2400; 68 | disp.fillRect(barOffset + 2, yPos + 2, barWidth, 4, WHITE); 69 | 70 | // Footer 71 | disp.setFont(&Picopixel); 72 | disp.setTextSize(1); 73 | int16_t xPos = 7; 74 | yPos = disp.height() - 2; 75 | disp.setCursor(xPos, yPos); 76 | disp.printf("In: %4.1f'C", curStats.intakeTemp); 77 | disp.setCursor(xPos += 37, yPos); 78 | disp.printf("PCB: %4.1f'C", curStats.internTemp); 79 | disp.setCursor(xPos += 42, yPos); 80 | disp.printf("RPM: %5.0f", curStats.fanRpm); 81 | disp.drawFastHLine(0, yPos -= 7, disp.width(), WHITE); 82 | } 83 | break; 84 | 85 | case 1: { // Detailed / debug view (with all values, like before) 86 | // TODO 87 | } 88 | break; 89 | 90 | } 91 | 92 | disp.display(); 93 | } 94 | 95 | 96 | void setup() { 97 | Serial.begin(921600); 98 | SPI.begin(DISP_SCK, -1, DISP_MOSI, DISP_CS); 99 | Wire.begin(PSU_SDA, PSU_SCL, 400e3); 100 | 101 | disp.begin(); 102 | 103 | // set brightness and clear display 104 | disp.setContrast(128); 105 | disp.clearDisplay(); 106 | disp.display(); 107 | 108 | // show welcome text (21 characters x 8 rows at default font and size 1) 109 | disp.setTextSize(1); 110 | disp.setTextColor(WHITE); 111 | disp.setCursor(0, 0); 112 | disp.print("\n PDBrick Display\n\n Hello World!"); 113 | disp.display(); 114 | 115 | Serial.println("\nPDBrick Display"); 116 | psu.setFanSpeed(4500); // Set idle fan speed a bit higher, so hopefully the case doesn't get as hot to the touch 117 | } 118 | 119 | // uint16_t regs[256]; 120 | uint32_t lastUpdate = 0; 121 | uint16_t rpm = 3000; 122 | 123 | void loop() { 124 | if (millis() - lastUpdate >= 100) { 125 | lastUpdate = millis(); 126 | curStats = psu.getValues(); 127 | // updateDisp(); 128 | updateDisplay(); 129 | } 130 | 131 | 132 | while (Serial.available()) { 133 | switch(Serial.read()) { 134 | case 'w': { 135 | rpm += 250; 136 | psu.setFanSpeed(rpm); 137 | } 138 | break; 139 | case 's': { 140 | rpm -= 250; 141 | if (rpm < 1000) { 142 | rpm = 1000; 143 | } 144 | psu.setFanSpeed(rpm); 145 | } 146 | break; 147 | } 148 | } 149 | 150 | 151 | // i2c_scan(); 152 | 153 | 154 | // printf("%d\n", psu._read(4)); 155 | 156 | 157 | // for (int i = 0; i < 0x60; i++) { 158 | // regs[i] = psu._read(i); 159 | // } 160 | // printHex(regs, 0x60); 161 | } 162 | 163 | 164 | void i2c_scan() { 165 | byte error, address; 166 | int nDevices; 167 | 168 | Serial.println("Scanning..."); 169 | 170 | nDevices = 0; 171 | for (address = 1; address < 127; address++) { 172 | // The i2c_scanner uses the return value of 173 | // the Write.endTransmisstion to see if 174 | // a device did acknowledge to the address. 175 | Wire.beginTransmission(address); 176 | error = Wire.endTransmission(); 177 | 178 | if (error == 0) { 179 | Serial.print("I2C device found at address 0x"); 180 | if (address < 16) 181 | Serial.print("0"); 182 | Serial.print(address, HEX); 183 | Serial.println(" !"); 184 | 185 | nDevices++; 186 | } else if (error == 4) { 187 | Serial.print("Unknown error at address 0x"); 188 | if (address < 16) 189 | Serial.print("0"); 190 | Serial.println(address, HEX); 191 | } 192 | } 193 | if (nDevices == 0) 194 | Serial.println("No I2C devices found\n"); 195 | else 196 | Serial.println("done\n"); 197 | 198 | delay(5000); // wait 5 seconds for next scan 199 | } 200 | 201 | 202 | void printHex(uint16_t* buf, uint16_t size) { 203 | printf(" "); 204 | for(uint8_t i = 0; i < 16; i++) { 205 | printf("%1X ", i); 206 | } 207 | printf("\n%04X ", 0); 208 | for(uint16_t i = 0; i < size; i++) { 209 | printf("%04X ", buf[i]); 210 | if(i % 16 == 15) { 211 | printf("\n%04X ", i+1); 212 | } 213 | } 214 | printf("\n"); 215 | } 216 | 217 | void updateDisp() { 218 | 219 | printf("Input: %.2f V, %5.2f A / Output: %.3f V, %6.2f A / Intake: %.2f °C, Internal: %.2f °C, RPM: %5.0f\n", 220 | curStats.inV, 221 | curStats.inA, 222 | curStats.outV, 223 | curStats.outA, 224 | curStats.intakeTemp, 225 | curStats.internTemp, 226 | curStats.fanRpm 227 | ); 228 | 229 | 230 | 231 | char buf[256]; 232 | /*sprintf(buf, 233 | //" " 234 | "\n Input | Output" 235 | "\n %6.2fV | %6.3fV" 236 | "\n %6.3fA | %6.2fA" 237 | "\n %6.1fW | %6.1fW" 238 | "\n %6.1fVA | %6.1fVA" 239 | "\n %5.2fC | %5.2fC" 240 | // "\n---------------------" 241 | "\n RPM: %5.0f", 242 | // "\n < %6.2fV %6.3fA\n > %6.3fV %6.2fA\n 1: %5.2fC 2: %5.2fC\nRPM: %5.0f", 243 | curStats.inV, 244 | curStats.outV, 245 | curStats.inA, 246 | curStats.outA, 247 | curStats.inW, 248 | curStats.outW, 249 | curStats.inV * curStats.inA, 250 | curStats.outV * curStats.outA, 251 | curStats.intakeTemp, 252 | curStats.internTemp, 253 | curStats.fanRpm);*/ 254 | 255 | sprintf(buf, 256 | //" " 257 | "\nInput |Output| x2 " 258 | "\n%6.2f|%6.3f|%6.3fV" 259 | "\n%6.3f|%6.2f|%6.2fA" 260 | "\n%6.1f|%6.1f|%6.1fW" 261 | "\n%6.1f|%6.1f|%6.1fP" 262 | "\n %5.2f| %5.2fC" 263 | // "\n---------------------" 264 | "\nRPM: %5.0f |%6.1fW", 265 | // "\n < %6.2fV %6.3fA\n > %6.3fV %6.2fA\n 1: %5.2fC 2: %5.2fC\nRPM: %5.0f", 266 | curStats.inV, 267 | curStats.outV, 268 | curStats.outV * 2, 269 | curStats.inA, 270 | curStats.outA, 271 | curStats.outA, 272 | curStats.inW, 273 | curStats.outW, 274 | curStats.outW * 2, 275 | curStats.inV * curStats.inA, 276 | curStats.outV * curStats.outA, 277 | curStats.outV * curStats.outA * 2, 278 | curStats.intakeTemp, 279 | curStats.internTemp, 280 | curStats.fanRpm, 281 | curStats.inV * curStats.inA * 2); 282 | 283 | disp.clearDisplay(); 284 | disp.setCursor(0, 0); 285 | disp.print(buf); 286 | disp.display(); 287 | } 288 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PDBrick 2 | 3 | Mastodon post containing all details: https://chaos.social/@LeoDJ/111700051694162324 4 | 5 | Disclaimer: This project is provided as-is and does not aim to be a tutorial (yet) 6 | -------------------------------------------------------------------------------- /doc/HP_HSTNS-PL11_PS-2122-1C.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/doc/HP_HSTNS-PL11_PS-2122-1C.pdf -------------------------------------------------------------------------------- /doc/SW3518P Module Bot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/doc/SW3518P Module Bot.jpg -------------------------------------------------------------------------------- /doc/SW3518P Module Top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RainbowLabsDE/PDBrick/aaa8238136b7aa7814af32c6d2acdda914648285/doc/SW3518P Module Top.jpg --------------------------------------------------------------------------------