Hi all,
I am working on my first robot and looking for good but cheap sensors for obstacle avoidance and line tracking. Any real-world recommendations? Also, tips on mounting/wiring to avoid interference would be great.
Thanks!
Hi @shampee and welcome to our forum!
Here are some cheap sensors for your project:
https://www.robotshop.com/products/obstacle-detection-ir-sensor
https://www.robotshop.com/products/infrared-line-tracking-sensor
Mounting and Wiring Tips
This is where most first-time builds run into “ghost” bugs where the robot acts crazy once the motors start spinning.
- The “Twist” Trick: Twist your motor power wires together. This helps cancel out the electromagnetic interference (EMI) they create, which can otherwise mess with your sensitive sensor signals.
- Physical Separation: Keep your sensor wires as far away from your motor wires as possible. If they have to cross, try to make them cross at a 90-degree angle rather than running parallel to each other.
- Mounting Height: For line sensors, height is critical. TCRT5000 sensors usually need to be 3mm to 10mm from the floor. Too high and they won’t see the line; too low and they’ll get “blinded” by their own reflection.
- Filtering in Code: Sensors are noisy. Instead of reacting to a single “0” or “1,” use a simple Moving Average or a small Delay (debounce) to make sure the obstacle is actually there before the robot jerks to a stop.
Feel free to ask anything else.
A good answer. Perhaps there are more options.