Using NI Single-Board RIO and LabVIEW to Build a Self-Propelled, Piggery-Washing Robot

  Read in   |   Print Print

"Debugging in LabVIEW by using charts and probes made it incredibly easy to find errors. It becomes a quick experience instead of a lengthy analysis."

- Martin Sørensen, Nilfisk-Advance A/S

The Challenge:
Developing a productive, easy-to-use, reliable (PER) robot to automate unhealthy and heavy manual piggery cleaning labor.

The Solution:
Using an NI sbRIO-9601 and LabVIEW software to manufacture a functional field test prototype that we could use to quickly and affordably refine the design, shorten the time from idea to finished product, and keep project expenses minimal. Using LabVIEW graphical programming, it was easy to implement, optimize, and keep track of the many necessary algorithms.

Martin Sørensen - Nilfisk-Advance A/S

MULTICLEANER 7-53: A Self-Propelled Piggery-Washing Robot

Nilfisk-Advance, one of the world’s leading suppliers of professional cleaning machines, launched a self-propelled washing robot in 2010 called the MULTICLEANER 7-53 (MC). The washing robot is primarily targeted at pig farmers wanting to automate piggery cleaning.

The MC, used in a harsh environment containing ammonia fumes, is designed to be strong and very service friendly. The MC is easy to use and can be programmed in less than 30 seconds in many different languages. Additionally, the MC contains a selection of automated features, including the following:

  • Obstacle detection – with two ultrasound sensors, the MC can “see” obstacles and automatically maneuver around them
  • Intelligent nozzle control – nozzle acceleration, speed, and position are calculated based on embedded algorithms and depend on piggery setup, the MC position in the piggery, and how long the MC has been cleaning the piggery.
  • Touchless maneuvering – two ultrasound sensors on the side of the MC measure the distance to the aisle side. Based on these measurements, the MC keeps a constant distance to the wall. The two sensors send a signal to regulate propulsion wheel closed-loop speed and torque. This makes the navigation resilient to external disturbances.
  • Controlling a mechanical double-nozzle for laying out soap and disinfectant, as well as high-pressure cleaning – the nozzle exclusively uses gravitation to move a ball between two nozzle outlets. This requires the MC to always keep track of nozzle movement to determine if the ball is blocking the right nozzle outlet.
  • Checking sensor functionality – the MC constantly checks that the sensor signals are correct, meaning that the analog sensor interval is in the 4–20 mA range and that the sensors do not change too quickly or freeze. Apart from this, inductive sensors determine different motor positions. The MC constantly keeps track of where the motors are and checks that the inductive signal corresponds to the estimated motor position. If the MC detects an incorrect signal, a sensor may be defective, so the MC informs the farmer in the display and sends a text message.
  • External boundary estimation – based on MC measurements, it is constantly estimating if the external boundaries are sufficient for continuing the wash. For instance, the floor might be too greasy for the MC to drive on, a door in the aisle side is open, or there is not enough water. If the MC detects anything faulty, it displays the error and sends a text message to the farmer.
  • The propulsion speed varies so it fits the concrete pen that the MC is washing.

Product Idea

We designed the MC to exemplify PER. To achieve this, the design strategy centered on creating a general washing sequence that could be adapted to the individual piggery by adjusting several parameters. The farmer enters these parameters via a four-button menu system with an LCD.

We needed a variable way to control MC motor and chemical pump speed and turn the valves, warning lights, and high-pressure pump on and off. We also needed to monitor motor position, a wealth of I/O sensors, and more 4–20 mA sensors.

Design Phase

We chose an NI sbRIO-9601 embedded control and acquisition device because it contains a real-time processor and a field-programmable gate array (FPGA) with 110 digital I/O lines (DIO 0 V to 3 V). Using two custom-designed printed circuit boards (PCBs), we connected the peripherals (motors and sensors) to the NI Single-Board RIO device.

The first type of PCB “backbone” distributed 50 DIO lines on five ports with 10 DIO lines per port. In addition to the 10 DIO lines per port, an external voltage source added +5 V and +24 V supplies. The other type of PCB interface controlled a motor (-24 V to +24 V); measured motor power consumption; measured an analog input (0–24 mA or 0–10 V); and measured 4X DIO (0–10 V), using a port.

By deploying the 2X backbone and 10X interface, we could measure 10 analog signals and 40 DIO lines as well as control 10 motors bidirectionally, or 20 motors monodirectionally. Depending on the configuration, the MC only uses between six and eight interface cards, so there is plenty of expandability.

The interface PCB motor output control is PWM for acceleration and speed control. By using motor encoder feedback, we could conduct closed-loop motor position control.

The FPGA is so flexible that we could use 100 of the 110 DIO lines for vastly different purposes. We programmed the FPGA with LabVIEW graphical software because it makes it easy to design complex programs that can be executed swiftly. Without FPGA programming knowledge, it took two to three weeks to design a program that could handle, among other things, PWM, position encoding, counter/timer, and watchdog functionality.

We expanded the system with a plug-and-play interface card, which made it modular. The modular control system made the refinement process quick and inexpensive because it was easy to expand or reduce the number of motors and sensors as the project moved forward. This also makes it possible, even easy, to adopt the control system for other types of applications in the future.

The NI Single-Board RIO offers built-in RS232 communication, which made it easy to mount a serial LCD. Because there was a display driver, it only took 30 minutes for the display to light up and read, “Hello World.” We constructed a menu system with four external buttons to mimic early Nokia mobile phones and programmed the relevant menus. We designed the menu system so that the farmer could quickly change settings (such as language and driving distance to the side of the pen) and display sensor input and operating hours.

Why We Chose LabVIEW

For some, designing a real-time control system over a period of six months, including the MC FPGA programming, might seem unmanageable. But using LabVIEW has been a pleasure. LabVIEW contains many built-in building blocks such as communication between real-time and FPGA, serial port communication, integrator functions, and fault management. Because these were readily available, we only had to construct the algorithms pertaining directly to the applications. All of the laborious programming work had already been done and put into neat little boxes.  

Debugging in LabVIEW by using charts and probes made it incredibly easy to find errors. Instead of reviewing code and studying where it all went wrong, you can probe the program much faster until you find where the signal does not match the expectations. It becomes a quick experience instead of a lengthy analysis.

LabVIEW graphical presentation makes complex programs clearer. If the program starts to become unclear, you are only a few clicks away from dropping parts of the program into the subVIs, thereby regaining a program overview. Using this “slightly incorrect” approach quickly makes code that works in real life. Once motors and sensors collaborate, subsequent program setup and structuring gets easier, so you can get it right the first time.

Author Information:
Martin Sørensen
Nilfisk-Advance A/S
Sognevej 25
Broendby DK-2605
Tel: +45 43238100

Bookmark and Share

Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community

Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI