Background about project
Pluto X2’s flight controller is a multi-purpose controller board, which can be used to make various kind of projects. One of them is line follower bot. The aim here was to create a PID based fast line follower bot The program is written on PlutoIDE platform. Line follower bot made by using Primus X2, Cytron IR array sensor, 2 wheel rover chasis, n20motors and castor ball.
Motivation behind project:
Many aerial robotics based projects and experiments have been engineered using PRIMUS boards in past. This project aims to add terresterial dimension to the family of PRIMUS projects. Beginning with something simple as like line follower bot, this step paves a way ahead for more advanced projects in future.
Working of project:
let us start with understanding each components one by one and its working:
1. Understanding Sensor outputs:
Depending upon the position of Sensor array on line, voltage value varies according to input voltage given. The output is obtained at analog out pin on sensor array module.
2. Understanding PrimusX2 board:
It is a compact and powerful flight controller for the Pluto drone, designed for STEM learning and programming. Featuring onboard Wi-Fi, integrated sensors, and built-in motor drivers, it enables students and developers to easily learn, code, and experiment with real-world drone applications.
3. Working Principle: PID
P.I.D algorithm which expands to Proportional Integral Derivative, refers to a algorithm that basically does is “Pushes the system to the desired state, by optimally providing correcting signal, modifying those correcting signals, reducing the overshoots and oscillations, thus stabilising the system at desired setpoint.”
This was the idea which PID works on. To expand over each term in the algorithm. What each term does is:
1. Proportional term: It provides a correcting signal proportional to error we have.
P = Kp*error
2. Integral term: It is very essential in stabilsing the system at desired setpoint, without it, the system can be stabilsed but at different setpoint, thus it is used to elimate the steady state error.
I = (I + error)*Ki
3. Derivative term: It is used to reduce the correcting signal as the system nears the desired setpoint. Otherwise this term, the system may overshoot, not become stabilising and just oscillating.
D = Kd*(current_error- prev_error)
Correction signal =
Kp*error + (I + error)*Ki + Kd*(current_error- prev_error)
4. Connections:
PrimusX2 ADC1 --> Cytron IR array A0
PrimusX2 VCC --> Cytron IR array VCC
PrimusX2 GND --> Cytron IR array GND
In simple terms, connect ADC1 port of PrimusX2 to Cytron IR array
PrimusX2 M1 --> Left motor
PrimusX2 M2 --> Right Motor
5. Putting it all together:
Assemble the components on any standard 2WD chasis. Motors may change according to chasis selection, but connections remain same. Adjust the line sensor in way that line of symmetry of array and bot chasis are concurrent.
After fullfilling hardware connections and settings, we begin to software:
1. Install Pluto IDE extension in VS code
2. Create a project in it for Line follower
3. Update the PlutoPilot.cpp file with given code.
How to upload on board:
1. Connect your laptop wifi to PrimusX2's wifi
2. Click Wifi flash on the bottom command line (PlutoIDE)
3. To check flashing process ongoing correctly, tiny blue led keeps on blinking consistently
4. After sucessfully flash the the board with indicate by blinking its LED
After uploading the code on PrimusX2 board:
1. Restart the board (Poweroff-->PowerOn)
2. Connect it to your mobile
3. Turn on developer mode with the Pluto Controller app
Some tips and suggestions:
1. Tune your PID values according to your bot specifications
2. Cross-check the motor spin directions before running the code
3. Try running Pluto_hybrid code to ensure proper functioning of motors.
Conclusion:This project aims to make hobbyists aware of wide range of projects that can be made using PRIMUSX2 board. Future additions, modifications and expansion of application are encouraged!




_j8zQg4AjGy.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)


Comments