Project tutorial

Arduinomated Car Parking with Voice Assistance in Smartphone © GPL3+

Make an assistant which tells you about how much to drive backwards without any collision through your smartphone by Arduino and 1Sheeld.

  • 3,376 views
  • 1 comment
  • 20 respects

Components and supplies

Rgdgrrzsvgslnl8hlyxx
Arduino ADK Rev. 3
×1
13959 01a
SparkFun Ultrasonic Sensor - HC-SR04
×1
1sheeld%2b%20board%20and%20app
1Sheeld+ (iOS and Android shield for Arduino)
×1
1434509556 android phone color
Android device
iOS devices can also be used on place of Android but I am using Android smartphone here.
×1
12002 04
Breadboard (generic)
×1

Apps and online services

About this project

It's a problem to take the car in reverse and many time people bump it into other cars or garage wall. My dad often ask me to assist him while parking car. But, what if you are driving alone and there is no one to assist you? There comes the Arduinomated car parking assistant which will work on 1Sheeld+ and Ultrasonic distance sensor which will tell you about how much distance is there between your car and obstacle without seeing backwards with a voice assistant; means you don't have to look backward nor into a screen.

What is 1Sheeld?

1sheeld is a stackable Arduino UNO shield used by in projects which can substitute and many components and make the work easy for wireless connections between an smartphone and the Arduino using a single App available for Android and iOS both.

Tech Specs:

  • 1Sheeld+ uses a standard HM-10 Bluetooth low energy adapter (BLE 4.0)
  • 7.37 MHz operating frequency
  • Range up to 30 feet
  • Communicates with Arduino using UART
  • Supports iOS versions starting 9.0 and up.
  • Supports Android versions starting 4.3 and up.

Note: I am assuming that almost all the people know about the Ultrasonic Distance sensor.

Building Connections

Connections for this are very easy.

  • Put the 1Sheeld+ on the Arduino Mega2560.
  • Now, connect the VCC and GND pin of the distance sensor with the 5 V and GND pin of Arduino respectively.
  • Connect echo pin to pin 11 and trigger pin to pin 13.

Download and Install the 1Sheeld App in Smartphone

  • Download the 1Sheeld app from the Playstore/iTunes.
  • Connect your smartphone to 1Sheeld via Bluetooth.
  • Select Text to Speech in the App.

Uploading the Sketch to Arduino

  • Remember to install the 1Sheeld library before you start uploading the code. Click here to get the library. You can also install it through Arduino IDE. Go to Sketch > Include Library > Manage Libraries > Enter "One Sheeld" and install the library.
  • Go to Tools > Boards > click on "Arduino Mega ADK".
  • Upload the sketch to the board.

Testing and Calibration

  • Now, test the project by using a book, cardboard, etc as an obstacle and connect the App with 1Sheeld.
  • Change the delay time in delay() function to calibrate the speech time.

Now, you can put it on the bumper of your car with tape and test it.

Sketch uses 27104 bytes (10%) of program storage space. Maximum is 253952 bytes. Global variables use 2063 bytes (25%) of dynamic memory, leaving 6129 bytes for local variables. I would suggest you to use Mega or higher board. UNO don't have much memory!

Have a good day! Try it and comment, respect and follow!

Schematics

Schematics for the Car Parking Assistant
Car parking with 1sheeld schematics kjz6uyagnx

Code

Sketch - Car ParkingC/C++
/********************************************************************************
    
    2017  Techduino
    
    This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
    distance to the closest object in range. To do this, it sends a pulse
    to the sensor to initiate a reading, then listens for a pulse 
    to return.  The length of the returning pulse is proportional to 
    the distance of the object from the sensor.
     
    The circuit:
    * VCC connection of the sensor attached to +5V
    * GND connection of the sensor attached to ground
    * TRIG connection of the sensor attached to digital pin 13
    * ECHO connection of the sensor attached to digital pin 11
    
********************************************************************************/
 

#include <OneSheeld.h>

#define CUSTOM_SETTINGS
#define INCLUDE_TEXT_TO_SPEECH_SHIELD

char charValue[4];  //charVal variable stores the words which are to be spoken


void setup() 
{
  OneSheeld.begin();    //starts the 1Sheeld
}

void loop() 
{
  int trigPin = 13;     //trigger pin connected to 
  int echoPin = 11;
  
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  
  long duration, cm;
  
  // Read the signal from the sensor: a HIGH pulse whose
  // duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  duration = pulseIn(echoPin, HIGH);
  
  // convert the time into a distance
  cm = duration / 29 / 2;

  dtostrf(cm, 4, 1, charValue);
  if (cm < 70)
    {
      TextToSpeech.say("Stop! Your are too close! Distance is ");
      delay(3500);
      TextToSpeech.say(charValue);
      delay(1300);
    }
  else if (cm > 70 && cm < 170)
    {
      TextToSpeech.say("Keep it slow! Distance is ");
      delay(3500);
      TextToSpeech.say(charValue);
      delay(1300);
    }
  else if (cm > 170)
    {
      TextToSpeech.say("Distance is ");
      delay(1500);
      TextToSpeech.say(charValue);
      delay(1300);
    }
}

Comments

Similar projects you might like

Pac-Man LED Pixel Panel Costume

Project tutorial by Ben Muller

  • 5,815 views
  • 4 comments
  • 95 respects

LoRa Gateway for DeviceHive

Project tutorial by DeviceHive IoT team

  • 1,518 views
  • 2 comments
  • 19 respects

Really Smart Box

Project tutorial by Stephen Harrison

  • 4,130 views
  • 2 comments
  • 15 respects

Raspberry Pi and Arduino Laptop

Project tutorial by Dante Roumega

  • 18,381 views
  • 6 comments
  • 45 respects

IoT Bird Feeder with Sigfox and Tweeter

Project showcase by Gaël Porté

  • 670 views
  • 0 comments
  • 9 respects
Add projectSign up / Login