check in
Completed

Handheld laser measuring instrument

PROHandheld laser measuring instrument

tag

100
0
0
0
Mode:Full

License

Public Domain

Creation time:2025-02-20 06:44:19Update time:2025-02-21 01:34:34

Description

1. Project introduction

This project uses domestic chips, GigaDevice's GD32F303CBT6 as the main control chip, uses TYPEC interface for power supply, and adds lithium battery charging and discharging circuit and power switching circuit to ensure portability of use, using VL53L0x laser measurement sensor, which can achieve accurate measurement within 2 meters, trigger measurement by pressing buttons, OLED screen display measurement data, and buzzer to remind.

2. Onboard resources

  • Main control chip: GD32F303CBT6;
  • Power interface: TYPE-C 6Pin;
  • Display interface: 4-wire OLED display interface, battery charging indication LED, power indicator;
  • Boot mode: BOOT mode configuration, resistance welding;
  • Debugging interface: SWD programming mode, 4Pin in-line pin header;
  • Debugging interface: SWD programming mode, 4Pin in-line pin header;

3. Advantages and characteristics

  • The board has a slender appearance and is easy to hold with one hand, and the size is 40mm*99mm (1574.803mil*3897.638mil);
  • The overall layout is not compact, which is convenient for welding;
  • The chip and each sensor are cheap, rich in functions and cost-effective;
  • Use high-quality PCB and genuine components to ensure product quality;

4. Circuit analysis

Fig.4-1 Schematic diagram of a handheld distance measuring instrument

1. Power supply circuit

The power supply circuit is mainly composed of TYPE-C power supply circuit, power switching circuit and LDO-5V to 3.3V circuit, using 6PinTYPEC interface, which is simple and convenient and easy to solder.

nOTu4AmxdFpGOVac2ESjgFWoL6rs3FRB92pDn4Ef.png

Figure 4-2 TYPE-C power supply circuit

LDO-5V to 3.3V step-down circuit, the power supply from TYPEC or battery, the output is 3.3V through LDO step-down, which supplies power to the main control chip, and the capacitor is the filter, so that the output voltage signal is more stable.

cL5AzUenBzSasrjemfRFyR2cve6A6NehAK5Q9vqM.png

Fig.4-3 LDO-5V to 3.3V circuit

The power switching circuit is composed of AO34001Amos transistor and 1N5819 Schottky diode to realize the fast switching between the TYPEC interface and the lithium battery.

ihTCjQEidigz5ZR8JkGvSIRGnzHVWutlmYiZle9a.png

Fig. 4-4 Automatic power switching circuit

2. Main control circuit

GD32F303CBT6 adopts Cotrx-M4 core, has 120M main frequency, 128KFlash, 32KRAM, the capacitance here is the filtering effect, when drawing the PCB, try to be placed as close to the pins of the chip as possible, and at the same time control the BOOT0 pin through the resistor to control the boot mode, note that the BOOT pin can not float, the chip low level enters the reset, SW2 is the reset button, when the key is pressed, the reset pin is pulled down to enter the reset.

gjymam5td9JKLe7YAvf4220NRBKFhLrjZzDbS3Gs.png

Fig.4-5 GD32F303CBT6 main control circuit

3. Crystal oscillator circuit

The function of the crystal oscillator is to provide a clock signal to the main control chip, the role of the crystal oscillator side capacitor is to ensure that the output oscillation frequency is more stable, and the 8Mhz crystal oscillator circuit provides a clock signal for the single-chip microcomputer.

B1nDjslSxuejBDIt8wB6Ic8i47LDAsxvj4ipIZS9.png

Fig.4-6 Crystal oscillator circuit

4. Sensor circuit

The four-wire OLED screen is used to display the measurement data, and the module itself has a pull-up resistor, and the IIC interface can be connected without external connection.

SP68Ma44JLo9cEU0GBnl8OycGTPgSc7pnrmP8QwI.png

Fig. 4-7 Four-wire OLED screen circuit

The VL53L0x laser sensor module is used for laser ranging, the module is IIC communication, and has two control pins, and the module is compatible with 3.3V and 5V levels.

ehFUoY5OVDURUGpaPt1TagrPTMgTQPPNdTObo8Uo.png

Fig.4-8 Laser measurement circuit

The passive buzzer is used for measurement prompts, the NPN type transistor is used to drive the buzzer, R6 is the base limit current resistance, and R7 is used for fast shutdown and prevents the buzzer from abnormal sound caused by level confusion when powering on.

jy5z8c6IHwMn3qfyAbh0dNlR4QC3YhWOwRZkOoDK.png

