How to program relay32s

 

          How to program relay32s

What you need:
1PCS Relay32s
1PCS USB to TTL Module (please install driver in your PCc)
1PCS Power Supply
4P Female to Female Dupont Cable

Connection as below :

Open FLASH_DOWNLOAD_TOOLS_V3.4.4 file

Open ESPFlashDownloadTool_v3.4.4.exe

Setting as below:

Click START

Then it will show downloading….

Once download is finished, it will show

At last you open serial port software to test it, it will show as below

FAQ

Q: It shows error when program
A: 

  1. Please unplug the power supply, then plug it , until the software show downloading…
  2. Please exchange TX and RX and have try it again

website link  http://www.diymalls.com/esp32-wifi-bluetooth-relay-module?search=relay
Any question please email sales@diymalls.com

 

Arduino RC522 RFID Module

What you need:
1PCS Arduino UNO R3
1PCS USB Cable
1PCS RC522 RFID Module
7P Female to Male Dupont Cable

Connection:

 

Code:

/*

* ——————————————————————————————————————–

* Example sketch/program showing how to read data from a PICC to serial.

* ——————————————————————————————————————–

* This is a MFRC522 library example; for further details and other examples see: https://github.com/miguelbalboa/rfid

*

* Example sketch/program showing how to read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID

* Reader on the Arduino SPI interface.

*

* When the Arduino and the MFRC522 module are connected (see the pin layout below), load this sketch into Arduino IDE

* then verify/compile and upload it. To see the output: use Tools, Serial Monitor of the IDE (hit Ctrl+Shft+M). When

* you present a PICC (that is: a RFID Tag or Card) at reading distance of the MFRC522 Reader/PCD, the serial output

* will show the ID/UID, type and any data blocks it can read. Note: you may see “Timeout in communication” messages

* when removing the PICC from reading distance too early.

*

* If your reader supports it, this sketch/program will read all the PICCs presented (that is: multiple tag reading).

* So if you stack two or more PICCs on top of each other and present them to the reader, it will first output all

* details of the first and then the next PICC. Note that this may take some time as all data blocks are dumped, so

* keep the PICCs at reading distance until complete.

*

* @license Released into the public domain.

*

* Typical pin layout used:

* —————————————————————————————–

*             MFRC522      Arduino       Arduino   Arduino    Arduino          Arduino

*             Reader/PCD   Uno/101       Mega      Nano v3    Leonardo/Micro   Pro Micro

* Signal      Pin          Pin           Pin       Pin        Pin              Pin

* —————————————————————————————–

* RST/Reset   RST          9             5         D9         RESET/ICSP-5     RST

* SPI SS      SDA(SS)      10            53        D10        10               10

* SPI MOSI    MOSI         11 / ICSP-4   51        D11        ICSP-4           16

* SPI MISO    MISO         12 / ICSP-1   50        D12        ICSP-1           14

* SPI SCK     SCK          13 / ICSP-3   52        D13        ICSP-3           15

*/

 

#include <SPI.h>

#include <MFRC522.h>

 

#define RST_PIN         9          // Configurable, see typical pin layout above

#define SS_PIN          10         // Configurable, see typical pin layout above

 

MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance

 

void setup() {

Serial.begin(9600);      // Initialize serial communications with the PC

while (!Serial);         // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)

SPI.begin();             // Init SPI bus

mfrc522.PCD_Init();      // Init MFRC522

mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD – MFRC522 Card Reader details

Serial.println(F(“Scan PICC to see UID, SAK, type, and data blocks…”));

}

 

void loop() {

// Look for new cards

if ( ! mfrc522.PICC_IsNewCardPresent()) {

return;

}

 

// Select one of the cards

if ( ! mfrc522.PICC_ReadCardSerial()) {

return;

}

 

// Dump debug info about the card; PICC_HaltA() is automatically called

mfrc522.PICC_DumpToSerial(&(mfrc522.uid));

}

Result:

amazon link   https://www.amazon.com/dp/B07PY38DMP
Any question please email sales@diymalls.com

Arduino MPU-6050 Accelerometer Gyro Sensor

   Arduino MPU-6050 Accelerometer Gyro Sensor

 What you need:
1PCS Arduino UNO R3
1PCS USB Cable
1PCS MPU-6050 Accelerometer Gyro Sensor
5P Female to Male Dupont Cable

Connection:

Code:
// MPU-6050 Short Example Sketch

// By Arduino User JohnChi

// August 17, 2014

// Public Domain

#include<Wire.h>

const int MPU_addr=0x68;  // I2C address of the MPU-6050

int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;

void setup(){

Wire.begin();

Wire.beginTransmission(MPU_addr);

Wire.write(0x6B);  // PWR_MGMT_1 register

Wire.write(0);     // set to zero (wakes up the MPU-6050)

Wire.endTransmission(true);

Serial.begin(9600);

}

