How to use ARC with Microcontrollers

Table of Contents:

  1. Introduction
  2. Limitations of ARC Running on PC for Closed Loop Functions
  3. Utilizing Microcontrollers for Closed Loop Functions
  4. Examples of Closed Loop Functions
    1. Inverted Pendulums with Multi-Axis Accelerometers
    2. Counting Encoders for Positioning
    3. Monitoring Current Consumption for Servo Grippers
  5. Microcontroller Selection and Configuration
  6. Writing Code for Closed Loop Functions
  7. Integrating Microcontrollers with ARC Robot Software
  8. EZB Protocol
  9. Conclusion

Introduction:

This manual aims to provide a comprehensive guide on utilizing microcontrollers for closed loop functions in conjunction with the ARC Robot Software developed by Synthiam. While ARC runs on a PC, which is not ideal for tight closed loop functions requiring high accuracy and resolution due to its lack of real-time capabilities, microcontrollers can distribute the processing load across multiple cost-effective devices, ensuring precise and accurate control. This manual will explore the advantages of using microcontrollers and provide examples of closed loop functions that can be achieved.

Limitations of ARC Running on PC for Closed Loop Functions:

ARC, being a software running on a PC, has inherent limitations when it comes to tight closed loop functions. The lack of real-time processing capabilities on a PC can result in delays, leading to inaccuracies and compromised performance. To overcome these limitations, microcontrollers can be employed to offload critical processing tasks from the PC.

Utilizing Microcontrollers for Closed Loop Functions:

Microcontrollers offer several advantages when it comes to implementing closed loop functions:

Real-time processing: Microcontrollers are designed to operate in real-time, ensuring precise control and responsiveness. High accuracy and resolution: By distributing processing tasks to microcontrollers, you can achieve higher accuracy and resolution for closed loop functions. Cost-effectiveness: Microcontrollers are generally more affordable compared to high-performance PCs, making them an economical choice for distributed processing.

In this diagram, each Arduino micro controller would be programmed with a custom EZB firmware that performs a specific closed-loop function. Optionally, your custom EZB firmware can both send and receive data from ARC by extending the EZB communication protocol (covered further below). If you have the technical ability, a custom EZB firmware can extend the protocol to merge multiple functions into one microcontroller. However, in most cases the firmware will be specific to a function of the robot.

Examples of Closed Loop Functions:

Inverted Pendulums with Multi-Axis Accelerometers:

Inverted pendulums are a classic example of a closed loop control system. By incorporating multi-axis accelerometers, a microcontroller can continuously monitor the pendulum's position and make real-time adjustments to maintain stability. A robot skill and respective firmware that provides this example can be found in the Inverted Pendulum robot skill. This robot skill and firmware will demonstrate how to offload the closed-loop PID function to the micro controller and communicate with the ARC software.

Counting Encoders for Positioning:

Microcontrollers can be used to interface with encoders and perform accurate counting for precise positioning control. This is particularly useful in robotic systems that require precise movements and feedback.

Monitoring Current Consumption for Servo Grippers:

By utilizing microcontrollers, you can monitor the current consumption of servo grippers in real-time. This information can be used to implement safety measures, detect anomalies, and optimize grip strength for different objects.

Microcontroller Selection and Configuration:

Selecting the appropriate microcontroller depends on the specific requirements of your closed loop function. Consider factors such as processing power, input/output capabilities, communication protocols, and compatibility with ARC Robot Software. Configuration involves setting up the microcontroller, programming environment, and establishing communication interfaces with ARC.

Writing Code for Closed Loop Functions:

To perform closed loop functions, you'll need to write code for the microcontroller. This includes implementing control algorithms, interfacing with sensors and actuators, and processing data in real-time. Code examples, libraries, and resources specific to your microcontroller can greatly aid in developing efficient and reliable code.

Integrating Microcontrollers with ARC Robot Software:

To leverage the capabilities of microcontrollers within the ARC environment, proper integration is required. This involves establishing communication channels between the microcontroller and the PC running ARC, configuring data exchange protocols, and ensuring synchronization between the software and microcontroller.

One such example is the Wheel Encoder Robot Skill which uses a custom EZB firmware to communicate with ARC. The EZB protocol allows extending for additional commands to send and receive custom data. A custom robot skill can be created to use an EZB firmware that extends the protocol. In the Wheel Encoder Counter robot skill and respective firmware, the EZB protocol is extended to allow the robot skill to query the encoder counts from the micro controller EZB. This video demonstrates how that can be achieved.


EZB Protocol

The EZB communication protocol has pre-defined commands for interfacing with periphal devices, such as UARTs, I2C, Digital I/O and PWM Servos. The protocol has been defined in this document here, and can be extended using the above example provided with the Wheel Encoder Robot Skill.

Conclusion:

By harnessing the power of microcontrollers, you can enhance the closed loop functions in your robotics projects, achieving higher accuracy and responsiveness. This manual has introduced the concept of using microcontrollers with ARC Robot Software, provided examples of closed loop functions, and offered guidance on microcontroller selection, code development, integration, and troubleshooting. With this knowledge, you can now embark on implementing advanced closed loop control systems using cost-effective microcontrollers. To begin creating a robot skill, consult the Robot Skill Tutorial.