8-input and 8-output single-chip effect tube control board

Publisher:SparklingMoonLatest update time:2020-02-27 Source: 51heiKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Contents of the VB.NET host computer source code package for the single-chip programmable field effect tube control board:
 

Data directory

1 Introduction to the functions of the 8-input and 8-output effect tube industrial control development board

1.1 Introduction to the 8-input and 8-output FET industrial control development board

1.2 Hardware connection labeling instructions

1.3 Introduction to STC12C5A60S2 Series 1T MCU

1.4 Introduction to N-channel Irf1205 field effect transistor

2 Development Board Programming Tutorial

2.1 Introduction to Keil uVision4

2.2 Build a simple project using Keil software

2.3 Download program method

3 Development Board Application Examples

3.1 Example of controlling a certain delay on and off

3.2 Random Output Control Use Case

3.5. Example of eight-way output water lamp

3.4 One-to-one input and output jog control program

3.5 One-to-one input and output self-locking control example

3.6 One-to-one input and output interlocking control example

3.7 Host computer serial port control test

3.8 Host computer 485 interface control test

3.9 Host computer 232 or 485 interface control test

3.10 Encrypted settings for power-on times memory

3.11 Power-off memory test procedure

3.12 PWM Control of DC Motor

Appendix: Schematic

1.4 Introduction to N-channel Irf1205 field effect transistor

IRFR1205 N-channel Chinese data description: MOSFET N-CH 55V 44A DPAK

FET Type

MOSFET N-Channel, Metal Oxide

FET Features

Standard

On-state Rds (max) @ Id, Vgs @ 25° C

27 milliohms @ 26A, 10V

Drain to Source Voltage (Vdss)

55V

Vgs(th) at Id (max)

4V @ 250µA

Gate Charge (Qg) @ Vgs

65nC @ 10V

Current - Continuous Drain (Id) @ 25° C

44A

Input capacitance at Vds (Ciss)

1300pF @ 25V

Power - Maximum

107W

Installation Type

Surface Mount


1 Introduction to the functions of the 8-input and 8-output effect tube industrial control development board 1.1 Introduction to the 8-input and 8-output effect tube industrial control development board

  • Size: 115mmX77mmX25MM

  • Power supply: board power supply DC 6 to 40V

  • Eight-way digital input optocoupler (PC817) isolation

  • Octal FET output with optocoupler (PC817) isolation

  • Expansion port eight io

  • Input and output indication

  • Crystal oscillator 11.0592Mhz

  • Field effect tube (IRF1205) output can control 55V44A load

Function: Eight inputs can be connected to eight NPN sensors, or limit switches, start and stop switches of control equipment, etc., and can realize programming of any control equipment (imitating Siemens s7-200 switch tube type), and can control DC 12V to 55V, 107w load


1.2 Hardware connection labeling instructions


  • Full page annotation:

  • 485 Connection


Note: RS485 is recommended to be connected by twisted pair cables, shielded twisted pair cables, and the shielding layer should be grounded. When multiple modules are hung on the bus, a hand-in-hand connection method should be used.

  • Connection method for collecting external dry contact switch signal




