3/21/01 N0QBH R/C transmitter to serial interface Note: This probably not a project for a beginner. Hardware and connection description: The interface is built around the PIC 16F84 microcontroller. Easiest place to start is with a pre made prototype pcb like the PICProto 18 from ME Labs for $10. It's made for the 18 pin PICs and has a prototyping area for the rest of the circuitry. Install an 18 pin socket to make life easier. The pcb also includes a 5 volt regulator circuit which will be used to lower the R/C battery volts to TTL levels. The processor will require a 10 Mhz ceramic resonator or crystal. Since there are only 2 connections made to the PIC chip, it's pretty straightforward. PWM input- The PWM input goes to PIC PORTB:0 which is PIC pin #6. A 220 ohm resistor is placed in series to limit transient current at start up. A 10k pull up resistor tied to 5v is connected directly to PIC pin #6. The other end of the 220 ohm resistor ties to pin #2 of the 6 pin DIN plug, which is the PWM wire on a trainer cord. Ground is most reliable at the shield and switched 9 volts is availible on DIN pin #1. This 9v line is connected to the (+) positive power in on the Protoboard. Ground goes to the (-) negative power next to the positive. Serial output- A Maxim RS232 converter is used for interfacing the PIC TTL to the rest of the world. It's onboard power converter uses 5v to create the +/-9 volts for RS232 serial data. Serial out comes from PIC PORTA:1 which is PIC pin #18. This is tied directly to pin #10 of a MAX232 IC. RS232 output is pin #7 of the MAX232 and goes to pin #3 of a 9 pin D-sub connector. Pin #5 is common ground. The MAX 232 requires four - 1 uF capacitors to operate. Download the data sheet for more connection details. www.maxim.com Mount it in a 16 pin socket to save headaches. Optional LED indicator- The program includes support for a LED indicator which flashes whenever data is sent out. Real handy for checking the transmitter and converter health. It's an active high that is output at PIC PORT A:2 (pin #1). A 470 ohm resistor is placed in series to limit LED current to 8 mA max. Other end of resistor goes to LED anode and the cathode goes to ground. Using it- The converter, built as described, connects either directly or thru a RS232 modem to a Scott Edwards SSC II servo controller configured for 9600 baud, channels 0-7, 90 deg motion. The trainer cord plugs in to the R/C transmitter trainer socket. Power is switched at the transmitter master. The LED will flash briefly on power up as the encoder reads and send the intitial positions. The R/C transmitter should have it's RF module removed or the transmitter disabled as it's not used and doing so will greatly extend battery life. -------------------------------------------------------------- Parts list- PCB PICProto 18 www.melabs.com U1 PIC 16F84 /10 www.digikey.com U2 MAX 232 U3 LM7805 5v reg C1-6 1 uF tantalum caps C7,8 22 pF caps R1 220 ohm 1/4 W res R2 470 ohm 1/4 W res R3,4 10k ohm 1/4 W res Y1 10 Mhz xtal or resonator DB9 DB9 male conn T1 trainer cord www.towerhobbies.com -------------------------------------------------------------- R_C_SSI.ASM The software program r_c_ssi2.asm is what drives the whole show. It must be assembled with MPASM and then the resulting hex file programmed into the PIC 16F84. If you're unfamiliar with PIC programming, find someone who is to help. MPASM is free and availible at www.microchip.com Good luck, Mike N0QBH