Touch Family User Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

TOUCHBERRY PI PANEL FAMILY

User guide
Rev. 6: 12-03-2024

Touchberry Pi Panel Family


User Guide
Revised March 2024

2
Rev. 6: 12-03-2024

Preface

This User Guide has been implemented by Boot & Work, S.L. working
under the name Industrial Shields.

Purpose of the manual


The information contained in this manual can be used as a reference to operating, to functions,
and to the technical data of the signal modules, power supply modules and interface modules.

Intended Audience
This User Guide is intended for the following audience:

● Persons in charge of introducing automation devices.


● Persons who design automation systems.
● Persons who install or connect automation devices.
● Persons who manage working automation installation.

Warnings:

● Unused pins should not be connected. Ignoring the directive may damage the
controller.
● Improper use of this product may severely damage the Panel PC.
● Refer to the Panels User Guide regarding wiring considerations.
● Before using this product, it is the responsibility of the user to read the product’s User
Guide and all accompanying documentation.
● Maintenance must be performed by qualified personnel familiarised with the
construction, operation, and hazards involved with the control.
● Maintenance should be performed with the control out of operation and disconnected
from all sources of power.
● Care should be taken when servicing electrostatic sensitive components. The
manufacturer's recommendations for these components should be followed.
● The Panel PC family are Open Type panels. It is required that you install a Panel PC in a
housing, cabinet, or electric control room. Entry to the housing, cabinet, or electric
control room should be limited to authorised personnel. Failure to follow these
installation requirements could result in severe personal injury and/or property
damage. Always follow these requirements when installing Panel PC.
● In case of installation or maintenance of the Touchberry please follow the instructions
marked in the Installation and Maintenance section.
● Do not disconnect equipment when a flammable or combustible atmosphere is
present. Disconnection of equipment when a flammable or combustible atmosphere is

3
Rev. 6: 12-03-2024

present may cause a fire or explosion which could result in death, serious injury and/or
property damage.

Avertissements:

● Les broches non utilisées ne doivent pas être connectées. Ignorer la directive peut
endommager le contrôleur.
● Une utilisation incorrecte de ce produit peut endommager gravement le contrôleur.
● Reportez-vous au Guide de l’utilisateur du Panel PC pour les considérations de câblage.
● Avant d’utiliser ce produit, il incombe à l’utilisateur de lire le Guide de l’utilisateur du
produit et la documentation qui l’accompagne.
● La maintenance doit être effectuée par personnel qualifié familiarisé avec la
fabrication, le fonctionnement et les dangers liés au contrôleur.
● La maintenance doit être effectuée avec l’équipement hors service et déconnectée de
toutes les sources d'alimentation.
● Faites attention lors de l'entretien des composants sensibles à l'électricité statique. Les
recommandations du fabricant pour ces composants doivent être suivies.
● Les automates de la famille Panel PC sont des contrôleurs de type ouvert. Il est
nécessaire d'installer l'automate Panel PC dans un boîtier, une armoire ou une salle de
contrôle électrique. L'accès au boîtier, à l'armoire ou à la salle de commande
électrique doit être limité au personnel autorisé. Le non-respect de ces exigences
d'installation peut entraîner des blessures graves et/ou des dommages matériels
importants. Respectez toujours ces exigences lors de l'installation des automates de la
Touchberry.
● En cas d'installation ou de maintenance du Touchberry, veuillez suivre les instructions
indiquées dans la section Installation et Maintenance.
● Ne débranchez pas l'équipement en présence d'une atmosphère inflammable ou
combustible. La déconnexion de l'équipement en présence d'une atmosphère
inflammable ou combustible peut provoquer un incendie ou une explosion pouvant
entraîner la mort, des blessures graves et/ou des dommages matériels.

4
Rev. 6: 12-03-2024

Application Considerations and Warranty

Read and understand this manual

Please read and understand this manual before using the product. Please consult your
comments or questions to Industrial Shields before using the product.

Application Consideration

THE PRODUCTS CONTAINED IN THIS DOCUMENT ARE NOT SAFETY RATED. THEY SHOULD NOT
BE RELIED UPON AS A SAFETY COMPONENT OR PROTECTIVE DEVICE FOR ENSURING SAFETY OF
PERSONS, AS THEY ARE NOT RATED OR DESIGNED FOR SUCH PURPOSES.

Please know and observe all prohibitions of use applicable to the products.

FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY WITHOUT ENSURING


THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, NEVER USE THE
INDUSTRIAL SHIELDS PRODUCTS.

NEVER USE THE INDUSTRIAL SHIELDS PRODUCTS BEFORE THEY ARE PROPERLY RATED AND
INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.

Industrial Shields shall not be responsible for conformity with any codes, regulations or
standards that apply to the combination of products in the customer’s application or use of the
product.

The following are some examples of applications for which particular attention must be given.
This is not intended to be an exhaustive list of all possible uses of the products, nor is it
intended to imply that the uses may be suitable for the products:

● Systems, machines, and equipment that could present a risk to life or property.
● Nuclear energy control systems, combustion systems, railroad systems, aviation
systems, medical equipment, amusement machines, vehicles, safety equipment, and
installation subject to separate industry or government regulations.
● WARNING: On outdoor operations, locations involving potential chemical
contamination or electrical interference, conditions or uses not described in this
document please contact Industrial Shields for further information.

At the customer’s request, INDUSTRIAL SHIELDS will provide applicable third-party certification
documents identifying ratings and limitations of use that apply to the products. This
information by itself is not sufficient for a complete determination of the suitability of the
products in combination with the system, machine, end product, or other application or use.

5
Rev. 6: 12-03-2024

Intended use of Industrial Shields products

Consider the following:


Industrial Shields products should only be used for the cases of application foreseen in the
catalogue and the associated technical documentation. If third-party products and components
are used, they must have been recommended or approved by Industrial Shields.

The correct and safe operation of the products requires that your transport, storage,
installation, assembly, operation and maintenance have been carried out correctly. It must
respect the permissible ambient conditions. You should also follow the indications and
warnings that appear in the associated documentation.

The product / system dealt with in this documentation should only be handled or manipulated
by qualified personnel for the task entrusted and observing what is indicated in the
documentation corresponding to it, particularly the safety instructions and warnings included
in it. Due to their training and experience, qualified personnel are in a position to recognize
risks resulting from the handling or manipulation of such products / systems and to avoid
possible hazards.

Disclaimers

Weights and Dimensions


Dimensions and weights are nominal and they are not used for manufacturing purposes, even
when tolerances are shown.

Performance Data
The performance data given in this manual is provided as a guide for the user in determining
suitability and does not constitute a warranty. It may represent the result of INDUSTRIAL
SHIELDS’s test conditions, and the users most correlate it to actual application requirements.
Actual performance is subject to the INDUSTRIAL SHIELDS Warranty and limitations of Liability.

Change in Specifications
Product specifications and accessories may be changed at any time based on improvements
and other reasons.

It is our practice to change model numbers when features are changed, or published ratings or
when significant construction changes are made. However, some specifications of the products
may be changed without any notice. When in doubt, special numbers may be assigned to fix or
establish key specifications for your

application on your request. Please consult with your INDUSTRIAL SHIELDS representative at
any time to confirm actual specifications of purchased products.

6
Rev. 6: 12-03-2024

Errors and Omissions


The information in this document has been carefully checked and is believed to be accurate;
however, no responsibility is assumed for clerical, typographical, or proofreading errors, or
omissions.

These components may only be operated in closed housings or in higher-level control cabinets
with protective covers that are closed, and when all of the protective devices are used. These
components may only be handled by qualified and trained technical personnel who are
knowledgeable and observe all of the safety information and instructions on the components
and in the associated technical user documentation. When carrying out a risk assessment of a
machine in accordance with the EU Machinery Directive, the machine manufacturer must
consider the following residual risks associated with the control and drive components of a
PDS.

1. Unintentional movements of driven machine components during commissioning, operation,


maintenance, and repairs caused by, for example: − Hardware defects and/or software errors in
the sensors, controllers, actuators, and connection technology − Response times of the
controller and drive − Operating and/or ambient conditions not within the scope of the
specification − Condensation / conductive contamination − Parameterization, programming,
cabling, and installation errors − Use of radio devices / cellular phones in the immediate
vicinity of the controller − External influences / damage.

2. Exceptional temperatures as well as emissions of noise, particles, or gas caused by, for
example: − Component malfunctions − Software errors − Operating and/or ambient
conditions not within the scope of the specification − External influences / damage.

3. Hazardous shock voltages caused by, for example: − Component malfunctions − Influence of
electrostatic charging − Induction of voltages in moving motors − Operating and/or ambient
conditions not within the scope of the specification − Condensation / conductive
contamination − External influences / damage

