Help with Simple Circuit, Please

Thread Starter

mikey32230

Joined Aug 21, 2015
8
Hello,

I am working on my first simple circuit project. I am very new to electronics, but I have picked up a very basic understanding of general components and circuitry.

I have a few questions today. Below is a very basic schematic of my project. Don't worry too much about specific voltage/current quantities (I made the schematic very generic).



This is how it should (typically) work:

- Gadget 1 will turn on for a split second, allowing current to flow through the Optoisolator and activate Gadget 3.
- Then, Gadget 2 will turn on for a split second, allowing current to flow through the Optoisolator and activate Gadget 3.

Additional Info / Assumptions / Possibilities:
- Gadgets 1 & 2 can potentially power-on in any order, they could even turn on at the same time.
- Gadgets 1 & 2 can potentially remain powered-on for indefinite periods of time (seconds, minutes, technically even hours, etc).
Now, for my actual questions :)
As you can see, I am unsure as to what components I should insert into the two (-) return paths after the optoisolator. Do I need to insert anything? What happens if only gadget 1 is powered-on and current flows to both gadget 1 and gadget 2's negative terminals?

If that is an issue what components do I need to add at the (-) return paths? Simple diodes don't work because you know which battery the power is coming from at any given time. Is there a particular component that people use to solve this issue?


*Extra question:
Would a simple NPN transistor work as a replacement for the optocoupler? If I connect gadget 1 & 2's positive paths to the base of a NPN transistor it should allow gadget 3's current to pass across the transistor's collector and emitter. However, what happens to the the current applied to the base? I don't want that extra current flowing through the transistor into Gadget 3's sub-circuit.. do transistors allow the base current to flow out the emitter or what happens to it?
 

Dodgydave

Joined Jun 22, 2012
8,465
Depending upon the gadget battery voltages, you can use resistors for the (?) blanks, any value fom 330 to 1k ohms, if yo use a transistor to switch on gadget 3, you will need to join the negative supplies together, opto will give you best isolation.
 
Hello,
... Don't worry too much about specific voltage/current quantities (I made the schematic very generic).
Well, you need to worry about that. The devil is in the details. You have a general concept correct, now we have to sweat the details. For instance, you need current limiting resistors in each of the two input arms coming from Gadget 1 and Gadget 2, as dave says.

Please tell us what these gadgets are, what kind of "turning on" circuit they have, and what Gadget 3 would be; what kind of voltage and current it would require.

There isn't a generic solution to this that will work. It depends highly on the details.
 

Thread Starter

mikey32230

Joined Aug 21, 2015
8
Well, you need to worry about that. The devil is in the details. You have a general concept correct, now we have to sweat the details. For instance, you need current limiting resistors in each of the two input arms coming from Gadget 1 and Gadget 2, as dave says.

Please tell us what these gadgets are, what kind of "turning on" circuit they have, and what Gadget 3 would be; what kind of voltage and current it would require.

There isn't a generic solution to this that will work. It depends highly on the details.
I guess at this point I'm just generally curious about what happens with the (-) returns. If I send current to the negative terminal of a battery that isnt sending current from its positive terminal what happens? Is it bad, why or why not?

And why would the resistors you mention potentially solve this problem?
 

Dodgydave

Joined Jun 22, 2012
8,465
The resistors are to limit the current in the opto led, leds usually drop 1.8V, without the resistors the led will blow..

Also what current is needed in gadget 3, will determine if you need an opto coupler or relay.
 

dl324

Joined Mar 30, 2015
9,108
I guess at this point I'm just generally curious about what happens with the (-) returns. If I send current to the negative terminal of a battery that isnt sending current from its positive terminal what happens? Is it bad, why or why not?
If I redraw your schematic and add switches to indicate on/off, you can see that if a "gadget" is off (switch open), there is no path (complete/closed loop) for current to flow.
simple.jpg
Nothing good or bad will happen to a "gadget" that is off.

Without R1 and R2, the diodes or the LED in the optoisolator could be damaged. Similarly, with no current limit for the transistor in the optoisolator, the transistor would likely be damaged.
 

Thread Starter

mikey32230

