Selasa, 31 Mei 2016


SIM800 adalah salah satu Module GSM/GPRS Serial  yang dapat kita Gunakan bersama Arduino/AVR
Ada beberapa type dari Breakout Board SIM800/SIM800L yang akan kita bahas disini adalah yg Versi
Mini SIM800L dengan Micro SIM.

Berikut datasheet SIM800L mini Module :

Description:

Chip: SIM800L
Voltage: 3.7-4.2V (datasheet = 3.4-4.4V)
Freq : QuadBand 850/900/1800/1900Mhz
Module size: 2.5cmx2.3cm

Transmitting power
Class 4 (2W) at GSM 850 and EGSM 900
Class 1 (1W) at DCS 1800 and PCS 1900GPRS connectivity
GPRS multi-slot class 12 default
GPRS multi-slot class 1~12 (option)
Temperature range Normal operation: 40°C ~ +85°C
TTL serial port for serial port, you can link directly to the microcontroller. No need MAX232
Power module automatically boot, homing network
Onboard signal lights all the way . It flashes slowly when there is a signal, it flashes quickly when there is  no signal


Full Datasheet silahkan download link berikut :
Datasheets Lengkap Module SIM800L (Google Drive/Dani)



 Module SIM800L memiliki 12 pin Header,6 di sisi kanan dan 6 disisi kiri,berikut definisi PIN nya
1.NET = Antena
2.VCC = +3.7-4.2V
3.RST = Reset
4.RXD = Rx Data Serial
5.TXD = Tx Data Serial
6.GND = Ground/0V

7.RING  when call incoming
8.DTR
9.MICP = Microphone +
10.MICN = Microphone -
11.SPKP = Speaker +
12.SPKN = Speaker -



Default Boudrate untuk Module SIM800L adalah 9600
Harus Menggunakan Step Down Converter jika akan dihubungkan dengan VCC 5V Arduino

Saya mencoba memberi tegangan VCC SIM800L dengan 4,2VDC (saya turunkan dari 5V vcc Arduino menggunakan Stepdown Buck Converter) dan Hasilnya Muncul Warning Over Voltage pada Serial Monitor.Saya turunkan tegangan sampai 4,15V Warning masih Muncul.
 
Saya turunkan Kembali tegangan VCC SIM sampai 3,7VDC dan baru bisa Berjalan Normal walaupun pada Datasheets nya disebutkan VCC 3.4-4.4VDC

Untuk Koneksi Standar Wiring Module SIM800L dengan Arduino adalah sbb:

Sim800L  <--> Arduino
VCC <--> 3,7V melalui Step Down dari 5V Arduino
GND <--> GND
RXD <--> Tx Serial D1 atau Tx SoftwareSerial
TXD <--> Rx Serial D0 atau Rx SoftwareSerial

Berikut Adalah Coding Untuk Testing Koneksi SIM800L ke Arduino Melalui SoftwareSerial


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <SoftwareSerial.h>
SoftwareSerial SIM800L(2, 3); // RX | TX
// Connect the SIM800L TX to Arduino pin 2 RX. 
// Connect the SIM800L RX to Arduino pin 3 TX. 
char c = ' ';
void setup() 
{
    // start th serial communication with the host computer
    Serial.begin(9600);
    while(!Serial);
    Serial.println("Arduino with SIM800L is ready");
 
    // start communication with the SIM800L in 9600
    SIM800L.begin(9600);  
    Serial.println("SIM800L started at 9600");
    delay(1000);
    Serial.println("Setup Complete! SIM800L is Ready!");
}
 
void loop()
{
 
     // Keep reading from SIM800 and send to Arduino Serial Monitor
    if (SIM800L.available())
    { c = SIM800L.read();
      Serial.write(c);}
 
    // Keep reading from Arduino Serial Monitor and send to SIM800L
    if (Serial.available())
    { c = Serial.read();
      SIM800L.write(c);  
       }

}

