The invention relates to a testing device for a digital communication protocol of an
electric vehicle. The testing device comprises a charging
pile casing, a charging main circuit, a charging controller, and a testing host, wherein the charging main circuit and the charging controller are arranged in the charging
pile casing, and the test host is connected to the charging controller. The input endof the charging main circuit is connected to a power supply, and the output end is used for connecting a charging head of the
electric vehicle. The charging controller is connected to the charging main circuit, and a
light source is arranged on the charging head of the
electric vehicle. The testing device further comprises a controlled switch and a photo-
resistor. The controlled switch is arranged on the charging main circuit, and the input end of a
control signal is connected to the photo-
resistor. The photo-
resistor is fixed by the photo-resistor support inside the charging
pile casing, andthe position where the
light source can be illuminated, when the charging head of the electric vehicle is inserted. After the charging head is inserted, the resistance of the photo-resistor is decreased under the
irradiation of the
light source; the controlled switch is turned on, and then the charging main circuit starts to work, and the electric vehicle is charged. According to the testing device for the digital communication protocol of the electric vehicle, the method has the advantages of being safe, reliable, and the like, while compared with the prior art.