Projects Research & Design Hub

Automated TV Antenna Positioning System

Written by Jeff Bachiochi

Zeroing in on HDTV

Jeff is a master when it comes to putting household electronics into historical context, and then applying modern embedded technologies to them. Here, he discusses the history and science of television, from analog black-and-white TV to today’s HDTV. He then shares the details of his project that automates the antenna positioning for your over-the-air broadcast TV antenna, controlled from your phone over your home Wi-Fi network.

  • How to build a system that automates the positioning a broadcast TV antenna
  • What’s the history of TV antennas?
  • How did digital TV evolve?
  • How to align the antenna
  • How to control the antenna using the ESP8266
  • How the configure the antenna/compass orientation
  • How to set up your home network (SSID) interface
  • How to integrate Tablo
  • Winegard RFL-332 SensarPro TV signal strength meter
  • Adafruit BNO055 module
  • Espressif Systems ESP8266 processor
  • Tablo node

During my childhood, my family spent many weekends visiting relatives. If not visiting aunts, uncles and grandparents, we were often day tripping—to the beach or a local landmark. My dad, Harry, was a mail carrier, hoofing a route of many miles each day. His younger brother, Rayfield, lived only 15 minutes away. At the time, Uncle Ray had a daughter and son the same ages as my sister and I. This gave everyone a reason for visiting. I grew up with television programming that was broadcast in black and white (B&W). Both families had TV sets, but we spent most of the time outside.

I might watch Ding Dong School with Miss Francis in the morning, Ranger Andy in the afternoon and maybe The Ed Sullivan Show on Sunday nights. I can’t remember watching television while at Uncle Ray’s until one visit, when we gathered around the tube to see something new. He had just purchased a new color television. What? TV was black and white!

In the early 1950s, both CBS and RCA demonstrated their own versions of color television to the FCC, looking for approval. While CBS initially won the battle, they lost the war. RCA’s version was compatible with existing B&W sets. Even so, the initial cost of color receivers was high, which kept many households out of the market. I was young and not overly impressed at the time. Our B&W television seemed fine.

ROOFTOP ANTENNAS

Back then, TV programming was broadcast over the air in the UHF/VHF frequency bands, with station frequencies allocated by the FCC. By far, the most critical factor for TV antenna placement is height—the higher the antenna, the better the reception (Figure 1) [1]. Antennas were mostly used on the roof or attic. “Rabbit ears” were often used as an alternative to a roof-mounted antenna in areas that had a strong signal. These could be set atop the television and rotated by hand for the best reception. The strongest signal was received when pointing an antenna toward the station’s transmission tower. Whenever you got up and changed the channel (no remotes back then), you most likely had to readjust the antenna toward a different broadcast tower.

FIGURE 1 – Before cable or satellite TV was available to the masses, television antennas dotted every roof top [1]. Apartment buildings might have had an antenna for every tenant.

To receive stations that were farther away, the rooftop antenna was preferable. Climbing onto the roof to readjust the antenna toward a transmission tower whenever you changed channels was not practical. The “rotor” was developed to turn the antenna remotely, via a four-wire connection. Next to the TV was a remote box with a direction indicator (Figure 2). Either a knob or buttons allowed you to apply a voltage the antenna rotor. You were the feedback. You adjusted the antenna’s position until you received the best signal possible (clearest picture).

FIGURE 2 – Shown here is the control box that rotated the antenna on my roof back in the 1960s.

Unlike digital TV that either works or doesn’t, this analog signal had a strength associated with it. The picture quality was directly related to received signal strength, so you wanted to position the antenna accurately. When cable companies began collecting programming and sending it via a wired connection, most consumers jumped at the chance to get rid of the antenna hassles and have access to an always-perfect picture. Analog television was the standard for most of the 20th century, but, since the 2000s, cable systems have been upgraded to digital cable operation.

— ADVERTISMENT—

Advertise Here

CABLE AND DTV

While cable began providing analog television signals through its wired network, the bandwidth covered was allocated by the FCC. In an effort to provide more channels, something had to be done about how the bandwidth was used. Many digital methods are used throughout the world. In North America the ATSC (Advanced Television System Committee) format is used. Because DTV requires less bandwidth than analog TV, the broadcaster can take their allotted analog bandwidth and divide it up into multiple channels. Individual channels can have a different transmission resolution, from SDTV (Standard Definition TV) to HDTV (High Definition TV) resolution as long as they don’t exceed their 6MHz allocation.

