I designed a device that calculates current and power using a CT and an ATMega328P-AU microcontroller.

The board I designed was simple and I didn't account for noise cancellation on the ADC lines and AVCC and AREF. That being said, when I power the circuit using a transformer style power supply (Those brick style ones), my circuit functions well without any hiccups and I get proper current reading using the board I designed.

However when I power the circuit using those cheap Chinese 12V SMPS power supplies, the current reading goes all over the place and keeps the last read value even without any load; same thing happens when I add bigger filter caps on the power lines.

I suspect that the power supply has poor EMI protection and is causing my circuit to behave abnormally. Could it be due to me not including LC filters on the AREF and AVCC pins or both?

  • 3
    \$\begingroup\$ Can you post a schematic? How much current are you trying to read? What is your burden resistance? Do you have an RC filter going into your ADC? \$\endgroup\$ – Stiddily Sep 24 '19 at 11:37
  • 4
    \$\begingroup\$ How about sharing your design with us? \$\endgroup\$ – mic Sep 24 '19 at 11:37

Insert this into the GND and the VDD, from the cheap Chinese Switching Power Supply


simulate this circuit – Schematic created using CircuitLab


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.