Design of GSM intelligent express cabinet based on 51 single chip microcomputer

Publisher:WhisperingSongLatest update time:2022-01-27 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Hardware Solution

This design is based on the express container simulation design of STC89C52 single-chip microcomputer GSM SMS verification code. The device is mainly composed of single-chip microcomputer, power module, relay circuit, LED light alarm module, control module, GSM module, keyboard module, LCD display module, mechanical switch, etc. With the help of mature GSM mobile network, when the cargo cabinet detects the existence of express delivery, it will automatically send the verification code to the user's mobile phone, truly realizing long-distance and high-efficiency information transmission.


It is mainly designed by 51 single chip microcomputer + LCD1602 liquid crystal + GSM module + button + relay; as shown in the figure:

insert image description here

2. Design function

(1) LCD1602 is used to display the current status of the express cabinet.

(2) There are numeric keys (0-6) for entering the SMS verification code to open the locker.

(3) After the courier deposits the goods into the cabinet, a random verification code can be sent to the designated person through the GSM module.

(4) The verification code becomes invalid after the locker is successfully opened.


3. Design Schematic

The schematic diagram is mainly designed using AD software, as shown in the figure:

insert image description here

4. Software Design

Main program source code


void main (void)

{    

unsigned char i;

Init_Timer0(); //Timer 0 initialization

UART_Init(); 

P1=0xff;           

LCD_Init(); //Initialize LCD

DelayMs(20); //Delay helps to stabilize

LCD_Clear(); 

sprintf(displaytemp,"AutomaticMachine");//Print input interface

LCD_Write_String(0,0,displaytemp);//Display the first line

sprintf(displaytemp,"____ pass word"); //Print input value to prompt the motor to confirm

LCD_Write_String(0,1,displaytemp);//Display the second line


LED = 0;

for(i=0;i<20;i++) // short delay gsm stabilization

{DelayMs(50);}


// SendStr("ready ok!",9);

RELAY=1;

LED=1;


while(1) //main loop

{

KeyScanDeal();

if(KEYFAS==0) //key pressed

{

DelayMs(20); //eliminate jitter

if(KEYFAS==0)

{

while(KEYFAS==0); //Press the key to send the verification code

SendMsg=TRUE; //Send message set

}

}

if(SendMsg==TRUE)

{

LED = 0;

SendMsg=FALSE; //Send message set to cancel

SendStr("AT+CMGF=1rn",11); //Set character

for(i=0;i<20;i++) //delay

{DelayMs(50);}

SendStr("AT+CSCS="GSM"rn",15); //Set gsm format

for(i=0;i<20;i++) //delay

{DelayMs(50);}

SendStr("AT+CMGS="+8618799697649"rn",26);//You can modify the first phone number of the mobile phone receiving the message here

for(i=0;i<2;i++) //delay

{DelayMs(50);}

SendStr("The PW :",8); //You can modify the information here, 9 represents the number of bytes


if(PwCount==0)

{remempw[0]=pw01[0];remempw[1]=pw01[1];remempw[2]=pw01[2];remempw[3]=pw01[3];} //Record the number sent

else if(PwCount==1)

{remempw[0]=pw02[0];remempw[1]=pw02[1];remempw[2]=pw02[2];remempw[3]=pw02[3];} //Record the number sent

else if(PwCount==2)

{remempw[0]=pw03[0];remempw[1]=pw03[1];remempw[2]=pw03[2];remempw[3]=pw03[3];} //Record the number sent

else if(PwCount==3)

{remempw[0]=pw04[0];remempw[1]=pw04[1];remempw[2]=pw04[2];remempw[3]=pw04[3];} //Record the number sent

else if(PwCount==4)

{remempw[0]=pw05[0];remempw[1]=pw05[1];remempw[2]=pw05[2];remempw[3]=pw05[3];} //Record the number sent

else if(PwCount==5)

{remempw[0]=pw06[0];remempw[1]=pw06[1];remempw[2]=pw06[2];remempw[3]=pw06[3];} //Record the number sent

else if(PwCount==6)

{remempw[0]=pw07[0];remempw[1]=pw07[1];remempw[2]=pw07[2];remempw[3]=pw07[3];} //Record the number sent

SendStr(remempw,4);

for(i=0;i<2;i++) //delay

{DelayMs(50);}

SendByte(0x1a);

for(i=0;i<20;i++) //delay

{DelayMs(50);}


// SendStr("AT+CMGS="+8618119677903"rn",26);//You can modify the number of the mobile phone receiving the message here. The second mobile phone number

// for(i=0;i<2;i++) //delay

// {DelayMs(50);}

// SendStr("The PW :",8); //You can modify the information here, 9 represents the number of bytes

// SendStr(remempw,4);

// for(i=0;i<2;i++) //delay

// {DelayMs(50);}

// SendByte(0x1a);

// for(i=0;i<20;i++) //delay

// {DelayMs(50);}


LED=1;

}


}

}


Reference address:Design of GSM intelligent express cabinet based on 51 single chip microcomputer

Previous article:Intelligent Street Lighting Control System Based on 51 Single Chip Microcomputer
Next article:Flower watering control system based on 51 single chip microcomputer wifi internet of things

Recommended posts

2022 Brushless DC Motor Control Technology Seminar (the most rubbish conference I have ever attended)
DomesticsemiconductormanufacturershavenotyetsharedtheirpresentationPPTs.Thedemospresentedarenotveryinnovative. Themostimportantthingisthatlunchisnotincluded.Instead,weweregivenalunchsubsidyv
1399866558 Motor Drive Control(Motor Control)
Pingtouge RVB2601 Review: Connecting to Alibaba Cloud IoT Platform
1.IntroductiontoAT ATstandsforAttention.TheATcommandsetisacommandsentfromaterminaldeviceoradataterminaldevicetoaterminaladapteroradatacircuitterminaldevice. ATisasoftwareprotocol,notaphysicalconnectio
xiyue521 Domestic Chip Exchange
A record of the development experience of a new embedded CPU chip CC2540
OntheSTM32F207chipplatform,UCOS+LWIPwasusedtodevelopembeddedservers.Theworkinvolvedtheunderlyinghardware,RTOS,protocolstack,upper-layerapplicationsandfront-endwebpages.Fromtheproductperspective,asingleprojectwas
Jacktang Wireless Connectivity
Tips Summary: A Guide to Bitwise Operations
Iwon'ttellyouhowefficientthebitwisealgorithmis.Ifyoudon'tbelieveme,youcanuse1billiondatatosimulateit.TodayIwilltellyousomeclassicexamplesofbitwiseoperations.However,themostimportantthingisnottounderstandt
灞波儿奔 DSP and ARM Processors
【Review SGP40】-SGP40 test
1Experimentalconditions Onespoonful(10mL)ofalcohol,4disposablecups(180mL),constanttemperatureandhumiditychamber 2Experimentalprocedures 2.1Preparationofsolutionsofdifferentconcentrations Addasmallspoonfulofal
elike Sensor
How much impact does straightening the routing have on EMC?
Thiscanonlybemeasured,butthisrightangleisdefinitelynotgood.Istheviaconsideredarightangle? IstheboardaboveRogersboard? Thereasonwhyyoucan'tgoatrightanglesisforhigh-frequencysignals.Ifyoucontrolthesigna
btty038 PCB Design
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号