The new digital format is not backward compatible with analog televisions. This required the public to purchase new televisions. Just like moving from B&W to color, this didn’t happen overnight. While the end date continues to move, as of this writing, all analog signals will be phased out in 2021. It’s not a big deal, because the onslaught of large-screen HDTVs has brought the price down to a point where everyone can enjoy the benefits of digital TV (DTV).

1,000+ CHANNELS, NOTHING ON

I’ve heard this a zillion times! Networks have been established that have a slew of specialized channels. You have the cooking network, the sports network, the military network, the hobby network and more—each with channels such as Cake Boss, Rugby channel, WWII channel and so on. The lists go on and on. In the past, three networks, ABC, CBS and NBC, competed alone for a share of the public audience. The public tuned in every week, at the same time, same channel, to follow a particular show. Things have changed. We can now view all episodes of a show at one sitting—on our schedule. Binge watching has become the way to watch.

First it was Blockbuster, a chain store with a physical library of DVDs. Then Netflix, with mail rental of DVDs, made the Blockbuster chain obsolete. Netflix remains alive today by supporting a streaming library of films and television programs. Streaming services are carving into the cable companies’ all-or-nothing-approach. Even the major networks are spinning off their own expanded services. CBS has already spun off its All Access channel, and NBC is following the trend with Peacock. Trend data show à la carte subscriptions are rising.

With so much content available for purchase, many have lost sight of the free content still being broadcast by local stations. For a listing of what is potentially available in your area, you can go to www.fcc.gov/media/engineering/dtvmaps [2]. This attempts to take the topology of your location into account, to estimate which signals you may be able to receive. I live on Crystal Lake in Ellington, CT. If I map the east and the west sides of the lake, I get different results, due to the topography of the area (Figure 3). The lake area is surrounded by hills. With a clearer shot across the lake you can see the signal strengths are greatly improved. Potentially I can get all three major networks and several others as well.

FIGURE 3 – Some reception estimators such as www.fcc.gov/media/engineering/dtvmaps attempt to take topography into account when estimating the transmission towers available to your location. Because of the terrain at the lake where I live, the estimator gives slightly different results depending on which side of the lake you’re on. (left) West shore, (right) East shore.

Because of the skyrocketing cost of cable TV, many people are “cutting the cable” in favor of antennas and streaming programming. For those readers who have never used an antenna to pick up local broadcast transmissions, just what is necessary? As discussed earlier, the basics consist of an antenna and a rotor. If you Google for these items, you can find an abundance of antennas with rotors for about $50. These antennas incorporate the rotor power and signal amplifier into a control box that is separated from the antenna by the coax cable that carries rotor power and received signal. You must run this coax to your television(s). An alternative to running coax is to use an RF/Wi-Fi connection such as Tablo. More on this later.

GETTING STARTED

While waiting for my antenna to be delivered, I planned out the direction I was going to take with this project. To point the antenna in the proper direction I’ll use a digital compass or magnetometer. I had an Adafruit BNO055 module. This unit is a bit overkill ($35), since it contains an accelerometer, a gyroscope, a magnetometer and Arm Cortex-M0 based processor to digest all the sensor data and spit out quaternions, Euler angles or vectors. But, as I said, I already had it. This module is an I2C device and very easy to use.

Once the compass is aligned with the antenna, I need only activate the rotor and monitor the compass output (in degrees) until it matches the direction required. I’ll use an Espressif Systems ESP8266 as the processor to handle the sensor, rotor control output, debug serial and Wi-Fi node. Let’s start with the flow chart of the project shown in Figure 4. Two data arrays are used. The first is a list of broadcast station channel numbers (channelArray[]). The second list (compassArray[]) is the azimuth from my location to the broadcast tower for each channel. These come from the FCC website given earlier [2].

FIGURE 4 – The project flow chart has simple requirements. Get the channel of interest from the user. Look up the channel’s tower direction. Move the antenna until the compass module matches the requested tower direction.

When a viewer selects a channel to watch, the television looks for a signal coming from that channel’s frequency. The dumb antenna just sits there trying to see the broadcast. Unless we adjust the antenna’s position to point at the broadcast tower, we may not get sufficient signal for the television to decode a program. To communicate with the project, we go to the project’s assigned IP address. The project serves a list of the available channels, and you enter the new channel number. The channel array is searched for a matching entry, for example, channel 3. If it finds 3 in the channel array, say at offset 4 in the array, it then goes to offset 4 on the compass array to find the azimuth for that channel. Now we have a destination azimuth for the antenna.

— ADVERTISMENT—

Advertise Here

