All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > The Projects Forum

Notices

The Projects Forum Working on an electronics project and would like some suggestions, help or critiques? If you would like to comment or assist others with their projects, this is the place to do it.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-15-2010, 05:22 AM
chumarkrch chumarkrch is offline
New Member
 
Join Date: Nov 2009
Posts: 7
Default 4N25 Optocoupler (Optoisolator)

This is my first time positing to the forums and I am simply trying to use the 4N25 optoisolator to electrically isolate a DC voltage so it can be sensed by a microprocessor on the output side. Here is the basic circuit I am using:




This is the same circuit I've seen on other websites describing how to use the 4N25. I have varied the R1 and R2 values from 100 Ohms up to 10 KOhms and varied the input V1 from 0 to 10 V but the output either remains at some constant value in the mV or it is equal to V2. However, it never is equal to V1 which is what it should do.

Somebody please let me know what I am doing wrong.
Reply With Quote
  #2  
Old 03-15-2010, 05:43 AM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
 
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,030
Default

They're designed to be used as optically isolated logic switches, not as linear devices.

Your circuit is wrong. R2 needs to be in the wire that goes to +5v instead of between pin 5 and Vout. Wired the way it is, you would always read 5v on the output.

The pin numbers for 4 and 6 are in the wrong place; exchange them.

The emitter side (on the left) has a Vf of around 1.2v @10mA. Calculate your current limiting resistor R1 as:
Rlimit = (Vsupply - 1.2v)/10mA
So, if your V1 is either 5v or 0v, then:
Rlimit = (5v-1.2v)/10mA = 3.8/0.01 = 380 Ohms. Use the closest standard value, or use resistors in series or parallel to get 380 Ohms.

The 4N25 has a current transfer ratio of 20%
Don't expect the output to sink much current. Use a 2.5k to 3k resistor for R2.
__________________
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
  #3  
Old 03-15-2010, 03:56 PM
BMorse's Avatar
BMorse BMorse is offline
Senior Member
 
Join Date: Sep 2009
Location: Vermontville, Michigan (GMT -5)
Posts: 2,658
Blog Entries: 15
Default

Quote:
Originally Posted by chumarkrch View Post
This is my first time positing to the forums and I am simply trying to use the 4N25 optoisolator to electrically isolate a DC voltage so it can be sensed by a microprocessor on the output side. Here is the basic circuit I am using:




This is the same circuit I've seen on other websites describing how to use the 4N25. I have varied the R1 and R2 values from 100 Ohms up to 10 KOhms and varied the input V1 from 0 to 10 V but the output either remains at some constant value in the mV or it is equal to V2. However, it never is equal to V1 which is what it should do.

Somebody please let me know what I am doing wrong.

VOut should also be connected between the pin and the resistor, not where you have it on the circuit or else you will always be reading the value of V2....

B. Morse
__________________
There is no spoon -Neo-
Disclaimer: The example programs,circuits, projects and information I provide or post on this web site are for educational purposes only. By copying anything from this site posted by me, you agree to the "as is" nature of the programs, circuits, information and to the statements listed in this disclaimer.No warranty or liability is expressed or implied. Working with AC /DC voltages can be dangerous and even deadly. Proceed at your own risk!
Reply With Quote
  #4  
Old 03-15-2010, 11:12 PM
chumarkrch chumarkrch is offline
New Member
 
Join Date: Nov 2009
Posts: 7
Default

I tried your solution with the following circuit:



Maybe I'm not understanding something. By an optically isolated switch, does that mean it requires some signal to go high or low to start? How exactly does this start? Also, will it simply output the same DC voltage on V1 on the output?

Thank You.
Reply With Quote
  #5  
Old 03-15-2010, 11:26 PM
hgmjr's Avatar
hgmjr hgmjr is offline
Super Moderator
 
Join Date: Jan 2005
Location: Tennessee, USA (GMT-6)
Posts: 9,030
Blog Entries: 11
Default

Here is a link to the wikipedia section the topic of opto-isolators. This material will help provide you with a bit more background on the subject. Hopefully it will answer you main questions. Anything that is not clear you can come back here and ask for clarification.

hgmjr
Reply With Quote
  #6  
Old 03-16-2010, 12:41 AM
BMorse's Avatar
BMorse BMorse is offline
Senior Member
 
