Tools and techniques for robotics components — as I use them.
The Bluetooth module (HC-05 / HC-06) accepts 5V power, but its TX / RX signal lines are voltage-sensitive. The module's standard signal threshold is ≥ 3.33V, whereas most Arduinos output higher voltage on their pins — this slowly damages the module over time.
To protect the RX pin, use a 1kΩ + 2kΩ voltage divider between the Arduino TX output and the module RX pin, with the junction to GND as shown below.
QTR sensors (QTR-8A or QTR-8RC) are infrared arrays for line following. They emit IR light and measure reflected intensity from the surface below.
Capacitor-discharge timing method. Set pin HIGH, then measure time to fall LOW. Ideal for MCUs with limited ADC pins.
Outputs 0–5V based on reflectivity. Easier to code but requires one analog pin per sensor.
Rotate the robot over the line so the code records max and min reflectance values — the black of the line vs the white of the floor.
A photoresistor changes resistance based on light intensity hitting its surface.
Resistance is very high — often several MΩ.
Resistance drops to a few hundred Ω.
Microcontrollers can't measure resistance directly, so we convert it into a voltage change using a 1kΩ fixed resistor in a voltage divider.
These sections are coming soon. Check back later!