PCB FOR INTERACTIVE MODULE 8x8

5,025

54

2

Introduction: PCB FOR INTERACTIVE MODULE 8x8

About: PLC, Arduino - Do it yourself project

I have previously done a project about "INTERACTIVE RGB LED TABLE" with A2 size, 16x16 RGB LED matrix on foam sheets. I gifted it to my friend. Today, I will share how to implement this project by designing an INTERACTIVE MODULE 8x8 on printed circuit board. By doing this way, we can combine some INTERACTIVE MODULE 8x8 together to get a big interactive led table. We can also save a lot of time and the circuit works more stable, minimizing noises compared to soldering copper wires to each component.

Before getting started, please watch the video below:

Step 1: PART LISTS

The main components used to make an INTERACTIVE MODULE 8x8 as follows

  • 01pcs x Arduino NANO
  • 01pcs x Double Side Tinned Prototype PCB Universal Board 9x15cm
  • 01pcs x Copper Clad Double Side Plate 20x30cm 1.5mm
  • 64pcs x RGB LED 5mm, Common Anode
  • 12pcs x IR LED
  • 16pcs x Photo-Transistor
  • 01pcs x 74HC138
  • 08pcs x Transistor A1013
  • 03pcs x 74HC595
  • 03pcs x ULN2803
  • 02pcs x 74HC4051
  • 12pcs x R100/150
  • 08pcs x R560
  • 16pcs x R10K
  • 08pcs x Capacitor 1uF
  • 06pcs x 8P Female 2.5mm Pitch Flat Ribbon Cable
  • 01pcs x 6P Female 2.5mm Pitch Flat Ribbon Cable
  • 02pcs x 4P Female 2.5mm Pitch Flat Ribbon Cable
  • 02pcs x 2Pin 5.08mm Pitch Screw Terminal Block
  • 01meter x 8P Rainbow Ribbon Cable
  • 01pcs x White Acrylic Plate A4 size.
  • 01pcs x Clear Acrylic Plate A4 size.
  • 01pcs x Power Supply 5V, minimum 2A.

Step 2: SCHEMATIC & EAGLE DESIGN

1. SCHEMATIC

Picture above is overall schematic for an interactive RGB Led size 8x8 or you can download high resolution PDF file HERE. It includes the following circuits:

  • INTERACTIVE MODULE 8x8: including 64pcs x RGB LED 5mm, common anode + 12pcs x IR LED + 16pcs x Photo-transistor.
  • LED COLUMN SCANNING CIRCUIT: including 3pcs x (74HC595 + ULN2803) or 3pcs x TPIC6B595N + 24pcs x R100 + 3pcs x Capacitors 0.1uF.
  • LED ROW SCANNING CIRCUIT: including 1pcs x 74HC138 + 8pcs x A1013.
  • MULTIPLEXER CIRCUIT: including 2pcs x 74HC4051 + 2pcs x Capacitor 0.1uF.

Note: The 74HC4051 is an 8 channel analog multiplexer/ de-multiplexer, its working is as follows:

- Multiplexer mode: You can choose between 8 different inputs and select just one you want to read at the time.

- De-multiplexer mode: You can choose between 8 different outputs and select just one you want to write at the time.

2. EAGLE DESIGN

  • INTERACTIVE MODULE 8x8

I only designed PCB for INTERACTIVE MODULE 8x8 on Eagle software and etched this circuit at home. For the remaining control circuits, I soldered on the prototype board 9x15cm.

You can download PDF design files below:

*** INTERACTIVE MODULE 8x8 - TOP

*** INTERACTIVE MODULE 8x8 - BOTTOM

  • PROTOTYPE CONTROL BOARD:

I soldered the control circuit on prototype board 9x15cm as diagram below. We'll see my result on next step.

Step 3: ETCHING

To make a circuit board at home, I used Clothes Iron Toner Transfer method that simply print the circuit design out on a laser printer, iron it onto the copper, and etch. In this project, I did etching by myself on copper clad double side plate 20x30cm by Ferric Chloride method for INTERACTIVE MODULE 8x8.

TIP: If you're designing double sided PCB you'll should have a few holes somewhere that you can use a pin or drill bit to align both sides. In my case, I used some LED pin's holes located at four corners like alignment holes.

My result after etching and drilling as shown below:

  • INTERACTIVE MODULE 8x8 - TOP VIEW

  • INTERACTIVE MODULE 8x8 - BOTTOM VIEW

Step 4: SOLDERING WORK

  • Soldering 64pcs x RGB LEDs.

  • Soldering 12pcs IR LEDs and 16pcs x Photo-transistors.

  • Soldering resistors, female header and power supply screw header. Note that I put all headers and resistors at bottom of PCB.

  • Soldering a prototype control board following the schematic on previous step, including: LED COLUMN SCANNING CIRCUIT, LED ROW SCANNING CIRCUIT, MULTIPLEXER CIRCUIT and ARDUINO NANO. My circuit has up to 6pcs x (74HC595 + ULN2803) while 3pcs x (74HC595 + ULN2803) are sufficient for this project.

*** PROTOTYPE CONTROL BOARD - TOP VIEW

*** PROTOTYPE CONTROL BOARD - BOTTOM VIEW