Joined Aug 21, 2015
8
If I redraw your schematic and add switches to indicate on/off, you can see that if a "gadget" is off (switch open), there is no path (complete/closed loop) for current to flow.
View attachment 93130
Nothing good or bad will happen to a "gadget" that is off.

Without R1 and R2, the diodes or the LED in the optoisolator could be damaged. Similarly, with no current limit for the transistor in the optoisolator, the transistor would likely be damaged.
Thank you for your reply :)

First of all, I'm not worried about putting in resistors to protect the optocoupler, although I drew gadgets 1 & 2 as actual 9v batteries, the gadgets themselves already have resistors in them that bring down the current before it reaches the optocoupler. There was no way for you guys to really know that, because my schematic isn't really drawn that well, sorry.

Now, about your redrawing. I still don't understand why current from one of the gadgets won't also flow to the negative terminal of an OFF battery? Doesn't the current flow everywhere? Most will flow to the negative of the ON gadget's battery (to complete the circuit), but won't a little bit also flow to GND as well the negative of the OFF?
 

GopherT

Joined Nov 23, 2012
8,012
Thank you for your reply :)

First of all, I'm not worried about putting in resistors to protect the optocoupler, although I drew gadgets 1 & 2 as actual 9v batteries, the gadgets themselves already have resistors in them that bring down the current before it reaches the optocoupler. There was no way for you guys to really know that, because my schematic isn't really drawn that well, sorry.

Now, about your redrawing. I still don't understand why current from one of the gadgets won't also flow to the negative terminal of an OFF battery? Doesn't the current flow everywhere? Most will flow to the negative of the ON gadget's battery (to complete the circuit), but won't a little bit also flow to GND as well the negative of the OFF?

No current will flow into the battery that is off because nothing is flowing out of the battery that is off.
 

Thread Starter

mikey32230

Joined Aug 21, 2015
8
No current will flow into the battery that is off because nothing is flowing out of the battery that is off.
Okay I get it... It's outside of the path of the circuit, it just took me a while to get that to click in my head :rolleyes:

So what if both were on at the same time?
 

GopherT

Joined Nov 23, 2012
8,012
Okay I get it... It's outside of the path of the circuit, it just took me a while to get that to click in my head :rolleyes:

So what if both were on at the same time?
Then the load that the first battery supplies will be supplied current and the exact same amount of current will split of the common (ground) and flow back into each battery as it should. All will be balanced.
 

Thread Starter

mikey32230

Joined Aug 21, 2015
8
Then the load that the first battery supplies will be supplied current and the exact same amount of current will split of the common (ground) and flow back into each battery as it should. All will be balanced.
Good! I'm glad that will work. You might not, but do you know the technical reason as to why the electrons will flow balanced like that?instead of taking the nearest negative terminal?

Okay, so my "extra question" if I could use a NPN transistor in place of the optocoupler. As I start to think about this, I've become a bit confused because I've never actually done any of this before.

A transistor has 3 pins, the collector and emitter would be connected to gadget 3 and be part of the circuit on the right side of that schematic. Then I attach the base within the path of the left hand side circuit.. But where does the negative come out of the transistor?since the base in the positive -in where is the negative out?

Edit:

So I'm testing the transistor as we speak, and it works if I use the emitter as the negative-out when the base is positive-in... Does the work similar to the situation we discussed with the gadget 1 & 2 batteries both being on that the same time? Because now I have battery 1's current flowing through the emitter as well as battery 3's current flowing out the emitter, does battery 1s current/ voltage out of the emitter not mix with the current/voltage of battery 3s?
 
Last edited:

Thread Starter

mikey32230

Joined Aug 21, 2015
8
What are these "gadgets" and what is the purpose of the circuit?

This question was asked in post #3 but you are avoiding the question, why is that?
Because I don't really want to get in to what it is, I'm just trying to understand some of these random concepts. I know it's inconvenient for some of you to not cleanly see the whole story. Sorry :/
 

GopherT