To rotate the antenna to a particular azimuth, we need to know the present location of the antenna. To use the BNO055 orientation module we need two libraries: Wire and Adafruit_BNO055. The wire library establishes a communications channel using I2C. I’ve defined three GPIO pins for this project: GPIO2 for the motorPin, GPIO4 for the I2sdaPin and GPPIO5 for the I2sclPin. The Adafruit_BNO055 library handles all the registers in the orientation module. In our case the following commands:

sensors_event_t = orientationData;
bool getEvent(&orientationData, Adafruit_BNO055::VECTOR_EULER);

These commands return sensor data into the integer array xyz in a Euler vector format (degrees of vector x, y and z.) The fusion algorithm handles output offset and tilt compensated orientation data for each DOF (degree of freedom): Heading/Roll/Pitch. We will be accessing one vector, x (heading), through the command:

presentPosition = orientationData.orientation.x;

The BNO055 module is addressed at address 0x28 (alternative 0x29), and has the following capabilities:

Absolute Orientation: a three-axis orientation data based on a 360-degree sphere.
Absolute Orientation: a four-point quaternion output for more accurate data manipulation.
Angular Velocity Vector: a three axis of “rotation speed” in rad/s.
Acceleration Vector: a three axis of acceleration (gravity plus linear motion) in m/s2.
Magnetic Field Strength Vector: a three axis of magnetic field sensing in micro Teslas (µT).
Linear Acceleration Vector: a three axis of linear acceleration data (acceleration minus gravity) in m/s2.
Gravity Vector: a three axis of gravitational acceleration (minus any movement) in m/s2.
Temperature: an ambient temperature in degrees Celsius.

For more information on this module, see the datasheet [3] on the Adafruit website. You may have an alternative magnetometer such as the Honeywell HMC5883L. Just substitute the appropriate library in support of your module.

ANTENNA/COMPASS ORIENTATION

The BNO055 module is mounted onto the antenna, using a mount made from two pieces of plastic attached together by a plastic pin. The bottom one can be affixed to the antenna, while the top one has the BNO055 attached (Figure 5). A rubber washer between the two pieces of plastic acts as a friction brake, holding the two in place but allowing the module to be rotated by hand to orient the antenna to magnetic north. The FCC tower azimuths are given as a north pole azimuth, which is different from the magnetic pole azimuth. Since your BNO055 outputs a magnetic azimuth, you will need to adjust its output to compensate for the declination of your area.

FIGURE 5 – The compass module is mounted on the antenna. A four-wire twisted pair connection carries power and data between the module and the processor. Tie this cable to the coax, because it must stay unencumbered during antenna movements.

For my area in Connecticut, the declination offset is -14 degrees—that’s the angular difference between (true) north pole and the (magnetic) north pole—so I add 14 degrees to the magnetic azimuth output of the BNO055. Orient your antenna by turning on the rotor until it physically points to true north. You can use the compass on your phone to do this. Now, without moving the antenna, rotate the BNO055 module until the presentPosition shows 0 or 360 degrees (true north). You can actually use the BNO055 to do this, if you know which direction is north on the module. This is usually indicated by an arrow (X-axis). Remember that this arrow will be magnetic north, whereas my true north is 14 degrees clockwise (CW) of that!

That’s all there is to it! Samples must be taken fast enough so that, once the rotor is turned ON, the azimuth is output at least once per degree. If the sampling is too slow, the antenna may swing past the requested position and keep on going. These rotors are inexpensive because their AC motors’ direction cannot be controlled by polarity—it’s AC! They must continue to the end stop before they are forced to switch direction. Using a DC motor would allow smart direction control.

You can fine tune the position accuracy by using a signal strength meter on the antenna signal, and nudge the module slightly to correct any slight offset. Most of the signal strength meters I’ve seen will only give you a signal strength for the strongest transmission, which might not be the signal of interest when towers are in the same general direction. The only unit that can zero in on a particular channel is the Winegard RFL-332 SensarPro TV signal strength meter [4], shown in Figure 6.

FIGURE 6 – The Winegard RFL-332 is a sophisticated signal strength analyzer that can zero in on individual channels, as opposed to a simple meter that shows only the strongest signal being received.
YOUR HOME NETWORK

To get this module on your local network, you could “hard code” in the SSID and password, or add the WiFiManage library. With this library your module can power up in station mode with its own SSID. If you connect to that network, you are served a list of available networks. Choose your network and the project will then automatically connect to that upon any reset. The point here is that it can be dynamically assigned rather than hard coded. This is a nice feature for devices you may want to move around.

