IOT

How to Interface APR33A3 Voice Record & Playback Module with Arduino?

In this article, we’ll look at the APR33A3 Voice Record & Playback Module and how to connect it to an Arduino. The APR33A3 is an 8-channel voice record and audio playback board that includes the APR33A series IC, a powerful audio processor with high-performance audio analog-to-digital converters (ADCs), and digital-to-analog converters (DACs).

We’ll learn how to use this module, which includes audio recording and playback. We’ll also use the Arduino Board to create an audio-supported project. The board can be utilised in a variety of applications, including an audio notifier in an accident detection system and a Namastey Greeting Robot in a PIR Sensor Application. It can also be utilized in doorbells, Voice-Controlled Robots, train announcement systems, and automatic telephone answering machines, among other things. This module will be used in conjunction with the HC-SR04 ultrasonic sensor to alert a blind person to the detected distance.

APR33A3 Voice Record & Playback Module

APR33A3 IC

The APR33A series is a high-performance audio processor containing analog-to-digital converters (ADCs) and digital-to-analog converters (DACs). The IC is a completely integrated solution with analogue input, digital processing, and analogue output features that offers excellent performance and exceptional integration.

apr33a3 voice module

The APR33A series was created with the simple key trigger in mind. A switch allows the user to record and play the message averagely for 1, 2, 4, or 8 voice message(s), and the sample rate can be modified by changing the resistor values. It’s appropriate for basic interfaces or situations where the length of a single message must be limited, such as toys, leave messages systems, answering machines, and so on.

APR33A3 Features

  • Operating Voltage Range: 3V ~ 6.5V
  • Single-Chip, High-Quality Audio/Voice Recording & Playback Solution
  • No External ICs Required
  • Minimum External Components
  • User Friendly, Easy to Use Operation
  • Programming & Development Systems Not Required
  • 680 sec.(11 Minutes) Voice Recording Length in APR33A3-C2
  • Nonvolatile Flash Memory Technology
  • No Battery Backup Required
  • External Reset pin
  • Powerful Power Management Unit
  • Very Low Standby Current: 1uA
  • Low Power-Down Current: 15uA
  • Supports Power-Down Mode for Power Saving
  • Built-in Audio-Recording Microphone Amplifier
  • No External OPAMP or BJT Required
  • Easy to PCB layout
  • Configurable analog interface
  • Differential-ended MIC pre-amp for Low Noise
  • High-Quality Line Receiver
  • High-Quality Analog to Digital and PWM module
  • Simple And Direct User Interface
  • Averagely 1,2,4 or 8 voice messages record & playback

How to Record your Voice using APR33A3?

apr33a3 voice recorder module

1. The device can be powered in one of two ways: using a 5V or a 12V supply. To select, slide the power switch.

2. We can record audio on 8 channels (M1 to M8), each with a recording time of 1.3 minutes.

3. The onboard microphone will be used for recording.

4. The board’s power LED (LD1) will turn on.

5. There is a slide button labeled REC/PLAY that allows you to choose between recording and playback modes.

6. Select a channel (M1-M8) to record the message while in record mode. Assume we want to record messages on channel M0, and M1 is connected to GND. Alternatively, you can simply press and hold the M1 button.

7. Now, whatever we say will be collected and recorded by the MIC, and the status LED(LD2) will illuminate in record mode, indicating that the chip is recording. When the duration is reached, the LED(LD2) turns off, indicating that the segment is complete.

8. To stop recording, either release the M1 button or detach it from the GND.

How to Playback the recorder message using APR33A3?

  • Connect the speaker to the Speaker portion of the board.
  • Let’s take a look at what we’ve got. To do so, change the REC/PLAY setting to PLAY.
  • Now push the buttons M1-M8, and the status LED (LD2) will illuminate until the recorded sound has finished playing in the speaker.
  • This method applies to all of the remaining channels as well.

How to use APR33A3 with Arduino or any Microcontroller?

Let’s look at how the APR33A3 Voice Recorder Playback module can be used with an Arduino or other microcontroller.

1. Manually record your voice first.

