This robot was created to be an extension project of a university level embedded processing course, and is not a tutorial on how to complete the entire project from scratch. Code for necessary functions of the robot are included, but the RTOS written from scratch is not provided per university policy.
Video Demo:
1. Project Structure
Create a remote controlled robot that functions as movable and can control an extendable clamping arm. Use of the robot should include Wi-Fi via the CC3100 booster pack from Texas Instruments. Implement the PWM signals for the wheels and arm dependent on an analog joystick and buttons from the controller. Implement the preceded ideas into the RTOS created from scratch.
2. MeArm
The MeArm should be constructed and mounted onto the TI RSLK in any form that could be accessible to 4 excess GPIO pins. These 4 pins control the 4 servos for the arm: base, height, reach, and claw. The 5V source from the RSLK chassis is the supply for the MeArm. The PWM signals for the MeArm control one direction of movement at a time, which are controlled by 4 buttons and 1 joystick. The algorithm creates a delta from the joystick position, updates the duty cycle, and sends this value over Wi-Fi, where the client will then create the correct PWM to move the correct servo.
3. MSP432s/RSLK
The microcontrollers are fundamental building block for this project, and it is important to note their function. Each MSP432 will have a role, either host or client. This is indicated by the press of a button upon boot. The two devices will then acknowledge each other over Wi-Fi. From there, both will light blue, initialize their respective RTOS, then begin running. Each has only four threads, a more simple program. For the host, there is a create game thread, which initializes the entire sequence of events. Then, the joystick and button data is read in, with data manipulation applied. Next, there is a thread to transmit this data to the client. For the client, there is a join game thread, which waits for the host to create the game and acknowledge it. Then, the Wi-Fi package is received from the host. Finally, the client creates the correct PWM for the selected mode from the buttons. Both client and host have a dummy thread to avoid deadlock. It is important to note that the PWM signal is 20ms period. 10ms of this generated signal, the PWM generation thread is sleeping to allow the receive data thread to run. Wi-Fi mutexes are also implemented in order to avoid disruption in a transmission. The PWM also has a higher priority in the scheduler than the receive data, as we want the PWM to be as accurate as possible. Missing a packet is not a huge problem, since there are 2 active threads, there will be plenty of time to quickly adjust.
4. Future Work
The wheels for the TI RSLK currently do not have code for this project. In the future, a joystick to differential wheeled robot algorithm will be implemented in the same way the MeArm controls were. The wheel button will be pressed to indicate this mode, the joystick will be read in by the host, data manipulation will occur, then a packet will be sent over Wi-Fi, then the client will send the PWM signal needed for the wheels to move in a good direction.
Comments
Please log in or sign up to comment.