Hline Following Ti 84 Calculator Robot
This guide explains how to program a TI-84 calculator to follow a line using basic robotics principles. The calculator will use its sensors to detect the line and adjust its movement accordingly. This project is great for learning about feedback loops, proportional control, and basic robotics concepts.
Introduction
The Hline Following TI-84 Calculator Robot is a simple robotics project that demonstrates how a calculator can be programmed to follow a line. This project is ideal for students learning about control systems, feedback loops, and basic robotics. The calculator uses its sensors to detect the line and adjust its movement to stay centered on the line.
Key components of this project include:
- A TI-84 calculator programmed with the control algorithm
- A simple robot chassis with wheels and a line sensor
- Basic programming knowledge
- Understanding of proportional control
How It Works
The line-following robot works by using a feedback loop to adjust its movement based on sensor input. Here's a simplified explanation of the process:
- The robot's sensor detects the line and measures its position relative to the robot's center.
- The calculator processes this information using a proportional control algorithm.
- The calculator sends commands to the robot's motors to adjust its direction.
- The robot moves, and the process repeats continuously.
Proportional Control Formula
The basic proportional control formula used is:
Output = Kp × Error
Where:
Kpis the proportional gain constantErroris the difference between the desired position and the actual position
Programming the TI-84
To program the TI-84 calculator for line following, follow these steps:
- Turn on your TI-84 calculator and press the [PRGM] key to enter the program editor.
- Press [NEW] to create a new program and name it "LINEFOLLOW".
- Enter the following code:
TI-84 Program Code
:ClrHome :Disp "LINE FOLLOW" :Pause :While not(getKey) :Input "Kp:",Kp :Input "Error:",Error :Output=Kp*Error :Disp "Output:",Output :End
This program will:
- Display a welcome message
- Prompt for the proportional gain constant (Kp)
- Prompt for the error value (difference between desired and actual position)
- Calculate the output using the proportional control formula
- Display the calculated output
Example Scenario
Let's walk through an example to see how the calculator would work in a real scenario.
Suppose we have a line-following robot with the following characteristics:
- Desired position: 0 (centered on the line)
- Actual position: -2 (2 units to the left of center)
- Proportional gain constant (Kp): 0.5
Using the proportional control formula:
Output = Kp × Error = 0.5 × (-2) = -1
The negative output indicates that the robot should turn left to correct its position. The magnitude of the output (-1) would determine how sharply the robot turns.
FAQ
What is proportional control?
Proportional control is a basic feedback control mechanism where the output is proportional to the error between the desired value and the actual value. In our line-following robot, this means the robot turns more sharply when it's farther from the line.
How do I adjust the robot's sensitivity?
You can adjust the robot's sensitivity by changing the proportional gain constant (Kp). A higher Kp value makes the robot more responsive to errors, while a lower Kp value makes it more gradual in its corrections.
What happens if the line is too dark or too light?
If the line is too dark or too light, the robot's sensor may have difficulty detecting the line. You can adjust the sensor's threshold value to better match the line's contrast with the background.