void loop(){

Wire.beginTransmission(MPU_addr);

Wire.write(0x3B);  // starting with register 0x3B (ACCEL_XOUT_H)

Wire.endTransmission(false);

Wire.requestFrom(MPU_addr,14,true);  // request a total of 14 registers

AcX=Wire.read()<<8|Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)

AcY=Wire.read()<<8|Wire.read();  // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)

AcZ=Wire.read()<<8|Wire.read();  // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L)

Tmp=Wire.read()<<8|Wire.read();  // 0x41 (TEMP_OUT_H) & 0x42 (TEMP_OUT_L)

GyX=Wire.read()<<8|Wire.read();  // 0x43 (GYRO_XOUT_H) & 0x44 (GYRO_XOUT_L)

GyY=Wire.read()<<8|Wire.read();  // 0x45 (GYRO_YOUT_H) & 0x46 (GYRO_YOUT_L)

GyZ=Wire.read()<<8|Wire.read();  // 0x47 (GYRO_ZOUT_H) & 0x48 (GYRO_ZOUT_L)

Serial.print(“AcX = “); Serial.print(AcX);

Serial.print(” | AcY = “); Serial.print(AcY);

Serial.print(” | AcZ = “); Serial.print(AcZ);

Serial.print(” | Tmp = “); Serial.print(Tmp/340.00+36.53);  //equation for temperature in degrees C from datasheet

Serial.print(” | GyX = “); Serial.print(GyX);

Serial.print(” | GyY = “); Serial.print(GyY);

Serial.print(” | GyZ = “); Serial.println(GyZ);

delay(333);

}

Result:

amazon link    https://www.amazon.com/dp/B07PY38BCB

Any question please email  sales@diymalls.com

Arduino Sound Detection Sensor

What you need:
1PCS Arduino UNO R3
1PCS Sound Detection Sensor
3P Female to Male Dupont Cable

Pin Outs:

Connection:

Code:

//Henry’s Bench

//Arduino Sound Detection Sensor Module

 

int soundDetectedPin = 10; // Use Pin 10 as our Input

int soundDetectedVal = HIGH; // This is where we record our Sound Measurement

boolean bAlarm = false;

 

unsigned long lastSoundDetectTime; // Record the time that we measured a sound

 

 

int soundAlarmTime = 500; // Number of milli seconds to keep the sound alarm high

 

 

void setup ()

{

Serial.begin(9600);

pinMode (soundDetectedPin, INPUT) ; // input from the Sound Detection Module

}

void loop ()

{

soundDetectedVal = digitalRead (soundDetectedPin) ; // read the sound alarm time

 

if (soundDetectedVal == LOW) // If we hear a sound

{

 

lastSoundDetectTime = millis(); // record the time of the sound alarm

// The following is so you don’t scroll on the output screen

if (!bAlarm){

Serial.println(“LOUD, LOUD”);

bAlarm = true;

}

}

else

{

if( (millis()-lastSoundDetectTime) > soundAlarmTime  &&  bAlarm){

Serial.println(“quiet”);

bAlarm = false;

}

}

}

Result:

amazon link  https://www.amazon.com/dp/B07NQHC3PQ
website link  
http://www.diymalls.com/arduino-Sound-Detection-Sensor?search=sound

Any question please email sales@diymalls.com

 

 

How to use SH-HC-08 Bluetooth Module

You need prepare:
SH-HC-08       1pcs
Serial Module  1pcs
APP
SerialPort software

Connection
SH-HC-08 Bluetooth Module                               CP2102 (set to 5V)
RXD                                                                                     TXD
TXD                                                                                      RXD
GND                                                                                      GND
VCC                                                                                      5V

Download APP:
IOS is HM10 bluetooth serial lite, you can search it in APP Store
Android is DSD TECH Bluetooth, you can search it in Google Play

Open APP in your phone, open serial port software in your computer, then you can send and receive message between your phone and computer
For example, you enter message on your phone: hi, then you will see hi in the SerialPort software

DIYmall 2 Channel Relay Module GSM Remote Control Switch SMS Manual

Before using this device, please send a text message for authorization first. Then you can send a message command to control relay.

Authorized number configuration: This system supports up to 3 authorization numbers. Format:*code*# N Authorized number #, after setup successfully, the device will reply, SMS Content is: User(N) Number: number is set ok.
For example, if system code is 123456, and you want to set the first authorized number is 18846919911, you can send the SMS:*123456*#118846919911#
The device will reply, content is: User1 Number: 18846919911 is set ok! The new authorization number is saved in the device; and you want to set the second authorized number is 18846919900, you can send the SMS:*123456*#218846919900#
The device will reply, content is: User2 Number: 18846919900 is set ok!. The new authorization number is saved in the device.