4. Electrical, magnetic and electromagnetic fields generated in operation that can pose a risk to
people with a pacemaker, implants or metal replacement joints, etc. if they are too close.

5. Release of environmental pollutants or emissions as a result of improper operation of the


system and/or failure to dispose of components safely and correctly.

7
Rev. 6: 12-03-2024

Warranty and Limitations of Liability

Warranty
Industrial Shields’s exclusive warranty is that the products are free from defects in materials
and workmanship for a period of one year (or other period if specified) from date of sale by
Industrial Shields.

INDUSTRIAL SHIELDS MAKES NO REPRESENTATION OR WARRANTY, EXPRESSED OR IMPLIED,


REGARDING MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR PARTICULAR PURPOSE
OF THE PRODUCTS. ANY BUYER OR USER ACKNOWLEDGES THAT THE BUYER OR USER ALONE
HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR
INTENDED USE. INDUSTRIAL SHIELDS DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR
IMPLIED

Limitations of Liability
INDUSTRIAL SHIELDS SHALL NOT BE RESPONSIBLE FOR SPECIAL, INDIRECT, OR CONSEQUENTIAL
DAMAGES, LOSS OF PROFITS OR COMERCIAL LOSS IN ANY WAY CONNECTED WITH THE
PRODUCTS, WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR
STRICT LIABILITY.

IN NO EVENT SHALL INDUSTRIAL SHIELDS BE RESPONSIBLE FOR WARRANTY, REPAIR OR OTHER


CLAIMS REGARDING THE PRODUCTS UNLESS INDUSTRIAL SHIELDS’S ANALYSIS CONFIRMS THAT
THE PRODUCTS WERE PROPERLY HANDLED, STORED, INSTALLED, AND MAINTAINED AND NOT
SUBJECT TO CONTAMINATION, ABUSE, MISUSE, OR INAPPROPRIATE MODIFICATION OR REPAIR.

Device Opening Policy and Warranty Voidance Notice

The device should only be opened under the following circumstances:

1. SD Card Replacement: Opening is permitted for the purpose of replacing the SD card.
2. Jumper Configuration: The device may be opened to adjust jumper configurations,
provided that such modifications are conducted in accordance with the guidelines
outlined in the device's manual or as directed by authorised personnel.

Any unauthorised opening of the device for reasons other than those specified above will
result in the immediate voidance of the warranty provided by Industrial Shields. This includes
but is not limited to:

● Attempted repairs by unauthorised personnel, such as Raspberry Pi replacement (even


though steps to perform this procedure are explained, it results in the warranty being
void).
● Unauthorised modifications to the internal components.
● Opening the device out of curiosity or experimentation.

In order to see how to open the device, check Section 11.

8
Rev. 6: 12-03-2024

Table of Contents
1 Touchberry PI (Raspberry Pi 4B)......................................................................................... 10
1.1 Controller Specifications................................................................................................. 10
1.2 Raspberry Pi 4 B I/Os Pinout........................................................................................... 12
2 General Specifications....................................................................................................... 14
3 Touch Screen Specifications............................................................................................... 14
4 Power Supply.....................................................................................................................15
5 Pinout Scheme Connections.............................................................................................. 16
6 Screen configuration..........................................................................................................17
7 Touch Panels PC Size.......................................................................................................... 18
8 Input and output controls..................................................................................................20
8.1 Inputs.............................................................................................................................. 20
8.1.1 Analog....................................................................................................................20
8.1.2 Digital.....................................................................................................................21
8.2 Outputs........................................................................................................................... 21
8.2.1 Digital.....................................................................................................................21
9 Usage tests: Communication protocols.............................................................................. 22
9.1 Ethernet.......................................................................................................................... 22
9.2 Wifi/Bluetooth................................................................................................................ 22
9.3 I2C................................................................................................................................... 23
9.4 SPI................................................................................................................................... 24
9.5 RS485.............................................................................................................................. 24
9.6 RS232-TTL........................................................................................................................25
10 Other interesting available software................................................................................ 26
11 Device opening and Raspberry replacement.................................................................... 27
12 Revision Table..................................................................................................................30

9
Rev. 6: 12-03-2024

1 Touchberry PI (Raspberry Pi 4B)

1.1 Controller Specifications


Panel PC based on Raspberry PI board, encasing a 7” or 10.1” capacitive
Touch Screen for industrial environment using Linux (Raspbian).

