Table of Contents

BO-100 KARD

INTRODUCTION

The BO-100 is a simple Kard that is used to bias microcontroller and rail pins of the hosted Kard. The concept is to tie most of the signals that come to a Kard slot to a single net though 0603 resistor pad. These pad can be populated countless numbers of ways to provide simple signal conditioning from the outside world to the microcontroller.

DOCUMENTATION

BO-100 Kard REV-X1 Eagle Design Files

PLPB-0046-REV-X1_BO-100 Kard Schematic

Back to Kard List

USER INSTRUCTIONS

The Quick240 contains 6 card slots which are numbered from 0 to 5). Each of these Kard slots has connections to different voltages and ground. Additionally each Kard slot has connections to 4 of the GPIOs located on the screw terminal strip (each of which is numbered 0 to 3). You will notice on the terminal strip, that each of these positions are labeled in the format CxPy (e.g. C0P1, C2P3 etc.) The number after the C specifies the card slot (0 to 5), while the number after the P specifies the port number (0 to 3). For example, 'C0P1' specifies Kard Slot 0, Port 0 and 'C3P2' specifies Kard Slot 3, Port 2. ***NOTE the reason the slots pins are labled CxPy instead of KxPy is because we could resist having a C3P0 written on the silkscreen.

The BO-100 Kard controls how the connection is made between the different signals on an individual Kard slot, and each of the 4 terminal strip positions assigned to that Kard Slot. There are many options on how you can connect a terminal strip position. For example, you may assign a terminal strip position to:

- 3.3V
- Ground
- 5V
- 24V
- +VRail
- -VRail
- One Of 3 uC pins.

If you choose to connect the terminal position to a uC controller pin,you may also implement the following.

- Pull Ups (Or Pull Downs) to any of the available powers or grounds.
- A voltage divider between the terminal position and the uC pin.

PORT GROUPS

The Kard is divided into 4 groups, each of which control the connections to a single terminal strip position. Each of these groups contain 10 resistors. You can determine which of the 4 terminal strip positions the group controls by looking at the vertical resistor located to the left of each group (Labeled P0, P1, P2 or P3).

POPULATING THE RESISTORS

You will need a minimum of 2 resistors in each group to properly make a connection.

BASIC CONNECTIONS

1) Determine which Kard slot you wish to use. This will depend on where on the terminal strip you wish to make your connection and which processor pin you wish to have access to.
2) Determine which of the 4 Ports you wish to configure.
3) Populate a zero ohm resistor in resistor position P0,P1,P2 or P3 depending on which port you wish to use.
4) Using the chart located Here, populate the second resistor in the group.

VOLTAGE DIVIDERS

This is only applicable for processor connections.

The port resistor (P0, P1, P2 or P3) is connected between the GPIO port, and a net which is common to all of the other resistors in port group. Because all of these resistors are on a common net, you can implement a variety of voltage divider topologies by populated resistors of varying values on these nets. For example, a basic 25% voltage divider can be implemented on P0 as follows:

1) Place a zero ohm resistor connecting one of the uC pins. (R12, R13 or R14)
2) Place a 30K resistor in position P0.
3) Place as 10K resistor in position R11.

OTHER INFORMATION

Quick240 BO100 Useful arrays
/*guick board
  These two arrays are useful when using a B100 Kard with a Quick board
 */
 
// KardCxPx is a multi-dimensional array where the first
// index points the Kard slot and the second point to the
// GPIO pin on the Kard, the first four GPIO pins generaly
// connect to the rail pin Px.
uint8_t KardCxPx[7][6] = {
                    { 68, 58, 62, 55, 82, 32 }, // Kard 0
                    { 57, 56, 63, 54, 83, 31 }, // Kard 1
                    { 86, 64,  5, 70, 84, 30 }, // Kard 2
                    { 22, 76,  9,  2, 35, 52 }, // Kard 3
                    { 23, 39,  8, 21, 34, 50 }, // Kard 4
                    { 78, 79, 10, 20, 33, 85 }, // Kard 5
                    {  0,  1, 19, 18, 71, 44 }, // Kard Com
                   };
//KardCxPx5v works just like KardCxPx except there is a 1 
//for pins that are 5 volt tolerant and can be used open collector
uint8_t KardCxPx5v[7][6] = {
                    { 0, 0, 0, 0, 1, 1 }, // Kard 0
                    { 0, 0, 0, 0, 1, 1 }, // Kard 1
                    { 1, 0, 1, 1, 1, 1 }, // Kard 2
                    { 1, 1, 1, 1, 1, 1 }, // Kard 3
                    { 1, 1, 1, 1, 1, 1 }, // Kard 4
                    { 1, 1, 1, 1, 1, 0 }, // Kard 5
                    { 1, 1, 1, 1, 1, 0 }, // Kard Com //has only on dedicated IO pin
                   };

Kard GPIO Pin to Rail Pin Map

Kard GPIO PinRail Pin
gpio 0CxP0
gpio 1CxP1
gpio 2CxP2
gpio 3CxP3
gpio 4unmapped

The following is a cheat sheet for helping to decided which resistors need to be populated when using a BO-100 board. The numeric values in the cells such as (68) represent the abstracted wiring library pin number that would be used with pinMode(), digitalRead() or digitalWrite() functions.

loading...

Example

Quick240 BO100 Example
/*
BO-100 as analog input divider to read distance on a linear Pot
Circuit required
BO-100 Kard in Slot 0
   0 ohm r5,12,15,22,25,32,35,42
   1k ohm r10,20,30,40
0-10K pot on inputs C0P0-C0P3 wiper, low side connected to ground, high side floating
*/
 
void setup(){
  pinMode(C0IO0,INPUT);
  pinMode(C0IO1,INPUT);
  pinMode(C0IO2,INPUT);
  pinMode(C0IO3,INPUT);
  Serial.begin(115200);
}
 
void loop(){
  Serial.print("Zero: "); //tag
  Serial.println(CalcPosition(analogRead(C0IO0)),4);//print calculated position
  Serial.print("One: "); //tag
  Serial.println(CalcPosition(analogRead(C0IO1)),4);//print calculated position
  Serial.print("Two: "); //tag
  Serial.println(CalcPosition(analogRead(C0IO2)),4);//print calculated position
  Serial.print("Three: "); //tag
  Serial.println(CalcPosition(analogRead(C0IO3)),4);//print calculated position
  delay(1000);
}
 
//returns distance down sensor where touch is or -1 when untouched
double CalcPosition(unsigned int input)
{
  const double length_mm = 100;
  //resistor divider has range of 0-3v while connected
  const double max_read_in_range = 1023*3/3.3; //3.3 is adc vRef, 1023 is adc full scale count
  double calculated = (double)input/max_read_in_range*length_mm; //
  if(input>max_read_in_range+10){ // add a little for errors and unconnected is 1023
    return -1;
  } else {
    return calculated;
  }
}