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.

Problems switchin relay with PIC

Status
Not open for further replies.

Andy1845c

Active Member
I don't know if anyone is going to be able to help me on this one, but i'm going to ask anyway. I must be making a fundamental error of some kind in this circuit. I don't have a schematic, but I will describe it as best as I can.

I want to control a 3 phase AC motor with a low voltage momentary push button switch. I want one push to turn it on, and the next off.

I cheated and programmed a PIC to do this for me. I have the input pin pulled low and am using 5v+ though the push button.

The pic switches a darlington, that switches a 12v relay, and that switches a 3 phase contactor with a 24v AC coil. I have a 12/24v transformer to power the switching. From the 12v I have a bridge rectifier and a filter cap and 7805 to power the PIC.

On proto board the pic and darlington work flawlessly switching an LED. Mounted in the enclosure with the relays, it will switch the 12v relay perfectly if the 3 phase contactor is unhooked or if I hold it on via direct connection from the transformer.

When its hooked up things go bad. It works fine 50% of the time and the other half of the time its like it begins to switch the 12v relay, and then releases. It just sort of bounces on and then back off. I took the PIC out of the circuit and manually jumped 5v on the darlington and that works fine too, so I know the problem in in the PIC. I lengthened the de-bounce delay in my program, thinking maybe a voltage was being induced somewhere in the circuit causing it to cycle. It didn't really help.

I think it has to have somthing to do with the coil in the 3 phase contactor:confused: Does anyone have anything I could check or try? Everthing was working so good up til this point:(
 
As the problem is occouring when you try to switch on, I would look at voltage dips.

The 12 V for the relay comes from the 24 V ac that powers the contactor. Is that right? You mention a 12 / 24 transformer. I guess that the motor is at 200 or 380 V ac so there must be some other transformer to feed the 24 V.

The 24 V ac coil on the contactor will have a much larger inrush current than its hold-in current. That is because the coil's inductance will be much greater when the core is complete.

You may be briefly overloading the transformer that produces the 24V as the contactor pulls in. Transformers are robust and will just get slightly warm but their output voltage will dip a lot when overloaded. If your 5V comes from the 24V contactor supply, then that could dip as well, which will confuse the PIC. The PIC is the only part of the circuit that will be sensitive to a loss of power for the order of 1 ms.

If you have a 'scope, look at how the 5V line behaves as you turn on. If not, try running the PIC from a battery, and if that works, you should increase your smoothing capacitor so that it can power the PIC for about 1/4 of a second, long enough to ride the power dip caused by the contactor's inrush current.
 
Wow.... thanks so much. I just clipped a battery to the PIC, and switched it 50 times or better with no problems.

I never considered that being the problem. The transformer I have is salvage, and is big and heavy. I don't have any specs for it, but it seemed like overkill for this project. I only worried about smoothing the AC ripples with my filter cap. I'm glad I have room on the board to add another capacitor!

Thats cool. I learned somthing cool and important, and fixed my problem:D
 
Andy1845c said:
Thats cool. I learned somthing cool and important, and fixed my problem:D

I'm sorry to sound negative, but your problem is only fixed after it is fixed.

You only have problem when the heavy load AC load is connected, not with only 24V contactor and/or 3-phase contactor working. Remove your 3-phase AC load but leave the 24V relay and 3-phase contactor in circuit. I'll bet the circuit will then work perfectly.

You have tried using a battery but haven't actually tried the effect of adding a capacitor to see if it removes the interference.

According to your description, I'm afraid its more like interference coming from the power line rather than voltage dip and this problem is not easily rectified.
 
Actually, Diver seems to be right on. I put a 1500:mu:F cap on the 5v supply to the PIC, and it seems to be working fine.

I don't have the 3 phase lines connected. just the contactor. Hopfully they will not add more problems once they are in the circuit too.

The transformer for the low voltage is connected to 120v single phase, via a seperate cord.
 
Well, I installed my controler and with the extra cap it works perfectly:) Thanks again:D
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top