|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Add
a PC based RF remote control transmitter to your next robotics design, or
automate your home from your PC serial port with the TX-4-PC interface. The
TX-4-PC connects the Holtek HT-12E remote control encoder IC, Ming TX-99,
TX-66, or TWS-434 RF transmitters directly to your PC serial port. Download & use our "FREE" PC-Remote control software shown below, or create your own custom control software with the tutorial shown at the bottom of this page. The TX-4-PC is designed for use with three popular & inexpensive hobby RF transmitters.
Just plug-in your favorite RF transmitter modules for instant remote control from your PC serial port.
Note: The antenna wire for the TWS-434 photo was coiled to include antenna in the picture. You'll want to extend the antenna straight up without coiling it for optimum range. Mounting Antennas: The TX-4-PC circuit board includes a gold single-pin socket for the TWS-434 antenna wire, and a solder pad for whip antenna ground connections. The TWS-434 RF transmitter requires a solid 6 1/2" piece of 22 gauge insulated wire for a 1/4 wave antenna. Just insert the end of the 6 1/2" 22 gauge wire into the gold pin socket as shown below. Just click on a picture for a larger view.
The TX-4-PC has an optional mounting hole for 434MHz whip style antennas as shown above. Push the whip antenna coax cable and threads through the hole, and use the nut to secure the antenna to the PC board. Trim the coax cable to size so the wire is kept short, and run the wire direct to the antenna connection area. Solder the center conductor of the whip antenna coax wire to the gold pin socket marked ANT, and solder the shield to the pad marked AGND [antenna ground]. The Ming TX-99 and TX-66 RF transmitter modules require a 9.06" 22 gauge wire for a 1/4 wave antenna. Solder the antenna wires directly to the Ming RF transmitter modules as described in the documentation for the specific transmitter module used. The gold pin socket is used only for the RWS-434 wire or whip antenna connections. No Antenna Required For 30-50 Foot Operation: One benefit of using the Ming RF transmitter modules is the loop antenna designed into the RF module. The loop antenna allows operation between 30-50' [or more] without the addition of the external wire antenna. The TWS-434 transmitter module requires a minimum 6 1/2" antenna wire, or a 434MHz whip antenna.
Applications For The TX-4-PC Interface:
Virtually anything you need remote control of directly from your PC serial port is possible with the TX-4-PC, and the RX-5 receiver. Free PC-Remote Control Software Write your own control software [shown at the bottom of this page], or use our "free" RC-Remote application to control the TX-4-PC transmitter interface. PC-Remote allows you to create individual remote control "tasks". A task consists of the receiver address, data to send to the receiver, time to run or activate each task, the number of times to transmit a tasks information to the receiver from 1 to 5, and descriptive task labels to identify the device, data outputs, and receiver address being controlled. Below are samples of manual receiver control, and building automated control tasks for use with the TX-4-PC. Manual Receiver Control Window
The PC-Remote manual receiver control window allows you to select the receiver address, control data to place on the receiver outputs, and the number of times to send selected data to the receiver from 1 to 5. Automated Control Tasks
Using the PC-Remote task editor you create individual remote control tasks. Tasks include control information to be sent to individual receivers, address of receiver to control, time to run or activate individual tasks for full remote control automation from your PC serial port. Features:
Edit Task: The edit task window allows full editing of each individual remote control task. Below is an example of editing the Coffee Pot OFF task to change the deactivation or OFF time from 7:30am to 8:30am.
Get PC-Remote Software for FREE --- HERE 2.03mb file size The TX-4-PC Interface: The TX-4-PC uses an 18-pin PIC16F627 microcontroller as the main interface component to the PC serial port & Holtek HT-12E series 4-bit remote control encoder IC. The Holtek encoder IC "data output pin" connects to the TWS-434, Ming TX-99 or TX-66 RF transmitter modules "data input pins". The PIC16F627 receives data from the PC serial port, then places this data on the encoder IC data, address, and transmit enable pins allowing direct serial control of the Holtek encoder IC + RF transmitter from your PC serial port.
How it Works: The TX-4-PC interface is simple. Here's how it works.
The PIC16F627 microcontroller interfaces to the PC serial port through a single series 22K resistor. This "direct" RS-232 interface is similar to designs using BASIC Stamps, PIC microcontrollers, and the Mini SSC-II serial servo controllers. The PIC places the received address information on the address bus connecting the PIC port B I/O-pins to the HT-12E encoder IC address pins, then places the 4-bit data on pins A.0, A1, A2 and A3. After placing the address & data control signals on the HT-12E encoder IC, the PIC initiates the transmission by pulling the HT-12E transmit enable pin "/TE" to ground. The transmission is held ON for a period of 200mS [200 milliseconds], then ended by returning /TE to logic 1. The PIC then returns to the data input routine waiting for more incoming serial commands/data. Serial Commands to Control The TX-4-PC: Note: The TX-4-PC can also be controlled by a BASIC Stamp or another PIC. The examples below assume you'll be using your PC serial port. The PIC16F627 waits for a serial command string consisting of three data bytes from the PC serial port as shown below.
The synchronization byte 170 consists of an even number of 1s' & 0s', or 10101010 in binary, and is is used to synchronize the transmitter with the PC serial port. The address byte selects the receiver at a specific "address" to control. The data byte is the 4-bit logic pattern that will be transferred the receiver HT-12D decoder ICs' control output pins. The PIC16F627 places the address & data on the HT-12E encoder pins, then activates /TE or transmit enable for a period of 200mS, then returns to the serial input routine to look for more incoming serial data. Note: Data packets not preceded by the synchronization byte of "170", will be ignored. This helps the TX-4-PC ignore any noise signal that may otherwise be interpreted as a beginning data packet. The 250mS pauses in the VB application software shown below take into account the 200mS time frame in which the PIC holds the /TE or transmit enable pin on the HT-12E active. An additional time of 50mS per pause ensures the PIC has returned to the data input routine, and is ready for the next inbound data/control packet. This causes four transmissions from the TX-4-PC to help ensure data packets reach the receiver in case of interference. You can increase or decrease the transmissions as required by your own application. Creating Your Own Custom VB Control Software: Creating your own custom control software for use with the TX-4-PC is very simple. The following example shows how to create a simple program to control all four outputs on the RX-5 receiver with Microsoft Visual Basic. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) ' Form
load code ' Used
for the "pause" ' Button
1 code. Sends synch byte of 170, a receiver address of "0", then turns OFF
all outputs on receiver. ' Button
16 code. Sends synch byte of 170, a receiver address of "0", then turns ON
output all outputs on receiver. To create the application below, just add more buttons, and duplicate the button code shown above. Change the last byte sent for each button press to correspond to the 4-bit data pattern to be sent to the receiver. IE,, Chr$(170) & Chr$(0) & Chr$(2) will turn ON output #2, and the remaining outputs all OFF on the receiver set to address 0. The #1 button [0000] shown below in Figure 1 corresponds to the Button 1 code shown above, and below the picture, and will turn OFF all outputs on receiver at address 0. Figure 2 shows button 16. This button turns ON all outputs on the receiver at address 0. You can create any combination of different addresses by simply changing the second "address" byte to match the receiver you wish to control. Note: You will need the professional edition of Visual Basic to use the MSComm control. Be sure to add the MSComm control to your form, and select the available serial port on your PC as shown above in the line - MSComm1.CommPort = 1. Just change the 1 to whatever comm port you have available. IE,, MSComm1.CommPort = 2 for comm 2.
The loop is created to send data four times per button click, every 250mS. Multiple data transmissions per button click helps ensure the receiver gets the inbound command information, changes its outputs to match the data sent, and the TX-4-PC has time to receive each data packet sent by the PC.. The Exit button code look like this -- Private
Sub Command17_Click() This checks the status of the comm port. If open, it closes it before exiting the application. It's good practice to always close the comm port before exiting your application. Download The Software Program Above: We have the full VB application software [shown above] available for download HERE in .ZIP format. These files require Visual Basic Pro edition. You can modify the program to suit your own applications, or use them as-is.
Data From the HT-12E to RF Transmitter Module: Address and control data placed on the HT-12E encoder by the PIC microcontroller exits the HT-12E encoder IC on pin #17 DOUT. This outgoing data enters the data input pin of the RF transmitter in the header sockets. J2 is for the TWS-434 transmitter. J3 is for the Ming TX-99 or TX-66 series transmitters. Just insert the RF transmitter of your choice into one of the TX-4-PC headers.
The Power Supply: The TX-4-PC uses the LP2950 "micro power" +5V regulator with very low quiescent current requirements [approximately 75uA]. With current requirements of approx <2mA idle, and <4mA during transmit, this allows the TX-4-PC to be used for mobile or robotics remote control applications with laptop computers and a 9-volt battery, and helps extend battery life. With its very low input requirements to maintain the regulated +5V output, the LP2950 regulator allows the TX-4-PC to operate for several days on a single 9-volt battery.
Power Supply & +5V Regulator Schematic A 2-position screw terminal is provided for the battery connection. We recommend using 9 to 12V batteries with the LP2950 regulator. There is no gain in performance by using a larger supply supply input voltage, and lower inputs reduce the amount of heat generated by the regulator. The LP2950 provides a max output current of 100mA which is more than enough for the TX-4-PC. Be sure to connect the positive & negative battery leads to the correct polarity terminals when connecting the battery to the power supply input screw terminals. Connect battery leads or power supply as shown below. The TX-4-PC does not have input reversal protection, and reversed polarity connections will damage the onboard LP2950 regulator or TX-4-PC components.
The RX-5 Receiver: The next page shows RX-5 RF receiver board. The RX-5 receiver uses the ULN2803 darlington transistor array to drive two 5-volt mechanical relays, 4 LED output status indicators, and two digital outputs. The RX-5 has two individually controllable relays, and two high-current digital outputs for controlling larger AC loads with solid state relays. Each of the four outputs have a status LED for a visual indication of each outputs ON or OFF status. Click HERE to see the RX-5 receiver board. Purchase the TX-4-PC HERE
|