Code configuration: Format: *6 old code number**6 new code number*. After setup successfully, the device will reply, SMS Content is: SYS Code: 6 new code numbers set ok. For example, if system code is 123456, you want to revise the new code is 666666, send the SMS:*123456**666666*
The device will reply, content is: SYS Code: 666666 Set OK. Note that only authorized number can change the code. The new code is saved in the device.

The cell phone SMS control
Relay1 On command: ON1, after successful setup, the device will reply SMS is: REALY1 set on! For example, send the SMS: ON1. Relay status will be saved

Relay1 Off command: OFF1, after successful setup, the device will reply, SMS Content is: REALY1 set off! Send the SMS: CMOF. Relay status will be saved

Relay2 On command: ON2, after successful setup, the device will reply SMS is: REALY2 set on! For example, send the SMS: ON2. Relay status will be saved

Relay2 Off command: OFF2, after successful setup, the device will reply, SMS Content is: REALY2 set off! Send the SMS: OFF2. Relay status will be saved

System status query instruction: STA. For example, sends the SMS: STA. The device will reply the state of two relay

Any question please email sales@diymalls.com

ebay link: https://www.ebay.com/itm/273103300932
aliexpress link: http://aliurl.cn/NG035S
website link:

SIM800L GPRS GSM Module DIYmall

What you need 
SIM800L module X 1
GSM Antenna X  1
CP2102 Module X 1
Several Cables
DC Power Supply
Software SSCOM3.2

NOTE: The input voltage is  3.7-4.2V

Connection:

SIM800L      CP2102         DC Power Supply
TX                   RX
RX                   TX
GND                GND             GND
VCC                         VCC( 3.7-4.2V)


Open software SSCOM3.2, then you can send AT command:

For more AT command, please download from this link 
https://drive.google.com/open?id=1MR7HtLoeCq7svqtESLwl7Z8-Zvt40XwQ

Where to buy?
Product link http://www.diymalls.com/index.php?route=product/product&product_id=71&search=SIM800L

eBay link  https://www.ebay.com/itm/182736378127

aliexpress link  http://aliurl.cn/CUUDOG

Bulk order please contact sales@diymalls.com

sim5320e 3G expansion board AT command make call receive call

Connection:
input voltage: 5-9V, input current: above 1A, earphone: android(please do not use iphone earphone, otherwise you can not hear voice in your phone)

Power the board:
Power the adapter and USB cable, the PWR led will turn on

Start the board:
Press the power swith for about 3 seconds to start the board, you will see the STA led and NET led will turn on too

Install the driver:
You will see the port in the device manage as below

This means you need install the SIM5320 driver, you can right click SimTech SIM5320 to install the driver manually, the drive in the this file

Once the driver installed, it will show:

Open software SSCOM3.2, you can find the software in document:

ATD18576406709;  means make call from board to phone
ATH means hangs off the phone
The process of making call from phone to board: call the board, once the message show: RING in the window, send ATA. If  the call failed, please send these command again:AT+CSQ and AT+COPS?

SIM5320E Document link
https://drive.google.com/open?id=16DHPKuTUaHcJdCFDWWrAZzjcPWMyeAsj

website  www.diymalls.com
email   sales@diymalls.com
aliexpress  link  https://www.aliexpress.com/item/1/32866616402.html?

JSN-SR04T Waterproof Ultrasonic Module Sensor DIYmall

Connection

JSN-SR04T           Arduino
5V                                5V
Trig                               D3
Echo                             D2
GND                              GND

JSN-SR04T arduino code:

#define ECHOPIN 2// Pin to receive echo pulse
#define TRIGPIN 3// Pin to send trigger pulse
void setup(){
  Serial.begin(9600);
  pinMode(ECHOPIN, INPUT);
  pinMode(TRIGPIN, OUTPUT);
  digitalWrite(ECHOPIN, HIGH);
}
void loop(){
  digitalWrite(TRIGPIN, LOW); // Set the trigger pin to low for 2uS
  delayMicroseconds(2);
  digitalWrite(TRIGPIN, HIGH); // Send a 10uS high to trigger ranging
  delayMicroseconds(10);
  digitalWrite(TRIGPIN, LOW); // Send pin low again
  int distance = pulseIn(ECHOPIN, HIGH,26000); // Read in times pulse
  distance= distance/58;
  Serial.print(distance);
  Serial.println("   cm");                    
  delay(50);// Wait 50mS before next ranging
}

Picture:

Product link
https://www.ebay.com/itm/281754858457

Email
sales@diymalls.com

 

 

U-blox 7 vk-172 gps module can not get correct readings

Recently, one customer complained:

I bought a U-blox 7 from you and I’m giving it some tests right now and I’m not getting correct readings from it. I’m an application developer and I had to add a compensation element to both latitude and longitude in order to get “correct” readings from it.

GPS data to google data need conversion

Here is the link about how to do it https://drive.google.com/open?id=1MwNTrqJtst3Dpl9qH8Mt3UJhs87ODdf9