Categories
TUTORIALS

CROSSING GUARD – ARDUINO TALKING AT THE INTERSECTION

Introduction:

Our group’s project, Crossing Guard, is aimed at providing safe environment improving for the vulnerable people when crossing the intersection in busy urban areas. An audio noise like “crossing” or “wait” is needed to indicate if it is safe to cross especially for blind people. In this tutorial, we will mainly use Interface SD Card Module and a speaker to figure out how to play audio files with the Arduino.

Required Hardware:

Arduino Board

Interface SD Card Module

Mini Hamburger Speaker

SanDisk 2GB MicroSD

Jump Wires

Setup and Wiring:

Connections of the Interface SD Card Module

The module (MicroSD Card Adapter) is a Micro SD card reader module for reading and writing through the file system and the SPI interface driver. SCM system can be completed within a file MicroSD card, Support Micro SD Card or Micro SDHC card (high speed card). In this tutorial, we will use a file MicroSD card. Power supply is 4.5V ~ 5.5V, 3.3V voltage regulator circuit board.

Connect SD Card Module VCC to 5V.

Connect SD Card Module GND to GND.

Connect SD Card Module CS to pin4.

Connect SD Card Module MOSI to pin11.

Connect SD Card Module MISO to pin12.

Connect SD Card Module SCK to pin13.

 

Connections of the Speaker :

We need to connect two wires to the speaker jack with solder.

 

 

One wire from the speaker jack will connect to GND of the Arduino.

The other wire will connect to digital input 9 of the Arduino (The library use digital pin 9).

Create and Convert of audio file:

In this part, you need to record the audio like “Crossing” and “Wait” as signals for vulnerable people.

  1. I use phone application to record them. You can also use songs or music to show whether it is safe to cross the intersection if you want.
  2. After recording, you need to convert the audio file from mp3 to WAV. I use the online website https://audio.online-convert.com/convert-to-wav.Upload your audio you want to convert to WAV

    Then change the settings as below:

    bit resolution: 8 bit

    sampling rate: 16000 Hz

    audio channels: mono

    After pressing “Start conversion”, our WAV audio files are ready.

  3. Then connect your SD card to your computer with a card reader. And save these files in the format of WAV to SD card.
  4. Finally, you will insert the SD card into the SD card module.

    Code:

    The code set up relatively simple in this tutorial. It is based on the wiring. You must pay attention to the code about pins of Arduino as they are connected to different pins of Interface SD Card Module. Do not mix them up.

    What’s more, do not forget to add libraries and you can get the library from https://github.com/TMRh20/TMRpcm. Also, do not change the pin connections as the library is using these pins accordingly.

Video:

One reply on “CROSSING GUARD – ARDUINO TALKING AT THE INTERSECTION”

i had been trying to make make arduino project to speak but still this your codes and circuit i have not been able to make it possible please can you help

Leave a Reply

Your email address will not be published. Required fields are marked *