Once it has been assigned an IP address on your network, you can use ArduinoOTA, which allows OTA (over-the-air) programming, should you want to change the application. These are options that you could choose to leave out, if you wish to further simplify the application.

To initiate a channel change, just use your cell phone browser and enter your module’s IP address. The module will send you an HTML screen that generates a pull-down list containing all the channels in your channel array. You simply choose a channel, and the channel number is transmitted to the module. From there, the module will grab the azimuth for that channel from the compass array. If it is not already positioned to that azimuth, the rotor will be switched on until the BNO055 indicates the antenna is pointing at the new azimuth, then the rotor is then turned off.

In Figure 7 you can see the relay module I am using, which is driven from the motorPin. The rotor control box has a big red button on top, which is a momentary switch that applies power to the antenna rotor. This also comes with an IR remote, designed for use when this is located next to your television. My whole project is located in the attic, so the IR remote will not be used. Instead, I’ve attached a couple of wires inside the rotor controller across the red button, so now I can externally push the button using the relay contacts.

— ADVERTISMENT—

Advertise Here

FIGURE 7
The Espressif ESP8266 processor handles Wi-Fi, the compass and the relay. An external 5V relay board provides isolation between the processor and the antenna power supply for the rotor motor.
TABLO

Those of you who dislike having to run coaxial cable (or even twisted pairs) for communications throughout your house will want one of these. The Tablo [5] is a Wi-Fi (or Ethernet) node that can be added to your home network to shuttle video to multiple televisions. You must be using a smart TV that supports Tablo, or, alternately, a streaming device such as Roku on each set. Tablo’s antenna input will convert OTA digital channels received from your antenna into a streaming format that can be streamed to your (supported) television.

As an added feature, Tablo can save OTA broadcasts to a USB external hard drive to provide a DVR function. If you will be using a rotor for optimum reception, make sure you record only those channels that are being received by the present antenna position. Recording allows you to watch scheduled programming at your convenience. Just remember to position the antenna for that channel’s recording period.

Tablo has a subscription-based on-screen programming guide as a convenience. Free guides can be found online. As with many televisions that accept a digital antenna input, to set up the device, you need to do a channel scan. Tablo will search for any channels being received (at the present antenna position). This means only one set of channels is available to Tablo (or a television) from a given antenna position.

Note: Tablo allows appending selected channels from each antenna position scanned to the guide. You will not be able to receive (or record) that channel if the antenna is not pointed toward that transmitting tower. It would be a great feature if Tablo were able to output a channel number, so you could automate the antenna positioning based on the channel selected by the user.

WAY OF LIFE

It’s hard for me to break old habits. I like tuning into NCIS on Tuesdays at 8 p.m. to see the next installment of the Gibb’s saga. With COVID-19 demanding cancellation of all “live” meetings and network programming limited to reruns, we’ve just about finished going through our DVD collection.

I am satisfied with watching one of the locally broadcast networks. If you were to ask my wife what programming is important to her, she would tell you NESN for the Boston Red Sox games and the Hallmark channel for their original movies. Unfortunately, neither of these is available OTA, so it might require some streaming service to make her happy.

I hope all of you are faring well during this time of social distancing. Ain’t life full of surprises? We have a lot more free time. Use it wisely. Read Circuit Cellar, build/fix/improve things and smell the roses. So much we can do, so little time. 

RESOURCES

References:
[1]  Image source: Antennas on rooftops: https://www.everthenomad.com
[2]  Free TV content in your area: http://www.fcc.gov/media/engineering/dtvmaps
[3]  BNO055 datasheet:  http://www.adafruit.com/datasheets/BST_BNO055_DS000_12.pdf
[4]  Winegard RFL-332 SensarPro TV signal strength meter
www.winegard.com/products/accessories/signal-meters
[5] The Tablo:  https://www.tablotv.com

Adafruit | www.adafruit.com
Espressif Systems | www.espressif.com
Honeywell | www.honeywell.com
Winegard | www.winegard.com

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • DECEMBER 2020 #365 – Get a PDF of the issue


Keep up-to-date with our FREE Weekly Newsletter!



Don't miss out on upcoming issues of Circuit Cellar.

Note: We’ve made the May 2020 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.


Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Sponsor this Article
Website | + posts

Jeff Bachiochi (pronounced BAH-key-AH-key) has been writing for Circuit Cellar since 1988. His background includes product design and manufacturing. You can reach him at: [email protected] or at: www.imaginethatnow.com.

Supporting Companies

Upcoming Events

Copyright © 2021 KCK Media Corp.

Automated TV Antenna Positioning System

by Jeff Bachiochi time to read: 14 min