Connection between the output of current transformer and single chip microcomputer
First of all, ordinary I/O ports can only judge voltage. If it is higher than 0.8V, it is considered as a high level, so you need to add a load resistor, and use the voltage on both sides of the resistor as the input of I/O. However, because it is alternating current, if the voltage value of your resistor is definitely changing, there are two methods. The first way is to assume the working state once it is detected as a high level, and delay for a fixed time when it is detected as a low level (that is, the voltage is less than 0.0V). -This method can't be detected when the AC frequency is high. The second method is to make rectifier and filter circuit. This can be found in the model book, and it can always be at a high level. But if the voltage generated by your transformer is very low, even the rectifier circuit can't pass (the voltage value of the bridge rectifier on the diode is 1.4V).