Multiplexing Composite NTSC Video

This was one of those rare times where I had a hunch, followed it, and had a great result.

So for a project I’m working on for school, we have a robot with multiple composite video cameras onboard. We will be using those cameras seen on DIY drones or in simple security systems. We will be transmitting this video feed via a 5.8GHz video transmitter meant for a drone. We want the operator to be able to switch which feed they’re viewing at a given time, but we don’t want to have to use 3 transmitters and receivers. So to get around this, I thought we might just connect video feeds to a simple analog multiplexer I had laying around from a previous project and see if you could switch the feed that way. Turns out, you totally can. Here’s the eventual block diagram of this part of our project if you’re interested:

The following is the code running on the arduino. Remember, this isn’t doing anything special other than driving the mux:

Code Running On Arduino

Arduino

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

#define NUMSELECTS 4

ints0=2;

ints1=3;

ints2=4;

ints3=5;

intselects[NUMSELECTS]={s0,s1,s2,s3};

intselect_state[NUMSELECTS]={0,0,0,0};

voidsetup()

{

Serial.begin(9600);

for(intindex=0;index<NUMSELECTS;index++)

{

pinMode(selects[index],OUTPUT);

digitalWrite(selects[index],select_state[index]);

}

}

voidloop()

{

if(Serial.available()>0)

{

charinchar=Serial.read();//assigns one byte (as serial.read()'s only input one byte at a time