2

Hi maybe someone can help me here, basically I am trying to build a computer controlled coaxial switch. I am using a regular Integrated circuit multiplexer to handle which channel is patched to output. So basically I have:

                  (8 X Coaxial Inputs)
                  I I I I I I I I 

microcontroller ----> | Multiplexer | --------------- I (1 X Coaxial Output)

The idea is so that I can use a computer to control which of my 8 video feeds that I can watch. I thought that because the connections are straight through I wouldn't have to worry about attenuation as much, but I tried a sample setup using a breadboard and I can barely see the picture. Any ideas as to how I can make it work?

I am currently using a breadboard with all the components I listed Plus some small gauge cables (so that they fit on the bread board)

1 Answers1

0

software:

you need to install putty:
putty is a cross-platform Serial client.
it can be used for ssh and serial port client

hardware:

you can use regular relays for switching ( don't forget diode across the coil of the relay)
and your mux multiplexer,

wire mux data pins to arduino to 3 digital IO's.
e.g. mux0 = pin 2, mux1 = pin3 mux3 = pin4

software:

something like this

//assign multipex pins
const int mux0=2;
const int mux1=3;
const int mux2=4;

//global variables
int current=0;

void setup()
{
  Serial.begin(9600);
  displayMenu();
}
void loop()
{
  if(Serial.available()) //check if new byte is comming
  {
    char in = Serial.read();//read the byte
    if(in >= '0' && in <= '7')//check if it is a usable number
    {
      current = in - 48; // ASCII 0= 48 ASCII 7=55 so it is linear moved whith 48
      //write output; by reading individual bits of in and write them to te outputs
      digitalWrite(mux0,bool(current & 0b00000001));
      digitalWrite(mux1,bool(current & 0b00000010));
      digitalWrite(mux2,bool(current & b00000100));
      //update screen
      Serial.write(8); //removes last char;
      Serial.print(current)
    }
    else
      displayMenu(); //if wrong input then displayMenu
  }
}
void displayMenu()
{
  //clear output 
  for(int i=0;i<=200;i++)
    Serial.write(10); //line feed
  Serial.write(13); //carriage return

  //replace 'input x' by were the camera is placed; 
  Serial.println("0: input 0");
  Serial.println("1: input 1");
  Serial.println("2: input 2");
  Serial.println("3: input 3");
  Serial.println("4: input 4");
  Serial.println("5: input 5");
  Serial.println("6: input 6");
  Serial.println("7: input 7");
  Serial.println();
  Serial.print("current selected: ");
  Serial.print(current);
}

not tested but should work;

manual:

you open serial terminal. (putty)
connect to serial port (9600) baud
type the the number you want to select

on8tom
  • 1,766
  • 11
  • 24