2
\$\begingroup\$

I am working on an AC Voltmeter. The supply to the microcontroller is not isolated. Only a bridge rectifier is used convert AC to DC. To get 5V, resistors are used to drop down the voltage.

Is it a good idea to connect the debugger to a PC and microcontroller when AC is present? I want to debug my code, and without the presence of AC supply, I can't sense the voltage and I'm unable to debug the problem.

Will connecting non-isolated 5V and Ground to the PC have any effect on PC? Will it give shock while connecting?

\$\endgroup\$
  • 2
    \$\begingroup\$ Draw yourself a quick circuit diagram. Assume everything to do with the PC is connected to mains earth. See what currents will flow in the wires between PC and mains. Also check what happens if the mains hot/live and neutral are reversed. \$\endgroup\$ – tomnexus Nov 29 '17 at 18:14
  • 5
    \$\begingroup\$ YIKES... You are rectifying the mains and dropping to 5V through a resistor???? \$\endgroup\$ – Trevor_G Nov 29 '17 at 18:14
  • \$\begingroup\$ @trevor I haven't design the circuit. I am adding ST controller which will replace existing PIC controller. \$\endgroup\$ – Embedded Geek Nov 29 '17 at 18:36
  • 2
    \$\begingroup\$ Show us a schematic of your AC->5V DC power supply. If, as implied in your question, there is no transformer involved, the supply is EXTREMELY HAZARDOUS and the microcontroller MUST NOT be directly connected to anything, and should be mounted in an insulated box, so no-one can contact any part of it. \$\endgroup\$ – Peter Bennett Dec 16 '17 at 0:47
1
\$\begingroup\$

It's never a good idea to touch and perform experiments on any non-isolated supply. You might get an electric shock. Also, in case of occurrence of a mainline fault or some voltage surges, your computer, and the microcontroller too can get hanged or eventually damaged too. Thus, never work on a non-isolated supply. It's always better to use some sort of isolation transformers to be in safe working premises.

Thanks!

\$\endgroup\$

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.