usb controllable analog video switch 2 -> 1

hello,

i want to build a video switch basically it would have two analog video/audio input (i'm thinking of the typical yellow/white/red cables) and one video/audio output (same format)

so in = 6 wires out = 3 wires

then from host PC i would need to send requests on the USB wire such as * connect video intput 1 to video output * connect audio Left input 1 to audio left output * connect video intput 2 to video output etc.

(and get command result back)

i don't need the arduino to do anything on the video/audio stream as an option it would be nice to know if i have anything at all on a given input cable (maybe detect voltage, i don't know)

i'm terrible when it comes to hardware (software is ok) sorry if this sounds obvious, but is this even doable with an arduino ?

thanks fourchette

sorry if this sounds obvious, but is this even doable with an arduino ?

If all the Arduino is going to do is somehow connect one wire to another, then that is easy using a relay. A latching relay will require very little power to stay in one state. You might even be able to use a MOSFET instead of a relay.

I would imagine a simple way of doing this would be to get 3 relays, for one video stream, wire the video, and 2 audio tracks into the NC side of the relay (NC = normally closed). For the other video stream, wire them to the NO (NO = normally open), and then connect the controls to 3 Arduino pins. When you decide to switch channels, you would either set the 3 control pins HIGH or LOW. A quick google shows that composite video is perhaps 1 volt., so you might not need a physical relay meant for switching high voltages. Terry King has a nice tutorial on relays here: http://arduino-info.wikispaces.com/ArduinoPower.

His store at yourdunio.com sells various relays: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=155. You can get them at many other places as well, but I tend to try about buy from sites that have good tutorials that they wrote (yourdunion, adafruit, sparkfun, etc.) to help support those tutorials.

Back in the day I made a parallel port analog audio/video switcher for use with my webcams using ordinary NPN transistors (below). You may be able to do the same using the bottom analog multiplexer.

http://web.comporium.net/~shb/ppswitcher.htm

https://www.sparkfun.com/products/9056

zoomkat: Back in the day I made a parallel port analog audio/video switcher for use with my webcams using ordinary NPN transistors

Thanks so much for this, the NPN worked a treat for me. I will probably post a new thread on this because I found it hard to find info on this (although I did see your similar posts in other threads too).

I could successfully switch ON/OFF s-video from my PC to a CRT TV. This was done by cutting the Luminance + Sync (Y) wire of the s-video cable and connecting the ends of that wire to the NPN collector and emitter (switch these round if it doesn't work). The base is then connected through a 5K (4.7) resistor to I/O pin (+5V = ON). This was powered by the computer supply so grounding was already done. I am sure this approach can be used for composite and component signals, and could me implemented to switch multiple different inputs (all I needed was simply ON/OFF of one signal).

I experimented with controlling the other s-video wires. I could get a black\white image (which I think is a nifty trick!) or a nasty flickering colour image. I also experimented with an RC filter (100uf, ~100ohm = 15KHz) to filter out the TV signal which worked too. I also tried a n-mosfet (in place of the NPN) which was interesting - the signal would go through when the gate was still at 0V but it was distorted and the colours looked all bleeded. Not sure if it was wrong orientation (I think I tried both ways) or due to internal diode/V drop. Finally, adding resistors to the Y wire could reduce the brightness of the image. I will post pics in a new thread soon.

Thanks again, Brendan

PaulS:

sorry if this sounds obvious, but is this even doable with an arduino ?

If all the Arduino is going to do is somehow connect one wire to another, then that is easy using a relay. A latching relay will require very little power to stay in one state. You might even be able to use a MOSFET instead of a relay.

Unless you configure and bias and then control the mosfet as a linear switch with a gain of one, you wouldn't use a MOSFET for passing audio and video signals which are in fact small signal higher frequency AC signals. Either a relay or a solid state 'analog' switch IC (which internally most likely uses mosfet devices ;) ) would be the appropriate choices.

Lefty

I could successfully switch ON/OFF s-video from my PC to a CRT TV. This was done by cutting the Luminance + Sync (Y) wire of the s-video cable and connecting the ends of that wire to the NPN collector and emitter (switch these round if it doesn't work). The base is then connected through a 5K (4.7) resistor to I/O pin (+5V = ON). This was powered by the computer supply so grounding was already done. I am sure this approach can be used for composite and component signals, and could me implemented to switch multiple different inputs (all I needed was simply ON/OFF of one signal).

You can make a simple adapter (you can buy them too) to do s-video/composite video conversion just using a 470pf capacitor like below. I used this to input s-video into a composite capture card (works the other way too).

http://www.epanorama.net/circuits/svideo2cvideo.html