Appendix B

Television Remote Control Example

This chapter contains an example program written in Microsoft QuickBasic for controlling the 4070A remotely. It is used here to drive an infrared LED to issue commands to a TV or a VCR. It uses the 4070A in Burst mode to emulate the same waveforms used in many infrared remote control transmitters.

Background

Many TV remote controls operate by flashing an infrared LED at a carrier frequency rate in the ultrasonic frequency band (usually 30-40 KHz). Short bursts of these pulses are used to form various remote control commands to command the TV power on or off, change the channel, etc. Often it is the number of bursts, which determines which command is which.

Some TV's and VCR's count the number of pulses to distinguish between commands. The pulse sequence for a TV receiver was determined by examining the signal generated by the remote control unit. An oscilloscope was used to observe the waveform across the remote transmitter's LED. Using the oscilloscope, the carrier frequency, and pulse on time, pulse off time, and number of pulses for several commands was measured.

These parameters were then entered into the Basic program. The Basic program takes these parameters and issues commands to the 4070A to generate the same pulse train using the Burst mode of operation. A program menu asks the user which command to generate.

Hardware Setup

You must connect a serial cable between your computer and the RS-232 port connector on the rear of the 4070A. For more information on how to do this, refer to chapter 6.0.

The program assumes you are using serial port 1 (COM1). If you are using another serial port, change the OPEN COM1... statement in the beginning of this program. It also assumes that the 4070A baud rate is set to 9600. To check the 4070A baud rate, press the Mode then offset keys.

You must also wire the output of the 4070A to an infrared LED. The diagram below shows how to do this. Don't forget to aim the LED towards the device you wish to control.

To

3 9 0

 

SYNC Out

 

Connector

 

I n f r a r e d

L E D

( A i m t o w a r d

t e l e v i s i o n )

Figure B-1: Infrared LED hookup

This program does the following:

1.Clear the screen

2.Open the serial communications port for communicating with the 4070A

3.Make sure there is a 4070A connected to the serial port. If we can't find one, wait until it is connected up.

4.Command the 4070A to enter Burst mode.

5.Set up the burst frequency, on time and off time. On time is the burst duration, off time is the burst delay.

6.Present a menu to the user asking which remote control command to issue (i.e. power on/off, change channel, etc.)

7.When a command is selected, command the 4070A to generate the same number of pulses associated with the selected command.

NOTE: This program uses the same subroutines as those listed in Appendix A.

77

BK Precision 4070A User Manual Rev.2.2

Page 82
Image 82
B&K 4070A user manual Appendix B, Television Remote Control Example