This project was done with the collaboration between Minoo Gunawardena from Monash University, Malaysia and Chathuni Wijegunawardana. A mobile robot was created and controlled using CY8CKIT-059 PSoC® 5LP Prototyping Kit to complete a specific task. It was programmed using PSoC Creator development software for Cypress PSoCs. PSoC Creator provides IP blocks to program the PSoC to implement its various functions and features like PWM outputs, Timers, etc.

The Functions

The robot was supposed to be able to perform the following tasks.

  • Navigating an arena using encoders
  • Color Detection
  • Object Detection
  • Puck Detection
  • Flicking a puck

The Design of the Robot

The robot chassis was constructed using 3 mm acrylic sheets. Pololu 12V DC gear motors with 48 CPR encoder was used to drive the robot. The resolution of the encoder was crucial because the robot uses encoder counts to navigate within the pre-determined arena in a precise way.

Two buck converters were used to supply power to the high power motors and the PSoC and other sensors. The following sensors were used appropriately to observe the environment.

  • Color sensor – placed beneath the bottom layer of the robot, centered
  • IR sensor – placed in the front side of the robot facing downwards to detect the puck
  • Ultrasonic sensor – placed in the front of the robot facing forward

A rod was fixed on the bottom side of the robot to flick the puck. This was controlled using a servo motor.

Programming using PSoC Creator

The following figure shows the top design of the controller.

PSoC Creator provides IP blocks such as PWM, Timers, Registers and UART communication, logic gates and other components within its environment. The user can program their PSoC solely using this top design by adjusting the parameters within each block.

In our implementation, we configured the inputs and outputs of each block using a code written in C++. The code can accessed through this GitHub repository. We used internal and external interrupts to switch between each function like navigation, puck detection and object detection. The priority could be assigned to each interrupt through the software to optimally manage a operation driven using multiple number of interrupts.

After writing the source code, the hardware pins were assigned to each input and output.

Leave a Reply

Your email address will not be published. Required fields are marked *