Opto/Echelon neuron problem

Dec 11, 2009 15 Replies

My customer has started seeing problems with a batch of boards.



I have an opto coupler, MOCD217 because it is cheap, led anode to +12V cathode to 10k. The 10k is pulled down by an open collector elsewhere in the system.



The opto transistor is pulled up to +5V by 36k. The collector goes straight into an input of the FT3150 processor.



This all works and has done for years. 18 months ago the customer started using this a pulse count input. Now he is getting miscounting. It appears to be due to the slow rising edge due to the



36k pull up. The scope shows about 800us rise time which appears monotonic and has less than 50mV of noise on the signal. The processor is specified as TTL levels, 0.8V and 2V, with minimum 175mV of hysteresis.

The problem seems to tie in with a change of batch of the MOCD217, 07 to 09 date codes.



Changing the resistors around the opto I got much faster rise times and greatly reduced miscounting.



As far as I can see with 175mV hysteresis on the processor input it shouldn't matter if the rise time was a fortnight or 10us.



My concern is I can use a "trick" (copyright CRU) and make it work. But as yet I don't understand why it should make a difference unless of course the data sheet is wrong and the processor does not have hysteresis on the inputs.


How is the FT3150 recognizing the input? Interrupt? Frequent polling? Internal edge detector or hardware counter? Which input? How configured?

It's a photo-transistor, thus Miller gain of the collector-base capacitance.

So I'd design for arbitrarily slow slew rate. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Help save the environment! Please dispose of socialism properly!

The FT3150 is based on multiple Z80s and has built in firmware for the various timer functions. You call the pulse count function and 0.839 seconds later you get an answer. This is on IO7.

Those are pretty high impedances. The led side could easily pick up enough noise to wiggle the output side through the small hysteresis band, on either edge. The open base of the phototransistor is also a hazard at these low currents. Sounds like your counters are hardware, so are probably nanosecond edge sensitive.

Straight capacitive coupling could be a hazard, too.

The scope probe could easily add enough capacitance to hide some of the problems. How often does it miscount? Has a storage scope observed it long enough to catch several miscounts?

Are the input and output circuits truly floating relative to one another? I've seen lots of systems where both sides were ground referenced and people used optocouplers anyhow, for their magical noise reduction effects, and made things worse, at considerable expense. CTR variations and LED degradation make optos some of the least predictable parts you can buy. Slow as hogs, too.

John

I'm not too enthusiastic about your connection scheme on the LED, given that this opto does not appear to have an internal screen.

Thanks.

I bet it is the open base. And yes the scope affected the problem.

So the latest batch of optos are just more sensitive and lowering the impedances is the solution, not just a "trick".

And both sides are ground referenced. I wouldn't have used optos here at all but the customer had problems with the original boards in China and insisted on a higher spec board with optos for noisy environments.

I was paid to do it against my better judgement (I know it sounds like I work for CRU). The actual problem in China was large differences in earth voltages in different parts of the system.

Debounce in software?

www.wescottdesign.com

The pulse count function is in the manufacturers firmware.

I'm probalbly wrong as I just design the hardware but from memory the Echelon neurons are basically 3 Z80s. One handles the LON network, one the software and one something else.

The software is event driven and only runs when the schedular allows it, otherwise the 3 cores spend a fair time chatting amongst themselves.

As far as the customer's software guy is concerned it is best to you use the built in functions.

If I had known of a requirement for pulse counting I would have implemented in the PIC I have on the board where I would have had full control.

They used to have a processor with - I think - their own instruction set, with one core that run two effective cpu's on alternate clock phases, one for the network and one for the application. Brutally slow. Weird folks, Echelon.

John

You could try a different optocoupler, such the NEC PS2503. It states a higher coupled capacitance than the one you are using, but that may not be the whole story.

For testing, maybe bias it so that the phototransistor output voltage is about 1V by trickling a bit of current through the LED, and connect a signal generator to the input with a fast rise time square wave and see if you can get it to glitch at the output (as measured by the processor, not with a scope).

IIRC, there was a 6502-derivative like that. Rockwell?

Flash is a bottleneck these days.

Or use one of those Schmitt-trigger logic couplers. Or dump the opto part and just use an RC+Schmitt; he doesn't need isolation!

John

The data on the PS2503 looks good. I'll check availability.

I'll give it a try.

The Commodore 64 used a 6510 CPU from the 6502 family with the MOS Technology 6567 video chip. They shared the memory bus on alternate phases.

Offworld checks no longer accepted!

175 mV isn't necessarily enough to give good noise immunity with a high-Z source like that.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal ElectroOptical Innovations 55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required