#Hubungkan TXD SIM800L ke pin D2 Arduino (Rx SoftSerial) dan RXD SIM800L ke D3 (Tx SoftSerial).Buka Serial Monitor pada Arduino IDE dan Setting Boudrate 9600 - Both NL & CR.

#Pastikan SIM800L sudah dimasukan SIM (microSIM) dan LED Indicator Berkedip Lambat (jika kedipnya Cepat berarti SIM No Signal atau SIM Not Detected)

#Tes Koneksi dengan mengetik at
Kalau koneksi berhasil maka SIM800L akan merespon seperti Gambar di bawah :

Standar ATcommand untuk check parameter SIM800L
AT – is to check if interface is working fine.
AT+CFUN – is used to set phone functionality
AT+CFUN? – returns currently set value for AT+CFUN
AT+CFUN=? – returns all possible values that can be set for AT+CFUN (similar to help)
AT+CFUN=1 – is to sent AT+CFUN to 1 (full functionality)
AT+CREG? – to get network registration information. stat=1 means you are registered with home network
AT+COPS? – returns currently registered operator details
AT+COPS=? – returns all the operators available


Mengirim SMS Sim800L melalui SoftwareSerial tanpa menggunakan Library (hanya AT Command)

 Berikut adalah Sample Coding Untuk Kirim SMS SIM800L menggunakan SoftwareSerial/tanpa Library


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <SoftwareSerial.h>
SoftwareSerial SIM800L(2, 3); // RX | TX
// Connect the SIM800L TX to Arduino pin 2 RX. 
// Connect the SIM800L RX to Arduino pin 3 TX. 
void setup() {
 // start th serial communication with the host computer
    Serial.begin(9600);
    while(!Serial);
    Serial.println("Arduino with SIM800L is ready");
 
    // start communication with the SIM800L in 9600
    SIM800L.begin(9600);  
    Serial.println("SIM800L started at 9600");
    delay(1000);
    Serial.println("Setup Complete! SIM800L is Ready!");
   
  Serial.println("Set format SMS ke ASCII");
  SIM800L.write("AT+CMGF=1\r\n");
  delay(1000);
 
  Serial.println("SIM800L Set SMS ke Nomor Tujuan");
  SIM800L.write("AT+CMGS=\"089666699999\"\r\n");
  delay(1000);
   
  Serial.println("SIM800L Send SMS content");
  SIM800L.write("Testing Kirim SMS via SIM800L");
  delay(1000);
   
  Serial.println("Mengirim Char Ctrl+Z / ESC untuk keluar dari menu SMS");
  SIM800L.write((char)26);
  delay(1000);
     
  Serial.println("SMS Selesai Dikirim!");
}

void loop() {
  // put your main code here, to run repeatedly:

}


Berikut Screenshoot pada Serial Monitor Arduino IDE


Berikut ScreenShoot SMS MAsuk pada Hp Nomor Tujuan :

Menggunakan GSM Library ke Module SIM800L

Disini saya menggunakan Library dari Seeeduino.Silahkan download librarynya disini

Library Seeduino Menggunakan Software Serial dengan Pin Tx=D8 dan Rx=D7
Berikut sambungan wiring antara SIM800L dengan Arduino dengan Library Seeeduino
Sim800L  <--> Arduino
VCC <--> 3,7V melalui Step Down dari 5V Arduino
GND <--> GND
RXD <--> D8
TXD <--> D7

Berikut Contoh Sketch kirim SMS dengan SIM800L menggunakan library Seeeduino


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Sketch: GPRS Connect TCP

Function: This sketch is used to test seeeduino GPRS's send SMS func.to make it work, 
you should insert SIM card to Seeeduino GPRS and replace the phoneNumber,enjoy it!
************************************************************************************
note: the following pins has been used and should not be used for other purposes.
  pin 8   // tx pin
  pin 7   // rx pin
  pin 9   // power key pin
  pin 12  // power status pin
************************************************************************************
created on 2013/12/5, version: 0.1
by lawliet.zou(lawliet.zou@gmail.com)
*/
#include <gprs.h>
#include <SoftwareSerial.h>

GPRS gprs;

