0Gx1G34RET

Based on Liangshan School electronic materials storage box

 
Overview

1. Background
================================================= =============================
We are now in an era of electronic information. Some companies, school classrooms, stores, etc. engaged in electronics are It is necessary to reserve some electronic component materials. Due to the wide variety of materials, it is very inconvenient to obtain them.
 
Display:
Lichuang Liangshan School - Physical electronic material storage box
 
PCB:
 
2. Realization of functions
================================= =============================================
(1) Can search Which cabinet should a certain electronic material be placed in and automatically open the cabinet to light up the prompt;
(2) You can add/delete a cabinet, add/clear an electronic material;
(3) You can query the details of all stored electronic materials;
(4) You can query The remaining empty cabinets;
(5) It has the function of saving information when it is powered down;
(6) The interaction method should include screen touch, voice recognition, and mobile phone search;
Parts to be added: Realize misplaced storage box reminders through RFID.
 
3. Control methods
================================================ ==============================
  Originally I wanted to use the wireless method, but the wireless method requires each container to have a wireless The cost of the module plus battery was a bit high for me, so I gave up on the wireless solution.
 
1. The host
installs a 16-channel slave interface on the host, that is, the maximum number of connected containers is 16; the slaves are controlled through 5 lines, namely the positive and negative poles of the 5V power supply, the servo control line, the signal light control line, and the input Box detection switch wire.
16 slave machines are controlled through 595 and 165. The screen uses Taojingchi serial screen (7-inch capacitive touch screen). The voice recognition uses the movement intelligent SU-03T. The mobile phone control is controlled through the WIFI module ESP8266.
 
2. The slave
control method is to eject the container through the servo and light up the light to prompt. Install another travel switch to detect whether the container has returned to its original position. The slave is installed behind the storage box. When the slave receives the signal from the host, it controls the servo to push out of the container and lights up to prompt.
 
 
4. Technical indicators
================================================ ==============================
1. You can search which cabinet a certain electronic material is placed in and light up the prompt;
because every time you add For a material, you need to fill in the material information and save its container number. Just search the 16 container information saved in the flash. If the data is the same as the searched material data, it will pop up and light up.
 
2. You can add/delete a cabinet and add/clear an electronic material;
when on the homepage, determine whether the add material or delete material mode of the touch screen is pressed, and enter the corresponding mode if so.
Add container: In the add material mode, edit the newly added material information on the touch screen interface to complete adding cabinets or materials.
Delete container: In the material deletion mode, select the corresponding material container to delete.
 
3. You can query the details of all stored electronic materials;
every time you add a material, the material data is saved in the flash of the chip, and you only need to call up all the data and display it.
 
4. You can query the remaining empty cabinets;
detect the box entry detection switch line in the slave line in real time. When it is detected that there is no cabinet status (when no container is connected), it means that the corresponding container interface is not connected to the container. Just display the interfaces that are not connected to the container.
 
5. Find the material and automatically open the cabinet;
there are three search methods, namely: mobile phone search, voice search, and touch screen search.
Mobile phone search: Make an Android software that mainly uses socket to communicate with the WIFI module ESP8266. Enter the material information you are looking for on your mobile phone and send it to the host for identification through WIFI. Requires mobile phone connection detection and material information transmission functions.
Voice search: Set some commonly used electronic components as voice commands, speak the value + name of the corresponding electronic component, for example, 1K resistor, and the corresponding container will pop up if the recognition is successful. Because the number of voice commands is limited, this feature has major flaws.
Touch screen search: In the material search mode, all material information will be displayed and classified. You can also search through the Pinyin input method that comes with the touch screen.
 
5. Hardware design
================================================ ==============================
1. The power supply part
uses 3 batteries for power supply and is charged with TC4056. The maximum charging current is 1A. Use two different USB ports to prevent the absence of charging cables.
I originally wanted to use a button to turn on and off by pressing a long button, but later I found out that it was indeed possible, but it was not connected to the development board and I was forced to fly the line. .
 