Fig. 4-9 Passive buzzer circuit

5. Lithium battery charging circuit

The TP4056X single-cell lithium battery charge and discharge chip is used to charge the lithium battery, LED2 is the charging indicator, LED3 is the charging completion indicator, and the charging current is modified by modifying the resistance value of R3.

bGQ6TXgdzZq3pr0aeSXK3MUMazKNPFiQaZQ9MvI0.png

Fig.4-10 Lithium battery charging circuit

The single-chip ADC supports a maximum of 3.3V sampling, and converts the battery voltage into the normal range through the resistor divider, so as to judge the remaining battery power.

lD5BkS2PcUdkbLmSBHmgGjDZUqa8CUP7jfAQ63US.png

Fig. 4-11 Battery voltage measurement circuit

6. Basic peripheral circuits

The output function of the IO of the microcontroller is tested by the LED light, and it can also be used as a status indicator.

iEVNIeU5TaaomyHYx8PLf48bP5j9eJkuqthfWybX.png

Fig.4-12 LED lamp circuit

The input function of the microcontroller IO can be tested by pressing the button, and it can also be used as the input of the startup measurement status.

rWdt9BatHh9G1TRKZIYY7Hn3WZZTI3mcyLRyHjXq.png

Fig.4-13 Button circuit

6. Download the circuit

Using SWD download, through the 2.54*4P female arrangement, the download pin is led out, which is convenient to connect to the external downloader.

R6OVYflsJr1v4WEamKGyoYuFTSKgO84PXjwvuypU.png

Fig.4-14 SWD download circuit

5. PCB layout suggestions

Qb4tg9ZkMaLs6QTyI7QmfnhrgDw6GlcS1UuAujEp.png

Fig. 5-1 PCB layout reference

  • The power cable is set to 30mil, and the signal line is set to 10mil;
  • The device is placed on the top layer as much as possible, and the battery interface is placed on the bottom layer.
  • The top-layer wiring is the mainstay, and the unreachable line can be placed via to switch to the bottom layer for connection;
  • In the process of wiring, priority is given to straight lines, and the places that need to be turned are mainly obtuse angles or arcs of 135°, horizontal and vertical, so as to maintain the beautiful design;
  • The crystal oscillator wiring should be as short as possible, and the bottom should not be traced to reduce noise interference;
  • In the process of wiring, the GND fan hole should be appropriately placed to occupy the space to avoid the incomplete GND after copper pouring;

6. PCB layout suggestions
s3q9sqRRAu2WDUsQTrIuRWGFYHVxFC0xOlE65P3A.png

Fig. 6-1 Schematic diagram  of copper pouring on the top layer

QTW3sRoWO7sfO4kQQsr5gWqtJYMuAOmgoO4nhoMp.png

Fig.6-2 Schematic diagram of copper pouring on the bottom layer

  • Marking the board information (hand-held distance meter)
  • Add silkscreen marking buttons, external pins and debugging interface functions;
  • After the drawing adjustment is completed, the teardrop effect is added to the PCB to make the board more beautiful and stable;
  • Add JLCJLCJLCJLC under the component to specify the custom editing position, and the board is beautiful;

7. Device welding

FGDf0DQJwZRmT1CJVXr1ARMueZ76Tjr6MN4BzYvx.png

Fig.7-1 Schematic diagram of welding aids

Order of reference

  • First weld the TYPEC interface to ensure there is no short circuit in the power supply.
  • Then weld the chip, making sure the pins are properly soldered, with no tinning or soldering.
  • Then weld resistors, capacitors, diodes, chips, and crystal oscillators.
  • Finally weld the switch and plug-in bar.

Precautions

  • When welding, you can select the welding auxiliary tool in the EDA toolbar of JLC, which is convenient for real-time interaction;
  • After soldering, use alcohol or washing water to clean the feeling, and carefully check whether there is a problem with the chip and interface;

8. Physical demonstration

Jf6dUkLr0pRwDPwCI11t74Uk2q2Cjg5T4XGUL5vP.jpeg

Fig.8-1 PCB and enclosure diagram

PuPm31Xvpzw5lnZgMgGOf2ouYM0n4LecqecM4WL2.jpeg

Fig. 8-2 Renderings

Designed by 立创EDA课程案例推荐 (from OSHWHub)

Link:https://oshwhub.com/course-examples/shou-chi-shi-ji-guang-ce-liang-yi

Design Drawing

Download File
The preview image was not generated, please save it again in the editor.

Attachments

OrderFile nameDownload times
1
Handheld Laser Distance Meter Program .zip
395
Add to Album
0
0
Share
Report

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation