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:
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:
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;
}
}
}
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
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Solving High-Temperature Isolation Design Challenges Using Grade 0 Digital Isolators
- Kalman filter, help
- The ESP32-C3 module of Anxinke failed to run after burning MicroPython 1.1.17
- How to choose MOSFET indicators? System design of ACDC and DCDC? PCB layout and heat dissipation? Have you watched these useful videos?
- C2000 F2810 The program does not run after encrypting the CSM function
- Usage of DSP C54X ioport
- McBSP Serial Interface Technology and Program Design of TMS320VC5410
- Is this the intention of the forum?
- 4G DTU
- 400 V DC-BUS solution for UPS based on TI C2000