void setup() {
  Serial.begin(9600);
  while(!Serial);
  Serial.println("SIM800L Demo Send SMS via Seeeduino");
  gprs.preInit();
  delay(1000);
  while(0 != gprs.init()) {
      delay(1000);
      Serial.print("init error\r\n"); //pesan di Serial Monitor jika proses init module GPRS Gagal
  }  
  Serial.println("Init succes..."); //pesan di Serial Monitor jika proses init module GPRS Sukses
  delay(1000);
  
  //Format Coding Kirim SMS
  gprs.sendSMS("089666699999","Test Send SMS with Seeeduino Lib"); //define phone number and text
}

void loop() {
  //nothing to do
}

 Screenshoot pada layar Hp :

  Berikut Contoh Sketch Melakukan Panggilan dengan SIM800L menggunakan library Seeeduino

 
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Sketch: GPRS Connect TCP

Function: This sketch is used to test seeeduino GPRS's send SMS func.to make it work, 
you should insert SIM card to Seeeduino GPRS and replace the phoneNumber,enjoy it!
************************************************************************************
note: the following pins has been used and should not be used for other purposes.
  pin 8   // tx pin
  pin 7   // rx pin
  pin 9   // power key pin
  pin 12  // power status pin
************************************************************************************
created on 2013/12/5, version: 0.1
by lawliet.zou(lawliet.zou@gmail.com)
*/
#include <gprs.h>
#include <SoftwareSerial.h>

GPRS gprs;

void setup() {
  Serial.begin(9600);
  while(!Serial);
  Serial.println("SIM800L Demo Calling via Seeeduino");
  gprs.preInit();
  delay(1000);
  while(0 != gprs.init()) {
      delay(1000);
      Serial.print("init error\r\n"); //pesan di Serial Monitor jika proses init module GPRS Gagal
  }  
  Serial.println("Init succes..."); //pesan di Serial Monitor jika proses init module GPRS Sukses
  delay(1000);
  
  //Format Coding Calling Number
  gprs.callUp("089666699999"); //define phone number
}

void loop() {
  //nothing to do
}

Screenshoot di layar Hp :




 

Auto Read Incoming SMS From SIM800L to Arduino Serial Monitor


Berikut Contoh Sketch Auto Read incoming SMS dengan SIM800L menggunakan library Seeeduino


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <gprs.h>
#include <softwareserial.h>
 
#define TIMEOUT    5000
#define LED_PIN    13
 
bool ledStatus;
GPRS gprs;
 
void setup() {
  Serial.begin(9600);
  while(!Serial);
 
  Serial.println("Starting SIM800 Auto Read SMS");
  gprs.preInit();
  delay(1000);
 
  while(0 != gprs.init()) {
      delay(1000);
      Serial.print("init error\r\n");
  } 
 
  //Set SMS mode to ASCII
  if(0 != gprs.sendCmdAndWaitForResp("AT+CMGF=1\r\n", "OK", TIMEOUT)) {
    ERROR("ERROR:CNMI");
    return;
  }
   
  //Start listening to New SMS Message Indications
  if(0 != gprs.sendCmdAndWaitForResp("AT+CNMI=1,2,0,0,0\r\n", "OK", TIMEOUT)) {
    ERROR("ERROR:CNMI");
    return;
  }
 
  Serial.println("Init success");
}
 
//Variable to hold last line of serial output from SIM800
char currentLine[500] = "";
int currentLineIndex = 0;
 
//Boolean to be set to true if message notificaion was found and next
//line of serial output is the actual SMS message content
bool nextLineIsMessage = false;
 
