How to Make an Industrial Strength IoT Touchscreen
投稿人:DigiKey 北美编辑
2018-01-24
Industrial Internet of Things (IIoT) interfaces can be tough to design, and not just because they’re often subjected to harsh environments. Most industrial equipment, such as robots, process control panels, and machine presses, are also subject to tight regulatory control and safety protocols.
Unlike a new consumer item, designers can’t just create any user interface they want. They have to follow the rules. As a result, the design of an industrial user interface is equal parts engineering, regulatory compliance, and creativity.
This article will describe some of the design and regulatory requirements. It will then introduce a touchscreen controller and how to go about applying it to create a modern touchscreen interface for the factory floor.
Industrial design emphasizes safety and ruggedness
There are several overlapping user interface standards that apply to industrial goods that limit the designer’s freedoms in several ways. Many industrial goods must adhere to local and global standards for control layout, legibility, and design.
Language can be an issue, since many industrial designs are destined for a global audience that may not speak English (or German, or Mandarin, etc.). Thus, icons and standardized symbols play a big role.
As one example, big industrial robots have very stringent rules about the robot’s emergency stop button (ISO Standard 13850), which is always a certain color of red, always round, always placed over a yellow background, and always a push-to-activate button (as opposed to a knob or a toggle switch). A good example is Omron Automation and Safety’s A22E-M-11B (Figure 1). A reasonably skilled operator faced with an unfamiliar or misbehaving robot will know instinctively how to shut it off without first consulting the manual.
Figure 1: A typical emergency stop (e-stop) button, such as Omron Automation and Safety’s A22E-M-11B, must meet ISO Standard 13850, which mandates that all such buttons be round, red with a yellow background, and push to activate. (Image source: Omron)
That’s not to say that industrial user interface design is a dead end. Far from it. Designers are still required to creatively emulate modern mobile device interfaces using GUI functions such as active LCD displays, touch sensitive interfaces, and colorful graphics.
While designing an attractive, useful, and standards-compliant LCD display is complicated, creating a touch sensitive interface is not. In fact, all it requires is one low-cost microcontroller chip and a handful of resistors. Remarkably, an expensive and fragile touchscreen interface isn’t even needed. A fully functioning touch interface with buttons and analog “sliders” is no more complicated than a two-sided pc board layout with a few basic components.
Touch interface integrated with MCU
Touch interfaces have become popular enough that they’re now integrated into high volume and low-cost microcontrollers, such the CY8C22545 from Cypress Semiconductor Corp. This is a low-cost 8-bit MCU available in a number of different surface mount and through-hole packages with various sizes and pinouts that support a different assortment of built-in peripherals. It is very tolerant of both voltage and frequency. Designers can provide a supply voltage as low as 1.71 volts or as high as 5.5 volts. The operating frequency can range from 750 kHz up to 24 MHz. Best of all, the CY8C22545 operates over the temperature range of -40° to +85°F, making it suitable for industrial designs.
The CY8C22545 is also part of the company’s Programmable System-on-Chip (PSoC) product line, which highlights another important feature of the chip family, programmable logic. Cypress PSoC chips are programmable in more than the usual sense. They also include internal analog and digital circuitry that can be configured through software, much like an FPGA. The 8-bit MCU core, the programmable logic, and the built-in capacitive sensing technology all make the CY8C22545 a good candidate for a simple, tough, and straightforward touch interface.
In the consumer world, touch interfaces often overlay an LCD screen (as in a smartphone or ATM), but in industrial settings, that’s often not desirable or allowed by regulation. That’s not a problem: touch sensitive interfaces can be placed over static graphics printed on a control panel, opening many design opportunities for engineers and developers. The resulting interface will be robust, tough, and environmentally insensitive.
Cypress provides a number of ways to begin PSoC development, including preconfigured development boards like the CY3280-22x45 (Figure 2). For touch interfaces, pair this board with the CY3280-SLM companion board, which is a passive pc board that provides ready-made touch input pads (Figure 3). Note that the companion board does not contain any active circuitry; the touch sensors are nothing more complicated than simple pc board traces connected to the I/O pins of the MCU on the development board.
Figure 2: Cypress’s CY3280-22x45 development kit includes a development board based on the CY8C22545 MCU, a USB programming interface, cables, development software, and example code on CD. (Image source: Cypress Semiconductor)
Figure 3: The Cypress CY3280-SLM is a companion board for the CY3280-22x45 development board that adds five virtual buttons, a touch sensitive “slider,” and five LED indicators. Jumper J2 selects the appropriate shield. (Image source: Cypress Semiconductor)
Developing a touchscreen interface with CY8C22545
Install the software provided in the development kit before powering up the boards for the first time. Simply insert the software CD that comes with the development board and follow the installation instructions. It will install PSoC Designer, Cypress’s main program for configuring and programming the entire family of PSoC devices, including the CY8C22545 MCU device on this board. It will also install PSoC Programmer, a separate application for downloading configuration data to the MCU.
Once all the software is installed, plug the two boards together. They are keyed, so they only fit one way. Insert a few configuration headers (shunts) as detailed in each board’s documentation, plug in a DC power supply, and everything should be ready to go.
The development kit also comes with a MiniProg1 programmer, a small plastic Y-shaped device that plugs straight down into the main board’s header stakes (at J3) for downloading software programs (as opposed to hardware configuration settings) over a USB cable. Insert the MiniProg1 and connect the supplied USB cable between it and the development PC.
- Launch the PSoC Programmer application on the PC (not PSoC Designer)
- Click on the File menu, then File Load. (Highlight #1 in Figure 4, below.) A conventional Windows file browser window will appear.
- Browse to the directory <install directory>\Cypress\CY3280-SLM\<version>\Firmware\20x34_CSA\PD project1\CY3280_20x34_Project1\
- Locate the file CY3280_20x34_Project1.hex. Click Open.
- Click Connect (#2)
- Click Program (#3)
- Click Toggle Power (#4)
- Try touching one of the five virtual buttons on the companion board. The corresponding LED above it should light up.
- Try touching two or more of these buttons at once. Again, the corresponding LEDs will light up.
- Try sliding a finger across the slider at the bottom of the companion board. The LEDs will illuminate in sequence, corresponding to the slider position.
- Note that the system supports simultaneous touches on multiple buttons, or the slider and buttons, and will correctly identify each contact, just as with physical pushbuttons.
Figure 4: The PSoC Programmer application allows downloading sample programs to the development board. (Image source: Digi-Key Electronics)
With these two development boards and the supplied software, it’s possible to create a working touch interface in just a few minutes. This design can be leveraged to create a tough, environmentally rugged set of virtual pushbuttons suitable for a number of harsh environments.
A look at the schematic reveals that there are no significant external components required to make the touch sensitive buttons and slider work (Figure 5). A few series resistors are added to reduce RF interference. Nor is the pc board layout unusual: just a few exposed pads with an air gap.
Figure 5: The Cypress PSoC microcontroller family with CapSense implements touch sensitive inputs with no external components, apart from a few optional current limiting resistors. (Image source: Cypress Semiconductor)
Both the buttons and the slider feed directly into the CY8C22545’s general purpose I/O GPIO pins where they’re monitored by a simple program already provided in the kit. Because the PSoC’s I/O pin assignments are programmable, these pins can be reassigned to accommodate different pc board layouts. There’s nothing special or unique about the pin assignments in this example.
The CY3280-22x45 development board also comes with several more example programs. One allows the developer to read out the status of the inputs in real-time over the chip’s I2C or UART interfaces. Others monitor absolute sensor capacitance levels, or tune each input’s sensitivity. All source code (C and assembly) is provided and commented.
The hardware bill of materials for the ’545 MCU and a handful of resistors amounts to less than $5.00, and all the software is free.
By reconfiguring the programmable I/O pins and tweaking the software, designers can convert the ten position “slider” into ten additional on/off switches instead. Conversely, individual switch inputs could be sacrificed to create an additional slider, or to make a slider with more granularity. Any combination is possible.
Conclusion
Modern touch sensitive interfaces for connected IIoT or even unconnected systems or devices needn’t be intimidating, expensive, or difficult. With the right microcontroller, it has become a lot easier for the average designer to implement a tough and flexible touch interface on nearly every type of interface panel.
免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。