Android App and Modbus RTU

We made a small and simple application for our well Ltouch panels to allow users to configure and subsequently communicate with all Modbus RTU devices.

Biemme Config, will be installed as standard on all our touch, so make it easier to configure the Modbus RTU devices.

In a few simple steps we can write and read using the Modbus RTU functions 03 and 16.

We prepare communication; We connect via a three-wire cable on Modbus device and Ltouch.

The Modbus RS485 port is positioned in the side of a connector DB9 and uses these pins:

  • 2 – A
  • 3 – B
  • 5 – GND

Set the speed of communications (thanks to our Libreria the app supports speeds up to 115200) and the timeout.

The Function 03:

Node Id: corresponds to the slave to read.

Start Register : corresponds to the first register for the Modbus read

Number Registers: Corresponds how many registers I want to read

Once configured these three fields we can, using the three buttons, perform the read request.

Single reading: Ltouch will perform a read-only and represents the values read on the screen.

Continuous cycle reading: Ltouch will perform the readings at intervals of a second in a cyclic mode. The values will be shown on screen.

FUNCTION 16:

With this feature we can write the integer values:

Node ID: It corresponds to the address of the slave in which I am going to write

Start Register: It is the first register in which I am going to write

Number Registers: It represents the number of consecutive registers in which I will write the value.

Value: It represents the value that will write.

To close the application just press over the Biemme logo

Android Arduino Communication through Modbus and Rs485

In this post I’d like to describe you a project I’m working on that consists of connecting an Android multi touch panel to one (or more) Arduino slave(s) using modbus protocol and RS485.
Even though the idea of this project could be applied in many fields, I chose to contextualize it in a typical smart home context: a touch display that dims lights, shows temperatures and bulbs statuses.


The nice feature of the Android multi touch panel I used is that it has many interfaces such as Ethernet, RS485, RS32 and I²C as well.
I expressly selected RS485 because Arduino-based microcontrollers are not ready for Ethernet yet (even though some examples still exist but without great success). Indeed, RS485 is a well known standard that has been widely used in the indus­trial con­text and in building automa­tion appli­ca­tions. It is a half-duplex, 2-wires, low noise bus that allows high speeds and remote devices connection (up to 1200 meters).
Furthermore, modbus is a serial communication protocol, developed for industrial applications, open and easy to deploy and maintain. I used modbus RTU, but other variations of the protocol still exist though. Continue reading

Industrial Automation with Android: Acquisition of 6 PT100 Probes

The project I’m working on is about making an industrial automation system using an ARM Cortex A8 1Ghz Android-based touch HMI and a slave bm6PTI expansion module that communicates using RS485 and Modbus.

From the Android touch screen is possible to directly read 6 class B PT100 Temperature probes through an expansion module using RS485 and Modbus protocol at a speed of 19200 bps.

If required, it is possible to extend the project by adding other expansions modules up to a total of 63 bm6PTI therefore 378 temperature probes can be read.

Continue reading

Industrial Automation and Future Trends

Industrial Automation remote I/O moduleThere is debate on the feasibility of employing Android on Industrial Automation applications.
Big companies contend the market share and most of the time constrains customers to use their proprietary software.

The world is changing and the Internet allows users to benefit from almost infinite availability of information, technical specifications and even to find people that freely share their knowledge and expertise.

Our vision is that in the close future, more industrial automation applications will benefit from the open community and they will lay the foundation to a new revival of this sector.

In this post, I want to show you how the integration of Android in industrial automation applications is possible. I also noted that is surprisingly straightforward.
Continue reading

Android Modbus RTU library new release

A new release of the Modbus RTU Android library for Ltouch multi-touch devices is available

Time has passed from the first release (v.0.1) of the modbus RTU Android library. Our customers were satisfied and many home and industrial automation projects have been developed. However, as in any software projects, some bug fixes exists and features enhancements have to be implemented.

That’s why we are proud to announce that the new version is ready for download. As usual, you will find two binaries: debug and release. The main difference is that the first will give you more informative logs whereas the second one is devoted for production. The Android devices currently supported are the Ltouch F and Ltouch S. The Modbus functions that are implemented are:

  • Function Code 03, Read Holding Registers specifically designed for reading registers in one of the devices active in the bus line.
  • Function Code 16, Preset Holding Registers specifically designed for writing registers in one of the devices active in the bus line.

For details, examples and API docs, please take a look at out libraries section.

In case you need to update the library only, remember to refresh your project (especially if you are using Eclipse) in order to avoid that the older version of the library will be used in the app.

As usual, comments and suggestions are welcome! 🙂

Biemme Store Opening

We are happy to announce that our new on line store is now open. The key product we want to present is our new development board. Take a look at it, we hope you will find useful for your needs.

To date, we were concentrated to provide the customers two development boards with capacitive touch screens that can be used in many contexts like industrial and home automation systems. The availability of many interfaces (like Ethernet, rs485 etc) and the possibility to install Android, Linux and WinCE 6.0, make the boards very flexible.

For professional users that would like to to integrate our board into their existing industrial instruments, we designed a free native Android library that supports the modbus RTU protocol through rs485. In this way, you only need to create an Android project, link the modbus library and call the methods provided.

Development board in stock:

The first board includes an aluminum frame 5mm thick and a rearward steel protection cover. The frontal frame has a button to power on/off the system and to set and wake up from standby. The frame could be white or black.

Ltouch with white frame development board
The second board does not include the frontal frame and rearward protection as the picture on the right shows, in order to allow the customer to place it inside an already existing structure.
The board works also with Arduino slaves, take a look at these nice demo video on youtube.

Ltouch without frame development board

Android touch

Ltouch touch screen boardWe designed and developed a control system that uses our new board with Android operating system and a 7″ capacitive touch screen (figure on the right). It is connected to a pool of Arduino’s slaves over rs485 channel. Our tests suggest that the most efficient and lightweight communication protocol is the modbus. It works greatly also on Arduino devices. Indeed, we used Maxim’s max485 chip in order to convert Arduino TTL serial signal to rs485. Terminator resistor (120 Ohm) is connected accross the two wires to limit data corruption. Continue reading

Rtu modbus

Logo ModbusThe modbus protocol defines how communication takes place between a “master”, that manage the system, and one or more “slaves” that reply to the masters’ requests.

The protocol defines how master and slave communicate, the format of the messages exchanged between the two parties, how master and slave have to be identified and how the error messages being handled. Continue reading