Board Raspberry Pi 4B

SoC Broadcom BCM2837B0

CPU Quad core 64-bit ARM-Cortex A72 running at 1.5GHz

GPU Broadcom VideoCore VI

USB (2) x USB2 Ports + (2) x USB3 Ports


Storage (1) x Micro SD / MMC / SDIO slot
Network 1x Gigabit Ethernet port (supports PoE with add-on
Communication PoE HAT) – (2) x RS485 HD - RS232 - SPI - I²C - TTL
Wireless 802.11 b/g/n/ac Wireless LAN (2.4GHz and 5GHz ) and
Communication Bluetooth 5.0 with BLE
Low level devices 40-pin GPIO header, populated
IP Value IP20
GPIO Voltage 3.3V
OS Linux and Unix

10
Rev. 6: 12-03-2024

- This Panel PC is based on GNU/Linux OS installed on a SD card. It


has many interfaces built in: Ethernet, USB, WiFi… Using the
Ethernet port or WiFi network you can remotely control all
parameters, data and inputs/outputs of your control system.

- Furthermore, Touchberry PI has enough I/O to replace PLCs on


simple automation applications.

- Open protocols not only allow communication with other Industrial


Shields PLCs, but also third-party devices and machinery.

- In complex systems, you can create a network between several


Touchberry Pi. Providing integral supervision and control solutions
for entire production plants and real-time data at hand.

11
Rev. 6: 12-03-2024

1.2 Raspberry Pi 4 B I/Os Pinout


The Raspberry Pi 4 model B pinout:

12
Rev. 6: 12-03-2024

Next, it is shown a table connection between external DC-37 female connector


Pinout and Raspberry Pi 4B Pinout:

DC- Raspberry DC- Raspberry DC- Raspberry DC- Raspberry DC- Raspberry
37 Pi GPIO 37 Pi GPIO 37 Pi GPIO 37 Pi GPIO 37 Pi GPIO

1 01 09 17 17 35 25 12 33 28
2 03 10 19 18 37 26 14 34 30
3 05 11 21 19 40 27 16 35 33
4 07 12 23 20 02 28 18 36 36
5 09 13 25 21 04 29 20 37 38
6 11 14 27 22 06 30 22 38 -
7 13 15 29 23 08 31 24 39 -
8 15 16 32 24 10 32 26 40 -

13
Rev. 6: 12-03-2024

2 General Specifications

Item Touch Panel


Power supply DC power
12Vdc to 24Vdc
voltage supply
Power DC power
28W min.
consumption supply
Power supply
12Vdc (30W) // 24Vdc (30W)
External voltage
power supply Power supply
2.5A (12Vdc) // 1.25A (24Vdc)
output capacity
Shock resistance 80m/s2 in the X, Y and Z direction 2 times each.

Ambient temperature
0º to 50ºC
(operating)
Ambient humidity
10% to 90% (no condensation)
(operating)
Ambient environment
With no corrosive gas
(operating)

Ambient temperature (storage) -20º to 60ºC

Power supply holding time 2ms min.

Weight 1137 gr. (7”) / 1673 gr. (10.1”).

3 Touch Screen Specifications

Item Touch Screen

Technology Capacitive Touch Panel, 900 nits, RTD2662 controller chip

Image Resolution 1024 x 600 (7”) / 1280 x 720 (10.1”)

Format 16:9

Size 7” / 10.1”

Display Technology TFT Type

Screen Type IPS Display

14
Rev. 6: 12-03-2024

4 Power Supply
DC Power Supply: 12Vdc - 24Vdc

Current: 2.5A (12Vdc) // 1.25A (24Vdc)

Power supply: 12/24Vdc

- Plug-in connector

- Pitch: 5,04 mm

- Two contact pins

The input/output pins must be powered separately in addition to the general


panel power supply.

15
Rev. 6: 12-03-2024

5 Pinout Scheme Connections


The distribution of pins can be seen in the images below:

Serigraphy:

16
Rev. 6: 12-03-2024

At the bottom of the panel we will find the USB and Ethernet connections:

6 Screen configuration
The Screen configuration feature is integral to our 7-inch and 10.1-inch
touchscreen displays. The 7-inch variant is equipped with 5 side buttons for
diverse settings, whereas the 10.1-inch version features 2 exclusive buttons for
brightness control. Both options provide intuitive interfaces for users to
customize the visual experience according to their preferences.

Key Features:

7-Inch Touchscreen:

● 5 buttons for configuring brightness and other settings.


● Intuitive interface for versatile adjustments.
● The buttons include Menu, Power, Exit, Up, and Down, situated at the
rear right of the screen.

10.1-Inch Touchscreen:

● 2 dedicated buttons for brightness control.


● Streamlined interface for efficient adjustments.
● The buttons are located at the rear, at the top of the screen housing.

This section guides users through the differences in Screen configuration,


empowering them to tailor the visual experience to their preferences and
specific environments.

17
Rev. 6: 12-03-2024

7 Touch Panels PC Size


The panel measurements are different depending on the version of the product.

In the case of the 7” panel:

18
Rev. 6: 12-03-2024

In the case of the 10.1” panel:

19
Rev. 6: 12-03-2024

8 Input and output controls

8.1 Inputs

8.1.1 Analog
In analog inputs, the voltage difference between -Vcc (ground) and +Vcc can vary
across a wide range of values. An analog input provides a measurement in the form of
a digital value that is represented by an N-bit number. Both digital and analog I/O
have self-insulation, which means that they can be connected to power supplies with
different voltages than 24 V.

The Touchberry Panel provides 2 analog inputs (I-0 to I-1) which can be used with both
modes (0-10V and 4-20mA).

To read the value of the analog inputs, the Touchberry has a series of tests for this.
If we use the 4-20mA configuration (default), we will do it as follows:

pi@raspberrypi:~ $ ./test/4-20mA/get-analog-input I0
pi@raspberrypi:~ $ ./test/4-20mA/get-analog-input I0

If you have the analog input configured from 0 to 10V, it will be done like this:

pi@raspberrypi:~ $ ./test/analog/get-analog-input I0
pi@raspberrypi:~ $ ./test/analog/get-analog-input I1

WARNING: Remember that the power must be connected to the set of input output
pins, through the 24V COM and GND COM pins.

Also remember to connect a 1 KΩ resistor in series to the analog input (since the 4-20
mA mode is used by default and the resistor is needed).

20
Rev. 6: 12-03-2024

8.1.2 Digital
In digital inputs, the voltage difference between -Vcc (ground) and +Vcc can only be
between two states: 0 (which corresponds to -Vcc or GND) or 1 (which corresponds to
+Vcc), with no intermediate values. Both digital and analog I/O have self-insulation,
which means that they can be connected to power supplies with different voltages
than 24 V.

The Touchberry Panel provides 3 digital inputs (I-2 to I-4) which can be used with both
modes (5-24V and 250mA).

In order to measure the value of the digital input, we will use the tests that are
precompiled in this way:

pi@raspberrypi:~ $ ./test/digital/get-digital-input I2
pi@raspberrypi:~ $ ./test/digital/get-digital-input I3
pi@raspberrypi:~ $ ./test/digital/get-digital-input I4

In this way it will return 0 or 1 in case of LOW 0 and in case of HIGH 1.

8.2 Outputs

8.2.1 Digital
Voltage variation from –Vcc (or GND) to +Vcc, with no intermediate values. Two states:
0 (-Vcc or GND) and 1 (+Vcc). In Digital and Analog I/O there is self insulation, so it is
possible to connect them using a different power supply from the 24V one.
The Touchberry Panel provides 5 digital inputs (from Q-0 to Q-4).
To configure the digital outputs, in the same way as the inputs, we will use the tests
provided as follows:

pi@raspberrypi:~ $ ./test/digital/set-digital-output O0 1
pi@raspberrypi:~ $ ./test/digital/set-digital-output O0 0
pi@raspberrypi:~ $ ./test/digital/set-digital-output O1 1
pi@raspberrypi:~ $ ./test/digital/set-digital-output O1 0
pi@raspberrypi:~ $ ./test/digital/set-digital-output O2 1
pi@raspberrypi:~ $ ./test/digital/set-digital-output O2 0
pi@raspberrypi:~ $ ./test/digital/set-digital-output O3 1
pi@raspberrypi:~ $ ./test/digital/set-digital-output O3 0
pi@raspberrypi:~ $ ./test/digital/set-digital-output O4 1
pi@raspberrypi:~ $ ./test/digital/set-digital-output O4 0

This time, the attributes of this test are: the output (O0..O4) and the state that we want
to assign 0 for the LOW output and 1 for the HIGH output.

The Touchberry board contains test LEDs that allow us to see the configuration of the
digital outputs.

21
Rev. 6: 12-03-2024

9 Usage tests: Communication protocols

9.1 Ethernet
Ethernet is the technology that is most commonly used in wired local area networks
(LAN). A LAN is a network of computers and other electronic devices that covers a
small area such as a room, office, or building. It is used in contrast to a wide area
network (WAN), which spans much larger geographical areas. Ethernet is a network
protocol that controls how data is transmitted over a LAN. Technically, it is referred to
as the IEEE 802.3 protocol. The protocol has evolved and improved over time to
transfer data at the speed of a gigabit per second.

*IMPORTANT: Make sure that your PLC is powered (12-24Vdc). Just with USB is
insufficient power to power up the Ethernet communication.

For Ethernet communication with eth0 interface, there aren't any Raspberry Pi used
pins.

Ethernet hardware configuration must be plug and play.

You can maintain a simple connection with the NETCAT tool like this:

pi@raspberrypi:~ $ nc -l port (server)


pi@raspberrypi:~ $ nc server_ip port (client)

Example:

#Touchberry:
pi@raspberrypi:~ $ nc -l 1234
#Other PLC:
pi@raspberrypi:~ $ nc 10.42.0.114 1234

Or you can create some slightly more complex code and create more complex
automations depending on the functions you want to add.

9.2 Wifi/Bluetooth

All products of the Raspberry Pi family incorporate WiFi/Bluetooth connection.


To set up Wi-Fi in the Raspberry PLC, you can follow this guide.

And if you want to know how to use Bluetooth to, for example, communicate with the
Raspberry PLC with an Android Phone, you can follow this guide.

22
Rev. 6: 12-03-2024

9.3 I2C
To send an I2C message in a Linux environment, you can use the i2c-tools package,
which provides the i2cset and i2cget commands.

These commands allow you to write data to an I2C device or read data from an I2C
device, respectively.

Here's an example of how you can use i2cset to send an I2C message:

i2cset -y <bus_number> <device_address> <register_address> <value> [b]

● <bus_number>: The I2C bus number (e.g., 1 for /dev/i2c-1).


● <device_address>: The I2C address of the target device.
● <register_address>: The register address where you want to write data.
● <value>: The value you want to write to the specified register.
● [b]: Optional parameter indicating that the value is in byte format.

For example, to write the value 0x45 to register 0x02 of an I2C device with address
0x50 on bus 1, you would run:

pi@raspberrypi:~ $ i2cset -y 1 0x50 0x02 0x45

Keep in mind that the actual bus number, device address, register address, and data
value will depend on your specific hardware and requirements.
Additionally, you may need to ensure that the I2C kernel modules are loaded (i2c-dev
and the driver specific to your hardware). You can use the lsmod command to check if
these modules are loaded.

pi@raspberrypi:~ $ lsmod | grep i2c

Here's an example of how you can use i2cget to read data from an I2C device:

pi@raspberrypi:~ $ i2cget -y 1 0x50 0x02

#This command reads a byte from the specified register address (0x02) of the I2C
device with address 0x50 on bus 1. The output will be the value read from the register.

23
Rev. 6: 12-03-2024

9.4 SPI
To use SPI communications, we recommend using the spidev library.

pi@raspberrypi:~ $ pip install spidev

Here I leave you a simple example in python with which we can communicate using
this protocol.

import spidev

# Initialize SPI
spi = spidev.SpiDev()
spi.open(0, 0) # The arguments (bus, device) depend on your setup
# Configure SPI settings
spi.max_speed_hz = 1000000 # Set the SPI speed (Hz)
spi.mode = 0 # Set the SPI mode (consult your device's datasheet)
# Prepare your data to be sent
data_to_send = [0x01, 0x02, 0x03]
# Send the SPI message
received_data = spi.xfer2(data_to_send)
# Close the SPI connection
spi.close()
# Process the received data if needed
print("Received Data:", received_data)

This Python code uses the spidev library to establish an SPI connection, send data,
and receive a response from an SPI device.

9.5 RS485
RS-485, on this device, can be configured as Half Duplex or Full Duplex. Below we will
see an example of each one.

First, to use this communication, some prior configurations must be made.


In order to configure the RE and DE:

echo 27 > /sys/class/gpio/export


echo 17 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio27/direction
echo out > /sys/class/gpio/gpio17/direction

The baudrate is very important in serial communications and is configured as follows:

stty 115200 -F /dev/ttyS0 raw -echo

