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.

Relay acting screwy

Status
Not open for further replies.

2camjohn

Member
I am using a relay to switch the voltage from a battery to a motor.

The signal to the coil of the relay comes from a pic by way of a transistor.


The problem is when I wire up the circuit it comes on permenantly, instead of 0.1seconds like the signal to the coil is.

When I disconnect the battery and reconnect it is off again until another 0.1s pulse puts the relay on permenantly again.

Its not a latching relay or anything like that!!

Have I broken the relay?

The power I am switching is a little higher than what its meant to switch.


Any help on this will be appreciated,

Thanks
John
 
a diagram would be helpful. NPN or PNP transistor? How are you driving the transistor? Does the base have a pull-up ( or down ) resistor?
 
when driving higher current with relay it can happen that contacts weld.
this doesn't seam to be the case since removing power fixes the problem.
what is the part number of the transistor (could it be SCR)?
it could be the circuit where transistor doesn't turn off completelly
but actually I think the likely problem is simply too fast signalfor the relay.
what is duty cycle of the signal?
 
It looks a bit like this

**broken link removed**

The transistor is a BC107b, it hasnt failed me yet!!!



The same design works fine with a 9v pp3 and lower power motor.

But with 6 AAs and a more powerful motor I get the symptoms I described above.


The signal on for 0.1seconds only occurs a few times per second, so im sure it has time for the contacts to open if they were going to.
 
You should put a reversed diode in parallel with the relay coil to protect your transistor...
Most likely your transistor is damaged
 
Johnson777717 said:
You should put a reversed diode in parallel with the relay coil to protect your transistor...
Most likely your transistor is damaged

is that to protect the transistor from the contact arc?

No, The relay is a coil, when you turn it off it will generate a voltage spike with reversed polarity... this will damage the transistor...
 
Man I hate to translate the conventions between US and Europe, guess thats what I get for bein a Yank on a Brit board :)

A temp weld is not the problem.

I don't know what port your using IIRC pics are tri state I/O devices with certain ports having a "weak " Pull-up internally. The transistor your using is general purpose but has a very low ICBO so once turned on it may stay on due to that low pull up. That's why I mentioned a pull-up ( or down) resistor I don't know the intrinsic state of the PIC I/O lines so once again you will have to bother Nigel. My suggestion off the cuff is find a less sensitive switching transistor and/or slap a 10k ohm resistor on the base of the transistor ( after the 1k to either rail ( since I don't now the logic state of the output port) and as others have said add a reversed biased diode to avoid back emf. As an aside , I never interface TTL-CMOS controllers with relays anymore I use optos . Just my opinion, avoids mechanics, back emf, wide spectrum RFI ( from arc) .
 
2camjohn,

If the relay doesn’t sound as loud as the others, make sure it’s the correct coil resistance (Voltage). Maybe you have some 9Volts and some 12Volts?

Ante :roll:
 
As I see it you need to find out where the problem is happening, this is easily done - for a start try removing the transistor and manually turning the relay ON and OFF using a piece of wire from where collector and emitter of the transistor were connected. If it still holds ON too long, obviously it's a relay problem.

If it doesn't hold ON too long, obviously it's not the relay - so replace the transistor but remove the resistor feeding the base. Use a 1K manually from the base to +ve and check the relay switching - this will proof if the transistor driver is OK or not.
 
there is no suppression circuit for the motor so your PIC might be locking up. do you have capacitors accross pic power terminals?
 
Thanks for all the help guys, I will do the tests now.

I thought the test I have already performed was sufficient to rule out the transistor: Using an almost dead pp3 to power the motor stopped the relay holding ON at all.


The relay is definately a 6V, but the click is nowhere near as audible as other identical relays I have on other boards.


I like the idea of using optocouplers, but they seem to be such tiny devices.
Can they handle alot of power?

Does anyone have any links to websites which cover optocouplers.
Eventually I want to be able to switch 2A at 9V with a 6V signal.

Ill post back once I have done the tests.
Cheers
John
 
2camjohn said:
Thanks for all the help guys, I will do the tests now.

I thought the test I have already performed was sufficient to rule out the transistor: Using an almost dead pp3 to power the motor stopped the relay holding ON at all.


The relay is definately a 6V, but the click is nowhere near as audible as other identical relays I have on other boards.


I like the idea of using optocouplers, but they seem to be such tiny devices.
Can they handle alot of power?

Does anyone have any links to websites which cover optocouplers.
Eventually I want to be able to switch 2A at 9V with a 6V signal.

Ill post back once I have done the tests.
Cheers
John

Opto relays: https://www.mpja.com/listitems.asp?dept=133&main=132
 
Yes if you want , I'd use a TIP120, It's a darlington pair in a to-220 case ( sorry American convention) , but there are solid state relays that will do the job and all they need is a 3-30vdc input and the outputstage is what ever you select
 
100nF capacitors are good for this sort of problem. One across the motor brushes is my best bet. Next try one across the PIC power pins. Also check that no PIC pins are programmed as inputs and left floating.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top