Skip to content

6N138 Optocouplers

August 12, 2012

Now I had to choose. I had decided on a method of communication by transferring data signals bidirectionally through optocouplers, but which signals did I need at what kind of data rate?

At this stage I was still unsure precisely what load information was of most interest. Having deferred the details of the interface design to a later stage meant I did not have a clear idea what features of the energy monitor circuit would be needed to make the Energy Analyzer work.

Because this section of the circuit would be difficult to modify after installation I decided the best approach was make it a nice prototyping module, self contained and as full-featured and capable as I could reasonably devise. What features the Energy Analyzer actually needed would be determined experimentally later on.

The ADE7756 is able to provide sampled current and voltage waveform information. According to the datasheet, data is made available at sample rates of up to 27.9 kSPS (thousand samples per second). As each sample is three bytes (24 bits) plus the command overhead it seemed to me the raw bit rate through the interface would probably want to be as fast as possible.

Optocouplers in general are slow. Reading datasheets for commonly-available optocouplers like the 4N25 revealed they would be unlikely to achieve anything like these high data rates. I knew of another optocoupler though, a high spec and cost device I was familiar with from many years previous.

6N138

I had needed to obtain some fast optocouplers to construct a small range of MIDI music projects. MIDI is a serial interface with 31.625 KHz bit rate IIRC which required the use of high speed 6N138 optocoupler devices. A quick check of the datasheet revealed these devices can reach data rates up to 100k bits per second.

These days the 6N138 is not so hard to get or anything like as expensive. A bunch of these devices appeared to be my best shot at maximum interface speed and therefore flexibility.

Individual 6N138 optoisolator circuit

The input side and output side of each optocoupler should be arranged to be completely separate. Different earth, different power supply. According to the datasheet the device can withstand 5000 volts potential difference between the two sides without disturbing operation.

But how many would I need? The ADE7756 has a bunch of signals in addition to the SPI-compatible serial interface, some provide information already available over the serial interface, others have extra information. Because the optocouplers fit well in pairs and four lines was only enough for the serial interface after some pondering I chose to have six optocouplers to make available the four serial interface lines Data In, Data Out, Serial Clock and Chip Select along with the Interrupt Request signal and the Zero Crossing signal.

So the interface would need to be bidirectional with six data lines. Each data line requires it’s own optocoupler, three optocouplers conduct signals from the microcontroller to the energy monitor and three optocouplers conduct signals back the other way.

More Soon…

About these ads
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: