hippy
Ex-Staff (retired)
This project uses a PICAXE to detect the presence of a composite video signal (CVBS) which is normally connected using a single RCA or phono jack ( usually coloured yellow ).
This is a proof-of-concept part of a larger project designed to control an auto-selecting video switcher so it changes the signal for a TV to a composite video input whenever it is connected but can also be used in its own right as a "video present" indicator.
Most auto-selecting video switchers monitor a signal on a SCART connector pin which goes high when the connected device is powered up but very few detect if an actual video signal is present. This circuit is the first step in generating such a signal which can control the SCART pin when composite video is present; here just a LED is lit to indicate that state.
A composite video signal, whether PAL, NTSC or SECAM, is usually around 1 volt peak-to-peak, with the blanking level at 0V, sync pulses going negative, black level being just above 0V and white level higher. The technique used here is to simply look for levels somewhat greater than 0V and take that as an indicator of video presence. To handle the low voltage an internal hardware comparator is used with the voltage to compare against selected internally.
The composite video passes through a 47K resistor to the comparator input. That is high enough to ensure there is minimal impact on the video signal itself and also helps minimise problems should the input pin inadvertently be set as an output. It may even be possible to increase this resistor value. The low current negative voltage sync signals will be clamped by the input pin internal diode but have little affect on the actual video signals due to the 47K. The resistor also protects the PICAXE from damage and being phantom powered if video is connected with the PICAXE powered off.
To ensure the input does not float when a signal is not connected a 100K pull-down is placed across the video signal input. This again is a high value to have minimal impact on the video signal itself and can be omitted if the unit the video passes to has a suitable input resistance to 0V.
Operation is simple; the comparator output will go high when the video signal is connected and somewhat greater than 0V. The comparator output is connected through to an output pin which can be used to drive a LED. So far we are using the PICAXE as nothing more than a hardware comparator with the program only configuring the internal hardware.
To cater for misinterpretation of the video signal, black levels being interpreted as lack of video signal, the PICAXE program monitors the state of the comparator output and sets the software "detected" output pin immediately video is detected but clears it only when there has been a lack of video for a while. When the video signal is disconnected the "comparator" LED will extinguish immediately and the "detected" LED shortly after.
While the initial circuit used a PICAXE-20X2 ( to cater for additional digital signal input and output to be added in the final project ) it can likely be modified for use with any PICAXE which has an on-chip comparator and suitable analogue input which feeds that comparator. Where there is no support for the COMPSETUP command ( as for the M2 range ) the comparator hardware will need to be configured using appropriate POKESFR commands as demonstrated with the code example for the PICAXE-08M2.
This is a proof-of-concept part of a larger project designed to control an auto-selecting video switcher so it changes the signal for a TV to a composite video input whenever it is connected but can also be used in its own right as a "video present" indicator.
Most auto-selecting video switchers monitor a signal on a SCART connector pin which goes high when the connected device is powered up but very few detect if an actual video signal is present. This circuit is the first step in generating such a signal which can control the SCART pin when composite video is present; here just a LED is lit to indicate that state.
A composite video signal, whether PAL, NTSC or SECAM, is usually around 1 volt peak-to-peak, with the blanking level at 0V, sync pulses going negative, black level being just above 0V and white level higher. The technique used here is to simply look for levels somewhat greater than 0V and take that as an indicator of video presence. To handle the low voltage an internal hardware comparator is used with the voltage to compare against selected internally.
The composite video passes through a 47K resistor to the comparator input. That is high enough to ensure there is minimal impact on the video signal itself and also helps minimise problems should the input pin inadvertently be set as an output. It may even be possible to increase this resistor value. The low current negative voltage sync signals will be clamped by the input pin internal diode but have little affect on the actual video signals due to the 47K. The resistor also protects the PICAXE from damage and being phantom powered if video is connected with the PICAXE powered off.
To ensure the input does not float when a signal is not connected a 100K pull-down is placed across the video signal input. This again is a high value to have minimal impact on the video signal itself and can be omitted if the unit the video passes to has a suitable input resistance to 0V.
Operation is simple; the comparator output will go high when the video signal is connected and somewhat greater than 0V. The comparator output is connected through to an output pin which can be used to drive a LED. So far we are using the PICAXE as nothing more than a hardware comparator with the program only configuring the internal hardware.
To cater for misinterpretation of the video signal, black levels being interpreted as lack of video signal, the PICAXE program monitors the state of the comparator output and sets the software "detected" output pin immediately video is detected but clears it only when there has been a lack of video for a while. When the video signal is disconnected the "comparator" LED will extinguish immediately and the "detected" LED shortly after.
While the initial circuit used a PICAXE-20X2 ( to cater for additional digital signal input and output to be added in the final project ) it can likely be modified for use with any PICAXE which has an on-chip comparator and suitable analogue input which feeds that comparator. Where there is no support for the COMPSETUP command ( as for the M2 range ) the comparator hardware will need to be configured using appropriate POKESFR commands as demonstrated with the code example for the PICAXE-08M2.