In this case we have set it to 115200, but it can be varied according to your needs.

24
Rev. 6: 12-03-2024

Half Duplex:
Configuration of DE and RE for the use of RS-485 in Half duplex.

For receptions:

echo 0 > /sys/class/gpio/gpio17/value


echo 0 > /sys/class/gpio/gpio27/value

Then, to see the data we are receiving, with the command: cat /dev/ttyS0

For transmissions:

echo 0 > /sys/class/gpio/gpio17/value


echo 1 > /sys/class/gpio/gpio27/value

So, we can send messages, for example with: echo MESSAGE > /dev/ttyS0

Full Duplex:
Configuration of DE and RE in Full duplex:

echo 0 > /sys/class/gpio/gpio17/value


echo 1 > /sys/class/gpio/gpio27/value

Then you are ready to use RS-485 in your projects.

We recommend adding a delay of at least 1 ms between reception and transmission.

9.6 RS232-TTL
Below we provide an example applicable to RS232 and TTL, setting the baud rate to
115200, for example, with the following command:

pi@raspberrypi:~ $ stty 115200 -F /dev/ttyS0 raw -echo

Therefore, we send a message as follows:

pi@raspberrypi:~ $ echo -ne Hello > /dev/ttyS0

and we will receive through the port by executing:

pi@raspberrypi:~ $ cat /dev/ttyS0

25
Rev. 6: 12-03-2024

*The /dev/ttyS0 port is a common port for these serial communications, only one of
these can be used, to be chosen at the time of purchase.

10 Other interesting available software

There are other programs available to run on Debian, below we leave some
screenshots where you can see examples and how to use these software programs,
also on our blog there is interesting information about our touch panels:

Node-Red:
https://www.industrialshields.com/blog/arduino-industrial-1/software-for-iot-solutions-
40

26
Rev. 6: 12-03-2024

11 Device opening
There are specific circumstances that may require opening the device:

1. Changing SD Card: The SD card, which stores essential data and system
configurations, may need to be replaced in case of corruption, upgrading to a
higher capacity card, or transferring data between devices.
2. Adjusting Jumper Configurations: Some configurations of the device may
require adjustments to jumpers for proper operation. Opening the device
provides access to these jumpers, allowing for configuration changes as
needed.

Warning! As explained in the warranty section at the start of this document, opening
the device for a reason not included in this list will result in the warranty being void. If
you have any doubts, contact our technical support team at industrialshields.com.

For example, opening the device to replace the Raspberry Pi will result in the warranty
being void. Nonetheless, this section explains the steps about how to do so up to
removing the Raspberry.

In order to open the device, follow these steps. Attention! Make sure the device is
totally off and disconnected from power or other devices before proceeding.

1. Unscrew and remove the external screws, shown in the following diagrams:
○ 7’’ Panel:

27
Rev. 6: 12-03-2024

○ 10.1’’ Panel:

2. Carefully remove the metal cover by pulling it upwards.

At this point you will have access to the SD card or jumpers. Perform the
necessary configurations/SD change and follow the steps up to this point in
reverse order to close the device.

If you want to replace the Raspberry, proceed with the next steps. Warning!
Proceeding with the further steps will result in the warranty being void!

3. Remove the HDMI connected to the Raspberry by gently pulling the


microHDMI wire:

28
Rev. 6: 12-03-2024

4. Finally, remove the Raspberry Pi by pulling it upwards. Keep in mind that it is


fixed to the main PCB by 4 plastic supports and be careful not to bend any pin
of the Raspberry Pi GPIO header.

In order to assemble the device once again, follow the steps in the inverse order.

29
Rev. 6: 12-03-2024

12 Revision Table

Revision Number Date Changes

0 15/09/2019 First implementation


Touchberry PI: The internal Raspberry PI 3B+ has been
1 17/12/2019
changed for the Raspberry PI 4B model
2 21/04/2022 TinkerBoard S model update
3 09/09/2022 Change on Section 9.2
4 07/09/2023 Family Implementation
5 31/01/2024 Touchberry model update
Added Touchberry disassembly procedure and
6 12/03/2024
conditions

About Industrial Shields:

Direction: Camí del Grau, 25


Zip/Postal Code: 08272
City: Sant Fruitós de Bages (Barcelona)
Country: Spain
Telephone: (+34) 938 760 191 / (+34) 635 693 611
Mail: [email protected]

30

You might also like