Distance sensor demo device

5. Documentation

Proximity sensor demo device

Project documentation


Contents

  1. Introduction

  1. The device

    1. General design

    2. Electronics

      1. Electrical system and wiring

      2. Microcontroller

      3. Sensors

    3. Mechanical design

      1. Assembly

    4. User interface

    5. The program

  1. Project analysis

    1. Arrangement

    2. Limitations of the design

    3. Encountered problems

    4. Possible future development

  1. Appendix

    1. 3D-models

    2. Program files

    3. Parts list


1. Introduction

The main goal of the proximity sensor demo device is to give students knowledge of measuring distances with different sensors and visualize the possibilities and the limitations of basic sensors used in mechatronics projects.


2. The device

2.1. General design

-

2.2. Electronics

2.2.1. Electrical system and wiring

All the wirings are made straight to an Arduino board that is powered by a 9V battery. There is only one switch in the device that connects power to Arduino.


2.2.2. Microcontroller

Arduino Uno.


2.2.3. Sensors

There are four different sensors in the device, of which three are working properly. The sensors are: HC-SR04 ultrasonic sensor, Sharp 0A41SK F 27 infrared sensor, and Adafruit VL6180X/VL53L0X laser sensors.


Model

Sample rate

Range

Supply Voltage

Average current when measuring

HC-SR04

40 Hz

2-400 cm

5 V

15 mA

Sharp 0A41SK F 27  

60 Hz

4-30 cm

4,5-5,5 V

12 mA

VL53L0X

30 Hz

5-120 cm

2,6-3,5 V *

19 mA

VL6189X

30 Hz

0-10 cm

2,6-3,5 V *

19 mA


*3-5 volts with a breakout board

2.3. Mechanical design

2.3.1. Assembly

The box was made by bending aluminium sheet into shape and inserting 3d-printed panels to each end. The cover was also printed.  


2.4. User interface

The user interface was kept simple by having only one button (power switch) and display. For maintenance, there are adjusting screws for sensors in the front panel and a detachable panel for changing the battery.


2.5. The program

Because the 20x4 character LCD screen had no working libraries available, one had to be made.


3. Project analysis

3.1. Arrangement

The project was assigned to develop teaching methods in mechatronics. The team working with the project consisted of three research assistants at Aalto University, which also were responsible for the funding.

3.2. Limitations of the design

Again, the size of the device was kept as small as possible. Because of the small power consumption, a battery was implemented instead of a power cord.


3.3. Encountered problems

There was a major problem with using two almost similar laser sensors with I2C. The breakout boards were similar and thus had the same address, 0x29. The address could be changed temporarily from the software, but running the sensors simultaneously was still not possible.


3.4. Possible future development

The gadget was built so it can be upgraded to IoT-device with either Bluetooth- or wifi-module. Modular sensor mounts allow changing the sensors with a little effort of drawing mounting plates for possible new sensors.


The adjustment of sensors was done just briefly, so depending on the user's preferences some more adjusting could be made both in the code and the hardware.


4. Appendix

4.1. 3D-models

4.2. Program files

4.3. Parts list


No.

Part

Qty.

1

Arduino Uno

1

2

Newhaven 0420D3Z-FL-GBW-V3 LCD

1

3

MTX 3m power tape

1

4

HC-SR04 ultrasonic sensor

1

5

Sharp 0A41SK F 27 infrared sensor

1

6

VL53L0X laser sensor

1

7

VL6180X laser sensor

1

8

Switch, toggle

1