NEED
Archiver
Posts: 46,084
Hello All,
I am working on a project, and I would greatly appreciate your help
in selecting an opto-isolator. I have a device that emits a 12-volt
square wave. I have a BASIC Stamp that is being used as the micro-
controller for the project, which consequently needs to be able
to "read" the aforementioned square wave (via the
"pulsein"
command). I need an opto-isolator to allow me to "convert"
the 12-
volt square wave to a 5-volt square wave. As an added benefit, the
opto-isolator will offer some electrical isolation. I am interested
in the square wave frequency around 400 Hz. My micro-controller will
measure the duration the pulse is high or low. At 400 Hz, the high
or low portion of the pulse should be approximately 1250
microseconds. I need to be able to easily measure the frequency to
within 2 Hz (of course, being within 1 Hz would be even better and
preferable). At 398 Hz, the high or low portion of the pulse should
be approximately 1256 microseconds. Thus, there is a pulse-duration
delta between 398 Hz and 400 Hz of approximately 6 microseconds.
Now to my question: Could someone suggest a suitable opto-isolator
that will comfortably satisfy the above requirements? I need to
ensure the opto-isolator will accommodate the 5 and 12-volt voltages
and have a quick enough response time to ensure the frequency can be
accurately obtained. If you have a different solution altogether, I
welcome it as well.
Thank you in advance for your help, and I look forward to your
responses.
I am working on a project, and I would greatly appreciate your help
in selecting an opto-isolator. I have a device that emits a 12-volt
square wave. I have a BASIC Stamp that is being used as the micro-
controller for the project, which consequently needs to be able
to "read" the aforementioned square wave (via the
"pulsein"
command). I need an opto-isolator to allow me to "convert"
the 12-
volt square wave to a 5-volt square wave. As an added benefit, the
opto-isolator will offer some electrical isolation. I am interested
in the square wave frequency around 400 Hz. My micro-controller will
measure the duration the pulse is high or low. At 400 Hz, the high
or low portion of the pulse should be approximately 1250
microseconds. I need to be able to easily measure the frequency to
within 2 Hz (of course, being within 1 Hz would be even better and
preferable). At 398 Hz, the high or low portion of the pulse should
be approximately 1256 microseconds. Thus, there is a pulse-duration
delta between 398 Hz and 400 Hz of approximately 6 microseconds.
Now to my question: Could someone suggest a suitable opto-isolator
that will comfortably satisfy the above requirements? I need to
ensure the opto-isolator will accommodate the 5 and 12-volt voltages
and have a quick enough response time to ensure the frequency can be
accurately obtained. If you have a different solution altogether, I
welcome it as well.
Thank you in advance for your help, and I look forward to your
responses.
Comments
out of range of the cheap 4N26 class device (you might even be able to tune
one of those to do the job by selecting resistor values to match the
specific 4N26; not a good idea). Look for a 6N136 or better yet, a 6N137
(they are very different devices. In both cases, you will want a resistor
in series with the LED to set the current to about 10mA, 1K should be about
right. The output of both devices is an NPN open collector, so you need a
pullup resistor, 1K should be about right for that too. (The 6N137 is a
faster device and you could take the pullup resistor down as low as 330
Ohms, but if you use the 1K, either part should work and do your stated job.)
Bob Underwood
> Date: Mon, 25 Nov 2002 22:03:47 -0000
> From: "jowiri" <jowiri@y...>
>Subject: NEED "HIGH-SPEED" OPTO-ISOLATOR FOR 12-VOLT SQUARE WAVE
>
>Hello All,
>
>I am working on a project, and I would greatly appreciate your help
>in selecting an opto-isolator. I have a device that emits a 12-volt
>square wave. I have a BASIC Stamp that is being used as the micro-
>controller for the project, which consequently needs to be able
>to "read" the aforementioned square wave (via the
>"pulsein"
>command). I need an opto-isolator to allow me to "convert"
>the 12-
>volt square wave to a 5-volt square wave. As an added benefit, the
>opto-isolator will offer some electrical isolation. I am interested
>in the square wave frequency around 400 Hz. My micro-controller will
>measure the duration the pulse is high or low. At 400 Hz, the high
>or low portion of the pulse should be approximately 1250
>microseconds. I need to be able to easily measure the frequency to
>within 2 Hz (of course, being within 1 Hz would be even better and
>preferable). At 398 Hz, the high or low portion of the pulse should
>be approximately 1256 microseconds. Thus, there is a pulse-duration
>delta between 398 Hz and 400 Hz of approximately 6 microseconds.
>
>Now to my question: Could someone suggest a suitable opto-isolator
>that will comfortably satisfy the above requirements? I need to
>ensure the opto-isolator will accommodate the 5 and 12-volt voltages
>and have a quick enough response time to ensure the frequency can be
>accurately obtained. If you have a different solution altogether, I
>welcome it as well.
>
>Thank you in advance for your help, and I look forward to your
>responses.
connect a resistor (1k or less) from the base lead to ground (emitter). By
doing this you the transistor porition will turn off faster once the LED is
turned off.
[noparse][[/noparse]Non-text portions of this message have been removed]
Try this, or something similar, since with turn on and turn-off time your
several uS spec will be impossible with the CTR of most of the available
optos.
Pick a transistor out opto that has as high a CTR as you can find. H11L1 is
a simple one channel that's OK. DO a kind of 'common emitter' thing by
connecting the emitter of the opto trans to the base of a second transistor,
something like a 2N3904 and the collector high through a resistor (start
with around 10k). This becomes the base resistor for the 3904. Then put a
15k resistor or so as a load resistor for the 3904 and connect for either
direct or inverted output accordingly. With the resistor on the high side,
it makes a nice fast isolate inverter.
I did a series of these and charted and plotted the results in order to bias
the extra trans for the highest possible CRT. The results on the scope then
proved the excel sheet. This way, you'll also know that however many of
these you build, you will be able to expect them all to work the same.
Chris
> In addition, if the transistor portion of the opto-osolator
> has a base lead,
> connect a resistor (1k or less) from the base lead to ground
> (emitter). By
> doing this you the transistor porition will turn off faster
> once the LED is
> turned off.
>
>