Lab 4B: Driving While Lit Up: LabVIEW guidance of a RC Car by UHF telemetry

Background:  In Lab 4 you learned to send out control signals to the Mayhem RC Car from LabVIEW to navigate "ballistically" to a goal on the floor. You were able to set the initial position and orientation of the car to insure success. Here in Lab 4B the initial orientation and distance of your car from its goal will be arbitrary on each trial. The goal for the car to knock over will be underneath a bright halogen light -3-6 meters away, 30 cm above the floor.

The car will be able to determine the direction of the light with phototransistors on its front, arranged like you did in Lab 2. The PN150 signals are A-D converted on the car, then encoded as a 12-bit serial transmission from a UHF antenna up to a radio receiver near the computer. The radio signal is decoded and the phototransistor signals become 4-bit resolution analog voltages sent into LabVIEW.

Protocol:
Arranged on the green connector card:
ACH6 ACH7 are the A-to-D-to-A phototransistor signals to 4 bits of resolution.
They are the outputs of op amps part of a D-A converter.
ACH4 is an active-HI signal when the goal is knocked over.
ACH1 is active-HI when the timer is started on the scoring circuit.

There are 2 PN150 phototransistors mounted on the front of a 27 or 49MHz car, pointing off in different directions. The phototransistor emitters are A-D converted in a transmitter circuit that eventually sends out a 12-bit code on a LINX UHF transmitter. The receiver circuit decodes the UHF pulses and presents the recreated phototransistor emitters to the green connector card ACH6, 7.

On both the transmitter and receiver a TI TSP7333 voltage regulator (DIP chip) supplies 3.3v power to the LINX chips.
(For pinout and more data on this chip go to the TI website.)

You should not need to adjust much on the car: verify that the PN150s are pointing forward, off-axis.

Calibration: Using MAX you should verify that ACH6 and ACH7 change as you rotate the car in front of the halogen light. Note the magnitudes and signs of the voltages. As the car faces away from the halogen, note how small the voltages become. On the scope near the computer you should be able to see the data bits of the receiver output signal flicker as the car rotates.

Go to the LINX website to see the pinouts of transmitter and receiver chips.
See below the first page of the downloaded transmitter datasheet:

The receiver chip will be near the LabVIEW green connector card, and will be powered by a 3.3v regulator. If necessary, test with your oscilloscope that the pulses sent to the UHF receiver appear on the data output pin of the chip. The receiver output ("data") is not TTL logic, so it is stepped up by passing through a TTL logic chip.
See diagram below.

Your VI: Your VI will read the phototransistor signals and generate rotation or translation commands to move the car toward the goal block. See suggestion below:
What you see is the second of 3 frames. The first frame waits for the start signal from ACH1; the last frame RESETs all digital OUTs to zero. Notice that the TRUE case is invoked when the combined phototransistor signals are large (negative) enough to imply the car is pointing in generally the correct direction.

Testing your telemetry-guided controller: The goal block will be directly under the halogen light. First you will start your program: In a while loop it will look for the start button to go HI. We will orient your car in any position or orientation inside a 3 m long X 4 m wide chalk marked box whose front edge is 1 m from the goal block. Then we will press the start button, your program will detect that then allow the car to start searching for the goal. Your program will have 32 seconds to knock over the goal. You can have 3 tries per day.

For no FTQ: Knock over the goal on the first try, or create a VI that automatically stops the car after the block is knocked over.

Free Advice : Notice in the example above an attempt to normalize the photoxsistor signals is made, and the search is limited to rotations unless the car is pointing the general direction of the block. Also see the averaging of the Ain icon waveforms, to low-pass-filter the photoxsistor signals.