Can anyone tell what's wrong with my circuit?

  • Thread starter UWouldKnow
  • Start date
  • Tags
    Circuit
In summary, the circuit seems to work when I hook it up to a USB port, but when I try to run the code it doesn't do anything. The relay is supposed to trigger the LED's on and off, but when I run the code the relay isn't even making any noise. I think the issue may be with the power supply, but I don't know how to test that.
  • #1
UWouldKnow
19
2
I am doing basic tutorials with an arduino but I can't seem to get this circuit to work. I hooked everything up and ran the given code but nothing happens. The relay is supposed to trigger the led's on and off but when I run the code the relay isn't even making any noise

20170907_184645_zpsyszssulz.jpg

20170907_185942_zps29t1ejh5.jpg
COLOR]
 

Attachments

  • 20170907_184645_zpsyszssulz-jpg.jpg
    20170907_184645_zpsyszssulz-jpg.jpg
    43.7 KB · Views: 469
Last edited by a moderator:
Engineering news on Phys.org
  • #2
UWouldKnow said:
am doing basic tutorials with an arduino but I can't seem to get this circuit to work. I hooked everything up and ran the given code but nothing happens. The relay is supposed to trigger the led's on and off but when I run the code the relay isn't even making any

most of your images are missing

show us your circuit diagram(s) for the circuit
also show the code for the micro
 
  • Like
Likes UWouldKnow and Asymptotic
  • #3
Have you tried running everything off battery power (or wall wart) instead of USB? Without seeing a schematic or relay number that would be my guess.
 
  • Like
Likes UWouldKnow
  • #4
davenn said:
show us your circuit diagram(s) for the circuit
It concerns me that so many circuit experimenters seem to present their questions in the form of pictures of a breadboard layout. Am I so old fashioned in expecting a symbolic circuit diagram? I wouldn't expect someone with an arithmetic problem to have it presented in terms of piles of beans. I wonder if it's the general habit to work with wires and components, directly form the device spec sheet. A breadboard realisation of fast circuitry - or even slow analogue - can be full of parasitics.
 
  • Like
Likes davenn, gleem, cnh1995 and 1 other person
  • #5
Have you got a multi-meter and done some basic checks? eg is power getting to all the places it should? Is there any evidence the code is running? eg is the pin that drives the relay changing? That check alone might narrow the problem down to one half of the circuit or the other.
 
  • Like
Likes UWouldKnow
  • #6
I notice the OP has not replied to any of this. Perhaps he needs a chance to do some checking of his wiring and code.
We tend to forget how hard troubleshooting can be to the uninitiated (and even the initiated).
 
  • Like
Likes CWatters and davenn
  • #7
mishima said:
Have you tried running everything off battery power (or wall wart) instead of USB? Without seeing a schematic or relay number that would be my guess.

Thanks, I'll try that... I think that's what the issue is. What do you mean by wall wart? Is that something that converts the wall power into something suitible for an arduino

sophiecentaur said:
It concerns me that so many circuit experimenters seem to present their questions in the form of pictures of a breadboard layout. Am I so old fashioned in expecting a symbolic circuit diagram? I wouldn't expect someone with an arithmetic problem to have it presented in terms of piles of beans. I wonder if it's the general habit to work with wires and components, directly form the device spec sheet. A breadboard realisation of fast circuitry - or even slow analogue - can be full of parasitics.

Sorry I didn't mean to bother, I was just wondering if someone could see any obvious issues right off the bat. I was just curious as I am trying to learn and am in no need to try to get this circuit to work. The circuit diagram and code was made by a starter kit, so I am assuming that their circuit and code is correct. I should have been more clear and explained that

CWatters said:
Have you got a multi-meter and done some basic checks? eg is power getting to all the places it should? Is there any evidence the code is running? eg is the pin that drives the relay changing? That check alone might narrow the problem down to one half of the circuit or the other.

Interesting, I would be glad to run some test with my multimeter but I have no idea what to check for. And you it receives the code but it is just not doing anything.

davenn said:
most of your images are missing

show us your circuit diagram(s) for the circuit
also show the code for the micro

The code and circuit diagram was created by a starter kit so I was assuming that it is correct, I could still add them to the chat if your interested though.
 
  • #8
UWouldKnow said:
The code and circuit diagram was created by a starter kit so I was assuming that it is correct, I could still add them to the chat if your interested though.

we ALL want to see them so that we have a better understanding of what you are talking about

again ... please post them
 
  • #9
20170910_012658_zpsurwcjjra.jpg

20170910_012729_zps85z0gybc.jpg

20170910_012746_zpsrnrskhzx.jpg
20170910_012752_zpsj1ohxbis.jpg
 
  • #10
davenn said:
we ALL want to see them so that we have a better understanding of what you are talking about

again ... please post them

Okay I just posted them
 
  • #11
