Bluetooth Audio Receiver Board [B210]



https://www.youtube.com/watch?v=k3NmiGb3d9E



* Specs

Audio input mode:Bluetooth receiver

USB decode and play

TF card decoding playback

Support Playback Format: MP3,WMA,WAV,FLAC

Power Supply: DC 5V (original phone charger can power small USB plug)

Board Size:50 x 40mm


Preamp output can be directly promote the headset and also can be followed

by the use of the power amp



* Contents

- Connect 


- Sample




Posted by RD IoT RDIoT

댓글을 달아 주세요

Serial MP3 Music Player Module for Arduino (YX5300) [B208]





https://www.youtube.com/watch?v=D9rsBf1b3CM


GitHub : https://github.com/rdiot/rdiot-b208


* Specs

The module is a kind of simple MP3 player device which is based on a high-quality MP3 audio chip---YX5300. It can support 8k Hz ~ 48k Hz sampling frequency MP3 and WAV file formats.

There is a TF card socket on board, so you can plug the micro SD card that stores audio files. MCU can control the MP3 playback state by sending commands to the module via UART port, such as

switch songs, change the volume and play mode and so on. You can also debug the module via USB

to UART module. It is compatible with Arduino / AVR / ARM / PIC.


Features:

1. Support sampling frequency (kHz): 8 / 11.025 / 12 / 16 / 22.05 / 24 / 32 / 44.1 / 48

2. High quality


3. Support file format: MP3 / WAV

4. Support Micro SD card, Micro SDHC Card

5. 30 class adjustable volume

6. UART TTL serial control playback mode, baud rate is 9600bps

7. Power supply can be 3.2 ~ 5.2VDC

8. Control logic interface can be 3.3V / 5V TTL

9. Compatible with Arduino UNO / Leonardo / Mega2560 / DUE



* Contents

- interface 


- Connect 

Serial MP3 Player - Arduino

GND - GND

VCC - 5V

TX - D5

RX - D6


- Commonly Command bytes Descriptions


- tested source code 

 : https://github.com/rdiot/rdiot-b208/blob/master/SerialMp3PlayerControl.ino.ino


- Key Code

#include <SoftwareSerial.h>


#define ARDUINO_RX 5 // TX - Arduino RX

#define ARDUINO_TX 6 // RX - Arduino TX


SoftwareSerial mySerial(ARDUINO_RX, ARDUINO_TX);


unsigned char playmode = 1; 

  #define PLAY  1

  #define PAUSE 0

static int8_t Send_buf[8] = {0} ;

  

/************Command byte**************************/

#define CMD_NEXT_SONG 0X01

#define CMD_PREV_SONG 0X02

#define CMD_PLAY_W_INDEX 0X03

#define CMD_VOLUME_UP 0X04

#define CMD_VOLUME_DOWN 0X05

#define CMD_SET_VOLUME 0X06

#define CMD_SINGLE_CYCLE_PLAY 0X08

#define CMD_SEL_DEV 0X09

#define DEV_TF 0X02

#define CMD_SLEEP_MODE 0X0A

#define CMD_WAKE_UP 0X0B

#define CMD_RESET 0X0C

#define CMD_PLAY 0X0D

#define CMD_PAUSE 0X0E

#define CMD_PLAY_FOLDER_FILE 0X0F

#define CMD_STOP_PLAY 0X16

#define CMD_FOLDER_CYCLE 0X17

#define CMD_SET_SINGLE_CYCLE 0X19

#define SINGLE_CYCLE_ON 0X00

#define SINGLE_CYCLE_OFF 0X01

#define CMD_SET_DAC 0X1A

#define DAC_ON  0X00

#define DAC_OFF 0X01

#define CMD_PLAY_W_VOL 0X22

/*********************************************************************/


#define ROTARY_ANGLE_SENSOR A0


#define ADC_REF 5//reference voltage of ADC is 5v

#define VCC     5    //the default value of VCC of the control interface is 5v

#define FULL_ANGLE 280//full value of the rotary angle is 280 degrees


void setup() 

