Clone this wiki locally
The ''FPGA Quad-Linear-Amplifier Controller'' (FPGA1394-QLA) is an IEEE1394 based controller board set that comprises one general purpose FPGA controller board, with IEEE-1394a interface (and Ethernet, starting with Rev 2.0), and one linear power amplifier board, that supports up to 4 DC brush motors. The power amplifier has a linear design that is based on the TI/Burr-Brown OPA549 power amplifier, which provides up to 6A continuous current at a maximum supply voltage of 48V. The controller board contains a field programmable gate array (FPGA) that provides the IEEE1394 interface to the different I/O components:
- D/A converter to control the motor current
- A/D converter to read the motor current feedback
- A/D converter to read potentiometer feedback
- A/D converter to read temperature sensor feedback
- Quadrature encoder circuits (implemented in the FPGA) to provide position/velocity feedback from incremental encoders (optional index pulse count is also available)
- Digital inputs for motor and board (power supply) status
- Digital output to disable motor power
- Digital inputs to for Positive - Negative Limits and Home signals
In the software and the FPGA design, channel numbering starts at 0 so the 4 axes are labeled 0,1,2,3. In the electrical schematic, numbering starts at 1 (this was done to avoid an apparent bug in the Protel design software when doing a multi-channel design starting with channel 0). The PCB silkscreen also labels the 4 channels as Axis 1-4. To avoid confusion, this document uses the software convention of starting the numbering at 0.
As mentioned in the overview, the controller set has one FPGA board and one QLA board (See Fig. 1 ).
The board is connected to computer using an IEEE-1394 (FireWire) cable and the digital power is either from an external power supply or from the cable. Rev 2.x FPGA boards also contain an Ethernet interface, which can alternatively be used to connect to the computer (FPGA Firmware Rev 7+ required).
The FPGA1394 QLA controller board can be connected to individual motors via a breakout board. One DB9M to DB9F and one VHDCI 68-pin Male to SCSI-3 68-pin Male cable connect the breakout board and the controller board together.
The current software is written in C/C++ and uses the
libraw1394 library under Linux for the Firewire interface. See http://www.dennedy.org/libraw1394/ for libraw1394 documentation.
(October 30, 2017) We recommend Ubuntu 16.04 LTS, which is a long term support version. For ROS, we recommend Kinetic.
You can use Synaptic to install packages or the command line.
- Synaptic: Search for raw1394 and install the libraw1394-dev package.
- Terminal: On the command line, install it with:
sudo apt-get install libraw1394-dev
If you installed linux recently, you are likely to have Kernel 3.x with the new Juju firewire driver stack, which means the firewire device would be /dev/fw* instead of the old /dev/raw1394*. In order to run the control software without root permission, please do the following steps:
/etc/udev/rules.dfolder if it's not there
- Add rules for
/dev/raw1394*for Ubuntu versions prior to 10.04)
- Create Group fpgaqla
- Add current User to Group fpgaqla
- Restart computer
sudo mkdir /etc/udev/rules.d cd echo 'KERNEL=="fw*", GROUP="fpgaqla", MODE="0660"' > ~/80-firewire-fpgaqla.rules sudo mv ~/80-firewire-fpgaqla.rules /etc/udev/rules.d/80-firewire-fpgaqla.rules sudo addgroup fpgaqla sudo adduser `whoami` fpgaqla
For more information about Juju migration: https://ieee1394.wiki.kernel.org/index.php/Juju_Migration
For Ubuntu versions prior to 10.04
- Replace the
fw*line above by
- Autoload kernel module
raw1394at startup: add
raw1394to the end of
sudo sh -c 'echo "raw1394" >> /etc/modules'
This section is only needed to debug complex issues. In most cases, skip this and start using the dVRK examples and/or the command line
Check Firewire Module:
To make sure the Firewire driver stacks are loaded, run this command:
lsmod |grep 'firewire\|1394'
On Lucid or older (raw1394 stack), it should return something like this:
~@: lsmod | grep 'firewire\|1394' dv1394 18602 0 ochi1394 30338 1 dv1394 raw1394 25814 0 ieee1394 95219 3 dv1394,ohci1394,raw1394
On Maverick or newer (Juju stack), it should return this:
~@: lsmod | grep 'firewire\|1394' firewire_ohci 24679 0 firewire_core 54327 1 firewire_ohci crc_itu_t 1739 1 firewire_core
NOTE: the numbers in second column are SIZE and may be different from the values listed here.
If the return value (first and third columns) is not correct, please load the corresponding Firewire stacks. See Ubuntu Firewire wiki https://help.ubuntu.com/community/FireWire for details.
Test code: Next checkout, compile and run the IEEE 1394 utilities from the Mechatronics GIT repository (https://github.com/jhu-cisst/mechatronics-software/tree/master/util)
svn co https://github.com/jhu-cisst/mechatronics-software/trunk/util cd util make
- Run test code:
Table 1: list of utility functions
|info1394||display information about IEEE-1394 devices|
|quad1394||quadlet transfer read / write|
|block1394||block transfer read / write|
|time1394||perform timing tests of read / write|
~@: ./quad1394 0x05 0x00003F3F