Troubleshooting:
The purpose of the following is not to make you feel bad - it's exactly what I (and the others here) would be checking from the very start)
Take nothing for granted about what you have done. Assembling circuits is an alien world for most people.
First of all, do you have your supply volts and ground actually arriving at your breadboard (both places) and processor?
Does the processor actually give you a different voltage on Pin 2 when it's supposed to? That test will determine if your code is ok. If that's a fail then look again at your code.
Are all the leads firmly in contact with the holes on the board?
Does the collector volts go 'down' when Pin 2 volts go 'up'?
I forgot - the most important is to check (twice) that the connections really are on the correct pins and not on a 'mirror image' in your head when you are looking at the thing upside down? (Happens every day!)
Is the transistor emitter actually connected to ground?
etc etc.
This is not a whole afternoon's work but something that need only take a couple of minutes and would be 'automatic'.
With luck, you may find one of the above tests 'fails' and you will have found your circuit fault.
 
  • Like
Likes cnh1995
  • #12
Are either of the LEDs lit?
If +5V and 0V (ground) are connected to the circuit then the LED on the N.C. relay pole ought to be on.

To isolate the transistor and Arduino output pin 2 from contention, temporarily disconnect the transistor collector wire, and jump it to ground. The relay coil should energize, switch the contacts, and the other LED ought to turn on.
Q-driven-relay(test).jpg


If the relay doesn't switch, then a problem exists in this 'half' of the circuit.
If the relay operates, and the other LED turns on, then the problem is on the Arduino/transistor side.
 
  • Like
Likes davenn, cnh1995 and sophiecentaur
  • #13
You'll most likely be able to resolve the problem using the troubleshooting tips from Sophiecentaur and asymptotic.

My two cents: I believe it is also possible that your arduino board is sourcing too much current (coils+LEDs). That gives you an error message "problem uploading to board" when you try to run the code. What is the current rating of the relay coil? Try using a separate 5V supply to feed the coil.
Edit: I don't see a mention of such error message in your OP. Are you sure the code was uploaded successfully?
 
Last edited:
  • Like
Likes Asymptotic
  • #14
cnh1995 said:
Try using a separate 5V supply to feed the coil.
This is a great idea, and has shaken loose another possibility ... is the Arduino USB cable plugged directly into a computer USB port, or is it plugged into a USB hub? An unpowered USB hub doesn't have much current sourcing capacity, and more often than not, doesn't have the juice to power an external HDD.
 
  • Like
Likes rbelli1 and cnh1995
  • #15
Is the diode the wrong way around?

EDIT: Scratch that - the diode IS the wrong way around, even in the breadboard diagram. Not your fault. The circuit diagram is correct. Give the person who drew the breadboard diagram an insulting slap across the face.
 
  • Like
Likes Asymptotic, sophiecentaur, davenn and 2 others
  • #16
Guineafowl said:
Is the diode the wrong way around?

EDIT: Scratch that - the diode IS the wrong way around, even in the breadboard diagram. Not your fault. The circuit diagram is correct. Give the person who drew the breadboard diagram an insulting slap across the face.

yup, good spotting

the flyback diode is reversed on the breadboard layout :smile:
result ... the relay won't operate

As @sophiecentaur said earlier, this is why we wanted the diagrams etc so we could check for errors

NOTE ... DONT DO Asymptotic's test UNTIL you have reversed the diode and checked operation, else you will just be shorting the 5V to ground via the poor diode and it probably won't survive that

Asymptotic said:
To isolate the transistor and Arduino output pin 2 from contention, temporarily disconnect the transistor collector wire, and jump it to ground. The relay coil should energize, switch the contacts, and the other LED ought to turn on.
Dave
 
  • Like
Likes Asymptotic and phinds

1. What could be causing my circuit to not work properly?

There are several potential reasons why a circuit may not be functioning correctly. It could be due to a faulty component, incorrect wiring, or a design flaw. It is important to carefully troubleshoot and analyze each part of the circuit to determine the root cause of the issue.

2. How can I test for problems in my circuit?

One way to test for problems in a circuit is to use a multimeter to measure the voltage and current at various points. This can help identify any faulty components or breaks in the circuit. Another method is to use a breadboard or simulation software to simulate the circuit and identify any potential issues.

3. Is it necessary to follow a specific circuit design or can I make modifications?

It is generally recommended to follow a specific circuit design to ensure proper functionality. However, modifications can be made as long as they are carefully considered and do not compromise the overall design. Any changes should also be thoroughly tested before implementing them in the final circuit.

4. Can the power source affect the performance of my circuit?

Yes, the power source is a critical component of a circuit and can significantly impact its performance. It is important to use the correct voltage and current ratings for the circuit's components and to ensure a stable power supply to prevent any potential issues.

5. What should I do if my circuit is overheating?

If a circuit is overheating, it could be a sign of too much current flowing through the components or a faulty component. It is important to check the voltage and current ratings of the components and make sure they are not being exceeded. If the issue persists, it may be necessary to replace any damaged components.

Similar threads

Replies
8
Views
847
  • Electrical Engineering
Replies
5
Views
2K
Replies
12
Views
2K
Replies
7
Views
1K
  • Electrical Engineering
Replies
10
Views
871
Replies
9
Views
4K
  • Electrical Engineering
Replies
11
Views
3K
  • Electrical Engineering
Replies
11
Views
4K
  • Electrical Engineering
Replies
26
Views
2K
  • Electrical Engineering
Replies
6
Views
2K
Back
Top