Introduction: What is this thing?

It's a whole computer. It's a 300MHz PC, rather slow by modern standards. It has a power supply, a video driver, and an ethernet adapter; it can connect to a keyboard and mouse, and to a floppy drive, and to a hard drive -- the whole works.

By the way, you can click on any of the the photos to enlarge -->

M. Peshkin 2006-01-03

I've removed the top card, which is the CPU, and flipped it over.

If you increased the RAM (64MB SODIMM, clipped in on the right) and the disk space (64MB compact flash, inserted on the left), you could run Windows.

We won't run Windows.

The physical layout and the bus type are called PC-104. The PC-104 bus is the same as the ISA bus on x86 PCs, which contrasts with the newer PCI bus. The ISA bus lines are simply rearranged to pass along a stack of bus connectors extending from each card to the one above it and below it.

The whole thing is usually called a "PC-104 stack" and it's often used in embedded computing (and mobile robots).

In addition to the above, our stack has a data acquisition (DAQ) board. (Shown here after pulling off the CPU board)

This includes 8 analog-to-digital converters (ADC), 4 digital-to-analog converters (DAC), 8 digital input-output lines (DIO) which can be selected in software in blocks of 4 to be input or output, and 4 quadrature decoders which can count pulses from optical rotation sensors ("encoders") or other incremental sensors.

Below the DAQ board, the stack includes a bottom board (made at NU) which serves to bring all the tightly packed DAQ lines out to terminal blocks to which you can conveniently attach wires. This kind of thing is often called a Break-out Board. We'll call it BoB.

BoB includes some buffer and protection electronics. The hope is that if you make a mistake and impose too large a voltage or too great a current, you will burn out one of the easily replaced chips on BoB, rather than damaging the DAQ board itself. Try not to.

BoB also includes power conditioning which converts battery or wall-adapter supplies (ranging 9-18VDC) to a nice clean 5VDC for the stack, and also provides +12 and -12 VDC for opamps and whatnot. You can have access to these voltages, but you need to understand the limits.

BoB also has status lights for the 8 DIO lines and for the power supply voltages. It has a pushbutton for one of those DIO lines. It has a power on/off switch and a fuse and a connector for a battery or wall-adapter.

You can run various operating systems on this PC-104 stack. DOS, the old pre-windows OS, would run. QNX would be a good choice; this is a true real-time OS. Linux would run. For all these you would have to concern yourself with finding or writing "drivers" to control the DAQ board.

We'll use xPC, which is an extension of Matlab. xPC is intended to run in a "host-target" configuration, meaning that you do your programming on a desktop computer (host) and then download and run the code on the PC-104 stack (target).

The communication between them can be serial, via the "COM1" serial port on both (RS232 connector shown in the upper right corner), or, better, via ethernet (RJ45 jack shown in the upper left corner). You can see the video connector too.

Target and host can communicate for programming, and also for controlling execution of code on the target, and even for communicating run-time data between the target and a matlab program running on the host.

You can make a direct RS232 or ethernet connection from target to host, or you can communicate TCP/IP or UDP packets via a wifi bridge. Doing so lets you make the PC-104 stack fully mobile.

The wifi bridge can be powered by the +5VDC power supply on BoB.

(note - wrong connector on CPU in this photo)

Contents of this document



  • Getting Matlab and necessary extensions running on the host
  • Getting xPC running on the stack and communicating with the host
  • Connecting monitors etc to the PC-104 CPU
  • Using a wifi bridge
  • Programming for the stack in xPC
  • Controlling code execution
  • Run-time host-target communication

Building the Break out Board (BoB)

These instruction are how to build BoB. You will need a blank printed circuit board (PCB) and all the parts.

You will need a good temperature controlled soldering station, thin rosin core solder, a solder sucker, and flush cutters.

If you don't have much practice soldering, get some before you start on BoB.