void loop() {
  //Write current status to LED pin
  digitalWrite(LED_PIN, ledStatus);
   
  //If there is serial output from SIM800
  if(gprs.serialSIM800.available()){
    char lastCharRead = gprs.serialSIM800.read();
    //Read each character from serial output until \r or \n is reached (which denotes end of line)
    if(lastCharRead == '\r' || lastCharRead == '\n'){
        String lastLine = String(currentLine);
         
        //If last line read +CMT, New SMS Message Indications was received.
        //Hence, next line is the message content.
        if(lastLine.startsWith("+CMT:")){
           
          Serial.println(lastLine);
          nextLineIsMessage = true;
           
        } else if (lastLine.length() > 0) {
           
          if(nextLineIsMessage) {
            Serial.println(lastLine);
             
            //Read message content and set status according to SMS content
            if(lastLine.indexOf("LED ON") >= 0){
              ledStatus = 1;
            } else if(lastLine.indexOf("LED OFF") >= 0) {
              ledStatus = 0;
            }
             
            nextLineIsMessage = false;
          }
           
        }
         
        //Clear char array for next line of read
        for( int i = 0; i < sizeof(currentLine);  ++i ) {
         currentLine[i] = (char)0;
        }
        currentLineIndex = 0;
    } else {
      currentLine[currentLineIndex++] = lastCharRead;
    }
  }
}

 Screenshoot pada Serial Monitor Arduino dan Pengiriman SMS dr Hp :





Auto Answer Incoming Call From SIM800L with Notify Arduino Serial Monitor


Berikut Contoh Sketch Auto Answer Incoming Call dengan SIM800L menggunakan library Seeeduino


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <gprs.h>
#include <SoftwareSerial.h>

char gprsBuffer[64];
int i = 0;
char *s = NULL;
int inComing = 0;

GPRS gprs;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while(!Serial);
  Serial.println("GPRS - Auto Answer incoming Call...");
  gprs.preInit();//power on SIM800
  delay(1000);
  while(0 !=gprs.init()) { //gprs init
      delay(1000);
      Serial.print("init error\r\n");
    }
    Serial.println("Init success, start to monitor your incoming Call...");
}

void loop() {
  // put your main code here, to run repeatedly:
   if(gprs.serialSIM800.available()) {
        inComing = 1;}
        else{delay(100);}
   
   if(inComing){
        gprs.readBuffer(gprsBuffer,32,DEFAULT_TIMEOUT);
        Serial.println(gprsBuffer);
        Serial.println("Panggilan Masuk");
         //Auto Answer Call Incoming
        if(NULL != strstr(gprsBuffer,"RING")) {
           delay (500); // Delay Angkat Telefon
            gprs.answer();}
            if(NULL != strstr(gprsBuffer,"OK")) {
           Serial.println("Panggilan Diterima");}
            if(NULL != strstr(gprsBuffer,"NO CARRIER")) {
           Serial.println("Panggilan Terputus");}
   
     gprs.cleanBuffer(gprsBuffer,32);
     inComing = 0;    
     }    
}

 Berikut Tampilan Layar Serial Monitor Arduino :


 

Setting Caller ID (nomor panggilan masuk) pada SIM800L menggunakan interaksi Serial Monitor

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <gprs.h>
#include <SoftwareSerial.h>

char gprsBuffer[64];
int i = 0;
char *s = NULL;
int inComing = 0;
char c;
GPRS gprs;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while(!Serial);
  Serial.println("GPRS - Auto Answer incoming Call...");
  gprs.preInit();//power on SIM800
  delay(1000);
  while(0 !=gprs.init()) { //gprs init
      delay(1000);
      Serial.print("init error\r\n");
    }
    Serial.println("Init success, start to monitor your incoming Call...");
    delay (1000);
    Serial.println("Aktifkan Caller ID ?  Y=Ya T=Tidak");

}

