top of page
White Background

Self-Balancing Robot 02

Designing, making, and testing a self-balancing robot that can grasp and pick up an object and place it at a different location while maintaining balance on two wheels requires a combination of mechanical design, electrical engineering, and software programming skills. The use of SolidWorks, LabVIEW, and Siemens NX can help in achieving the desired design and functionality of the robot. In here, the last year example has been imported to Matlab Simscape to analyse how the self-balancing robot behaves in the Simulink environment.

 

Solidworks can be used to design the physical structure of the robot. The software provides various tools for creating 3D models of the robot, including its frame, wheels, and components. It also allows for the simulation of the robot's movements, including its balance and stability. The SolidWorks model can be exported as a STEP file for use in other software tools.

 

LabVIEW is a graphical programming language that can be used to control the robot's movements. The software provides a wide range of tools for developing control algorithms, processing sensor data, and interfacing with hardware components such as microcontrollers and sensors. LabVIEW can be used to program the robot's movement, including its balance, and the ability to pick up and move objects. It also provides tools for real-time monitoring and debugging of the robot's performance.

 

Siemens NX is a computer-aided design (CAD) software that can be used for designing and simulating the robot's mechanical components. The software provides advanced tools for designing and testing the robot's frame, wheels, and other mechanical components. It also allows for the simulation of the robot's movements, including its stability and balance. The Siemens NX model can be exported as a STEP file for use in other software tools.

Grey Limbo

To design, make, and test the self-balancing robot, the following steps can be taken:

 

  1. Design the physical structure of the robot using SolidWorks. The design should include the frame, wheels, and components needed for the robot to balance on two wheels and pick up objects.

  2. Use Siemens NX to simulate the mechanical components of the robot, including its stability and balance. This will help to identify any potential issues with the design before building the physical robot.

  3. Build the physical robot using the SolidWorks model as a guide. This includes assembling the components and wiring the electronics.

  4. Use LabVIEW to program the robot's movements, including its balance and the ability to pick up and move objects.

  5. Test the robot's performance by placing an object, such as a ball, at a specific location and programming the robot to pick it up and move it to another location while maintaining balance on two wheels. Observe the robot's movements and make any necessary adjustments to improve its performance.

 

In summary, the use of SolidWorks, LabVIEW, and Siemens NX can help in designing, making, and testing a self-balancing robot.

 

To test your understanding of how Simscape works, you took a SolidWorks model of a self-balancing robot and wanted to import it into Simscape. To do this, you needed to install the Simscape Link plug-in for SolidWorks. The below link helps to understand about the Simscape plugins.

 

 

Once installed, you exported the Solidworks assembly as an XML file and used the smimport function in MATLAB to import the XML file into Simscape.

To use the smimport function, you had to open the command prompt or terminal in MATLAB and type "smimport();". This command allows you to import the relevant blocks of the Solidworks assembly into Simscape in a format that Simscape can understand. All the necessary links have been inserted in the “Resources for Matlab Simscape”

After importing the SolidWorks model into Simscape, then use the simulation environment to test the behaviour of the self-balancing robot. This includes creating a control system using Simscape blocks and testing the robot's balance and stability. Through this process, one can verify the validity of their knowledge of Simscape and confirm the successful import of a Solidworks model into Simscape.

Grey Limbo

The “The toggle visibility of frames” and “The toggle visibility of centre of mass of rigidly connected components” have been indicated in the workspace of the robot as in figure 25 an figure 26. To design the ground plane for a two-wheel robot, you need to first ensure that the robot has a stable and flat surface to move on. The robot consists of two wheels, two motors, two motor mounts, a battery, and a skeleton. All the mates must be defined correctly to ensure that the components are properly connected and the robot is structurally sound.

 

In Simulink, the gravity acts on the robot, and the wheels rotate in opposite directions to maintain balance on the ground. This is achieved through the control system that is implemented in Simulink, which controls the speed and direction of the motors based on the robot's orientation and position.

 

The kinematics of the robot must also be defined correctly to ensure that the wheels move in the desired direction and that the robot maintains its balance. This includes defining the relationship between the motion of the wheels and the robot's position and orientation. Designing the ground plane for a two-wheel robot involves careful consideration of the robot's structure, kinematics, and control system. By ensuring that all components are properly connected and defined, you can create a stable and reliable robot that can move on a variety of surfaces.

Picture9.png

Figure 24: Solidwork view of the self-balancing robot

Grey Limbo
Picture10.png

Figure 25: Simscape isometric view of the self-balancing robot

Picture11.png

Figure 26: Simscape front view of the self-balancing robot

When creating a model of a two-wheel self-balancing robot in Simscape, several key components have imported to ensure that the model accurately represents the real-world system. These components include the world frame, revolute joints, cylindrical joints, subsystems, and planar joints.

 

The world frame is the reference frame used to describe the motion of the robot. All other frames are defined with respect to this frame. The revolute and cylindrical joints allow for rotational motion between components, while the planar joint allows for motion in a plane.

 

Subsystems are used to organize the model and simplify the overall design. In a two-wheel self-balancing robot model, subsystems may be used to group together components such as the wheels, motors, and battery.

 

The orientation of the robot is critical to its ability to balance on two wheels. The position of each component must be carefully defined with respect to the world frame, and the kinematics of the system must be accurately modelled to ensure that the robot maintains its balance.

 

To connect the various components of the model correctly, it is important to define the correct joints and mates. Revolute and cylindrical joints allow for rotational motion between components, while planar joints allow for motion in a plane. Mates define how two components are connected, such as the connection between the wheels and the motor mounts.

 

Overall, the Simscape code for a two-wheel self-balancing robot must accurately model the physical system, taking into account the orientation and position of each component, the kinematics of the system, and the correct connections between components. Through careful design and testing, it is possible to create a Simscape model that accurately represents a real-world two-wheel self-balancing robot.

Figure 27: Simscape code of the self-balancing robot

Picture12.png
Grey Limbo

Measuring the angle between the robot and the surrounding environment can be crucial for certain applications, such as navigation or mapping. In order to accomplish this in the Simscape environment, there are a few approaches that can be taken.

 

One way is to use sensors that are capable of measuring orientation, such as gyroscopes or accelerometers. These sensors can be incorporated into the robot design in Solidworks and then imported into Simscape along with the rest of the model. In Simscape, the sensor output can be connected to appropriate blocks that process the data and calculate the angle between the robot and the surrounding environment.

 

Another approach is to use feedback from the robot's actuators to determine its orientation. For example, if the robot has two wheels like the self-balancing robot mentioned earlier, the motor speed and direction can be used to infer the robot's orientation. By knowing the angle at which the wheels are turning, it is possible to calculate the robot's orientation relative to the ground.

 

Regardless of the approach taken, it is important to accurately measure the angle between the robot and the environment in order to achieve the desired performance. With the knowledge and experience gained from working with Simscape, incorporating sensors and feedback mechanisms to measure orientation should be achievable with some additional learning and practice.

bottom of page