It's important to be able to create good solder joints reliably. A good solder joint wets (cozys up to) the solder pad and to the pin. Critical steps in soldering are:

  1. All surfaces must be clean. Clean the hot soldering tip by scraping it on a moistened sponge.
  2. Heat the junction between the pad and pin, and feed some solder into that junction.
  3. Stop feeding solder and let the molten solder flow into a clingy volcano shape.
  4. Remove the soldering tip; there must be no vibration or movement until solid (about 2 seconds)

Here is 17sec video in several formats, showing me soldering a line of pins on the back of a PCB.

Chip sockets: Start with the five chip sockets for the user-accessible chips. These are the only ones that mount on the top side of the PCB. Put them all in and turn the board upside down so you can easily solder them.

You can use some tape to hold the sockets onto the board as you flip it, but be sure to push down as you solder so that the sockets seat snugly against the board.

Be careful to use chip sockets of the right size (14 vs. 16 pins) and to put them on the correct side of the board -- the top side, which is the one with the silkscreened markings in white ink.

Be sure to get the sockets' polarization tab aligned with the indication on the board, or else users will later install chips backwards.

Here you can see the pin-1 indication on the PCB, the socket, and the chip. Pin-1 of the chip is on the right side of this photo, by the tab.



Now mount the six chip sockets on the underside of the PCB.

On the bottom of the PCB there's no silkscreen (ink) layer.

Pin-1 of each chip is indicated by a square rather than a round pad, and by a little "1".

Watch out for solder bridges

If you get a solder bridge, remove it with a solder sucker

Terminal blocks: Install the five terminal blocks (5, 6, 10, 10, and 12 positions).

One side has holes for wires and the other doesn't. Be sure to get the holes for wires facing out toward the edge of the board.

Lay the board on its top surface while you solder, so the terminal blocks stay snug. I often solder one pin of each terminal block, then check for snugness before soldering all the pins.

Snug, with holes for wires facing the edge of the board.

Light bar and pushbutton: Mount the pushbutton "bit 1" switch, and the LED light bar.

The LED light bar has only a very subtle pin-1 marker, a slightly beveled edge (on the lower left corner in this photo.)

