Sunday


JunkBot Line Follower 
Physical: 

The JunkBot has been slightly updated with a larger platform, and I replaced the h-bridge with a motor driver module. This was done for simplicity, size, and just to test it out. The code did not have to change since they are driven in the same manner. 

The line following 'sensor' uses a laser and two IR sensors to detect the line. Variable resistors are used to set the sensitivity of the sensors. I chose to use a laser since I had one on hand and it is capable of overwhelming ambient light sources. My initial design used an LED, which worked almost as well. I removed the lense from the laser, making the width of the beam wider than the strip of tape. The IR detectors are mounted just below the laser, and the beam passes between them and reflects off the floor. The detectors are shielded with black electrical tape.

 














  




Logical:

Fairly simple code, the value of each IR detector is read into an analog input, and motor speed is tied directly to these values. When line is between the detectors, slight adjustments are made. When line is out of these boundaries, more aggressive adjustments are made.

Written using the Arduino IDE, running on Arduino Nano/ATmega328

JunkBotX_SD_LF preliminary code here (Current code for testing, all other functions disabled)

Functionality:

Put together mostly out of curiosity, it follows lines in a fairly smooth way without diverting from the defined course. Could be fine tuned for smoother or more precise adjustments if required. This may be useful in repositioning or determining location based on visible markings.

No comments:

Installing and using the RF24 Communication stack on Arduino and RPi - 2024

 Installing and using the RF24 Communication stack on Arduino and RPi - 2024 I made a video to demonstrate current installation and usage of...