SmartCar 2017

Smart Car Follower of a person

Smart Car overview

 

Development: Ioannis Stoltidis

Supervision: Dr. Minas Dasygenis from the Laboratory of Digital Systems and Computer Architecture.

 

Smart Car Follower is a project developed as part of a thesis for the Department of Informatics & Telecommunications Engineering of the University of Western Macedonia, Greece, under the supervision of Dr. Minas Dasygenis. The full text (in Greek) is available online, together with the presentation file.

 

or download the video

 

Introduction

Smart follower is a modified vehicle which follows the user and has the ability to overcome obstacles. Additionally the user can control remotely the vehicle via internet with a gamepad. For this case, an application running on windows was developed. This application uses SSH protocol for the communication between the vehicle and the client’s PC. In the past we had presented the alpha version of this vehicle.

 

Features

  1. Follow a user that carries a special designed keychain that transmits Bluetooth and infrared signals
  2. Avoid obstacles using sonar and smart bumper
  3. Remote control the vehicle using a custom PC application and a mounted webcam on a remotely operated pan/tilt structure
  4. Control the vehicle by ssh into the onboard raspberry and issue commands to the USB attached Arduino

Design

CarControl UI

CarControl UI

CarControl is the application for remote controlling our vehicle. A user friendly graphics interface was developed, making the use of the application easier. After the SSH connection with the vehicle is established, the user can control it using their gamepad. The application uses both Xinput and DXinput methods for gamepad reading, supporting many kinds of gamepads. The distance sensors’ readings are viewed at the right side of the app’s main window and are refreshed every 1s. Also there is a video streaming window and a debug message viewer window. The follow-me function needs nothing more than pressing a button (the green one) from the vehicle and to turn on the user transmitter. The vehicle reading IR messages will follow the user.

Hardware

The vehicle is equipped with a Raspberry Pi 3 model B and two Arduino Uno R3 connected with a USB cable. An LCD 16x2 is connected directly on the Pi, showing periodically the local IP of the vehicle. Also some simple components like LEDs and push buttons are connected at Pi’s GPIO pins. All five sonar distance sensors, two servo motors (for camera rotation) and two DC motors through a dual H bridge, are connected to the first Arduino. Four 38Khz IR receivers are connected to the second Arduino. Additionally a client receiver, which contains an Arduino Uno R3, six IR LED and a Bluetooth transmitter (BC417), was designed.

Power supply System

 

Software

Raspberry hosts an SSH server and a motion server for video streaming. The main software is also running on Raspberry Pi. This software supports remote control functionality by forwarding some commands to Arduino. Also the follow-me function and the obstacle avoidance are implemented in this software.

 

Remote Control

When using CarControl, each control command is sent via SSH to the Raspberry. The command is a two letter string (like “ms”) and saved in a file mounted on RAM. Most commands are forwarded to Arduino for execution, while some other less important (like LED toggle) are executed directly on Pi.

Remote control communication

Follow-me function

The Arduino connected with IR receivers, decodes received signal and prints periodically a 4-bit variable. The main software, when reading this variable, knows the position of the client compared to the vehicle. Also the Bluetooth signal’s strength readings reveal the distance between the vehicle and the client. With these information the vehicle follows the client.

 

Follow me communication

Hardware Schematics

car schematic

car schematic

Client's transmitter schematic

Client transmitter

CarControl Project

Download CarControl

Main Arduino Source Code

Download car_pro_pi

Receiver Arduino Source Code

Download ir_rcv

Transmitter Arduino Source Code

Download ir_trans

Python Source Code

Download RaspberryPi_Scripts

Bill of Materials

Component

Unit Cost (€)

Cost (€)

1x children car

100

100

1x Battery MW MWS 7.2-12

15.8

15.8

1x Raspberry Pi 3 Model B

35

35

3x Arduino Uno R3 clone

1.80

5.4

1x Bluetooth BC417

5.16

5.16

1x Η Bridge

1.30

1.30

1x Web Camera

15.26

15.26

1x DC converter LM2596s

1.02

1.02

1x LCD 16x2 HD44780

0.88

0.88

2x Servo motor SG90

0.87

1.74

2x Sonar US-020

1.2

2.4

3x Sonar HC-SR04

0.85

1.7

4x IR receiver VS1838b

0.05

0.2

9x IR LEDs

0.01

0.09

7x Push button

0.01

0.07

11x Resistor

0.01

0.11

1x Potentiometer

0.01

0.01

1x Breadboard mini

0.4

0.4

1x car USB adaptor

0.7

0.7

Total Cost

 

187,24 €