Midterm Check-in Demonstration
Major components
- Mechanical
- Loading
- The loading mechanism uses two hopper locations so that the third bean bag is placed on the launcher when first setup. It uses two servo motors that rotate in opposite directions to move the bean bag into the hopper.
- Throwing
- The throwing mechanism used is a catapult design as it is easy to operate along with build. As the catapult requires both a high torque and fast movement motor, the catapult was designed to not require a fast movement motor and instead use a solenoid (an electromagnet in this case) for locking the catapult into place. Then, another motor with string and a spring would increase the tension on the catapult before releasing the electromagnet, and providing the tension to release by launching the catapult. The motor would then decrease the tension which would then use gravity to have the base go back to its original position, which could then be locked by the electromagnet again.
- Mechanical Base
- The mechanical base used for this robot is the P3 Pioneer from Mobile Robots. This base has sonar sensors that could be used for obstacle detection, along with two motors that control two of the three wheels of the robot. This allows it to move forwards and backwards, along with rotate in the same position.
- Electrical
- Sensing
- The sensor used for the electromagnet control is a simple button switch, which can tell when the catapult base is on the magnet and for it to activate. It is only deactivated from a second command from the Arduino.
- Motor Control
- A motor controller is used to control the electromagnet along with the tension motor that pulls the spring.
- For the loading mechanism, servo motors are used to keep a position and slowly rotate to the required point. This uses the Arduino Servo library which provides the PWM signal to move it. Since the motors are 180° apart the angles are opposite of each other in terms of their direction.
- Software
- Raspberry Pi (Remote Operation/Camera)
- The Raspberry Pi (RPi) is a major part in the control system of the P3 robot base. It runs ROS, which allows the robot (mechanical) base to be controlled using the USB to serial interface. The RPi also has serial access to the Arduino, which can then implement control logic for the loading and throwing. The RPi also implements the hardware connection to the camera for vision, along with potentially getting input from the sonar sensors.
- Arduino (Control Logic/Sensors)
- The Arduino gets inputs from the Raspberry Pi along with a push switch (button) to know when to activate the electromagnet. The Arduino also implements the motor control system to allow the catapult to have spring tension to allow it to throw a bean bag. One sensor that the Arduino has is for the loading mechanism to allow it to electromagnetically lock the catapult.
- GUI (Control Logic/Remote Operation/Camera)
- The GUI contains several buttons to control the launching and loading mechanisms, the speed and turn variables, and the actual keyboard movements. The IJKL, WASD, and arrow keys pressed while the GUI is in focus makes the robot base move, along with showing the current direction of the robot. The space key stops the robot from moving.
- The camera button loads a raspivid command in a separate process from the GUI in order to transmit video over the network using netcat (nc). This then requires a computer on the network to get the video and output it to mplayer.
- The loading and launching mechanisms send messages over serial to an Arduino, which sends messages back. Every 100 ms the GUI checks for serial communications as to not slow down the GUI interface if other user inputs come in.
- Sensors
- A push button is used in order to tell when to lock the electromagnet to lock the catapult into position.
Solved Challenges:
- Mechanical
- Setup the catapult system including the motor, spring and fishing line launching system. The motor was tested to make sure it would work with the system, the servo motors were tested for the bean bag system, and the electromagnet was tested to lock the hopper in place.
- Electrical
- The motor and electromagnet were tested to be able to be controlled from an Arduino with a button input to control when it would launch depending on if the hopper was on the electromagnet. The stepper motors were also tested to be able to load bean bags into the device.
- Software
- The sonar message system was tested and was able to detect objects to stop the robot from moving.
- The Raspberry Pi and Pi Camera were setup and found to work properly with the Pioneer base. The Raspberry Pi was also tested to be able to use the remote operation over SSH, sending messages to the Arduino over serial, and creating a GUI that could be used in one interface. Also, using netcat the Raspberry Pi was able to send video over the network with a low lag rate.
- Integration
- The Raspberry Pi was integrated with the Pioneer robot base and was able to move correctly
- The catapult was integrated with the motors and other parts of the electrical system including the bean bag loader
Unsolved Problems:
- Mechanical
- Accurate throwing of the bean bag from the catapult
- Making the bean bag loader load bean bags smoother into the catapult
- Electrical
- Setting the PWM signal for the servos to be in the same position
- Removing the breadboard and making all of the connections neater in terms of wiring
- Getting power from the electrical base for the Raspberry Pi and motors
- Software
- Getting a better looking GUI with video interface in one place. Also setup the overall software of the system on the Arduino along with possibly getting a PS4 controller to work with the robot
- Integration
- Overall integration of the system for the Raspberry Pi
- Integrate the control system to work better overall
Plan for completion
- Mechanical
- Calculate the forces needed for exact placement of the beanbags
- Redesign components as needed if some break or design changes
- Electrical
- Make adjustments to the motor and sensing code to make it less jerky along with running better
- Make the wiring neater with heat shrink and other methods
- Software
- Get the GUI looking better and allow for more functions to be implemented
- Integration
- Integrate the entire setup together
Media for this project including images and videos is at the bottom of the page.