Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Easy line voltage controlled switch

Status
Not open for further replies.

AGCB

Member
Looking for easiest, cheapest way to control a 3 volt circuit (on/off) with 120 volts AC. I think I remember doing it with a opto coupler and a resistor on both input and output to control current but would like other ideas also. I don't want to use a relay.
Thanks

Aaron
 
Wireless or wired, what does user end look like ? Distance between control end and
command end ?

Power required for 3V on / off, is that a logic input or an actual power supply
being switched on/off ?


Regards, Dana.
 
Just use a 3V wall wart adapter to generate the presence or absence of
120 VAC, and feed to MCU thru a 4.7K resistor to prevent any turn on/off transients
to MCU. Best protection would look like this :

1696952148175.png


Make sure wall wart is isolated.

Regards, Dana.
 
How fast do you need to respond to the loss of AC?

A 3.3V wall wart is certainly the simplest way to go, but the unloaded output may stay up for many seconds after the AC goes away.
 
Last edited:
How fast do you need to respond to the loss of AC?

A 3.3V wall wart is certainly the simplest way to go, but the unloaded output may stay up for many seconds after the AC goes away.
A resistor across the adapter output should reduce the turn-off time to less than 1 s. We'll know for sure once the TS tells us what he has to work with.

ak
 
I guess if I have to purchase anything it will be a 120 volt relay with 1 amp contacts. I was just trying to use something on hand.
Thanks
Aaron
 
is this to detect an AC failure then enable a battery powered MCU?
 
You could make a current transformer.

I made one from a small mains transformer. It was a split-bobbin transformer, so the primary and secondary were separate an both were visible. I cut and removed the secondary windings. I put one turn of insulated mains wire though the space where the secondary had been.

I connected a bridge rectifier to the primary, which was now acting as the secondary, and an LED to the output of the bridge rectifier.

When current flowed in the insulated mains wire, the LED lit. The mains wire was running at about 12 A. For smaller currents you would need more turns.

On many toroidal transformers it's quite easy to add turns without removing the existing windings, so you could use one of those to make a current transformer.
 
I guess if I have to purchase anything it will be a 120 volt relay with 1 amp contacts. I was just trying to use something on hand.
Thanks
Aaron
It doesn't need to be a 3.3 volt adapter. Any voltage higher than that can feed a resistive voltage divider to make a 3.3 Volt signal to connect to your MCU.
 
So - what do you have on hand?

ak
I'm pretty sure I made one a long time ago with an opto-coupler. Both input and output current were reduced with resistors. I don't remember all the details, but it was easy, and I now have all the stuff, I think to do it again.
I did find a 120-volt relay in the junk drawer that will work but very over kill!
Aaron
 
I did find a 120-volt relay in the junk drawer that will work but very over kill!
In my opinion it's not. It's cheap for you, it needs no modification, and it will just work. It probably also has visible and audible confirmation that it's operating.

You should make sure that 10 mA or more is put through the contacts. Especially on larger relays, they can be unreliable when switching very low currents at low voltages.
 
Agree. If it's in the junk box, the cost already is sunk. Whatever money or effort it took to get it is gone forever; from this point forward, it is totally free. If nothing else, it solves the problem immediately. Now you can take your time working on a more refined solution if you want to.

The basic opto isolator circuit needs one durrent-limiting resistor and one reverse voltage protection diode on the AC input side, and one pull up (or pull down) resistor on the output transistor side. The output will pulse 60 times per second, and the resistor will dissipate about 1.2 W, so it will have to be rated for at least 2 W; 3-5 W would be much better.

Depending on what device or circuit the opto drives, if you want a continuous output you add a capacitor to the opto output. Where the cap goes can vary. This will slow the response time of the circuit - there will be a delay between when the AC goes away and when whatever the opto is driving gets the message; less than 1 second.

ak
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top