void loop() {

  if(Serial.available()) {
  c = Serial.read();
  if (c=='Y'){
  Serial.println("Ya"); 
  gprs.serialSIM800.print("AT+CLIP=1\r");
  Serial.println("Caller ID diperlihatkan!");}
  if (c=='T'){
    Serial.println("Tidak"); 
  gprs.serialSIM800.print("AT+CLIP=0\r");
  Serial.println("Caller ID disembunyikan!");}           
}  
  // put your main code here, to run repeatedly:
   if(gprs.serialSIM800.available()) {
        inComing = 1;}
        else{delay(100);}
   
   if(inComing){
        gprs.readBuffer(gprsBuffer,32,DEFAULT_TIMEOUT);
        Serial.println(gprsBuffer);
        Serial.println("Panggilan Masuk");
         //Auto Answer Call Incoming
        if(NULL != strstr(gprsBuffer,"RING")) {
           delay (500); // Delay Angkat Telefon
            gprs.answer();}
            if(NULL != strstr(gprsBuffer,"OK")) {
           Serial.println("Panggilan Diterima");}
            if(NULL != strstr(gprsBuffer,"NO CARRIER")) {
           Serial.println("Panggilan Terputus");}
   
     gprs.cleanBuffer(gprsBuffer,32);
     inComing = 0;    
     }    
}


 Ketik Huruf "Y" pada Serial Monitor Untuk Mengaktifkan Fitur Caller ID 
 Setelah Fitur Caller ID Aktif maka Nomor Pemanggil akan ditampilkan setiap ada panggilan masuk







Jika Ingin Menyembunyikan Caller ID maka ketik Huruf "T" pada serial Monitor dan Fitur Caller ID akan dinonaktifkan (default) dan Caller ID telefon masuk tidak akan ditampilkan




Demikian Sesi Pertama Review SIM800L kita akhiri disini dan Lanjut Sesi Kedua pada Postingan berikutnya..

 Terimakasih buat yang sudah Nyimak..

SIM800L GSM/GPRS Module to Arduino

Read More

Senin, 30 Mei 2016




TEA5767 adalah module Stereo FM Receiver
Yang dapat kita gunakan bersama Arduino.
Komunikasi dengan Arduino menggunakan i2C
interface dengan i2C address (0x60).

Module TEA5757 sudah dilengkapi BreakoutBoard dengan 2 port audio 3.5mm.1port untuk audio out dan 1 lainya untuk Antena yang sudah disertakan dalam paket penjualanya.

 Berikut adalah Spesifikasi Lengkap dari Module FM Stereo TEA5767 :
  • power supply: 5V
  • Frequency range: 76-108MHZ
  • PCB size: 31*30mm
  • With reverse polarity protection diode
  • With power output filtering sensor
  • Directly plug antenna interface
  • I2C bus communication
  • Multi capacitor combined filter
  • Blue LED power indicator
  • FM chip module TEA5767
  • Onboard 3.5mm audio interface
  • If connects with singlechip, only connect the Power Ground and two I2C communication cable
Features:
  • LC harmonic oscillator use low cost fixed chip
  • No need to adjust Intermediate frequency
  • High sensitivity(low noise RF input amplifier)
  • High power auto gain control AGC circuit
  • Soft mute

Module ini dilengkapi dengan 4 Pin Header yaitu VCC,GND,SDA & SCL
Penyambunganya dengan Arduino adalah Sbb :
TEA5767 <--> Arduino Uno/Mega
VCC <--> 5V
GND <--> GND
SDA <--> A4 uno / D20 Mega
SCL <--> A5 uno / D21 Mega

Frekeunsi Gelombang Radio pada module TEA5767 dapat di set melalui program pada arduino
dengan format


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include <TEA5767.h> //library FM Module
#include <Wire.h> //library i2C Connection

TEA5767 Radio;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
Radio.init();
Radio.set_frequency(93.6); 
Serial.print("Radio Frequency set at 93.6Mhz")
}

void loop() {
  // put your main code here, to run repeatedly:

}

Berikut adalah Contoh Project Digital Radio FM menggunakan Module TEA5767 dengan tombol Up dan Down untuk mencari Sinyal Radio secara Otomatis dan menampilkan beberapa info pada layar LCD.



Berikut Wiring Projectnya :
 Berikut Coding Sketch Arduino nya :


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
#include <TEA5767.h>
#include <Wire.h>
#include <Button.h>
#include <LiquidCrystal_I2C.h>   

LiquidCrystal_I2C lcd(0x27, 20, 4);
#define PULLUP true
#define INVERT true 
#define DEBOUNCE_MS 20
#define Next_Button 11
#define Prev_Button 12