2. Serial port debugging.
Because the WIFI module and voice recognition communicate through the serial port, I have added USB but do not use the USB debugging function, which is a waste.
So a 340N was added. At the pin header of H6, you can use a jumper cap to short-circuit 340 and WiFi module (U1RXTX), or short-circuit 340 and voice module (B2B3) to realize computer serial port debugging.
3. The boost circuit
boosts the battery voltage to 5V because the battery power is unstable, and then converts this 5V to the required 3.3V.
Because there are many power consumers, there are 7-inch screens, voice recognition speakers, WIFI modules, and 16 servos. So I boosted the voltage from the battery to 5V for them respectively, that is, I added a boost circuit to each part. The actual test found that there was no power shortage problem.
4. Module power gating
The low-power design that originally came to mind was to disconnect unused modules to reduce power consumption; so how to disconnect the power supply? I used a mos tube control. When the signal terminal (CPKCON in the picture) is turned on to the low-level MOS tube, the battery voltage is output to CKPIN, and then CKPIN passes through the boost circuit of the module. The signal terminal (CPKCON in the figure) is cut off when the high-level MOS tube is supplied.
 
(Here are only screenshots of the power gating control of the serial port screen)
6. Software design
==================================== ==========================================
The code is a bit rubbish, if there are some places If it can be saved, please point it out (bow)
1. Battery detection display part
Divide the voltage through two resistors, and then calculate it through the voltage division formula.
Use ADC to collect 100 times and transmit it through DMA, filtering and displaying.

 
2. The WIFI part
mainly implements two functions. One is to obtain network time for calibration; the other is to transmit data to and from the mobile APP.
The downloaded firmware is the MQTT firmware, the 1MB one. (If the WIFI module is AT firmware, then change the command AT+RST and the response will be OK.)
 
There are too many codes. . . . I can’t write anymore. . . Skip it.
5. Realization
=============================================== =============================
1. Screen UI
data link: http://wiki.tjc1688.com/doku.php? id=start
This screen has powerful functions. I directly put the time calculation display function on the screen and run it myself (the screen has its own RTC function); as long as the microcontroller transmits a starting time to the screen at the beginning, the screen can run the clock effect.
The [Seven-inch screen electronic material management cabinet.HMI] in the attachment is the UI interface designed based on this project.
 
 
2. The mobile APP
is designed using Android stdio. The [app-debug.apk] in the attachment is the Android app designed based on this project; the size is 3.73MB.
Permissions involved:
1. Access the network (to determine whether the WIFI connection of the storage box is successful)
2. Obtain the network information status (to determine whether the connection is successful) The WIFI of the storage box is successful)
3. Get the WIFI status (determine whether the connection to the WIFI of the storage box is successful)
4. Get the positioning permission (I want to not add this permission, but if it is not added, it will crash)
5. Memory read and write permission ( Save the container information sent from the storage box. The container information will be automatically deleted after closing the software, so you don’t have to worry about the memory becoming larger and larger.)
Disclaimer: I only know how to design simple Android APPs, sorry about Apple (·crying· )
 
Summary
Thanks to Mr. Wu from Jialichuang, my PCB can be completed in one go under his guidance, and he gave me a lot of ideas!
Thanks to the group friend [Would you like to drink Coke?] for guiding me with my coding ideas and directly allowing me to open up a new world!
Thank you so much! !
Because I was a senior in college and was looking for an internship. As a result, many parts of the work were not purchased in time, which wasted a lot of time. I also tested positive for the virus and had to lie down for several days.
But I will continue to improve the functions in the future, because this is also my final design. . .
 
 
Debugging record:
2022-12-25
The general framework is completed and basic functions are implemented.
The currently unfinished part:
Each container will be able to use
the exit indicator light (LED) and
the entry detection switch (travel switch).
After a certain period of time, the screen will automatically stop
and the power consumption will be as low as possible.
 
2022-12-31  
Add the voice recognition function, which can be found at [ Homepage], [View All Materials Mode] and [Access Material Mode] for voice pop-up;
improve the pop-up function of most containers;
improve the time part, so that the time will not be missing after the interface jumps; add network calibration, improve manual Calibration;
New problem found:
When obtaining the network time on the initialization interface, after clicking the [Cancel] button, although the interface jumps, the program is still stuck in the section of obtaining the network time until the acquisition is successful or times out. Container inspection was adjusted on
 
2023-07-06 .
but! !
Bi She was handed over! The real thing is gone. (Wail in pain)
 
 
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 05:26:51

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号