Join Date: Sep 2009
Location: Vermontville, Michigan (GMT -5)
Posts: 2,658
Blog Entries: 15
Default

Quote:
Originally Posted by chumarkrch View Post
I tried your solution with the following circuit:



Maybe I'm not understanding something. By an optically isolated switch, does that mean it requires some signal to go high or low to start? How exactly does this start? Also, will it simply output the same DC voltage on V1 on the output?

Thank You.

With the circuit above, you should read V2 on Vout.

If you disconnect V1, then you should read almost 0 volts on Vout.

You "activate" the opto coupler by turning the LED side on or off to control the state of the output phototransistor...

B. Morse
__________________
There is no spoon -Neo-
Disclaimer: The example programs,circuits, projects and information I provide or post on this web site are for educational purposes only. By copying anything from this site posted by me, you agree to the "as is" nature of the programs, circuits, information and to the statements listed in this disclaimer.No warranty or liability is expressed or implied. Working with AC /DC voltages can be dangerous and even deadly. Proceed at your own risk!
Reply With Quote
  #7  
Old 03-16-2010, 01:34 AM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
 
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,030
Default

You misunderstood me when I said the pin numbers were swapped.

You also misunderstood me when I said the resistor needed to be moved to the wire going to Vcc.

You have likely destroyed the optocoupler, but here is how you should have connected it. Note the corrections in red.

Attached Images
File Type: jpg 2010034n25v2.jpg (10.8 KB, 500 views)
__________________
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
  #8  
Old 03-17-2010, 06:25 AM
chumarkrch chumarkrch is offline
New Member
 
Join Date: Nov 2009
Posts: 7
Default

Thanks for all your help.

I still can't seem to get it working so I think the optocoupler may not be the right solution for what I'm trying to do.

I'm trying to isolate the DC voltage of a battery so I can send it to the analog input of a microprocessor. Can anyone offer up a type of circuit or solution that would do this.
Reply With Quote
  #9  
Old 03-17-2010, 06:54 AM
retched's Avatar
retched retched is offline
Senior Member
 
Join Date: Dec 2009
Location: Baltimore, MD
Posts: 5,198
Blog Entries: 14
Default

Why do you want to isolate it? And you were right that the optocoupler was wrong for the job.

If you want to isolate something from its power source, you should use an isolation transformer. Isolation transformers have the same number of windings on the primary and secondary windings so they do not raise or lower the voltage, just physically isolate it.

You may want to put it out there and just tell us what your trying to do. That will help save time with the wild goose chases.
__________________
-rm-
Reply With Quote
  #10  
Old 03-17-2010, 04:01 PM
chumarkrch chumarkrch is offline
New Member
 
Join Date: Nov 2009
Posts: 7
Default

It's a battery management system that will be a part of a Formula Hybrid vehicle. The rules say that the high voltage circuit must be isolated from the low voltage circuit. However, we have to sense the battery voltages for the battery management system to work. It is also to protect the microprocessor.
Reply With Quote
Reply   Post New Thread

Tags
, ,


Related Site Pages
Section Title
Textbook Mutual inductance and basic operation : Transformers
Textbook Voltage regulation : Transformers
Textbook Resonance in series-parallel circuits : Resonance
Textbook Simple parallel (tank circuit) resonance : Resonance
Textbook Series resistor-capacitor circuits : Reactance And Impedance -- Capacitive
Textbook The common-emitter amplifier : Bipolar Junction Transistors
Textbook Active mode operation : Bipolar Junction Transistors
Textbook Simple parallel circuits : Series And Parallel Circuits
Textbook Simple series circuits : Series And Parallel Circuits
Textbook Scientific notation in SPICE : Scientific Notation And Metric Prefixes


Similar Threads
Thread Thread Starter Forum Replies Last Post
optoisolator - triac\SCR - FOR DC !! yehezkel2 General Electronics Chat 1 01-06-2010 09:55 PM
Using an Optocoupler as a switching device rapseez The Projects Forum 17 08-13-2009 02:25 AM
~12v Optocoupler Driver mikemania General Electronics Chat 3 07-20-2009 02:59 PM
Optoisolator NEC 2532 problem. SIcam The Projects Forum 2 09-03-2008 10:37 PM
Optocoupler and gate drive Marie The Projects Forum 10 02-12-2008 03:43 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:20 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.