Electronics Forum

Electronics Circuits & Projects discussion forum. Get help with electronics.


Controling an AC Relay with opamp

Discuss about electronic circuits here. Request help for circuits that you couldn't find anywhere else, how a circuit works etc. Discuss anything related to electronic circuits.

Moderator: pebe

Controling an AC Relay with opamp

Postby lowtech » Thu Apr 24, 2014 7:30 pm

I would like to create an electronic circuit utilizing an LM339 quad opamp and a relay.
The circuit will interface to a Rapid Air Coil Unwinder. The unwinder has a 115VAC motor which releases tension on the copper coil as the coil is unwound. An actuating arm rests on the coil and is attached to a 5K ohm potentiometer. As the arm swings up, the potentiometer increases in resistance. This output is fed to the (-) input of the opamp. When the voltage on pin 10 exceeds the reference voltage, the comparator turns the transistor on which activates the relay and applies 115VAC through the relay contacts.
The circuit works except I’d like to have the control voltage point change from turn-on to turn-off, that is, 6V turn-on, 4.3V turn-off. Currently, it switches on or off at 6V.
Can you provide a solution to my problem?
Thanks
Attachments
rapid air1.jpg
rapid air1.jpg (308.55 KiB) Viewed 26996 times
Circuit.jpg
Circuit.jpg (852.46 KiB) Viewed 26996 times
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Fri Apr 25, 2014 7:21 am

You have +12v and -12V supply rails, so pin11 is at 0V.
Are the 6V and 4.3V you mention relative to that pin? And where are the voltages applied to?
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Controling an AC Relay with opamp

Postby lowtech » Fri Apr 25, 2014 10:43 am

Sorry, the -12v is ground so there is 6V at pin 11.
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Fri Apr 25, 2014 1:13 pm

Sorry, it's still not clear. If the -12V line is ground, then pin11 is at an absolute 0V, or at +12V relative to ground. Either way, it cannot be 6V.

What Is the controlling voltage 6V to 4.3V measured relative to? And where is it introduced into the circuit?
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Controling an AC Relay with opamp

Postby lowtech » Fri Apr 25, 2014 2:32 pm

A 12V power supply is connected to the printed circuit board. Pin 11, via a 4.7K resistor, is connected to the plus side and pin 11 through a 4.7K resistor to the minus side of the power supply. I attached a 5K potentiometer across the power supply input with the adjusting input connected to pin 10. By varying the potentiometer, I can control the pick up and drop out of the 12V relay.

The 5K potentiometer I used simulates a potentiometer attached to the actuating arm of the Rapid Air (RA) unit. The potentiometer of the RA unit is attached to the circuit board at the 12V inputs. The adjusting pin of the potentiometer is connected to pin 10. As the arm travels up and down, the voltage input to pin 10 varies.

Currently, the relay picks and drops at 6V. I'd like the relay to pick at 6V as the arm elevates (because it rests on the coil) which turns on the RA unit's motor. The motor will drop the arm because it supplies more coil to the pick up unit. I'd like to have the relay stay energized until the input to pin 10 drop to 4.3V.
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Fri Apr 25, 2014 3:12 pm

Ah, it's clear now. Many op-amps use dual supplies (+12V and -12V) and that's what I thought you were using. But with a single 12V supply your ground rail should have been marked 0V.

It's easy to adapt the circuit for what you want. I'll draw up the modifications for you.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Controling an AC Relay with opamp

Postby lowtech » Fri Apr 25, 2014 5:14 pm

Thank you
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Sat Apr 26, 2014 5:46 am

So I can calculate the drive to the 2N3906, can you tell me the resistance of the 12V relay you are using?
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Controling an AC Relay with opamp

Postby lowtech » Sat Apr 26, 2014 9:57 am

120 ohms
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Sat Apr 26, 2014 3:30 pm

Here is your circuit with some modifications. R4 has been added so that the output of the comparator can pull point (A) higher or lower to give some hysteresis. R4 has been calculated as 10.198K but 10K should be near enough. One of your 4K7 resistors has been replaced with a 5K pot so that the voltage at point (A) can be adjusted during set-up.

The LM339 is a comparator – not an op-amp, so it has no internal pull-up for its output. When its output is low, a transistor switches the output to ground. But when the output is ‘high’ the transistor is o/c and R4 relies on R2 and R3 to pull it up. So don’t change any of the resistor values, otherwise the input voltage swing of 6V to 4.3V will be wrong.

To set up,
-1). Connect the inverting input of the comparator to 0V and switch on. Its output will then go high.
-2). Adjust P1 to give 6V at point (A).
-3). Connect the inverting input of the comparator to 12V. Its output will then go low, turning on the relay. Point (A) will then change to 4.3V
-4). Disconnect the inverting input of the comparator and connect it to your sensor.

With an input of 6V or more, the relay will be ON
With an input of 4.3V or less, the relay will be OFF.

Changing the value or R3 from 1K to 3K3, should still give ample base current for the transistor to switch the relay.

Best of luck.
Attachments
Hysteresis Amp.GIF
Hysteresis Amp.GIF (3.61 KiB) Viewed 26934 times
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Controling an AC Relay with opamp

Postby lowtech » Sat Apr 26, 2014 5:18 pm

Thank You. I will give it a try.
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby lowtech » Thu May 01, 2014 2:04 pm

Tried your recommendations and the switcher worked as designed. However, the trip point (turn-on) has changed from 6V to 8.4V and the turn-off has changed from 4.3V to 7.8V.

Can I change P1 from a 5K pot to a 10K pot and adjust the pot to achieve an 8.4V turn-on? Also, can I change R4 to a 15K pot and adjust it to get the 7.8V turn-off?

By the way, the input control at I/P is a 12K pot across the 12V and 0V.

Thank you in advance.

Jim
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Fri May 02, 2014 10:39 am

Hi Jim,
Yes, it can be done, but it requires a change of circuit.
I'll modify the old one.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Controling an AC Relay with opamp

Postby lowtech » Fri May 02, 2014 11:24 am

Thank you
lowtech
 
Posts: 11
Joined: Thu Apr 24, 2014 4:07 pm

Re: Controling an AC Relay with opamp

Postby pebe » Fri May 02, 2014 12:54 pm

I have had to change the circuit because your new values are both more than half the supply voltage. In this circuit, when the input is only a couple of volts the output will be high and D1 will be cut off. Hence the reference voltage at (A) to turn on the relay will be 8.4V set only by the potential divider R1/P1. As that level is reached, the output will go low and current will flow through D1, R4 and P2. That will pull (A) down to 7.8V ready for switch off.

The resistance of P1 will be about 7.7K, and the feedback resistance will be about 27.72K (made up with R4 = 22K and P2 set at about 5.72K). Set it up like this;

1). Take i/p to 0V (o/p high) . Set P1 to give 8.4V at (A).
2). Take i/p to 12V (o/p low). Set P2 to give 7.8V at (A).
Attachments
Hysteresis Amp 2.GIF
Hysteresis Amp 2.GIF (4.06 KiB) Viewed 26852 times
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Next

Return to Electronic Circuits Help



Who is online

Users browsing this forum: No registered users and 11 guests



cron