1
\$\begingroup\$

I have a project that needs to be in use on saturday (afterwards I'll be able to complete it properly) and my optoisolators haven't come in yet.

I'm using an arduino to switch mains power (on/off) using a triac, Is there anyway to safely wire the microcontroller to the triac without using an optoisolator?

\$\endgroup\$
  • \$\begingroup\$ What microcontroler are you talking about? \$\endgroup\$ – Daniel Grillo Mar 11 '11 at 4:34
  • \$\begingroup\$ @Daniel An Atmel Atmega 328P \$\endgroup\$ – crasic Mar 11 '11 at 5:23
3
\$\begingroup\$

Depends what the micro is powered from and referenced to. You can run the micro on the live side. However, you give yourself a big problem in attaching debuggers and programmers to the micro, because the 0V side of the programmer usually goes to mains earth through the PC power supply. An isolated USB hub can help. Be very careful with this type of circuit - I know of at least one blown up motherboard caused by this type of work, and there is risk of electrocution.

\$\endgroup\$
  • \$\begingroup\$ That was my impression if I tried to use the micro directly, seems unnecessarily dangerous. Is there some equivalent to the isolator I can throw together from standard parts? \$\endgroup\$ – crasic Mar 11 '11 at 9:29
  • 1
    \$\begingroup\$ Isolation requires an opto transistor/led pair or a transformer (not autotransformer). It's possible to make an optocoupler from an opto transistor (usually IR sensitive) and an IR LED, but hardly worthwhile. It's also possible to wind your own transformers. \$\endgroup\$ – Martin Mar 11 '11 at 9:39
  • 2
    \$\begingroup\$ Martin is absolutely correct. I have (had) a HC16 BDM module and a BP6 motherboard that did not survive me plugging the BDM into a variable frequency drive; it converts three-phase AC to DC and then back to AC in order to speed-control an induction motor. The drive survived just fine but the 900VDC bus presented enough of a challenge to the BDM and PC such that a lot of copper was removed from both. I was fine, after the big flash and bang and a change of underwear. :-) \$\endgroup\$ – akohlsmith Mar 11 '11 at 16:35
1
\$\begingroup\$

You could test and debug the device at low voltages (use 12V AC instead of 110V).

OTOH if you need it to be connected to the PC (or anything having contact with humans, like a button or keyboard) while operating at 110V you should definitely buy a MOC3041 or something similar.

\$\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.