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 problem that doesn't make any sense (for me)

Status
Not open for further replies.

kyru27

New Member
I have a problem with the relay that as the title says doesn't make any sense for me, it's the following:

If I send 5 V to send from one of the coil terminals from Vdd keeping a permanent short circuit the relay works (this can be done in Pickit2 by tools->troubleshoot->verify Vdd) as if I quit the connection from Vcc or connect it to a "0" it changes the contact accordingly (in fact I can hear it clearly).

But if I try to input 5 V from wherever other place it ignores them.

Any idea of what can be happening? This is seriously weird. Maybe I'm missing something about relays behaviour, but I don't know what can be...
 
But if I try to input 5 V from wherever other place it ignores them.
What is "wherever other place"?

It's possible that you're trying to drive the relay with insufficient current, hence it doesn't operate. Measure the voltage across the relay coil when you're trying to operate it: if you see that it's too low, the relay won't be operating.
 
Sorry I cannot understand your problem. can you word it a different way? or maybe include a drawing?
 
What is "wherever other place"?

I mean any othe place where there are 5 V, I have tested it with several output pins of my microcontroller that are on 5 V and with them the relay doesn't change.

You were right, if not connected directly to Vdd the voltage is lower than what it should, but no idea why this is happening.

Sorry I cannot understand your problem. can you word it a different way? or maybe include a drawing?

I have a relay that has to have one of their coil pins connected to microcontroller pin that sends "0" or "1" to activate or deactivate the relay but doesn't work, but if the relay is connected to the pin 11 of the microcontroller, it does the change that should do when receiving a "1" and works correctly.
 
if not connected directly to Vdd the voltage is lower than what it should, but no idea why this is happening.
It's because the microcontroller IO pin can't supply sufficient current (pin has too much resistance). The normal way to drive a relay from such a pin is to use a transistor (BJT or FET) to increase the current capability. A freewheeling diode is placed across the coil (ref pictures in https://www.electro-tech-online.com/custompdfs/2012/07/RelayActivationTips.pdf) to stop the transistor being damaged by the flyback voltage (ie inductive kickback) of the coil.
 
Thanks a lot, now this has been solved, anyway I'm into another problem related to the relay:

When it changes in its NO or NC pin instead of getting 0 V and 5 V I think I should be getting, I'm getting 5V and 2,6 V though the common pin of the relay is grounded (along with the negative of my 5V supply).

I've done like in the pdf mentioned in the previous message, except for the fact I've used a BC337 as transistor, but this shouldn't be an issue.

Maybe those contacts are broken?

Thanks.
 

It's the same as in the pdf except for using a BC337 transistor.

If you were refering to connections in the relay these are the following:

1 2 3
4 5 6

1:Common -> Not connected to anything.

2: Coil-> Connected to 5 V supply

3: NC -> Connected to 5 V supply

4: Common -> Connected to GND and negative of 5V supply.

5: Coil-> Output of the transistor

6: NO -> Not connected to anything.
 
3: NC -> Connected to 5 V supply
4: Common -> Connected to GND and negative of 5V supply.
err.. you seem to have connected the relay contacts across the supply.
 
err.. you seem to have connected the relay contacts across the supply.

Awww... sorry, I miswrote it, I meant NC-> Connected to a 56 Ω resistor that's connected to 5 V, I guess that in one position there should be connection between NC and common (so ground also) so there should be 5V and in the other position it should be working as an open circuit between NC and common and give 0 V, but it looks more like if the relay is working as a sort of potentiometer with just 2 possible values.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top