---
title: "Position measurement and control of a Piezoresistive Contactless position sensor through Ethernet"
url: "https://maker.wiznet.io/mayuri/projects/position-measurement-and-control-of-a-piezoresistive-contactless-position-sensor-through-ethernet/"
markdown_url: "https://maker.wiznet.io/mayuri/projects/position-measurement-and-control-of-a-piezoresistive-contactless-position-sensor-through-ethernet/md"
type: "UCC: User Created Content"
author: "Kavya M.C"
author_url: "https://www.ijert.org/research/position-measurement-and-control-of-a-piezoresistive-contactless-position-sensor-through-ethernet-IJERTV2IS90443.pdf"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Kavya M.C"
original_url: "https://www.ijert.org/research/position-measurement-and-control-of-a-piezoresistive-contactless-position-sensor-through-ethernet-IJERTV2IS90443.pdf"
published: "2022-10-17"
language: "en"
hardware: ["Arduino Ethernet Shield"]
likes: 4
views: 1040
comments: 1
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Position measurement and control of a Piezoresistive Contactless position sensor through Ethernet

> A position control mechanism for contactless position measurement has been proposed through Ethernet. The distance values are displayed.

Original author: Kavya M.C (source: https://www.ijert.org/research/position-measurement-and-control-of-a-piezoresistive-contactless-position-sensor-through-ethernet-IJERTV2IS90443.pdf)

## Components

- **Arduino Ethernet Shield** x 1 ([docs](https://docs.arduino.cc/retired/shields/arduino-ethernet-shield-without-poe-module))

## Article

1. Introduction A contactless position measurement system was proposed based on piezoresistance in [1].A control mechanism for the same has also been proposed in [2]. This paper presents a mechanism to read the sensor remotely through Ethernet and also to control the position of the object. An arduino Ethernet shield has been used along with the arduino board for connecting the sensor to Ethernet. The research was carried out in KLESSCET, Belgaum during February – June 2013.

2. Design and implementation

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034131%2Epng)

The general block diagram to read the sensor remotely is shown in fig 1. The sensor along with the external hardware setup(not shown in the diagram) is connected to arduino uno. Arduino uno is meshed with an Ethernet shield which connects the board to Ethernet thereby connecting the sensor to Ethernet. Another system which is connected to the same router as that of the Ethernet shield is used to read the sensor. If the latter ystem is connected to different router than the shield then port forwarding is necessary.

2. To read the IP address

In order that the remote computer must be able to read the sensor through Ethernet , it is necessary to get the IP and MAC addresses for the arduino uno and Ethernet shield assembly. These addresses are unique for a given shield. The MAC address will be provided by the manufacturer along with the device during purchase. In IP address can be obtained through DHCP by executing the program through arduino IDE. This sketch uses the DHCP extensions to the Ethernet library to get an IP address via DHCP and print the address obtained using an Arduino Wiznet Ethernet shield.the IP address displayed on the command window is shown in fig 2.

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034171%2Epng)

The IP and MAC addresses for our board combinations are: MAC id : 0x90,0xA2,0xDA,0x0E,0x03,0x76 IP address: 172,16,110,170. Thus by using this IP address the sensor can be read anywhere through a remote computer through the arduino Ethernet shield.

3. Experimental Setup The experimental setup to read the sensor remotely through another computer connect the Ethernet through same router is shown in fig 3. Once the IP address has been obtained, Arduino uno is then configured as a web server. In order to access the sensor through a latter system the link containing the IP address and the output port of the arduino should be given as “http:\\ 172.16.110.170: 8081”

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034201%2Epng)

A webpage displaying the analog values of the analog ports of the microcontroller ATmega will be displayed. Since we have connected the sensor to analog port 2 only the values on that port are significant. Other values will be random and are not considered.

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034229%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034254%2Epng)

Fig 6 shows the data transferred and received status for a network connection on the command prompt terminal. It can be seen the communication is successful and the loss is 0%.

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034289%2Epng)

Now that the sensor is successfully read through a remote computer, the position of the object can be controlled by issuing a command to the servomotor through Ethernet.

![](https://maker.wiznet.io/upload/ckeditor5/485738518%5F1666034313%2Epng)

Fig 8: Webpage for the servomotor control. The webpage for the control of servomotor appears as shown in fig 8. Two options are provided as ON and OFF. Upon asserting the on command, the servomotor starts to rotate in and the object will be moved away from the sensor. Similarly on asserting the off command the servomotor stops thus positioning the object to a new desired position. The sensor values will be read again periodically with a certain delay. The procedure can be repeated until the desired position is obtained. Conclusion and future work A procedure for reading the position of a magnet remotely through Ethernet is provided along with a control mechanism using servomotor assembly. The positioning can be achieved with suitable accuracy. Work can be further carried out to increase the positioning range of the object ant to control the servomotor precisely.

---

Source: https://maker.wiznet.io/mayuri/projects/position-measurement-and-control-of-a-piezoresistive-contactless-position-sensor-through-ethernet/
