A fan module configured to be detachably connected to an electronic device includes an electrical connector and a circuit board assembly. The electrical connector includes a plurality of pins configured to be electrically connected to the electronic device. The circuit board assembly is embedded inside the electrical connector and is electrically connected to one or more of the pins. The circuit board assembly includes a circuit board and an integrated circuit disposed on the circuit board.