Video Switcher with PIC16F819


Posted on Jan 18, 2013

This device uses the second method (which, if you don't already know, requires about 100 times less parts), but adds motion detection to switch cameras. The usual way to detect motion is to store a complete video frame and then look for changes on successive frames. Again, a lot of trouble can be saved by only sampling 64 locations on the screen at a low resolution (i.e. just using the A/D in the PIC). Since this device is designed for up to 4 cameras, that is still a lot of data to store in our PIC. Another method was developed to greatly reduce the memory requirements.


Video Switcher with PIC16F819
Click here to download the full size of the above Circuit.

Three numeric sums (modulo 256) are computed from the 64 samples in the video frame. The first sum either adds or subtracts the video sample on a 'checkerboard' basis (see fig-1). Any object moving from one cell to an adjacent one will create a shift in the sum. A second sum is made using the pattern in fig-2. This sum is more sensitive to larger objects that may not affect the first sum. Likewise, a third sum is made using the pattern in fig-3. Now we just add the 3 sums! A single 8-bit value now reacts to almost any changes in the visual field. All we need to do now is take the samples. There is no way for the PIC's A/D to sample 8 times on a single video scan line. However, it has no trouble taking one sample per line. U4-A acts as a 'video clamp': it forces all of the sync tips to zero volts. This allows U4-B to 'slice' off the sync pulses and feed them to the PIC. The PIC can now locate the Vertical Sync by looking for a set of 6 wide Horizontal Sync pulses. It then counts Horizontal Sync pulses to find the start of any particular video line.




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

Water Level control and monitor with PIC12F675
7 MHz VFO
Temperature-to-frequency converter
Portable-rf-burst-generator
Latching Ac Solid-State Relay
Digital Clock
power supply NMOS FET selection for reverse polarity protection
nicad battery charger uses
Solar Relay
Industrial & Domestic Electronic Kits
50 to 150MHz high frequency VCO circuit



Top