TEA5767 Radio;
double old_frequency;
double frequency;
int search_mode = 0;
int search_direction;
unsigned long last_pressed;
int ch = 0;

Button btn_forward(Next_Button, PULLUP, INVERT, DEBOUNCE_MS);
Button btn_backward(Prev_Button, PULLUP, INVERT, DEBOUNCE_MS);

void setup() {  
  Wire.begin();
  Radio.init();
  Radio.set_frequency(93.6); 
 pinMode (13, OUTPUT);
 digitalWrite (13, HIGH); //get VCC from pin 13 to button led
  lcd.begin();
  lcd.clear();
}


void loop() {
btn_forward.read();
btn_backward.read();

  unsigned char buf[5];
  int stereo;
  int signal_level;
  double current_freq;
  unsigned long current_millis = millis();
  
    if (Radio.read_status(buf) == 1) {
    current_freq =  floor (Radio.frequency_available (buf) / 100000 + .5) / 10;
    stereo = Radio.stereo(buf);
    signal_level = Radio.signal_level(buf);
    //deskripsikan frekuensi dan nama Channel radio di daerahmu
    lcd.setCursor(0,1); 
    if (current_freq == 87.60){
    lcd.print("Hard Rock ");ch=1;}
    if (current_freq == 88.00){
    lcd.print("Mustang   ");ch=1;}
    if (current_freq == 88.30){
    lcd.print("M2 Radio  ");ch=1;}
    if (current_freq == 88.80){
    lcd.print("RRI JKT 3 ");ch=1;}
    if (current_freq == 89.60){
    lcd.print("i-Radio   ");ch=1;}
    if (current_freq == 90.00){
    lcd.print("Elshinta  ");ch=1;}
    if (current_freq == 92.40){
    lcd.print("Pass FM   ");}
    if (current_freq == 93.60){
    lcd.print("Gaya FM   ");ch=1;}
    if (current_freq == 98.70){
    lcd.print("GEN FM    ");}
    if (current_freq == 101.0){
    lcd.print("Jack FM   ");ch=1;}
    if (current_freq == 102.2){
    lcd.print("Prambors  ");ch=1;}
    if (current_freq == 100.3){
    lcd.print("El Gangga ");ch=1;}
    if (current_freq == 104.6){
    lcd.print("Trijaya   ");ch=1;}
    if (ch==0){lcd.print("Unregistered");}

    lcd.setCursor(0,0);
    lcd.print("FM:"); lcd.print(current_freq);
    lcd.setCursor(0,2);
    if (stereo) lcd.print("STEREO "); else lcd.print("MONO   ");
    lcd.setCursor(0,3);
    lcd.print("Signal: ");lcd.print(signal_level);
  }
  
  if (search_mode == 1) {
      if (Radio.process_search (buf, search_direction) == 1) {
          search_mode = 0;
      }
  }
  
  if (btn_forward.isPressed()) {
    last_pressed = current_millis;
    search_mode = 1;
    search_direction = TEA5767_SEARCH_DIR_UP;
    Radio.search_up(buf);
    delay(300);
  }
  
  if (btn_backward.isPressed()) {
    last_pressed = current_millis;
    search_mode = 1;
    search_direction = TEA5767_SEARCH_DIR_DOWN;
    Radio.search_down(buf);
    delay(300);
  } 
  //delay(20); 
  delay(50);
}

Berikut data pendukung untuk Library nya :

Library TEA5767 FM Module :
https://drive.google.com/open?id=0B7t_g4hdtuILX1loNWVUblo5dFE

Library Button Module (Low Active/Internal Pullup type):
https://drive.google.com/open?id=0B7t_g4hdtuILdlR1dk53aUlhcm8

Library i2C LCD :
https://drive.google.com/open?id=0B7t_g4hdtuILeEc3Uk9ZUkVKYmM

Button Menggunakan Jenis Push Button / Tactile Switch dengan Low Aktif
(aktif jika dihubungkan ke GND) dan menggunakan internal PULLUP di arduino sehingga tidak butuh resistor pullup ke VCC.

