Proximity sensors

Proximity sensors

Wilson
Copied !

The slot in the motherboard labeled sensor is intended to host a proximity sensor controller. The connectors 6, 7and 8 on the motherboard are associated to this slot and designed to connect 3 HC-SR04 ultrasound devices directly with a flat cable, as shown in the figure:

HC-SR04 connection

The sensor controller reads the 3 sensors one at a time and stores the 3 readings in a register that the Raspberry accesses through the I2C. The sensor controller performs this reading cycle continuously so when the Raspberry reads the register it gets the last measures of each of the 3 HC-SR04 devices.

The software of this module is available at GitHub as a regular project for the Arduino IDE environment. You need to load the SW into the boblock through the Arduino's USB port in the same way as for any other project.

map WEB app

When you downloaded the WEB app for the mobile, other applications were also installed, such as this one to test the sensors. This application requires the gyroscope to work properly so you need to have that module installed too.

map WEB app

Open the following URL on a PC:

http://<IP_address_of_your_Raspberry>/map

Rotate the vehicle by hand and see that the application draws black areas where the vehicle detects obstacles. The HC-SR04 works fine for distances between 2cm and ½ meter and incidence angles of less than 30 degrees.

This application is a considerably basic one, and its sole purpose is to test the sensors and gyroscope separately.