How to design a product using a microcontroller

Publisher:AngelicHeartLatest update time:2023-04-06 Source: zhihu Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Today's electronic equipment is almost inseparable from microcontrollers. There are microcontrollers that have been studied for so long in college. So how to use a microcontroller to design a product? Let’s discuss it with you today.


1

Develop requirements

First of all, you need to know what kind of product you want to make, what functions does this product contain, and what signals do you want to collect? What devices do you want to control? What communication protocols should be used? What interface does the communication protocol use? Do you want to display the interface? Do you want audible and visual prompts? Do you want low power consumption? Once you understand these requirements, you can make your selection.


For example, if I want to make a microcontroller password lock, the requirements are:

1. There is a 4-digit digital tube display;

2. Control a relay;

3. Control a buzzer;

4. Control five LED lights;

5. Two button input;


2

Chip selection

Determine the selected chip model based on your needs. For example, in the first part of the functional requirements, these five requirements only require the use of the IO port of the microcontroller and do not use on-chip resources, so as long as the IO port is sufficient, it is enough.

1. 4-digit digital tube: In order to facilitate everyone's learning, 74HC595 is used to drive it (click here to drive the 74HC595 digital tube). The chip only needs 3 IO ports to connect to the microcontroller;

2. Control a relay; this place mainly considers the coil voltage. The microcontroller is powered by 5V, so a 5V relay is selected (click here for the method of controlling a relay using a microcontroller), which occupies 1 IO port;

3. Control the buzzer: Use an active buzzer, that is, the electric buzzer will sound as long as it is supplied (click here to drive the buzzer using a microcontroller), occupying 1 IO port;

4. Control 5 LED lights: use current sinking method (click here for what is the current sinking method), occupying 5 IO ports;

5. Two button input: using pull-up resistors (what are pull-up and pull-down resistors click here), pressing low level to achieve, occupying 2 IO ports;

A total of 3+1+1+5+2=12 IO ports are used; for the convenience of beginners, let’s choose STC’s 51 microcontroller to complete this design. The selected model is STC89C51, and the packaging form is DIP40. I believe you all When I was learning microcontrollers in college, the teachers probably used this one to teach them.


3

Hardware principle design

After the chip selection is completed and you have a design idea, let’s quickly draw the circuit diagram. What software do you use to draw circuit diagrams? There are many such EDA tools, such as Protel99se, DXP, Altium Designer, etc. These are all software produced by one company, as well as Cadence, PowerPcb, etc. I use AD09. What is the content of schematic design? The content of the design includes the minimum system of the microcontroller and its expanded functions.

If you are interested, I will show you the process of drawing the schematic diagram tomorrow and the day after tomorrow.


4

Hardware PCB design

When the schematic drawing is completed and there are no errors, start drawing the PCB.


5

Sample welding

What is pattern welding? It is to solder electronic components to the pcb board. If the package is simple and the number of samples is small, then you can do the soldering by yourself. By the way, you can also exercise your soldering skills. For a person who is engaged in electricity, he usually comes from soldering circuit boards. If you do electricity but don't know how to weld, others will laugh at you.


6

Debugger

How to write a program? What tool do you use to write? Different microcontrollers have different programming environments. For example, PIC microcontrollers use the MPLAB programming environment, MSP430 microcontrollers use the IAR Embedded Workbench programming environment, and DSPs use the CCS programming environment. The programming environment highlighted here is Keil. Keil is the most useful of all programming environments currently and also supports the most chips. It can be said that Keil is the most mainstream programming environment at present. I use Keil's programming environment, Keil's C51 version and MDK version are both in use.


7

Program burning

Program burning means downloading the written program to the microcontroller, so that the microcontroller can execute naming and implement functions according to the program written by the user. How can the program be programmed into the microcontroller? Each microcontroller has its own program burning interface

.

After completing the above 7 steps, the electrical part of this product is completed, but this is not the end. Why? Because a product runs through many design links, such as structural design, electrical design, prototype testing, etc. Therefore, in the process of electrical development, you need to cooperate and discuss more with the people who make the structure, and you also need to discuss more with the product manager, and repeatedly modify the requirements, so that you can create a beautiful, practical, and popular product.


Reference address:How to design a product using a microcontroller

Previous article:The bottom-level essence of the microcontroller serial port​
Next article:Selection of microcontroller, a few steps that have to be mentioned

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号