Author Topic: Optical serial bridge.  (Read 3625 times)

0 Members and 2 Guests are viewing this topic.

Offline daddarioTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ee
Optical serial bridge.
« on: October 23, 2016, 04:33:17 pm »
I'm facing some difficulties trying to design an optical serial adapter for an existing piece of gear. Having only done a few IR adapters before, I've never ran into any issues with speed or sensitivity before, however this time it's just not working out. The transmitter on the device side is a small visible red LED, as the receiver for it, I can pretty much only cram an 0805 or 1206 there. Having tried Kingbright KP-2012P3C and Vishay TEMT7000X01, both give unacceptable results - depending on the current I either get nearly non existent sensitivity or an unusably "round" signal at 9600 baud. Setting the load resistor to about 8k? from a 5V supply gives the most optimal result, where the signal is sometimes readable. The rise and fall times are so bad, I'm essentially getting runt pulses.
My competence in HF electronics over 30MHz rolls off 3dB/oct.
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 3061
  • Country: au
Re: Optical serial bridge.
« Reply #1 on: October 24, 2016, 12:07:04 am »
From the datasheet of the Kingbright KP-2012P3C the fall time is the killer and that is usually because the transistor is slow to recover from saturation, therefore don't let the transistor saturate. To get better sensitivity you might need some optical gain i.e. a lense in front of the transistor.
 

Online Whales

  • Super Contributor
  • ***
  • Posts: 2703
  • Country: au
    • Halestrom
Re: Optical serial bridge.
« Reply #2 on: October 24, 2016, 02:30:01 am »
Perhaps it's the red led that's slow, not the receiver?

If your phototransistor is not sensitive enough, consider wiring it up to an NPN + resistor amp.  I use normal LEDs as optical sensors (RPM measurement), but they are very insensitive compared to phototransistors, so I use them with a darlington (or triple) attached.
« Last Edit: October 24, 2016, 02:40:43 am by Whales »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9789
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Optical serial bridge.
« Reply #3 on: October 24, 2016, 03:51:03 am »
Try adding a resistor, on the order of 100k, from base to emitter on the phototransistor. That trick is often used on 6 pin optoisolators to speed them up.
Cryptocurrency has taught me to love math and at the same time be baffled by it.
Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
BTC: 18813fu8LQEdDwH9YLM1ABed3XwCfeSeFi
 

Offline daddarioTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ee
Re: Optical serial bridge.
« Reply #4 on: October 25, 2016, 04:08:35 pm »
Perhaps it's the red led that's slow, not the receiver?

The device side is working fine and I've seen the original serial adapter for it, it also had a small 0805 on the receiving side and the input to the UART chip was a nice square wave, so there has to exist something fast enough.

Try adding a resistor, on the order of 100k, from base to emitter on the phototransistor. That trick is often used on 6 pin optoisolators to speed them up.

I haven't really seen a three pin SMD open phototransitor that has a base pin, but I've read an app note, I think by Vishay, about that method for optocouplers.
My competence in HF electronics over 30MHz rolls off 3dB/oct.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 17272
  • Country: de
Re: Optical serial bridge.
« Reply #5 on: October 25, 2016, 08:35:22 pm »
The receiver side might need an extra amplification stage, as a phototransistor is slow when working with a high load resistor, especially if the phototransistor is getting into saturation. So you might need a transistor and two resistors. So think 0402 and a small case transistor / FET.
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Optical serial bridge.
« Reply #6 on: October 26, 2016, 06:54:00 am »
Just modulating the link with 'baseband' serial data is probably not the way you need to go...
It may be more appropriate to modulate a carrier (any method) - for noise immunity, and the rx/demod will square up the data when it is recovered from the carrier.  Same LEDs, a 555 timer(modulator) and a simple PLL (demod) is the quickest solution.

The method is not complicated or expensive and will make your link much more robust in any situation.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline daddarioTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ee
Re: Optical serial bridge.
« Reply #7 on: October 26, 2016, 04:46:40 pm »
Just modulating the link with 'baseband' serial data is probably not the way you need to go...

Agreed, but I can't really modify the existing device.

Played around a bit today, adding some decent current amplification gave results. Currently getting about 30µs rise time measured from Q2 collector, which is almost acceptable, fall time is terrible, which is handled by Q3. Q2 current is substantial, but it's a start.
My competence in HF electronics over 30MHz rolls off 3dB/oct.
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Optical serial bridge.
« Reply #8 on: October 26, 2016, 07:10:40 pm »
...fair enough!

I read the original post as needing an adapter for an existing piece of gear.
Not thinking it was actual part of the existing internals.

Cheers.
Don't ask a question if you aren't willing to listen to the answer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->