The switch is non-polarized (doesn't care which way you put it in)

PC104 connector: The connector for the PC104 bus mounts on the top surface of the PCB. BoB doesn't use the bus, except to supply power to it, so I only soldered the 8 (2x4) pins on each end. The connector is non-polarized; it can be mounted either way.

Headers, 40-pin, 50-pin, & 72-pin: The five 10-pin headers on one edge of the board are inserted from the underside. These header strips are meant to snap apart into smaller strips. We will use one continuous strip of 72 pins, and just cut off excess pins to leave five blocks of ten.

Put the 72-pin header strip on the top side of the board to see which pins are unneeded. Be sure to orient it with the tin pins sticking up (these will go into the PCB from underneath) and with the gold pins toward the edge of the board.

Clip off the unneeded pins with your flush cutter, referring closely to the photo. Clipping is ever so much easier before you solder.

Click to enlarge image; check carefully; this step is hard to undo.

Here is the 72-pin header shown soldered onto the underside of the board.

Important: the tin pins are not inserted all the way through the board. We want the body of the header strip (black) spaced about 100 mils away from the PCB, so that there's room for a ribbon cable connector.


Here's a view from the upper side of the PCB, showing how the tin pins of the 72-pin header barely poke through the board from below.

Similarly, the 50-pin header mounts from the upper side of the PCB, and its tin pins also barely poke through to the underside.

Be sure to get these headers uniformly spaced off the PCB and the gold pins straight parallel to it.

There is also a 40-pin header that mounts on the top of the PCB.

Shown is a top view of the PCB with all the components soldered. Note the orientation of the 40-pin and 50-pin headers.

Capacitors, resistors:The six 1uF capacitors, the twelve .022uF capacitors, and the three 3.3Kohm resistors are non-polar, meaning you can mount them either way. (Some kinds of capacitors have a polarity, but these don't.)

Cut down the leads on capacitors and resistors before you insert them through the PCB. Otherwise when you try to solder them, you will be soldering through a thicket of leads.

Or, you may prefer to insert components with long leads, and clip them before soldering. Your choice. Either way, after soldering cut the leads down to the top of the solder volcano (about 1mm off the board surface.)

Bottom view of the PCB with all the components soldered.

DCDC converters: The blue and white components are DC-DC converters, which are switching power supplies. The lower one accepts input voltages in the range 9 to 18 volts DC, and provides a regulated 5volts DC up to 3 amperes. Its input will be a battery or a plug-in supply.

The upper one accepts an input voltage of 5 VDC and provides a regulated +12 and -12 VDC, for use by opamps and other analog components.

Resistor arrays: some of the resistor arrays are in 16-pin DIP packages ("dual in-line", like an IC chip). For those we have sockets; we'll put them in when we stuff the chips.

The four resistor arrays in SIP ("single in-line") packages have to be put in the right way, because one end (the one with the dot) is a common connection to one end of each of the other resistors inside. Make sure the dot on the SIP lines up with the little 'o' on the PCB. The SIP resisitors are (2) 3.3K bussed, (1) 680 ohm bussed, and (1) 1K isolated.

Note that we will skip the 3.3K pullup resistor SIP that is close to the digital out terminal block, so you will only place four SIP resistor arrays.

Zener diodes. The zener diodes (black, foreground) have a silver band on the cathode end. This is the direction that that the diode symbol "points to".

Be careful to use the right diode; several different zener voltages are used. You can read the part number on the diode if you have sharp eyes or a magnifying glass.

There are 3 different zener voltages called for: (2) 17V, (1) 20V and (2) 30V. These are labeled on the PCB. The available zener diodes may be slightly higher in nominal zener voltage than these, probably 17, 22, and 33V.

LEDs. There are three discrete LEDs on the board. The LEDs also have a polarity. The longer lead is the "+" side, also known as the anode; the diode symbol "points" from anode to cathode; from "+" to "-", and that's the way current flows. There's a little "+" symbol on the PCB.

If you look closely at the leads of the LED you will see a little swelling about 125 mils below the body. Sadly, some of the LED holes in the PCB are too small to allow this swelling through. So, you have to cut off the leads just above the swelling. Once you've done that it's hard to tell which is the + side anymore, and the dang thing is so small you are sure to drop it before you get it into the PCB.

Take a close look at the body of the LED. One edge is curved, the other is flat. The curved edge is +.

Make sure all your components are now soldered in, and leads are clipped nice and short on the opposite side.

Get some good flush cutters so you can cut the leads short. Only the components with two leads need to be cut (capacitors, resistors, zener diodes, LEDs.). Everything else has short leads to start with.


Power components: Solder in the toggle switch, barrel connector jack, and fuse holder. (Shown along the bottom of the photo here)

There is an typo on the board: it says the power connector is 5.5mm OD 2.5mm ID. It's actually 2.1mm ID.

Click on the photo to look closer, to see if anything is missing from your board.

With the fuse inserted and the switch "on" you can connect a 12VDC supply and make sure all the power-ok LEDs light up.

The LED near the power plug lights when power is provided and the fuse is OK, even if the switch is "off".

A red LED on the light bar shows that the main DCDC converter is providing 5VDC.

Two green LEDs show that the smaller DCDC converter is providing +12 and -12VDC

Now you can put in all the chips and the resistor arrays in DIP packages.

Note that the pin-1 marker on the chip, the socket, and the PCB all line up.

You will find that the leads of the chips are spaced farther than the holes in the socket. Automatic insertion machines bend the leads as they insert the chip.

I simply push half the leads against a hard surface to bend them closer.

So they line up perfectly with the holes in the socket. If you don't do this right some of the leads will crumple.

Then just push it in, hard.

Here are the chips that are user-accessible, on the top of the PCB: (2) DS2003, (2) 7405, and (1) LM348

Here are the less accessible chips and resistor arrays, on the bottom: (3) ADA1103 diode arrays, and (3) 8-resistor arrays in DIP packages, with resistances 100, 1K, and 10K ohm.

Ribbon cables:

Ribbon cables are a great way of making many connections at once, and keeping wiring neat.

Shown is a 10-pin "cable connector" with 10-conductor multicolored ribbon cable fed through it.

The conductors of the ribbon cable follow the same color code as resistors: 1=brown, 2=red, etc, through black (usually 0, here 10). For wider cable, the pattern repeats.

The cable connector has a shallow groove indicating pin #1 (on the left side of the photo)

In this photo I have carefully aligned the teeth and partially snapped the cable connector shut, such that each tooth one is going to puncture the insulation and make contact with one conductor.

Cheaper ribbon cable is gray, with just a red stripe to indicate conductor #1.

You can see the pin-1 indicator on the cable connector. It's a shallow groove just in front of the red striped conductor. This is 40-wide ribbon cable. (click the image to enlarge)

Conductor #1 connects to the top left square hole in the cable connector. Note that this would be so even if the ribbon cable emerged from the underside of the cable connector. Look carefully at the teeth in the previous picture.

Note the large mechanical polarization tab in the center. In a corresponding polarized "header" you can only insert the cable connector one way.

Some cable connectors and headers are non-polarized, meaning you can easily reverse the cable: pin 1 is exchanged with pin 40, 2 with 39, etc.

There are two easy ways IDC ribbon cable connectors can go awry:

(1) if you are not careful to line up the conductors with the IDC teeth, they may misalign. Watch carefully as you snap the connector closed by hand, to make sure the teeth engage correctly.

Here's a photo of a failed IDC connector, which I tore open to see what happened. It was a 25 mil error -- every conductor is shorted to its neighbor. (Click to see the whole thing.)

Second way ribbon cable connectors go awry:

(2) if you use pliers to close the IDC connector, it often will not make good contacts with all the conductors. Use a vise.

First snap the cable connector partly closed by hand. Put it in a vise and make sure the teeth are going to puncture between the conductors.

This kind of connector is called an "insulation displacement connector " (IDC) because you don't need to strip the wires; the teeth cut through to contact the wire inside.

Then close the vise quite hard. You will hear snaps engage on the sides, to hold the cable connector closed.

Tighten still further to make sure all the teeth have fully cut through the insulation.

Notice that the ribbon cable emerges from both sides of the cable connector -- you can cut off either side, or use one cable to connect multiple headers.

Take a good look at the alignment from the back to make sure the teeth lines up.

Usually you are cutting off one end. Cut it off flush with a razor blade.

Here you can see the cable cut off very flush, and the clip that hold the cable connector closed.

To connect the Sensoray 526 IO board to the Break Out Board, we need a 50-pin and a 40-pin short ribbon cable, like this. We don't need polarization tabs.

The distance between the inner edges of the cable connectors is 1.75 inch, so the ribbon cable you start with should be about 2.5 inches long or longer.

You can tear 50-conductor ribbon cable down to make 40-conductor ribbon cable.

Shorts in the ribbon cable can burn out the 526 board, and open circuits will cause frustrating and difficult-to-find problems later.

Therefore, test every cable with a ribbon cable tester.

(It would have been a good idea to use headers with extractor arms, for this.)

Mechanical assembly

We'll use metric 3mm thread diameter hardware (M3).

You will need eight 5mm long M3 screws, four 10mm-long female-female M3 threaded standoffs, and twelve 15mm long male-female M3 threaded standoffs.

This almost-blank PCB serves as a protective bottom cover, and also dissipates heat from the DCDC converters (it has a copper layer, and it presses up against the surface of the larger DCDC converter.

Use the 5mm M3 screws from below, and attach the 10mm standoffs above; fasten tightly.

Note the white labels are on the upper side.

Add the break out board and fasten with 15mm standoffs.

Add the short ribbon cables

And the Sensoray 526 board

Fold the ribbon cables under, carefully engage the PC104 bus connectors, and press the bus connectors together.

Add another four 15mm standoffs, the CPU board, and yet another four 15mm standoffs on top of the CPU board.

Tighten by hand. Standoffs are preferred over screws because there are easily damaged components on the CPU board very close to the holes.

Taking the stack apart without damage is tricky. It takes a lot of force, and then yields suddenly, which makes it easy to bend the pins of the PC-104 bus as the boards separate.

Use a tool. Engage a board separator with its fingers between the boards, right by the bus connector. Squeeze.

The VL-HDW-201 PC/104 Extraction Tool is available from Versalogic.

I found it helpful to cut off the top finger with a razor; the board didn't slip in there very well.

For mounting the whole "stack", I recommend making several long-headed screws. Loktite or superglue a 5mm M3 screw into a 15mm standoff. You hardly need any glue, just a tiny bit.

Now you can drop your long headed screws through the holes in the corners of the break out board, and they will hold down the plate underneath to the chassis of whatever you are building.

 Power and battery life

The whole stack, including the BoB, DAQ, and CPU boards, needs about 1.3 amps at 5VDC. If you are running the WET54G ethernet bridge as well, the total will be just under 2A. Any current your project draws from BoB's 5VDC supply (or its +12 and -12 VDC supplies) will add to that total.

BoB generates its 5VDC by using a DCDC converter described earlier. This DCDC converter is quite flexible about its input voltage; it's happy with anything in the range of 9-18 VDC.


There are a number of ways to provide 9-18 volts to the DCDC converter. Most of the time you can use a plug-in adapter. The one shown provides a regulated 12VDC at up to 1.5A

In practice, the stack (with the wifi bridge) needs 2A at 5VDC, which is 10 watts. The plug-in adapter will be providing only about 1A at 12VDC, which is 12 watts, to feed the DCDC converter. The DCDC converter is evidently about about 86% efficient (10W/12W=86%).

The DCDC converter can provide up to 3A of current at 5VDC.

The wall-plug switching power supply has a barrel-type connector; male on the supply and female on BoB (there is some ambiguity about the anatomy.)

There are a lot of barrel type connectors. The ones we will be using for 9-18VDC are 5.5/2.1mm, which are the OD and ID of the plug respectively.

5.5/2.5mm plugs and jacks are quite common too; both are shown in the photo. They are hard to distinguish visually.

Note that BoB has a typo; it says 5.5/2.5 but actually uses 5.5/2.1.

We will use the more common center-positive convention, which is what the symbol in the inset shows.

For mobile projects, you may want to use a rechargeable battery pack. You can use anything in the 9-18VDC range.

The one shown is rated 9.6VDC, 2200mAH. It consists of 8 1.2 volt NiCd cells in series. That's 21 watt-hours; I found that it ran the stack (which was consuming 10 watts) for 90 minutes.

Warning. If you short a rechargeable battery pack, very large currents will flow. It can get hot very quickly, and may catch fire or burst, spattering you with hot caustic toxic chemicals. Treat it like a car battery. Having a barrel connector on it helps a lot. Loose wires or clips are a hazard.

If you are putting a barrel connector on a battery pack, use a prefabricated molded connector with wires (as shown in this photo); don't use a do-it-yourself connector (as shown in the previous photo) which is prone to shorts. Strip one wire from the battery pack and solder it to the molded cord and insulate it, before you strip the other wire. This way the battery's wires can't touch accidentally while you work on them. Test for center-positive with a voltmeter.

You can charge a variety of battery packs with this smart charger. I've added a molded inline jack so that it connects easily to the battery pack. There's an inline fuse, too.

Do not use clips.

You are also welcome to make up your own battery pack out of rechargeable AA cells, which are now easy to get up to 2500mAH. The smart charger above will handle up to 10 of them in series, a nominal 12V pack.

Or you can use off-the-shelf chargers like the one shown here.

12 rechargeable AA cells, 2500mAH each, gives a whopping 36 WH, which ought to run the stack and wifi bridge (at 2A, 5V) for about 2.5 hours.

Power for your project

You can draw power for the electronics of your project from BoB's DCDC converters.

Up to 1A at 5VDC and 100mA at +12 and -12 are available. If you exceed the capabilities of the DCDC converters, they will "hiccup", shutting down and trying to restart over and over. You will see the +5 and +/-12 indicator LEDs go on and off if this happens.

You can use the terminal block to make connections, or a ribbon cable. The pinout for the ribbon cable is shown above it. Pin 1 is on the upper right, and is the brown wire in the photo. It's labeled "0" for ground.

Do not use BoB's supplies for running motors and other high power things. In fact ideally you should use a separate battery pack for these, not share the one that powers the stack.

To power the WET54G ethernet bridge, use a molded 5.5/2.5mm barrel connector and cable, and connect it (center-positive) to the +5VDC and ground connections of BoB.

Don't connect your 12VDC chargers or wall-plug supplies or battery packs to the ethernet bridge, which expects 5VDC. We'll try to stick to this convention:

  • 5.5/2.1mm barrel connectors ... 12VDC
  • 5.5/2.5mm barrel connectors ... 5VDC

Suppliers for all parts are listed on the parts list

Electronic interface to the DAQ IO lines

Good and bad ways of connecting to terminal blocks:

#8 -- bad -- stripped too much insulation, so conductors can touch

#6 -- good -- solid wire is good if it won't experience frequent bending, which would cause it to break eventually

#3 -- good -- stranded wire, twisted and tinned with solder

#2 -- not as good -- stranded wire, twisted but not tinned

#0 -- bad -- stranded wire, not twisted, and thus prone to loose strands

#4 etc -- good -- use ribbon cable to keep things neat

Get a jewelers screwdriver for opening & closing the terminal blocks.

Don't use tools that don't fit. This one is a T213.080-200, a 1.6mm blade from

You can get jewelers screwdrivers at radio shack too.

ADC: Let's start with the analog-to-digital lines (ADC). I've numbered them 1-8 on BoB, because that's how xPC refers to them. Sensoray calls them 0-7.

The schematic shows the circuitry that BoB interposes between the 526 DAQ board (left) and the terminal block, your interface (right). There is an RC filter with a time constant of 22uS. The resistors involved are packaged in a 16-pin DIP, containing 8 resistors.

The Sensoray 526 manual claims the ADC inputs will not be damaged unless you exceed 35 volts (either polarity). The normal range of voltages is -10 to +10. The protection diodes are used to shunt away current if the voltage applied at the terminal block exceeds +12 or -12.

DAC: Here's how the four digital-to-analog lines are handled. They are numbered 1-4 by xPC, and 0-3 by Sensoray.

Each analog signal from the 526 DAQ board runs through a 22uS RC filter. Then it is multiplied by -0.909 by the inverting opamp configuration. This means that the output voltage range is -9.09 to +9.09 volts, and is inverted in polarity from the corresponding voltage you command in software.

The inversion gives us the opportunity to protect the virtual ground with two diodes, preventing this node from going outside the range -0.6 to +0.6 volts even if you burn out the opamp.

The opamp is a quad device, LM348, which you can easily replace; pull it out with a chip extractor.


DIO: Before we get to the digital input and output lines (DIO), you need to know about "open collector" buffers and inverters (often abbreviated OC)

Ordinarily when you see a digital function like a 2-input OR, or an inverting buffer, the signals are either high or low, 1 or 0, +5V or ground. For the inverter, if you put +5 on the input you get ground on the output, and vice versa.

An open collector device, in contrast, acts as if it has a switch to ground inside it. Depending on the inputs, it can ground the output (make it logic low, or zero volts), but it cannot drive the output high.

If you want it to act like a normal buffer, inverter, or gate, you need to connect its output to +5 via a "pullup" resistor, typically ~3K.

The result will be high (+5) when the device's output is "open" because of the connection to +5 through the resistor. The result will be low (0 volts) when the device's output is low, because it effectively closes a switch to ground.

Here's the internal electronics of a 7404 inverter -- the normal kind, not the open-collector kind. One of the two transistors on the right is always on -- either the upper one pulling the output high (Vcc=+5V), or the lower one pulling it low (ground).

Something else is worth noting about this chip, which is typical of a lot of logic gates. If the input is left open (unconnected) it is as if it were connected to logic high (+5V) -- the gate will read a logic-high input and produce a logic-low output. The 4K resistor acts as a pullup resistor on the input line.

Most logic gates have this kind of input configuration, which allows you to (for instance) connect it to the output of an open collector gate, and it works just fine, even without a discrete pullup resistor.

Here's the internal electronics of a DS2003 open-collector inverter. The transistors can pull the output to ground, but have no ability to bring the output high. In fact this chip does not even have a connection to +5V.

The diode is intended to be used as a protection diode. We use this chip because of its large current and voltage handling capacities.

DIO lines used as outputs: Now you can understand the circuitry between the 526's DIO lines and your terminal block. The inverters shown are the the DS2003 and the 7405. Both are open collector inverters.

Consider first those DIO lines used as outputs from the 526. This involves the top part of the circuit. When a DIO line is commanded logic-low by the 526, the LED lights, and the DS2003 goes to its output-open state. It can sustain up to +35 volts, much higher than most logic chips. If you apply negative voltages you will burn it out.

The DS2003 will not produce a positive output voltage however; if you want that to happen you will have to supply a pull-up resistor to +5 or some other desired voltage.

When a DIO line is commanded logic-high by the 526, the LED goes dark. The DS2003 grounds its output, bringing it to logic-low and zero volts, and it can conduct up to 2 amps without burning out. I suggest not exceeding 1 amp for other reasons. This is a much greater current handling capability than most logic chips.

Note: get rid of the output's 3.3K pullup SIP on the PCB (not shown here)

Now consider those DIO lines used as inputs to the 526. This involves the lower part of the circuit. The 7405 is an open-collector inverter

If you leave a digital input terminal unconnected, it will be at logic-low because of the pull-down resistor. The 7405's will be in its output-open state, and the 526's DIO line will read logic-high because of the 3.3K pull-up resistor. The same is true if you connect to the digital input terminal and drive it to logic-low.

If you drive the digital input terminal to logic-high, or close the pushbutton switch (bit 1 only), the output of the 7405 will be grounded (logic low). The LED will light and the 526 will read logic-low. The DS2003 will go output-open.

To summarize the logic:

The 526's inputs and outputs are inverted from the terminal block's levels.

Used as inputs:

  • If the input terminal is driven logic-high (or, for bit-1, if you push the pushbutton) , the 526 reads logic low, the LED lights, and the output terminal goes output-open.
  • If the input terminal is driven logic-low (or left unconnected), the 526 reads logic-high, the LED goes out, and the output terminal grounds.

Used as outputs:

  • If the 526 commands logic-high, the LED goes out, and the output terminal is grounded (logic-low)
  • If the 526 commands logic-low, the LED lights, and the output terminal goes output-open

Shown is an example of using a terminal output #1 to provide a 24V logic signal, typically used as a enable/disable signal to a servomotor controller. Note the 4.7K pullup resistor. Output #2 drives a 12V relay.

Encoders. You will need to read about quadrature encoders elsewhere. Here's the pinout, starting in the upper right, which we will call pin 1, and is the brown wire in the photo.

1 = not connected 2 = not connected
3 = A- 4 = A+
5 = B- 6 = B+
7 = I- 8 = I+
9 = Ground 10 = +5VDC

There is no protection on these lines; they go straight to the 526 DAQ board. Please use them with care. Use these +5 connections only for your encoders, not for other purposes.

A lot of encoders have ribbon cables on them, but there is no "standard" pinout, so always figure out the wiring yourself.

For encoders that have single-ended A B & I lines, as opposed to differential ("+" and "-") lines, you can leave the "-" inputs floating (unconnected.) Don't ground them.

Direct DIO. Next to the four encoder inputs there is a 10-pin connection labeled DIO. This goes straight to the 526 DAQ board without protection. It's intended to be used for bi-directional data communication with a logic circuit. Don't use it; use the the terminal blocks instead, which are unidirectional (inputs or outputs) but have protection circuitry on BoB.

The pinout for this connector, stating with pin 1 in the upper right, is

1 = Ground 2 = Ground
3 = DIO 7 4 = DIO 6
5 = DIO 5 6 = DIO 4
7 = DIO 3 8 = DIO 2
9 = DIO 1 10 = DIO 0

xPC of course calls these DIO 1-8 rather than DIO 0-7