Difference between revisions of "Repeater Controller"

From BATC Wiki
Jump to navigation Jump to search
 
(72 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The BATC ATV Repeater Controller uses a Raspberry Pi 4 as a fully-featured, but simple-to-implement, ATV repeater controller.  The design is intended to be used with an HDMI Video switch, but can also be used with older composite video designs.
+
The BATC ATV Repeater Controller uses a Raspberry Pi 4 as a fully-featured, but simple-to-implement, ATV repeater controller.  Every repeater is different and the controller is designed as a core logic that can be used as the basis for an ATV repeater. The design is flexible with a large number of parameters in a text editable config file so that users can configure it to meet their own needs.  
  
Every repeater is different and the controller is designed as a core logic that can be used as the basis for an ATV repeater. The design is flexible with a large number of parameters in a text editable config file so that users can configure it to meet their own needs.  
+
The controller is intended to be used with an HDMI Video switch, but can also be used with other switchers such as an ATEM Mini or older composite video designs.
  
Initial design and construction information will be published here to enable collaborative development, but will be subject to change as the project develops.
 
  
 
The outline requirement specification is here [[:media:BATC ATV repeater controller.pdf]]
 
The outline requirement specification is here [[:media:BATC ATV repeater controller.pdf]]
 
  
  
Line 13: Line 11:
 
==Typical operation==
 
==Typical operation==
  
The BATC repeater controller will control either a single or multiple video switchers either by InfraRed, I2C or GPIO pins and will generate a carousel of scenes.
+
The BATC repeater controller controls single or multiple video switchers either by InfraRed, I2C or GPIO pins.  It also generates a carousel of scenes and has an on-board DTMF decoder.
  
 
===Carousel===
 
===Carousel===
  
The carousel can be configured to show up to 99 scenes which are played out from the controller RPi and can be .jpg or .png images, an input on the video switcher for example mast cam, or a video file (in future release). The still images are read each time before display so can be regularly updated by an external source.
+
The carousel can be configured to show up to 99 scenes.  The content and duration displayed of each scene is set in the configuration file and the scene can be one of the following:
 +
 
 +
* Status screen generated by the controller
 +
* jpg or png images played out by the controller
 +
* Video files (in future release).
 +
* Any input on the video switcher, so can display inputs such mast cams, weather stations or Quad video displays.
 +
 
 +
 
 +
The still images are read each time before display so can be regularly updated by an external source such as weather maps, propagation maps or DXspots.
  
 
===Valid signal input===
 
===Valid signal input===
  
On receipt of a valid signal from, for example, a Ryde receiver, the controller will, key the transmitter, play an image for .5 seconds indicating which input has been activated and then switch to that input.  When the receiver closes, the logic will play a "K" image and optional "K" in Morse and go back to the carousel.
+
On receipt of a valid GPIO line signal from, for example, a Ryde receiver, the controller will, key the transmitter, play an audio beep and display an image for .5 seconds indicating which input has been activated and then switch to that input.  When the receiver closes, the logic will play a "K" image and optional "K" in Morse and go back to the carousel.
  
 
The receiver input switching line can be directly from a Ryde receiver or an external source such as a sync detector on an analogue source.  Note do NOT exceed 3.3 volts on the GPIO input.
 
The receiver input switching line can be directly from a Ryde receiver or an external source such as a sync detector on an analogue source.  Note do NOT exceed 3.3 volts on the GPIO input.
Line 27: Line 33:
 
===Ident signal===
 
===Ident signal===
  
The controller RPi also generates images for the K sequence and input identification.  A video and/or audio ident can be generated at an interval set in the config file.
+
In order to comply with licensing regulations, a video and/or audio ident can be generated at an interval set in the config file.
  
 
===DTMF control===
 
===DTMF control===
Line 35: Line 41:
 
===Power saving===
 
===Power saving===
  
To enable power saving by turning the repeater transmitter off during quiet periods, a number of options are available such as only key the transmitter when in repeat mode, do not key the transmit during the night time and only enable the beacon for the first 30 minutes of every hour.
+
To enable power saving by turning the repeater transmitter off during quiet periods, a number of options are available such as only key the transmitter when in repeat mode, do not key the transmit during the night time and only key the transmitter to display the carousel for the first 30 minutes of every hour.
 +
 
 +
Additionally, the controller can provide time-based control of the power to the receivers and encoder/exciter so that they can be shut down outside operating hours.  Two operating periods can be defined in the config file, and the equipment can also be shut down and restarted using a fron-panel button.  A preceding shutdown signal is provided to allow proper shutdown of the Raspberry Pis.  This power control uses the same GPIO pins as Input 7, so is only compatible with the use of 6 or less repeater inputs.
 +
 
 +
==Repeater system sample builds==
 +
 
 +
A number of example configurations are shown on this page [[Repeater system configurations]]
  
 
==Hardware control==
 
==Hardware control==
 
The controller will interface to the following:
 
The controller will interface to the following:
  
* Video switches via IR transmitters (note up to 2 IR transmitters can be configured separately allowing multiple video switches to be cascaded).
+
* Video switches via IR transmitters - up to 2 IR transmitters can be configured separately allowing multiple video switches to be cascaded.
  
 
* Video switchers via hardware lines driven from the RPi GPIO lines (note 3.3v logic output)
 
* Video switchers via hardware lines driven from the RPi GPIO lines (note 3.3v logic output)
  
* I2CInitial support for the Audio switch designed for GB3SQ.  Future releases may support I2C video switches and relay boards.
+
* i2c
 +
 
 +
* Network control of an ATEM Mini Pro
 +
 
 +
The IR, i2c and ATEM commands for each input are set in the config file.
 +
 
 +
==i2c interface==
 +
 
 +
The controller will support i2c video switches and relay boards in the futureI2c Interface details are here: [[DATV Repeater i2c Interface]].
 +
 
 +
===i2c audio switching===
 +
 
 +
Currently, the controller only supports the i2c controlled Audio switch designed for GB3SQ.   
  
The IR and I2C commands for each input are set in the config file.
+
Details of the 8 channel input audio switch PCB can be found here [[DATV repeater audio switch]] and a PCB is available from the BATC shop.
  
 
==Configuring IR Switching==
 
==Configuring IR Switching==
  
The IR codes for the HDMI switches used on each repeater will need to entered in the configuration file.   
+
The IR codes for the video switches used on a repeater will need to be entered in the configuration file - see [[Repeater Controller configuration]].   
 +
 
 +
Full details on how to read your IR commands and then configure the system are here: [[Repeater_LIRC_Configuration|Configuring IR for HDMI Switching ]]
 +
 
 +
===IR Transmitter Control Circuits===
 +
 
 +
Here are example IR transmitter control circuits for the single and dual switch cases:
  
Full details are here: [[Repeater_LIRC_Configuration|Configuring IR for HDMI Switching ]]
+
[[File:IR Control Circuit.JPG|718px]]
  
==Customisation==
+
==Configuring ATEM Switching==
 +
 
 +
The controller can switch an ATEM Mini Pro connected on the LAN.  Full details here [[Configuring ATEM Control]].
 +
 
 +
==Customisation and configuration==
  
 
While this software is designed to work "out of the box" it will need to be configured for each individual repeater.   
 
While this software is designed to work "out of the box" it will need to be configured for each individual repeater.   
  
For a detailed description of the configuration details see the [[Repeater Controller configuration]] page.
+
Some configurations can be done using the SSH menu and some real-time control is possible using the ssh Console Menu.
  
Some configurations can be done using the SSH menu and some real-time control is possible using the ssh Console Menu.
+
For a detailed description of the configuration details see the [[Repeater Controller configuration]] page.
  
 
==DTMF control==
 
==DTMF control==
  
The BATC repeater controller uses an onboard DTMF detector which detects DTMF from the mic input on a USB audio dongle (use a standard Portsdown white USB dongle).
+
The BATC repeater controller uses an onboard DTMF detector which detects DTMF from the mic input on a USB audio dongle (using a standard Portsdown white USB dongle).
 +
 
 +
Full details of the functions that can be set by DTMF and their configuration are on this page [[DATV repeater DTMF commands]]
 +
 
 +
==GPIO Connections==
 +
 
 +
The repeater controller uses the RPi GPIO port for the following:
 +
 
 +
*Accepts up to 8 signal detect inputs
 +
 
 +
*IR / I2C drive output
 +
 
 +
*GPIO outputs to control video switchers.
  
The following functions can be changed using DTMF commands - actual command sequence is entirely flexible and set in the config file.  It is recommended that some command sequences such as shut down are publicly available and have been grouped in the example config file (see [[Repeater Controller configuration]]as keeper commands.
+
*Auxilliary equipment status monitoring inputs
  
===Suggested keeper functions===
+
*Auxilliary equipment control outputs
dtmfkeepertxoff=97350
 
dtmfkeepertxon=97351
 
dtmfkeeperreboot=97359
 
dtmftalkbackaudioenable=07
 
dtmftalkbackaudiodisable=08
 
  
===User codes for direct input select (use dtmfreset to deselect)===
+
The exact pins used for each function are set in the configuration file.
dtmfstatusview=01
 
dtmfquadview=04
 
dtmfselectinput0=10
 
dtmfselectinput1=11
 
dtmfselectinput2=12
 
dtmfselectinput3=13
 
dtmfselectinput4=14
 
dtmfselectinput5=15
 
dtmfselectinput6=16
 
dtmfselectinput7=17
 
  
===RPi GPIO Accessory DTMF Control examples===
+
The Ryde signal detect line can be connected to the input pin but '''Care MUST be taken to buffer the 3.3 volt logic levels used on the Raspberry Pi GPIO pins.'''
dtmfoutputs=1
 
dtmfgpioout1pin=15
 
dtmfgpioout1label=shack_light
 
dtmfgpioout1on=31
 
dtmfgpioout1off=41
 
  
dtmfinputs=1
+
A list of GPIO connections is here: [[Repeater GPIO Connections]].
dtmfgpioin1pin=8
 
dtmfgpioin1label=cabinet_door
 
  
===i2c Accessory DTMF Control examples===
+
==Mains Power Control==
  
MCP23017. Max 16 lines either in or out
+
The controller includes a number of features to reduce mains power consumption and to allow safe shutdown of Raspberry Pi based receivers and the controller itself.  Full details can be found here: [[Repeater Controller Power Control]].
i2cioaddress=0
 
  
i2cdtmfoutputs=1
+
==Composite video input==
i2cdtmfgpioout1pin=a0
 
i2cdtmfgpioout1label=shack_heater
 
i2cdtmfgpioout1on=51
 
i2cdtmfgpioout1off=61
 
  
i2cdtmfinputs=1
+
In order to enable analogue receivers and equipment, such as mast cameras, to be connected to an HDMI switcher, BATC has developed a composite to HDMI converter.
i2cdtmfgpioin1pin=b0
 
i2cdtmfgpioin1label=cabinet_lid
 
  
==GPIO Connections==
+
Based on the Ryde software running on a Pi3 or Pi4, it uses a Fushicai EasyCap and provides a high-quality converter even with noisy FM video signals.
 +
 
 +
===Software===
 +
 
 +
Build an SD card with the Ryde software and after updating to release 03/03/22 select Option 8 on the Settings Menu in the SSH Console Menu. 
  
The repeater controller accepts up to 8 signal detect inputs on the GPIO input pins and uses IR / I2C or GPIO outputs to switch external switchers.
+
Then manually edit the file /home/pi/ryde-build/cv_config.txt where you can set audio out, 16:9/4:3 and the ident caption.
  
Care MUST be taken to buffer the 3.3 volt logic levels used on the Raspberry Pi GPIO pins.
+
After rebooting with a Fushicai EasyCap connected, the HDMI output will show the Composite video input and carry the audio from the dongle.
  
An initial list of GPIO connections is here: [[Repeater GPIO Connections]].
+
'''Note This is not a Ryde facility, the Ryde build was just a convenient starting point for the software build.'''
  
 
==Switching Logic==
 
==Switching Logic==
Line 127: Line 148:
 
==Project status==
 
==Project status==
  
The target release date is the end of March 2022.
+
The software was put on full release at the end of March 2022.
 +
 
 +
Dec 2021 - Requirement spec agreed.
 +
 
 +
Jan 22 - Alpha release for testing
 +
 
 +
Feb 10th 2022 - A Beta release version of the software is available for download: https://github.com/BritishAmateurTelevisionClub/atv-rptr
 +
 
 +
Note this is NOT the final release and there will be bugs!  Please provide feedback on the forum.
 +
 
 +
Feb 15th 2022 - Feature freeze until the first release in March
 +
 
 +
Marrch 2022  -First production release
 +
 
 +
February 2023 - Updated to include safe shutdown and receiver/exciter power switching.
 +
 
 +
===Software download===
 +
 
 +
The BATC controller is available for download at https://github.com/BritishAmateurTelevisionClub/atv-rptr
 +
 
 +
Please follow the instructions carefully and note the controller runs on the Buster Lite OS and not Bullseye.
 +
 
 +
Depending upon demand we may sell preprogrammed SD cards in the BATC shop.
 +
 
 +
===Future requirements===
 +
 
 +
The following features have been identified for inclusion in future releases:
 +
 
 +
* Implement battery-backed clock (for no internet/power cuts).  Will serve NTP to Rydes on same network
 +
 
 +
* VLC Carousel Play of videos
  
Jan 22 - Aplha release for testing
+
* Full implementation of i2c accessory switch operation (Entries exist in config file, but not yet coded)
  
Feb 10th 2022 An early Beta version of the software (not yet ready for use, but good enough for shack-based testing) can be found here: https://github.com/BritishAmateurTelevisionClub/atv-rptr
+
* Composite video output
  
 
==Further information==
 
==Further information==
  
 
See https://forum.batc.org.uk/viewtopic.php?f=82&t=7750
 
See https://forum.batc.org.uk/viewtopic.php?f=82&t=7750

Latest revision as of 19:08, 14 November 2023

The BATC ATV Repeater Controller uses a Raspberry Pi 4 as a fully-featured, but simple-to-implement, ATV repeater controller. Every repeater is different and the controller is designed as a core logic that can be used as the basis for an ATV repeater. The design is flexible with a large number of parameters in a text editable config file so that users can configure it to meet their own needs.

The controller is intended to be used with an HDMI Video switch, but can also be used with other switchers such as an ATEM Mini or older composite video designs.


The outline requirement specification is here media:BATC ATV repeater controller.pdf


HDMI repeater.jpg

Typical operation

The BATC repeater controller controls single or multiple video switchers either by InfraRed, I2C or GPIO pins. It also generates a carousel of scenes and has an on-board DTMF decoder.

Carousel

The carousel can be configured to show up to 99 scenes. The content and duration displayed of each scene is set in the configuration file and the scene can be one of the following:

  • Status screen generated by the controller
  • jpg or png images played out by the controller
  • Video files (in future release).
  • Any input on the video switcher, so can display inputs such mast cams, weather stations or Quad video displays.


The still images are read each time before display so can be regularly updated by an external source such as weather maps, propagation maps or DXspots.

Valid signal input

On receipt of a valid GPIO line signal from, for example, a Ryde receiver, the controller will, key the transmitter, play an audio beep and display an image for .5 seconds indicating which input has been activated and then switch to that input. When the receiver closes, the logic will play a "K" image and optional "K" in Morse and go back to the carousel.

The receiver input switching line can be directly from a Ryde receiver or an external source such as a sync detector on an analogue source. Note do NOT exceed 3.3 volts on the GPIO input.

Ident signal

In order to comply with licensing regulations, a video and/or audio ident can be generated at an interval set in the config file.

DTMF control

An on-board DTMF decoder will allow input selection by remote control and also enable GPIO pins to be toggled to enable the control of external equipment.

Power saving

To enable power saving by turning the repeater transmitter off during quiet periods, a number of options are available such as only key the transmitter when in repeat mode, do not key the transmit during the night time and only key the transmitter to display the carousel for the first 30 minutes of every hour.

Additionally, the controller can provide time-based control of the power to the receivers and encoder/exciter so that they can be shut down outside operating hours. Two operating periods can be defined in the config file, and the equipment can also be shut down and restarted using a fron-panel button. A preceding shutdown signal is provided to allow proper shutdown of the Raspberry Pis. This power control uses the same GPIO pins as Input 7, so is only compatible with the use of 6 or less repeater inputs.

Repeater system sample builds

A number of example configurations are shown on this page Repeater system configurations

Hardware control

The controller will interface to the following:

  • Video switches via IR transmitters - up to 2 IR transmitters can be configured separately allowing multiple video switches to be cascaded.
  • Video switchers via hardware lines driven from the RPi GPIO lines (note 3.3v logic output)
  • i2c
  • Network control of an ATEM Mini Pro

The IR, i2c and ATEM commands for each input are set in the config file.

i2c interface

The controller will support i2c video switches and relay boards in the future. I2c Interface details are here: DATV Repeater i2c Interface.

i2c audio switching

Currently, the controller only supports the i2c controlled Audio switch designed for GB3SQ.

Details of the 8 channel input audio switch PCB can be found here DATV repeater audio switch and a PCB is available from the BATC shop.

Configuring IR Switching

The IR codes for the video switches used on a repeater will need to be entered in the configuration file - see Repeater Controller configuration.

Full details on how to read your IR commands and then configure the system are here: Configuring IR for HDMI Switching

IR Transmitter Control Circuits

Here are example IR transmitter control circuits for the single and dual switch cases:

IR Control Circuit.JPG

Configuring ATEM Switching

The controller can switch an ATEM Mini Pro connected on the LAN. Full details here Configuring ATEM Control.

Customisation and configuration

While this software is designed to work "out of the box" it will need to be configured for each individual repeater.

Some configurations can be done using the SSH menu and some real-time control is possible using the ssh Console Menu.

For a detailed description of the configuration details see the Repeater Controller configuration page.

DTMF control

The BATC repeater controller uses an onboard DTMF detector which detects DTMF from the mic input on a USB audio dongle (using a standard Portsdown white USB dongle).

Full details of the functions that can be set by DTMF and their configuration are on this page DATV repeater DTMF commands

GPIO Connections

The repeater controller uses the RPi GPIO port for the following:

  • Accepts up to 8 signal detect inputs
  • IR / I2C drive output
  • GPIO outputs to control video switchers.
  • Auxilliary equipment status monitoring inputs
  • Auxilliary equipment control outputs

The exact pins used for each function are set in the configuration file.

The Ryde signal detect line can be connected to the input pin but Care MUST be taken to buffer the 3.3 volt logic levels used on the Raspberry Pi GPIO pins.

A list of GPIO connections is here: Repeater GPIO Connections.

Mains Power Control

The controller includes a number of features to reduce mains power consumption and to allow safe shutdown of Raspberry Pi based receivers and the controller itself. Full details can be found here: Repeater Controller Power Control.

Composite video input

In order to enable analogue receivers and equipment, such as mast cameras, to be connected to an HDMI switcher, BATC has developed a composite to HDMI converter.

Based on the Ryde software running on a Pi3 or Pi4, it uses a Fushicai EasyCap and provides a high-quality converter even with noisy FM video signals.

Software

Build an SD card with the Ryde software and after updating to release 03/03/22 select Option 8 on the Settings Menu in the SSH Console Menu.

Then manually edit the file /home/pi/ryde-build/cv_config.txt where you can set audio out, 16:9/4:3 and the ident caption.

After rebooting with a Fushicai EasyCap connected, the HDMI output will show the Composite video input and carry the audio from the dongle.

Note This is not a Ryde facility, the Ryde build was just a convenient starting point for the software build.

Switching Logic

A detailed description of the operation of the switching logic can be found here: Repeater Switching Logic.

Project status

The software was put on full release at the end of March 2022.

Dec 2021 - Requirement spec agreed.

Jan 22 - Alpha release for testing

Feb 10th 2022 - A Beta release version of the software is available for download: https://github.com/BritishAmateurTelevisionClub/atv-rptr

Note this is NOT the final release and there will be bugs! Please provide feedback on the forum.

Feb 15th 2022 - Feature freeze until the first release in March

Marrch 2022 -First production release

February 2023 - Updated to include safe shutdown and receiver/exciter power switching.

Software download

The BATC controller is available for download at https://github.com/BritishAmateurTelevisionClub/atv-rptr

Please follow the instructions carefully and note the controller runs on the Buster Lite OS and not Bullseye.

Depending upon demand we may sell preprogrammed SD cards in the BATC shop.

Future requirements

The following features have been identified for inclusion in future releases:

  • Implement battery-backed clock (for no internet/power cuts). Will serve NTP to Rydes on same network
  • VLC Carousel Play of videos
  • Full implementation of i2c accessory switch operation (Entries exist in config file, but not yet coded)
  • Composite video output

Further information

See https://forum.batc.org.uk/viewtopic.php?f=82&t=7750