Optical serial bridge. - Page 1
Forum section: electronics / projects

author: daddario
author_rank: Regular Contributor
timestamp: October 23, 2016, 04:33:17 pm
content: 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.

author: moffy
author_rank: Super Contributor
timestamp: October 24, 2016, 12:07:04 am
content: 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.

author: Whales
author_rank: Super Contributor
timestamp: October 24, 2016, 02:30:01 am
content: 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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 24, 2016, 03:51:03 am
content: 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.

author: daddario
author_rank: Regular Contributor
timestamp: October 25, 2016, 04:08:35 pm
content: Quote from: Whales on October 24, 2016, 02:30:01 amThe 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.Quote from: NiHaoMike on October 24, 2016, 03:51:03 amI 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.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 25, 2016, 08:35:22 pm
content: 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.

author: SL4P
author_rank: Super Contributor
timestamp: October 26, 2016, 06:54:00 am
content: 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 inanysituation.

author: daddario
author_rank: Regular Contributor
timestamp: October 26, 2016, 04:46:40 pm
content: Quote from: SL4P on October 26, 2016, 06:54:00 amAgreed, 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.

author: SL4P
author_rank: Super Contributor
timestamp: October 26, 2016, 07:10:40 pm
content: ...fair enough!I read the original post as needing an adapter for an existing piece of gear.Not thinking it was actual partofthe existing internals.Cheers.