I found this guy who bought a dehumidifier from scrap and fixed it, and according to him, the way it works is pretty simple:
1. This finned block (preferably copper, but aluminum works too) acts as a heat conductor.
2. A fan pulls the air and directs it toward the metal block.
3. A thermoelectric module (Peltier module) is used to cool the air once it’s saturated with moisture.
These modules have two sides: one gets very hot and the other gets very cold.
We use the cold side here (and it’s safer to attach a metal piece to the hot side as well).
The black wire is negative, and the red wire is positive.
Connect red to red, black to black, and place a cup or container underneath to collect the water.
Use a 12V power supply, but with high amperage (around 4–5 amps).
Estimated device price: $200+