EGR-450

Manufacturing Controls

Final Project - Documentation

Summary of the Project

The project consisted of creating an interface between a personal computer and a remote transmitter used for controlling a radio frequency controlled car. The computer communicates with the transmitter via the parallel port and the interface's internal circuitry. The direction of the car is simultaneously indicated on the interface via four directional LED's and the PCs monitor via a statement that is printed to the monitor when the car is traveling in its respective direction. An executable program, written in Boreland C++ can be launched from the "A" drive using DOS which then allows the user to control the car with the cursor keys on the PCs keyboard. The circuitry of the interface contains four separate legs. Each leg of the circuit is identical. They each contain the same components and function in the exact same manner.

The Transmitter

The original transmitter transmitted a signal to the car when either side of two mechanical switches were operated by the user. These switches grounded out the active side of the switch when depressed. There are two active sides of both switches (see sketch). Each side is energized with 4.71 Vdc. When the switch is in operation, one side of the switch is grounded and the voltage goes to zero. When this happens, the car will either go forward or reverse, or the front wheels will turn right or left. In any case, the challenge was to reproduce this grounding effect through the use of electronic circuitry.

The Circuit

The circuit consists of four 2N222 transistors, two National Semiconductor dual D type positive edge triggered flip flops (PN 74LS74AN), four 100K resistors, four diodes, and four LED's. Each component was chosen for the following reasons.

Transistors - Chosen due to the necessity to ground out the active side of the switch. They function as the switch. When triggered at the base, they apply what is seen at the collector to the emitter. Observe how they are configured in the circuit schematic. The collector side is soldered directly to the existing transmitter circuitry, the emitter side is attached to ground through the diode, and the collector side is connected to the output of the flip flop through the 100K resistor. As the base is excited from the signal from the flip- flop, the energized side of the switch is basically grounded through the function of the transistor.

Flip-Flops - Chosen to allow a single pulse from the computer to trigger the transistor. The flip-flop senses the positive edge of the pulse from the computer at the clock input and switches "Q-out" either high or low. Therefore, when a cursor key is depressed, a pulse is sent to the clock input of the flip-flop and the output changes state. A single keystroke energizes the circuit and a second keystroke de-energizes the circuit.

100K Resistors - Chosen after experimentation with the circuitry. As previously stated, the voltage at the collector side of the transistor had to go near zero volts for the transistor to trigger the transmitter resulting in movement in the car. However, reducing the voltage at the collector side of the transistor by placing a resistor between the transmitter and the transistor did not produce the desired results. After trial and error, it was discovered that if the voltage out of the flip flop was reduced, the voltage at the collector side of the transistor was also reduced. Therefore, through experimentation, it was determined that a 100K resistor allowed enough voltage to trip the transistor and allow the voltage on the collector side to go to about .3 volts which was sufficient for the transmitter to function properly.

Diodes - Added to the circuit to try to reduce the amount of error occurring in the circuitry due to stray voltages and external noise. During the testing portion of this project, it was apparent that noise in the surrounding wires and circuitry was a problem. Before the diodes were incorporated funny things were happening when the program and circuit were being tested. The flip-flops did not operate as expected. The cursor keys had to be depressed multiple times to activate and deactivate the circuit. Many times when the up cursor was depressed, the forward and reverse legs of the circuit would be activated at the same time.

LED's - The LED's were not really necessary for the circuit to operate correctly however they do function and provide a good indicator of which leg of the circuit is activated.

The Program

The program was written in Boreland C++. This language was chosen mostly because of the documentation that was available. The program's main features are that it defines four cases, one for each direction. Each of these directions are defined by identifying them with the key depressed on the keyboard. When the program is running a message is displayed that tells the user to use the cursor keys to control the car. Actually the "Num. Lock" has to be activated and the user needs to use the "No. 8" to go forward, "No. 2" to go backwards, "No. 4" to go left and "No. 6" to go right. This is because I could not locate the cursor keys in the P.C. reference manual I was using. The data port is defined and its memory location is 0x3bc. When the number 8 is depressed, (this is case 0x38), "Forward" is sent to the monitor and the character "a" is sent to the pinouts of the parallel port. The parallel port's output pins are defined as "Data 0 through Data 8". Which are actually pins 2 through 9 at the printer connector. Now in the case where the #8 is depressed. The character "a" is sent to the data port which is 61 in hexadecimal. Now 61 in hex is 0110 0001 in binary. Therefore, the output pins 2, 7, and 8 go high for one pulse. This is a quick explanation of how the program works.

Putting it all Together

After much testing, the circuit containing the flip-flops and transistors, ect. was soldered to a small board approximately 2 in. by 4 in. The appropriate wires were soldered to the original transmitter board and connected to the collector side of the transistors. A second smaller board for the LED's was soldered up and all three boards were screwed together. A small case was purchased at Radio Shack and all the hardware including the 9 volt battery was placed in it. The only problem remaining was to power the chips. I lucked out and found a contact on the transmitter's board which did not deviate much from 4.7 volts when the transmitter was operating in any mode. Therefore, I soldered a wire from this location to the +5Vdc input pins on both chips and the unit was now self sufficient with no additional external power supply necessary. A ribbon cable was used to connect my new transmitter box to the computer's parallel port and everything was ready for presentation.

Conclusion

This project was difficult and time consuming however the results were a functioning car that does exactly what it was intended to do. I reinforced my knowledge in allot of areas from practice in using a multi-meter to soldering wires. The knowledge and experience gained from this project is more than can be described in a sentence or paragraph. I enjoyed this experience and am satisfied with the results.