Things used in this project
Here is the Github repository. This is a revised implementation of a project published by Texas Instruments. The above project is based on an earlier version of the PRU RemoteProc framework which used the "mailbox" system on the SOC. The latest framework has changed to system interrupts, and the code has been revised for compatibility with these changes. The project uses the "Beaglebone Green" (BBG) development board.
The YouTube video demonstrates the project.
How it's built
This device includes two "Programmable Real-time Units" which are 32-bit RISC processors which are intended to offload real-time tasks from the embedded Linux running on the host ARM processor. The system implements a "Proportional Integral Derivative" type digital feedback controller. The controlled parameter is the rotational speed of a DC motor. The DC motor is fitted with a "quadrature encoder" which provides both RPM and directional data.
The DC motor/encoder recommended is different than the one shown in the TI documentation. A motor/encoder obtained from eBay provided excellent results in this system. The quadrature encoder output is connected to the P8 header on the BBG. The DC motor is controlled via "Pulse Width Modulation" which is sourced from header P9. The PWM peripheral resides on PRU1, while the quadrature timing/decoding peripheral is located outside the PRU and is accessed via the internal bus.
A user-space C program provides simple control of the PID loop via character devices instantiated with the RemoteProc Messaging driver. An HTTP server capability allows the graphing of control loop behavior in a web page. This is functional and can easily be set up to serve the web page from the BBG. Capability to control RPM and PID loop parameters is possible from the web page, but it was not successfully demonstrated.
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!