Joined Nov 23, 2012
8,012
Good! I'm glad that will work. You might not, but do you know the technical reason as to why the electrons will flow balanced like that?instead of taking the nearest negative terminal?
If more electrons would enter one battery than leave it, and then fewer would return to the other battery, then you are separating charge and making an electrostatically imbalance. The two batteries would stick to each other like magnets (but because of electrostatic charge rather than magnetic attraction. That would be interesting - it doesn't happen.

Also, more realistically, once an electron leaves, then there is a pull from the other end to attract the same number of electrons. You need a circuit, you cannot just expect electrons to diffuse to where ever they can diffuse.

Okay, so my "extra question" if I could use a NPN transistor in place of the optocoupler. As I start to think about this, I've become a bit confused because I've never actually done any of this before.

A transistor has 3 pins, the collector and emitter would be connected to gadget 3 and be part of the circuit on the right side of that schematic. Then I attach the base within the path of the left hand side circuit.. But where does the negative come out of the transistor?since the base in the positive -in where is the negative out?
Ok, the right side of the circuit (with optocoupler) needs its own power supply, its own ground and pin 6 can be ignored (the light of the opto-coupler LED turns on the transistor instead of current to the pin6.

If the right side (Device 3) does not need to be isolated, then we can figure out how to simply use an NPN instead of an optocoupler. What do you really need?
 

blocco a spirale

Joined Jun 18, 2008
1,546
Because I don't really want to get in to what it is, I'm just trying to understand some of these random concepts. I know it's inconvenient for some of you to not cleanly see the whole story. Sorry :/
It doesn't affect me but without providing the details or a work-in-progress schematic no one can provide a solution and this thread will grind to a halt when people get tired of guessing.

It's also somewhat uncooperative to ask for advice on something and to withhold critical information about that something as it wastes the time of the good people who are trying to help you.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
5,682
It doesn't affect me but without providing the details or a work-in-progress schematic no one can provide a solution and this thread will grind to a halt when people get tired of guessing
Or never get involved at all, because the thread starter gives the impression that they will not be forthcoming.
 

Thread Starter

mikey32230

Joined Aug 21, 2015
8
Ok, the right side of the circuit (with optocoupler) needs its own power supply, its own ground and pin 6 can be ignored (the light of the opto-coupler LED turns on the transistor instead of current to the pin6.

If the right side (Device 3) does not need to be isolated, then we can figure out how to simply use an NPN instead of an optocoupler. What do you really need?
Okay thank you for the technical explaination, I suppose that makes sense :)

As for the optocoupler vs transistor.
I originally had it set up and working with the optocoupler as you described ( Pin 6 being ignored.) Device 3 does have its own power supply (3v battery). I originally assumed it needed to be isolated because I Thought it would be a problem to have a battery on the left side intermingling with the circuit of the Device 3 battery on the right side. But I did hook up the NPN transistor and it does function. But given your explaination above, the Electrons from the left side should not interfere with the circuit of the right side device 3 battery?

So I guess that means I don't need isolation? What would be a simple example of when you do need isolation?
 

GopherT

Joined Nov 23, 2012
8,012
Okay thank you for the technical explaination, I suppose that makes sense :)

As for the optocoupler vs transistor.
I originally had it set up and working with the optocoupler as you described ( Pin 6 being ignored.) Device 3 does have its own power supply (3v battery). I originally assumed it needed to be isolated because I Thought it would be a problem to have a battery on the left side intermingling with the circuit of the Device 3 battery on the right side. But I did hook up the NPN transistor and it does function. But given your explaination above, the Electrons from the left side should not interfere with the circuit of the right side device 3 battery?

So I guess that means I don't need isolation? What would be a simple example of when you do need isolation?
Isolation is needed if you have a high voltage device on the right side. Or noise-filled inductive loads. Or if you cannot have a shared ground for some reason. (level shifting issues with logic device).
 

dl324

Joined Mar 30, 2015
9,108
Most will flow to the negative of the ON gadget's battery (to complete the circuit), but won't a little bit also flow to GND as well the negative of the OFF?
Kirchhoff's Current Law states that the sum of currents entering and leaving a node equals zero. The current in a loop is the same for all elements; no loop, no current. So when one of your gadgets is off, no current is entering or leaving that gadget.
 
Top