Once you have built the board, you can start using it to control your soft fluidic actuators. This section contains some guidelines on using the board. For basic testing of your actuators (e.g. the type of motion they undergo when inflated, checking for leaks) it is probably sufficient to operate the board manually by using the switches and the potentiometer to vary the pressure and open and close the valves. You can also use the Arduino IDE to write some code that will automate the operation of the control board, for example if you want to test the fatigue strength of your actuator or you want to test out some predefined motion sequences. The Basic Control page discusses how to use the board in these ways.
For more advanced control, you can also use the Arduino IDE to write control software. Alternatively, you can use environments such as LabVIEW or Simulink to create the control or data acquisition software to run on the microcontroller. The Advanced Control page discusses some of these options.
Note: Always check the maximum air supply you provide to the system. Every component has its own specifications and can withstand different maximum pressures.
Once the board has been wired following the assembly instructions, we need to program the Arduino Mega microcontroller. If you haven't done so already, set up your Arduino board using the official setup guide: Windows / Mac
If you were able to get the guide's Blink example to work, upload the sample code to control the board hardware. Those already familiar with Arduino programming can customize the code to fit their own needs.
Control Board PWM Code.txt | 2 KB |
One of the advantages of using the Arduino microcontroller is the massive amount of support documentation and useful code libraries that are available. If there is a particular control architecture you wish to implement, there is a good chance that someone has published related Arduino code online. For example, see this guide to PID control using the Arduino, and this PID Arduino library.
LabVIEW is a development environment from National Instruments that uses a graphical programming language. Software code is created by dragging and dropping functional blocks and creating connections between these blocks. The following "virtual instrument", used in testing the performance of a PneuNets Bending Actuator, was created in LabVIEW.
The LabVIEW Interface For Arduino Toolkit can be used to create Arduino sketches in the LabVIEW environment.
Simulink from Mathworks is also a graphical programming language in which code is created by manipulating functional blocks in the development environment. One of the advantages of environments like LabVIEW and Simulink is that a designer can make use of provided robust algorithms, without having to make their controllers from scratch. The following block diagram was made in Simulink and used to implement closed-loop control of a PneuNets Bending Actuator.
The Arduino Support package for MATLAB allows you to develop software/algorithms using Simulink’s graphical programming language and download this algorithm to an Arduino device. The package has a built-in compiler that converts the block diagram into code that can be embedded and run remotely on the Arduino. This page contains details on how to set up and use the support package.
This page describes the steps required to set up Simulink to work with Arduino. The instructions assume that you have MATLAB installed on your computer.
To use Simulink to create code that can be run on the Arduino, we need to install the Arduino Support Package from Simulink. We can install the support package from directly within the MATLAB environment. To do this, do the following: