Relay switching issue between 2 sources

hello firends,

i am doing a project in it i use two sources.. one is usb supply and other is 3.7v li-ion rechargable battery....i am using a relay circuit for switching between two sources and the switching circuit i am attaching below.. when i battery is not connected the relay is switching well and i can hear its sound of switching but when i connect battery with relay normaly closed point then relay is not switching...i have some issue when connecting battery...please help me to solve this issue.. please friends.. thank you very much

https://s22.postimg.org/nu7l6i9ht/relay.jpg

You need to explain how your grounds are wired.

Draw a real schematic on a sheet of printer paper and take a photo and post it.

Do you think the relay might not be switching because it is ONLY connected to the USB ?

Did that occur to you ?

Try drawing the schematic again. FYI. you can't power the device that is switched from the device doing the switching (duh).


thanks for your reply .I think relay not switching when i connected the battery

Forget your circuit completely and just tell us what your objective is.
Do NOT reference your schematic.
Simply simply what your components are and what your objective is.
I do not want to discuss your circuit schematic.

hello friend thanks for your reply and sorry if i made mistakes...

I am doing a project to measure inclination angle in x axis and send the inclination through bluetooth module...and the citcuit is working in usb(or 5v adapter) and 3.7v li-ion battery....when adapter supply is off then need to switch the source to battery.. i am using a rely for this purpose... and alos need to measure the battery voltage by adc and indicate the battery status via a led bargraph... i am using li-ion battery cell with a charging ckt...i use usb supply to charge the battery.. please ask me if you need to know anymore information.. thank you friend

raschemmel:
Forget your circuit completely and just tell us what your objective is.
Do NOT reference your schematic.
Simply simply what your components are and what your objective is.
I do not want to discuss your circuit schematic.

What the hell is with you? I thought you were being an ass in the quick shifter thread but this is over the line.

Try drawing the schematic again. FYI. you can't power the device that is switched from the device doing the switching (duh).

If you're going to duh someone, you need to be sure that you are the one that is correct, otherwise you just look stupid. Take another look.

Moving on to actually trying to help...

The function of this circuit is not explicitly stated. You do say it is meant to switch power sources, but you do not specify the conditions under which the switching will occur. I will proceed under the assumption that the relay is supposed to switch to USB power when it is connected, and default to battery power when it is not. Correct me if that is wrong.

I don't see any fault with the way the schematic is drawn, which means it's possibly a wiring error. You don't say whether you've done this test with the switching circuit powering anything. Disconnect everything else so that you are left with only the relay, battery, and USB source and then test if the power switches properly then. Use the continuity tester on your multimeter to make sure the things you want hooked up are properly wired to each other, and the things you don't want hooked up are not connected.

How much current does your relay require?

You made my point exactly.

The function of this circuit is not explicitly stated

duh = "obviously" (if you find it offensive then ignore it. I don't think there's any thing wrong with using it when it is appropriate and this is one of those times)

If you know what the OP is trying to do then go ahead and solve the post. Otherwise , ask the OP what he is trying to do so we can figure out what the problem is.

The OP needs to forget the schematic and simply tell us exactly WHAT he is trying to do. That should be obvious. I don't know what your problem is but it is pointless to discuss a schematic if you don't know what the DESIGN CRITERIA is. So far, that is unknown. You admit yourself you are making assumptions. I am not being an ass. I am being practical. Maybe you should find out what the OP is trying to do before calling someone an ass.

The only way for a newbie to learn what mistakes are obvious is to simply tell them straight out that it is obvious you cannot do something. How else are they going to learn that ?
Obvously you can't switch a relay that is being used to do the switching. The OP said it didn't work when he connected the battery. We don't know what that means , yet.