Step 5: CONNECT BOARDS TOGETHER

  • Connecting 6pcs x 8P flat ribbon cables to INTERACTIVE MODULE 8x8

  • Finally, I connected all flat ribbon cables and power supply cable from INTERACTIVE MODULE 8x8to Prototype Control Board.

NOTE: Before connecting the circuit together, we should check and fix or replace the RGB LEDs in case the LEDs are broken or short-circuited.

  • Cover top led board by clear acrylic plate and bottom led board by white acrylic plate. Now, Prototype Control Board is mounted on the white acrylic plate. DONE!

Step 6: PROGRAMING

The code is available at my GitHub.

PROGRAM NOTES:

  • RGB Leds, IR leds and photo-transistors arrangement and their coordinates are shown in below picture.

  • When object is placed on the table, the photo-transistors will detect it and 4 RGB LEDs around these photo-transistors will be lighted up following the colorwheel rule. See picture in case all photo-transistors are covered.
void SetLightColorwheel(byte zone_dots[4][2])
{  
  for (int i = 0; i < 4; i++)
  {
    get_colour(colourPos + zone_dots[i][1]* 16 + zone_dots[i][0]* 16, &R, &G, &B);
    LED(zone_dots[i][1], zone_dots[i][0], R, G, B);
  }
}

  • When object leaves the table or move to other positions, these corresponding LEDs will fade out and turn off. The "getcolorPixel" subroutine read color value of each led before fading it out according to the preset time value "FadeTime" in microseconds.
void FadeLight(byte zone_dots[4][2])
{
  Color pixelColor;
  if ( (unsigned long) (micros() - samplingfadetime) > FadeTime)
    { 
    for (int i = 0; i < 4; i++)
    {
    pixelColor = getcolorPixel(zone_dots[i][1], zone_dots[i][0]);     
    if(pixelColor.red > 0)
      pixelColor.red--;
    if(pixelColor.green > 0)
      pixelColor.green--;
    if(pixelColor.blue > 0)
      pixelColor.blue--;
      LED(zone_dots[i][1], zone_dots[i][0], pixelColor.red, pixelColor.green, pixelColor.blue);      
    }
    samplingfadetime = micros();      
  }  
}
  • We can do calibration the led board and print out photo-transistor's values on Serial Port as follows.
if (CALIB)
  {
    hScroll(0, greencolor, redcolor, Calib_HIGH, 100, 1, 1);
    clearfast();
    fillTable(WHITE);
    delay(3000);
    Calib_High();
    delay(1000);
    hScroll(0, greencolor, redcolor, Calib_FINISH, 100, 1, 1);
    clearfast();
    hScroll(0, greencolor, orangecolor, Calib_LOW, 100, 1, 1);
    clearfast();
    delay(3000);
    Calib_Low();
    delay(1000);
    hScroll(0, greencolor, orangecolor, Calib_FINISH, 100, 1, 1);
    clearfast();
    for (byte i=0; i<16; i++)
      {
        IR_average[i] = (((IR_calib_low[i] + IR_calib_high[i])/2) - ProximityNoise);
      }
    for (byte i=0; i<16; i++)
      {
        Serial.print("IR_average[");
        Serial.print(i);
        Serial.print("] = ");
        Serial.print(IR_average[i]);
        Serial.print(" ;");
        Serial.println("");
      }
    }
else
  {
    for (byte i=0; i<16; i++)
      {
        IR_average[i] = ProximityLimit;
      }
  }
}

Step 7: PROJECT EXPANSION

This project can be expanded up to 16x16 or 16x32 interactive led table by combining 4 or 8 x INTERACTIVE MODULE 8x8together. And we can use Arduino Mega 2560 with 16 analog inputs. I have designed preliminary control circuits on Eagle software as follows:

  • LED COLUMN SCANNING CIRCUIT with 24pcs x (74HC595 + ULN2803). It can control 512 RGB LEDs of 8 x INTERACTIVE MODULE 8x8.

*** PCB TOP VIEW

*** PCB BOTTOM VIEW

  • LED ROW SCANNING CIRCUIT& MULTIPLEXER CIRCUIT: I combine them in one PCB

- LED ROW SCANNING CIRCUIT: include 2pcs x 74HC238 + 16pcs x TIP42C. It can control 16 LED's rows.

- MULTIPLEXER CIRCUIT: include 8pcs x 74HC4051. It can read 64 photo-transistors through 8 analog input. We can use 2 circuits to read 128 photo-transistors through 16 analog input of Arduino Mega 2560.

*** PCB TOP VIEW

*** PCB BOTTOM VIEW

Step 8: FINISH

Thank for your watching! Hope my instructable helps someone who is interested to do one interactive led table.

Please LIKE and SUBSCRIBE to my YouTube channel.

PCB Design Challenge

First Prize in the
PCB Design Challenge

Be the First to Share

    Recommendations

    • Pets Challenge

      Pets Challenge
    • Fandom Contest

      Fandom Contest
    • Water Speed Challenge

      Water Speed Challenge

    2 Comments

    0
    charget
    charget

    Tip 1 year ago

    I really like this project. Maybe top it with charlieplexing next time :D

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    Thank you, Charget!