{

  //pinMode(2, INPUT); // Button - Paluse&Play

  Serial.begin(9600);

  mySerial.begin(9600);

  delay(500);

  attachInterrupt(0, playOrPause, RISING);//pin2 -> INT0, and the Touch Sensor 

                                          //is connected with pin2 of Arduino

  sendCommand(CMD_SEL_DEV, DEV_TF);    

  delay(200);

  sendCommand(CMD_PLAY_W_VOL, 0X0F01);

}

static int8_t pre_vol = 0x0f; 

void loop() 

{

  int degrees;

  degrees = getDegree();

    

  int8_t volume;

  /*The degrees is 0~280, should be converted to be 0~255 to control the*/

  /*brightness of LED */

  volume = map(degrees, 0, 280, 30, 0); 

  if(volume != pre_vol)

  {

    sendCommand(CMD_SET_VOLUME, volume);

    pre_vol = volume;

  }

  delay(100);

}


void sendCommand(int8_t command, int16_t dat)

{

  delay(20);

  

  Send_buf[0] = 0x7e; //

  Send_buf[1] = 0xff; //

  Send_buf[2] = 0x06; //

  Send_buf[3] = command; //

  Send_buf[4] = 0x00;//

  Send_buf[5] = (int8_t)(dat >> 8);//datah

  Send_buf[6] = (int8_t)(dat); //datal

  Send_buf[7] = 0xef; //

  for(uint8_t i=0; i<8; i++)//

  {

    mySerial.write(Send_buf[i]);  

  }

  

}


int getDegree()

{

  int sensor_value = analogRead(ROTARY_ANGLE_SENSOR);

  float voltage;

  voltage = (float)sensor_value*ADC_REF/1023;

  float degrees = (voltage*FULL_ANGLE)/VCC;

  return degrees;

}

/*Interrupt service routine*/

void playOrPause()

{

  cli();

  if(playmode == PLAY)

  {

    playmode = PAUSE;

  sendCommand(CMD_PAUSE,0);

  }

  else

  {

    playmode = PLAY;

  sendCommand(CMD_PLAY,0);

  }

  sei();

}


- Reference

CATALEX Serial MP3 Player manual version v1.0.1

 : https://github.com/rdiot/rdiot-b208/blob/master/Serial%20MP3%20Player%20v1.0%20Manual.pdf

Serial Debug tool - SSCOM32 

 : https://github.com/rdiot/rdiot-b208/blob/master/Serial%20Debug%20tool%20-%20SSCOM32.zip

Serial MP3 Player Demo Code 

 : https://github.com/rdiot/rdiot-b208/blob/master/SerialMP3PlayerDemoCode%20for%20Arduino-1.0.zip


Posted by RD IoT RDIoT

댓글을 달아 주세요

Sound recordable module 10sec [S191]



https://www.youtube.com/watch?v=67x7TpmRhlQ


* Specs

Features:

With speaker, microphone and button

Record your own message

Great for greeting cards

Convenient

Designed for cardmaking and other similar projects.

Allows you to add sound to custom made cards using your own papers and decorations.

Can also be used in printed card projects.

Mounted on a crystal clear backing for a cleaner, more look.

The built-in voice recorder allows you to record up to a 120 second message. If you make a mistake you can re-record your message


Specifications:

Play Life: 200 plays

Shelf Life: 2 years

Power: 2 button batteries (included)

Recording time: 10 seconds

Speaker diameter: 4cm

Color: Black

Material: Plastic + Metal

Net Weight: 17.6g


* Contents

- Connect

Mic

Recoding LED

Record Start/Stop

Play Start/Stop

0.5W 8Ohm Speaker

Posted by RD IoT RDIoT

댓글을 달아 주세요

Sound Control LED Lamp Module [S175]



https://www.youtube.com/watch?v=I08YWqnpbPY


* Specs

Size: 52mm*75mm

Installing Hole: Φ3

Power Supply: Powered By USB (The input cannot exceed 12V)

Power Consumption: Max. 2W (Output: 5V, All LEDs are on.)


* Contents

- Connect

USB connect

Posted by RD IoT RDIoT
TAG LED, sound

댓글을 달아 주세요

Small Sound Detection Module (KY-038) [S053]



https://www.youtube.com/watch?v=WFB0QkhGm20


* GitHub : https://github.com/rdiot/rdiot-s053.git