The source program of the microcontroller is as follows:

  1. /********************************************************************

  2.                             Huicheng Technology

  3. Function: 1 to 1 input and output self-locking control program

  4. Chip used: AT89S52 or STC89C52

  5. Crystal: 11.0592MHZ

  6. Compilation environment: Keil

  7. Author: zhangxinchunleo

  8. [Statement] This program is for learning and reference only. Please indicate the copyright and author information when quoting!     

  9. *************************************************************************/

  10. /********************************************************************

  11. Program Description:

  12. When the IN0 port is connected to the GND port, the corresponding relay K8 is energized (i.e., COM7 is connected to CK and CB is disconnected);

  13. When the IN1 port is connected to the GND port, the corresponding relay K7 is energized (i.e., COM6 is connected to CK and CB is disconnected);

  14. When the IN2 port is connected to the GND port, the corresponding relay K6 is energized (i.e., COM5 is connected to CK and CB is disconnected);

  15. When the IN3 port is connected to the GND port, the corresponding relay K5 is energized (i.e., COM4 is connected to CK and CB is disconnected);

  16. When the IN4 port is connected to the GND port, the corresponding relay K4 is energized (i.e., COM3 is connected to CK and CB is disconnected);

  17. When the IN5 port is connected to the GND port, the corresponding relay K3 is energized (i.e., COM2 is connected to CK and CB is disconnected);

  18. When the IN6 port is connected to the GND port, the corresponding relay K2 is energized (i.e., COM1 is connected to CK and CB is disconnected);

  19. When the IN7 port is connected to the GND port, the corresponding relay K1 is energized (i.e., COM0 is connected to CK and CB is disconnected);


  20. *************************************************************************/

  21. #include //library file

  22. #define uchar unsigned char //macro definition of unsigned character type

  23. #define uint unsigned int //macro definition of unsigned integer

  24. /********************************************************************

  25.                             Initial Definition

  26. *************************************************************************/


  27. /*Define eight-bit input as MCU P1 port*/

  28. sbit IN0=P0^0;

  29. sbit IN1=P0^1;

  30. sbit IN2=P0^2;

  31. sbit IN3=P0^3;

  32. sbit IN4=P0^4;

  33. sbit IN5=P0^5;

  34. sbit IN6=P0^6;

  35. sbit IN7=P0^7;


  36. /*Define eight-bit output as MCU P2 port*/

  37. sbit K1=P2^6;

  38. sbit K2=P2^7;

  39. sbit K3=P5^1;

  40. sbit K4=P5^0;

  41. sbit K5=P4^6;

  42. sbit K6=P4^1;

  43. sbit K7=P4^5;

  44. sbit K8=P4^4;



  45. /********************************************************************

  46.                             Delay function

  47. *************************************************************************/

  48. void delay(uchar t)

  49. {

  50.   uchar i,j;

  51.    for(i=0;i

  52.    {

  53.             for(j=13;j>0;j--);

  54.          { ;

  55.          }

  56.    }

  57. }



  58. /********************************************************************

  59.                             Main function

  60. *************************************************************************/

  61. void main()

  62. {

  63.    P4SW|=0x70; //Configure P4.5 as IO port

  64. while(1)

  65. {

  66. if(IN0==0){delay(100);while(!IN0);K8=0;} //Relay K8 is closed

  67. if(IN1==0){delay(100);while(!IN1);K7=0;} //Relay K7 is closed

  68. if(IN2==0){delay(100);while(!IN2);K6=0;} //Relay K6 is closed

  69. if(IN3==0){delay(100);while(!IN3);K5=0;} //Relay K5 is closed

  70. if(IN4==0){delay(100);while(!IN4);K4=0;} //Relay K4 is closed

  71. if(IN5==0){delay(100);while(!IN5);K3=0;} //Relay K3 is closed

  72. if(IN6==0){delay(100);while(!IN6);K2=0;} //Relay K2 is closed

  73. if(IN7==0){delay(100);while(!IN7);K1=0;} //Relay K1 is closed

  74. }

  75. }

  76. /********************************************************************

  77.                               Finish

  78. *************************************************************************/


Keywords:MCU Reference address:8-input and 8-output single-chip effect tube control board

Previous article:51 MCU fan driver source program
Next article:STC MCU source program for servo pwm control (both single and multiple speed control)

Recommended ReadingLatest update time:2024-11-23 10:54

Why can't the microcontroller directly drive the relay and solenoid valve?
Note: This article is for beginners of single-chip microcomputers. Why write an article? Although this question is not worth mentioning for electronics experts, there are too many people who ask this question for beginners of single-chip microcomputers. In the past, I always explained it to you one by one, and th
[Microcontroller]
51 MCU controls TC35 to send text messages——MADE BY lyq
Main function #include reg52.h #include "1602.h" #include "uart.c" #include "tc35.c" //#define RsBuf_N    50 //char RsBuf ; //define serial port receive data buffer //uchar RsPoint=0; uchar code PhoneNO = "+8615900000000";//changed uchar code Text = "I love SDNU"; uchar code center ="+8613800531500"; void
[Microcontroller]
General method to check 8051 microcontroller board problems
Here is a general method to check the problem of 8051 microcontroller board. First, check the power supply. Experienced people will do this. When I was looking for a job, an interviewer asked me this question: If there is a problem with the board, where should I check first? Haha! Power supply! Then check the 3 key
[Microcontroller]
51 MCU-digital tube & LED
1. Light up the conjecture at the same time In the first section of this chapter, we said that if we want to light up the digital tube, then the small LED light we learned in the first chapter will not have a chance to light up. This is indeed the case in terms of hardware. However, we can still make a digital tub
[Microcontroller]
STC MCU One-key Downloader
      This article introduces the principle of STC MCU one-key downloader. When using STC-ISP software to download STC MCU programs, after clicking the direct download button, the MCU needs to be powered on and cold-started. This may not be a problem if the download is not frequent, but for frequent downloads of STC MC
[Microcontroller]
STC MCU One-key Downloader
Experts explain PIC microcontrollers: Getting started with microcontrollers is so simple
It is not difficult to get started with microcontrollers. This is an old article from a few years ago. It is easy to understand and shared with beginners. This little crab with eight legs is our first meal. As long as we eat it, the next big meal will be easy. The 1st and 8th legs are connected to the power supply +
[Microcontroller]
Experts explain PIC microcontrollers: Getting started with microcontrollers is so simple
51 single chip digital dynamic display
#include #include #define uchar unsigned char #define uint unsigned int #define SEG P0 sbit latch1=P2^7; //segment driver latch signal sbit latch2=P2^6; //bit driver latch signal   uchar code DSY_CODE = {       0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f       };   void DelayMS(uint x) {        flying t;        
[Microcontroller]
Design of charger using single chip microcomputer and charging integrated circuit
1 Characteristics of batteries The four most commonly used battery chemistries are lead-acid batteries (PbSO4), lithium-ion batteries (Li+), nickel-cadmium batteries (NiCd), and nickel-metal hydride batteries (NiMH). The development of new battery technologies has been driven by a combination of environmental concern
[Power Management]
Design of charger using single chip microcomputer and charging integrated circuit
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号