Demikian Tutorial Singkat ini dibuat oleh Dani Ardianto
Semoga bisa bermanfaat untuk semuanya..
Info lebih lanjut bisa Hubungi saya melalui FB : https://www.facebook.com/dani.ardianto.98
info Produk FM Module TEA5767 : https://www.tokopedia.com/rajacell/tea5767-fm-stereo-module-for-arduino-76-108mhz-with-i2c-connection

Silahkan Tinggalkan pesan dan Kesan pada kolom Comment Blog ini...

Membuat Radio FM Stereo Reciever dengan Arduino dan TEA5767 FM Module

Read More


Membuat Custom Char pada LCD 1602 atau 2004 dengan koneksi i2C ke Arduino berbeda dengan membuat custom Char pada koneksi langsung

berikut contoh sketch nya :

1
2
3
uint8_t pound[8] = {0x7,0x8,0x8,0x1e,0x8,0x8,0x1f}; // Custom char pounds
uint8_t euro[8] = {0x3,0x4,0x8,0x1f,0x8,0x1f,0x4,0x3}; // Custom char euro
uint8_t degree[8] = {0x8,0xf4,0x8,0x43,0x4,0x4,0x43,0x0}; // Custom char degres c

Penulisan lengkap pada sketch Arduino adalah sebagai berikut :



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <Wire.h> // Library i2C Connection
#include <LiquidCrystal_I2C.h>  //Library LCD Display

//LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for 16x02 LCD
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for 16x02 LCD

uint8_t testChar[8] = {0x8,0xf4,0x8,0x43,0x4,0x4,0x43,0x0}; // Custom char
uint8_t testChar2[8] = {0x1f,0xf0,0x17,0x15,0x15,0x15,0x11,0x1f}; // Custom char2

void setup() {
 lcd.begin(); // Start up the lcd
 lcd.clear(); 
 lcd.createChar(0, testChar); // Sends the custom char to lcd
 lcd.createChar(1, testChar2); // Sends the custom char to lcd
 }

void loop() {

 lcd.setCursor(0,0); // Set lcd cursor to the start of the first row
 lcd.print((char)0); // Custom char
 lcd.setCursor(0,1); // Set lcd cursor to the start of the first row
 lcd.print((char)1); // Custom char

 }  


Untuk mempermudah penilisan hexcode untuk custom char i2c lcd bisa diwnload aplikasi berikut :
https://drive.google.com/open?id=0B7t_g4hdtuILSnZORG0tX0VOTXc

Untuk library i2C terbaru silahkan gunakan yang ini (ganti library lama yang ada di folder arduino library jika sudah ada) :
https://drive.google.com/open?id=0B7t_g4hdtuILeEc3Uk9ZUkVKYmM

Semoga Artikel ini bermanfaat.
Jika ada kesulitan/pertanyaan silahkan hubungi saya melalui Facebook di
https://www.facebook.com/dani.ardianto.98

Membuat Custom Char pada LCD 1602 dan 2004 I2C Connection

Read More

Minggu, 29 Mei 2016

Neoway M590 / M590E adalah Module GSM /GPRS Module dengan Spectrum 900 - 1800M yang cocok dengan Jaringan Operator GSM di Indonesia.

Neoway M590 / M590E Module buatan China sudah dilengkapi dengan Breakout Board dan Slot SIM Card serta kelengkapan pendukung lain Antena,Pin Header dan LED Indikator.

Yang Menarik dari Module ini  adalah harganya yang sangat MURAH, tidak sampai 50rb rupiah.





product features:

Dual-band:900/ 1800 MHz
Good network compatibility:Certified by the global GPRS R4 agreement
Operation temperature :-40~+80℃, more safety outdoors
High reliability:Special EMI/EMC design, still as steady as a mountain with
                        bad electromagnetic environment
Support various protocols:
    TCP/ UDP/ FTP/ DNS
    TCP protocol stack support client mode、server mode、mix mode
    Multi-channe link


product certificate:CMIIT、CE、CCC