@OP ,
Thank you for the explanation . Can you please explain the problem ?
From what I can see, the idea is that when the 5V adaptor is NOT present, the arduino is powered through the N.C. contacts and when the adaptor IS powered, the arduino is powered through the N.O. contacts.
I am still not clear on what the problem is . Can you please explain the problem ?
Also, do you have a DMM (digital multimeter ? Please measure all the voltages and post them. Also, please post a link for the relay.

Please state the problem you are having.

I think relay not switching when i connected the battery

True.

When the USB is providing 5V power, the relay will be energized and USB 5V will be connected to your devices.

When USB power is unplugged, the relay will be off and battery power will be connected to your devices. Battery power does not need to switch the relay because the default condition is battery power connected.

Is this what you want? If not, how do you want it to work?

That's why I said I don't understand what the problem is.

I think relay not switching when i connected the battery
True.

The battery has absolutely NOTHING to do with the relay power. The relay energizes when the 5V adaptor is connected and powered up and deenergizes when that adaptor is disconnected or powered down. Whether or not the battery is connected has no bearing on the status of the relay.

raschemmel:
You made my point exactly.

duh = "obviously" (if you find it offensive then ignore it. I don't think there's any thing wrong with using it when it is appropriate and this is one of those times)

If you know what the OP is trying to do then go ahead and solve the post. Otherwise , ask the OP what he is trying to do so we can figure out what the problem is.

The OP needs to forget the schematic and simply tell us exactly WHAT he is trying to do. That should be obvious. I don't know what your problem is but it is pointless to discuss a schematic if you don't know what the DESIGN CRITERIA is. So far, that is unknown. You admit yourself you are making assumptions. I am not being an ass. I am being practical. Maybe you should find out what the OP is trying to do before calling someone an ass.

The only way for a newbie to learn what mistakes are obvious is to simply tell them straight out that it is obvious you cannot do something. How else are they going to learn that ?
Obvously you can't switch a relay that is being used to do the switching. The OP said it didn't work when he connected the battery. We don't know what that means , yet.

@OP ,
Thank you for the explanation . Can you please explain the problem ?
From what I can see, the idea is that when the 5V adaptor is NOT present, the arduino is powered through the N.C. contacts and when the adaptor IS powered, the arduino is powered through the N.O. contacts.
I am still not clear on what the problem is . Can you please explain the problem ?
Also, do you have a DMM (digital multimeter ? Please measure all the voltages and post them. Also, please post a link for the relay.

Please state the problem you are having.

yes i expect a working as you said.. when powering with adapter get supply through normally open (connected to adapter) and when adapter off get supply through normally closed point(connected to battery).. but my problem is that, when i switch on adapter relay switches to NO and when i power off the adapter the relay do not switch back to NC.. and on that i get a 2.7v across the coil( i dont know from where it coming) and when i check the continuity i gey COM,NC,No are short for some moments.... but if i disconnect the battery then relay switch perfectly to NO and NC ....

yes i expect a working as you said.. when powering with adapter get supply through normally open (connected to adapter) and when adapter off get supply through normally closed point(connected to battery).. but my problem is that, when i switch on adapter relay switches to NO and when i power off the adapter the relay do not switch back to NC.. and on that i get a 2.7v across the coil( i dont know from where it coming) and when i check the continuity i gey COM,NC,No are short for some moments.... but if i disconnect the battery then relay switch perfectly to NO and NC ....

Yeah, that's not going to work. There is something wrong with your "adaptor" setup that you are not telling us. What do you mean by "switch off my adaptor " ?

You understand that if you had a real switch in series with the adaptor voltage to the relay coil and you opened that switch it would be impossible for there to be ANY voltage on the relay coil so this means there is something about your adaptor wiring or setup that you are not telling us. Post a link for the adaptor and a photo of the adaptor showing the writing on the label and also a photo of the actual wiring of the adaptor.

Try unplugging the "adaptor" from the wall.
Post a vendor link for the adaptor.
Try putting a 1 k ohm resistor across the relay coil.

raschemmel:
Yeah, that's not going to work. There is something wrong with your "adaptor" setup that you are not telling us. What do you mean by "switch off my adaptor " ?

You understand that if you had a real switch in series with the adaptor voltage to the relay coil and you opened that switch it would be impossible for there to be ANY voltage on the relay coil so this means there is something about your adaptor wiring or setup that you are not telling us. Post a link for the adaptor and a photo of the adaptor showing the writing on the label and also a photo of the actual wiring of the adaptor.

Try unplugging the "adaptor" from the wall.
Post a vendor link for the adaptor.
Try putting a 1 k ohm resistor across the relay coil.

hello sir.. thanks for your sincere support...
sir i changed adapter and battery with an arduino board...i use 5v and 3.3 v but still remains that issue...i made more checking...even after i switch off adapter supply there will be a 2.7v across the relay coil ..and when i disconnect battery the coil voltage going to zero...but i dont know how it is...there is no connection between battery source and relay coil in my circuit .here i am attaching my complete circuit and photo of my board , i hope you can help me i am attaching the full circuit and photo of my board here..i hope you can help me

i got one more pint the problem is when the same usb source is given to NO and coil of the relay...i cut the connection from usb to NO and relay switched fine.. but when give 2 connections from USB source then issue arise

issue solved....
Bat+ connected to PC0 (ADC0) which could provide a sneak path from Bat+ to Vcc,

giving you the 2.7V when USB is disconnected.

Try putting a 10K resistor between PC0 and Bat+.

(Because of the high impedance of the ADC input, the reading of the

Bat+ voltage should not be significantly affected by the 10K resistor.)

my thanks to my all friends who spend time to support me thank you very much....

That's called "backfeeding" and occurs if there is ANY voltage on a digital or analog pin after disconnecting power from arduino +5V pin. The voltage comes through the ATmega328 internal protection diodes from the GPIO pins to the +5V .
The anode is on the GPIO pin (analog or digital) and the cathode of the diode is on +5V. What this means ( in plain English) is that you CANNOT turn ZOFF the arduino Power if there is ANY voltage on ANY analog or digital pin.