I bought a cheap Chinese inverter with no serial number, I thought it be a fun little home project to check if the AC voltage it provides is a true sine wave.
I tried using an arduino with a breadboard circuit to do so:
Above you can see my circuit, it takes the AC voltage (230V 60Hz), steps it down using a voltage devider, from there i rectify the signal to assure only voltages between 0 and 3.3V will be applied to the MCU's ADC pin. The plot shows the voltage at the ADC pin relative to the MCU ground.
From there I log the readings over serial to my computer to later plot it and then to compare it to the signal provided by mains power.
So when I set everything up and checked the voltage levels over R2 and R1 using a multimeter, I saw everything was correct, but once I connected my MCU and turned on the power, my arduino blew up and damaged my computer's usb port.
What caused the short to happen, my only guess is that it has something to do with the fact that my USB port's ground is also connected to the MCU's ground and some ground loop effect took place that caused this?