2. Connect the Controller I/Os to M0 through M7 for playback.

3. A recorded message will play when the output for a specific Pin drops low.

Interfacing APR33A3 Voice Recorder & Playback Module with Arduino

Let’s connect the Arduino to the APR33A3 Voice Recorder & Playback Module. This module will be used in conjunction with the HC-SR04 Ultrasonic Sensor and the OLED display in this section. The following is a schematic of the connections.

The HC-SR04 Module is a distance measuring ultrasonic sensor. I utilized a 0.96′′ I2C OLED Display to show the measured distance. From M0-M8, the APR33A3 Voice Recorder & Playback Module has 8 output pins. Arduino can be attached to one of the pins. The module pin will be activated by the digital low input, which can be utilized to playback the recorded voice message. I chose M1 and wired it up to the Arduino D8 pin.

In this project, the device will play the audio at distances of 5CM, 10CM, 15CM, and 20CM. For this initially, record the audio from channel M1-M4 as the following message.

1. M1: Distance is 5cm

2. M2: Distance is 10cm

3. M3: Distance is 15cm

4. M4: Distance is 20cm

The code will activate the channel based on the detected distance. You can watch the movie at the end of this guide to see how the entire system works.

Source Code/Program

The complete source code is given below. You need Arduino U8glib Library for this code.

#include “U8glib.h”
#include <Wire.h>
// setup u8g object
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // I2C
//
const int trigPin = 8;
const int echoPin = 7;
long duration, inches, cm, avgCm;
String longString = “”;
int tapeLength = 0;

int voice1 = 2;
int voice2 = 3;
int voice3 = 4;
int voice4 = 5;

void setup() {
Serial.begin(9600);
Wire.begin();
pinMode(voice1, OUTPUT);
pinMode(voice2, OUTPUT);
pinMode(voice3, OUTPUT);
pinMode(voice4, OUTPUT);
}

void loop()
{
avgCm = 0;
for (int f = 0; f < 5; f++)
{ // average out 5 readings
ultrasonic();
avgCm = avgCm + cm;
}
cm = avgCm / 5;
//draw loop
u8g.firstPage();
do
{
draw();
}
while ( u8g.nextPage() );
delay(50);

if (cm <= 5)
{
digitalWrite(voice1, LOW);
}
else
{
digitalWrite(voice1, HIGH);
}



if ((cm > 5) && (cm <= 10))
{
digitalWrite(voice2, LOW);
}
else
{
digitalWrite(voice2, HIGH);
}



if ((cm > 10) && (cm <= 15))
{
digitalWrite(voice3, LOW);
}
else
{
digitalWrite(voice3, HIGH);
}



if ((cm > 15) && (cm <= 20))
{
digitalWrite(voice4, LOW);
}
else
{
digitalWrite(voice4, HIGH);
}

}

void ultrasonic()
{
pinMode(trigPin, OUTPUT);
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);
Serial.print(inches);
Serial.print(“in, “);
Serial.print(cm);
Serial.print(“cm”);
Serial.println();
delay(100);
}
long microsecondsToInches(long microseconds)
{
return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds)
{
return microseconds / 29 / 2;
}
void draw(void) {
u8g.setFont(u8g_font_profont12);
u8g.drawStr(5, 8, “Arduino Tape Measure”);
if (cm > 110) {
longString = “—“;
tapeLength = 0;
}
else {
longString = String(cm) + “cm”;
tapeLength = cm;
}
const char* newData = (const char*) longString.c_str();
u8g.setFont(u8g_font_profont29);
u8g.drawStr(30, 40, newData);
// now draw tape
for (int f = 10; f < 120; f = f + 10) {
u8g.drawLine(f, 48, f, 61);
}
for (int f = 2; f < tapeLength + 3; f++) {
u8g.drawBox(f, 50, 1, 10);
}
}

Conclusion

I hope all of you understand how to Interface APR33A3 Voice Record & Playback Module with Arduino. We MATHA ELECTRONICS will be back soon with more informative blogs.

Leave a Reply

Your email address will not be published.