In order to control a stepper motor, a Stepper Motor Driver is required which will recieve two signals from the microcontroller in addition to two power supplies, one coming from the Control Board and the other is the Voltage Needed to power the Stepper Motors.
Each stepper motor driver has the following connections
The Servo motor is maily used to produce a controlled angular motion. The servo motor is connected to the control board using 3 pins:
The main tool i will be using to save the data collected by the robot is the microSD Transflash Breakout.
Breakout board for the microSD socket that is not much bigger than your fingernail. Compatible with the SPI interface found on any SD card, this tiny form factor was created for cell phone storage and is perfect for your next MP3 project! Board comes fully assembled and tested.
The microSD Transflash Breakout has 7 pins:
As mentioned previously, the Ultrasonic Distance Sensor is a Digital Sensor. The HC-SR04 Ultrasonic Sensor Module has four pins:
The main sesnor i am using in my Pipe Surveying Robot is the the MPU-9250.
This sensor is used to cllect 9 different values from the 3-Axis Accelerometer, Gyro, & Magnetometer MEMS found on its single chip.
The module has 10 pins:
In order to test the movement of my robot, and test the functionality of the mecanum wheels, i prepared an Arduino code that would allow me to control the robot remotely through bluetooth. This code reads from the serial monitor, and accordingly, it performs the motion function previously set.
To control the robot remotely, i used the following link Arduino Car application on the Android Google PLay as it seemed perfect for the functionalities i had in my project.
In addition to that, i wanted to build my personal application that has the same functionalities of this application. So i created my remote control app using MIT app Inventor. But it could be the ugliest app you have ever seen, but it does the job. You can download the app from the following link
Next i wanted to test the capabilities of the ultrasonic sensor. To do that, i updated the previous code, to stop the motors when an obstacle is detected.
To test the ultrasonic sensor, i used the example code found in the Arduin IDE.
The next step was totest the functionality of the servo motor, and see if scanning works when an ostacle is met. I used a code that set various angles of the servo, and measure the distances at the different angles, compares the values, and then returns the angle the robot should go to.
After finalizing all functionalities, the final step was to check if the MPU-9250 works and if the data is saved on the micro sd. To do that, i upgrated the remote control code, to measure data from the MPU- and save it on the Micro Sd, which was done successfully.