* Specs

Dimensions: 1.38 in x 0.59 in x 0.51 in (3.5 cm x 1.5 cm x 1.3 cm)

Weight: 0.11 oz (3 g)

Main chip: LM393

Electret condenser microphone

Working voltage: DC 4-6V

Interface definition:

AO: analog output sensor

GND: ground

VCC: Power supply input range: 3V-24V.

DO: Digital Output (comparator output)

Two red LED indication: POWER and SENSOR. POWER: Power is off.

SENSOR: When the microphone senses sound reaches a certain value, this LED light.


Single channel signal output

Low level output signal used for sound control light

Great module for sound alarm system

LM393 main chip

Electric condenser microphone


* Contents

- Connect

A0 ----- A0

G ----- GND

+ ----- 5V

D0 ----- X


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


int threshold = 30; 


int led1 = 2;

int led2 = 3;

int led3 = 4;

int led4 = 5;

int led5 = 6;


int pin = A0;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin,INPUT);


  pinMode(led1,OUTPUT);

  pinMode(led2,OUTPUT);

  pinMode(led3,OUTPUT);

  pinMode(led4,OUTPUT);

  pinMode(led5,OUTPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S052:SoundDetect");


  int val = analogRead(pin);


  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");


  if(val <= threshold)

  { 

    lcd.setCursor(0,2);

    lcd.print("                    ");

  }

  else

  {

    lcd.setCursor(0,2);

    lcd.print("Small Sound Detected");

    delay(100);  

  }


  digitalWrite(led1, LOW); 

  digitalWrite(led2, LOW); 

  digitalWrite(led3, LOW); 

  digitalWrite(led4, LOW); 

  digitalWrite(led5, LOW); 

 

  if(val > 30) { digitalWrite(led1, HIGH); }

  if(val > 31) { digitalWrite(led2, HIGH); }

  if(val > 32) { digitalWrite(led3, HIGH); }

  if(val > 35) { digitalWrite(led4, HIGH); }

  if(val > 40) { digitalWrite(led5, HIGH); }


  delay(50);

}

Posted by RD IoT RDIoT

댓글을 달아 주세요

Big Sound Detection Module (KY-037) [S052]



https://www.youtube.com/watch?v=jjT-qJG5OhY


* Specs

For sound detection module has two outputs: 

1. AO, analog output, real-time output voltage signal of the microphone 

2. DO, when the sound intensity reaches a certain threshold, the output high and low signal 


Module features: 

1. there is a mounting screw hole 3mm 

2. the use 5v DC power supply 

3. with analog output 

4. there are threshold level output flip 

5. high sensitive microphone and high sensitivity. 

6. a power indicator light 

7. the comparator output is light


* Contents

- Connect

A0 ----- A0

G ----- GND

+ ----- 5V

D0 ----- X 


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

 

int threshold = 600; 

 

int led1 = 2;

int led2 = 3;

int led3 = 4;

int led4 = 5;

int led5 = 6;

 

int pin = A0;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(pin,INPUT);

 

  pinMode(led1,OUTPUT);

  pinMode(led2,OUTPUT);

  pinMode(led3,OUTPUT);

  pinMode(led4,OUTPUT);

  pinMode(led5,OUTPUT);

 

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S052:SoundDetect");

 

  int val = analogRead(pin);

 

  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");

 

  if(val <= threshold)

  { 

    lcd.setCursor(0,2);

    lcd.print("                  ");

  }

  else

  {

    lcd.setCursor(0,2);

    lcd.print("Big Sound Detected");

    delay(100);  

  }

 

  digitalWrite(led1, LOW); 

  digitalWrite(led2, LOW); 

  digitalWrite(led3, LOW); 

  digitalWrite(led4, LOW); 

  digitalWrite(led5, LOW); 

 

  if(val > 600) { digitalWrite(led1, HIGH); }

  if(val > 605) { digitalWrite(led2, HIGH); }

  if(val > 610) { digitalWrite(led3, HIGH); }

  if(val > 615) { digitalWrite(led4, HIGH); }

  if(val > 620) { digitalWrite(led5, HIGH); }

 

  delay(50);

 

}

Posted by RD IoT RDIoT

댓글을 달아 주세요