Chip Spesification :


Dimensions27.6 * 21.2 * 2.6mm
Sensitivity -107dBm
Instantaneous current Max 2.0A
Operation current < 210mA
Standby current < 2.5mA
Operating temperature -40~+80℃
Operation voltage 3.3~4.5V, 3.9V recommended
Packaging 21-pin LCC package



Neoway M590 / M590E menggunakan komunikasi UART/Serial dengan Default Boudrate 9600
Neoway M590E Breakout Board memiliki 7 pinOut sebagai Berikut

1.BOOT  :  To Activated GSM/GPRS Modem (Active Low)
2.GND    : Ground / 0V
3.5V       : Supply 5VDC
4.RXD    : Rx TTL module Neoway
5.TXD     : Tx TTL module Neoway
6.RING   : Ring Out Terminal for Call notification/Speaker
7.GND    : Ground / 0V

Komunikasi Serial Module Neoway M590E dengan Arduino Uno/Nano/Leonardo/Mega

M590  <-->  Arduino
BOOT <--> GND
GND <--> GND
5V <--> 5V
RXD <--> Tx Serial
TXD <--> Rx Serial

Berikut adalah Coding Arduino IDE yang saya buat untuk Tes Komunikasi Module Neoway M590E dengan Arduino Uno

#include <SoftwareSerial.h>
SoftwareSerial Neoway(2, 3); // RX | TX
// Connect the Neoway M590 TX to Arduino pin 2 RX. 
// Connect the Neoway M590 Arduino pin 3 TX through a voltage divider.
 
char c = ' ';
void setup() 
{
    // start th serial communication with the host computer
    Serial.begin(9600);
    Serial.println("Arduino with Neoway M590 is ready");
 
    // start communication with the HC-05 using 38400
    Neoway.begin(9600);  
    Serial.println("Neoway M590 started at 9600");
}
 
void loop()
{
 
     // Keep reading from HC-05 and send to Arduino Serial Monitor
    if (Neoway.available())
    {  
        c = Neoway.read();
        Serial.write(c);
    }
 
    // Keep reading from Arduino Serial Monitor and send to HC-05
    if (Serial.available())
    {
        c =  Serial.read();
 
        // mirror the commands back to the serial monitor
        // makes it easy to follow the commands
        Serial.write(c);   
        Neoway.write(c);  
    }
 
}
Upload Sketch Program di atas ke dalam Arduino UNO kemudian Hubungkan Arduino Uno dengan Module Neoway dengan wiring sebagai berikut :
M590  <-->  Arduino
--------------------------------
BOOT <--> GND
GND <--> GND
5V <--> 5V
RXD <--> D3
TXD <--> D2

Pastikan Lampu LED indicator Neoway M590 berkedip tanda Modem GSM/GPRS sudah ON
Buka Serial Monitor pada Arduino IDE,setting Boudrate pada 9600 - Both NL & CR
Keting AT-Command berikut untuk Melakukan Komunikasi dengan Module Neoway

AT = Cek KOmunikasi
Respon : OK

Tambahkan AT Command Berikut Setelah AT untuk Fungsi Lain

A.General AT-Command
Get IMEI Number:+CGSN
Get IMSI Number:+CIMI
Get SIM card Identification:+CCID
Get Version:+ getvers
Repeat the previous command:A/ --> ATA/
Get the Module’s model:+CGMM
Get the module’s Information:I --> ATI
Echo:E --> ATE
Display the current configuration:&V --> AT&V
Save current configuration:&W --AT&W
Check the module’s status:+CPAS
Check network registration status:+CREG
Power off:+CPWROFF
Set module function:+CFUN
Low-power set:+enpwrsave
Clock:+CCLK
Set the module’s baud rate:+IPR
Input PIN code:+CPIN
PIN enable and check function:+CLCK







Connect Arduino to Neoway M590E GSM/GPRS Module

Read More

Copyright © 2014 Belajar Arduino | Designed With By Blogger Templates | Distributed By Gooyaabi Templates
Scroll To Top