公元 2025 年 04 月 30 日

仿QQ窗体自动收缩

2023/5/31 1:05:21

模仿QQ主窗体自动收缩的功能,展示部分功能。

        private void Timer1_Tick(object sender, EventArgs e)
        {
            if (Top < 3 && Tem_place == 0)//如果窗体被移到屏幕的顶部
            {
                if (Handle == FormNameAt(Cursor.Position.X, Cursor.Position.Y))//当鼠标移致到该窗体上
                {
                    panel_Title.Tag = 1;//设置标识,用于判断窗体在屏幕顶部
                    timer2.Enabled = false;//不对窗体进行拉伸操作
                    Top = 0;//使窗体致顶
                }
                else
                {
                    panel_Title.Tag = 1;//设置标识,用于判断窗体在屏幕顶部
                    timer2.Enabled = true;//将窗体在顶部进行隐藏
                }
            }
            else
            {
                if (Left < 3 || Right > GetSystemMetrics(0) - 3)//如果窗体被移到屏幕的左端或右端
                {
                    if (Left < 3)//如果窗体被移到屏幕的左端
                    {
                        if (Handle == FormNameAt(Cursor.Position.X, Cursor.Position.Y))//当鼠标移致到该窗体上
                        {
                            panel_Title.Tag = 2;//设置标识,用于判断窗体在屏幕左端
                            timer2.Enabled = false;
                            Frm_Height = Height;
                            Left = 0;//使窗体致左
                            Top = 0;
                            Height = Screen.AllScreens[0].Bounds.Height;
                            Tem_place = 1;
                        }
                        else
                        {
                            panel_Title.Tag = 2;
                            timer2.Enabled = true;//将窗体在左端进行隐藏
                        }
                    }
                    if (Right > GetSystemMetrics(0) - 3)//如果窗体被移到屏幕的右端
                    {
                        if (Handle == FormNameAt(Cursor.Position.X, Cursor.Position.Y))//当鼠标移致到该窗体上
                        {
                            panel_Title.Tag = 3;//设置标识,用于判断窗体在屏幕右端
                            timer2.Enabled = false;
                            Frm_Height = Height;
                            Left = GetSystemMetrics(0) - Width;//使窗体致右
                            Top = 0;
                            Height = Screen.AllScreens[0].Bounds.Height;
                            Tem_place = 1;
                        }
                        else
                        {
                            panel_Title.Tag = 3;
                            timer2.Enabled = true;//将窗体在右端进行隐藏
                        }
                    }
                }
            }
        }

 

1、折弯工件展开尺寸的计算公式:展开尺寸=(A+B)-1.6*C*N,

A,B:是外形最大尺寸,

C:板厚,

1.6:是铝板的折弯系数,

N:是折弯的数量。

2、以下图的例子展开尺寸计算:(23+53+60+33+53)-3*1.6*4=202.8,

3、折弯工件的展开图,

4、展开图的折弯线的公式:E = A-(C*1.6)/2*N,

N:是折弯的数量,

5、折弯工件展开图的折弯线,

20.6=23-3*1.6/2*1

48.2=53-3*1.6/2*2(两个折弯)

55.2=60-3*1.6/2*2(两个折弯)

28.2=33-3*1.6/2*2(两个折弯)

50.6=53-3*1.6/2*1

6、完成效果图。

经常用到的东西,记录下来,然后用的时候想不起来。

1.遍历整个 dataGridView1 控件

for (int i = 0; i < dataGridView1.RowCount; i++)
{
    for (int j = 0; j < dataGridView1.ColumnCount; j++)
    {
        //打印第i行第j列数据
        Console.WriteLine(Convert.ToString(dataGridView1[j, i].Value));
        // 注意dataGridView1[j,i]代表的是第i行第j列
    }
}

2.模糊查找数据并定位并加入是否还要继续查找

int row = dataGridView1.Rows.Count;//得到总行数
int cell = dataGridView1.Rows[1].Cells.Count;//得到总列数
string strTxt = txtFind.Text;//得到输入的字符串,并付值给变量
Regex r = new Regex(strTxt); // 定义一个Regex对象实例 
for (int i = 0; i < row; i++)//得到总行数并在之内循环
{
    for (int j = 0; j < cell; j++)//得到总列数并在之内循环
    {
        Match m = r.Match(dataGridView1.Rows[i].Cells[j].Value.ToString()); // 在字符串中模糊匹配 
        if (m.Success)
        {   //对比TexBox中的值是否与dataGridView中的值相同(上面这句)
            dataGridView1.CurrentCell = dataGridView1[j, i];//定位到相同的单元格
            if (MessageBox.Show("是否需要继续查找?", "", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
            {
                //如果选择了取消就会返回,如果选择了确定,就会继续查找匹配的.
                return;//返回
            }
        }
    }
}

 

自己网上Ctrl + C 、Ctrl + V 收集,并自己开发的,自用 简单窗体控件库,如有喜欢的朋友可以下载去探索下。

目前有 10个重写控件,分别是:Button、CheckBox、Form、GlassButton、ImageButton、ListView、MessageBox、RadioButtom

SplashScreen、TextBox。不会写的很复杂,适合新手,一看就明白。源码注释明确。

控件演示窗口:

EM.Controls

 消息窗口展示:

EM.Controls

文件目录展示:

EM.Controls

 展示部分窗体代码:

using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

namespace EM.Controls
{
    /// <summary>
    /// 自定义扩展窗体Form
    /// </summary>
    public class Form : System.Windows.Forms.Form
    {
        #region 私有变量
        //系统按钮管理器
        private SystemButtonManager _systemButtonManager;
        #endregion

        #region 构造函数

        public Form()
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterScreen;
            _systemButtonManager = new SystemButtonManager(this);
            FormIni();
        }
        #endregion

        #region 属性
        [Description("确定窗体标题栏的右上角是否有关闭框。")]
        public bool CloseBox { get; set; } = true;

        [Description("窗体圆角的半径。")]
        public int Radius { get; set; } = 5;

        [Description("是否允许窗体改变大小。")]
        public bool CanResize { get; set; } = true;

        [Description("窗体背景图片。")]
        public override Image BackgroundImage { get; set; }

        [Description("绘制窗体标题的字体。")]
        public Font TextFont { get; set; } = new Font("宋体", 9.0f, FontStyle.Bold);

        [Description("绘制窗体标题的颜色。")]
        public Color TextForeColor { get; set; } = Color.FromArgb(250, Color.White);

        [Description("绘制带有阴影的窗体标题。")]
        public bool TextWithShadow { get; set; } = true;

        [Description("使窗体绘制阴影。")]
        public Color TextShadowColor { get; set; } = Color.FromArgb(2, Color.Black);

        [Description("窗体阴影的宽度。默认值:3")]
        public int TextShadowWidth { get; set; } = 3;

        [Description("最小窗体宽大小。")]
        public int MinFormSizeWidth { get; set; } = 50;

        [Description("最小窗体高大小。")]
        public int MinFormSizeHeight { get; set; } = 30;

        [Browsable(false)]
        [Description("返回窗体关闭系统按钮所在的坐标矩形")]
        public Rectangle CloseBoxRect
        {
            get { return SystemButtonManager.SystemButtonArray[0].LocationRect; }
        } 
        [Browsable(false)]
        [Description("返回窗体最大化或者还原系统按钮所在的坐标矩形")]
        public Rectangle MaximiziBoxRect
        {
            get { return SystemButtonManager.SystemButtonArray[1].LocationRect; }
        }

        [Browsable(false)]
        [Description("返回窗体最小化系统按钮所在的坐标矩形")]
        public Rectangle MinimiziBoxRect
        {
            get { return SystemButtonManager.SystemButtonArray[2].LocationRect; }
        }
        /// <summary>
        /// 窗体 Icon 矩形
        /// </summary>
        internal Rectangle IconRect
        {
            get
            {
                if (base.ShowIcon && base.Icon != null)
                {
                    return new Rectangle(8, 8, SystemInformation.SmallIconSize.Width, SystemInformation.SmallIconSize.Width);
                }
                return Rectangle.Empty;
            }
        }
        /// <summary>
        /// 窗体标题矩形
        /// </summary>
        internal Rectangle TextRect
        {
            get
            {
                if (base.Text.Length != 0)
                {
                    return new Rectangle(IconRect.Right + 5, 8, Width - (8 + IconRect.Width + 2), TextFont.Height);
                }
                return Rectangle.Empty;
            }
        } 
        internal SystemButtonManager SystemButtonManager
        {
            get
            {
                if (_systemButtonManager == null)
                {
                    _systemButtonManager = new SystemButtonManager(this);
                }
                return _systemButtonManager;
            }
        } 
        #endregion 
        #region 继承

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                if (!DesignMode)
                {
                    if (MaximizeBox) { cp.Style |= (int)WindowStyle.WS_MAXIMIZEBOX; }
                    if (MinimizeBox) { cp.Style |= (int)WindowStyle.WS_MINIMIZEBOX; }
                    cp.ExStyle |= (int)WindowStyle.WS_CLIPCHILDREN;  //防止因窗体控件太多出现闪烁
                    cp.ClassStyle |= (int)ClassStyle.CS_DropSHADOW;  //实现窗体边框阴影效果
                }
                return cp;
            }
        } 
        protected override void OnCreateControl()
        {
            base.OnCreateControl();
            RenderHelper.SetFormRoundRectRgn(this, Radius);
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            UpdateSystemButtonRect();
        } 
        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);
            if (this.Width <= MinFormSizeWidth) { this.Width = MinFormSizeWidth; }
            if (this.Height <= MinFormSizeHeight) { this.Height = MinFormSizeHeight; }

            RenderHelper.SetFormRoundRectRgn(this, Radius);

            //更新 最大化 按钮 图标
            UpdateMaxButton();
            // 更新  按钮的位置
            UpdateSystemButtonRect();
        }
        /// <summary>
        /// 处理Win 系统消息
        /// </summary>
        /// <param name="m"></param>
        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case Win32.WM_ERASEBKGND:
                    m.Result = IntPtr.Zero;
                    break;
                case Win32.WM_NCHITTEST://这个消息是当鼠标移动或者有鼠标键按下时候发出的
                    WmNcHitTest(ref m);
                    break;
                default:
                    base.WndProc(ref m);
                    break;
            }
        } 
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);
            SystemButtonManager.ProcessMouseOperate(e.Location, MouseOperate.Move);
        }

        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);
            if (e.Button == MouseButtons.Left)
            {
                SystemButtonManager.ProcessMouseOperate(e.Location, MouseOperate.Down);
            }
        } 
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);
            if (e.Button == MouseButtons.Left)
            {
                SystemButtonManager.ProcessMouseOperate(e.Location, MouseOperate.Up);
            }
        } 
        protected override void OnMouseLeave(EventArgs e)
        {
            base.OnMouseLeave(e);
            SystemButtonManager.ProcessMouseOperate(Point.Empty, MouseOperate.Leave);
        }
        /// <summary>
        /// 重写控件的 OnPaint 事件
        /// </summary>
        /// <param name="e"></param>
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            e.Graphics.CompositingQuality = CompositingQuality.Default;
            e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
            e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;

            //绘制 背景图片
            if (BackgroundImage != null)
            {
                switch (BackgroundImageLayout)
                {
                    case ImageLayout.Stretch:
                    case ImageLayout.Zoom:
                        e.Graphics.DrawImage(BackgroundImage, ClientRectangle, new Rectangle(0, 0, BackgroundImage.Width, BackgroundImage.Height), GraphicsUnit.Pixel);
                        break;
                    case ImageLayout.Center:
                    case ImageLayout.None:
                    case ImageLayout.Tile:
                        e.Graphics.DrawImage(BackgroundImage, ClientRectangle, ClientRectangle, GraphicsUnit.Pixel);
                        break;
                }
            }

            //绘制窗体主体部分白色透明层
            RenderHelper.DrawFromAlphaMainPart(this, e.Graphics);

            //绘制 边缘
            RenderHelper.DrawFormFringe(this, e.Graphics, RenderHelper.GetImageFormResourceStream("Control.Form.Res.fringe_bkg.png"), Radius);

            //绘制 系统按钮
            SystemButtonManager.DrawSystemButtons(e.Graphics);

            //绘制 icon
            if (Icon != null && ShowIcon) { e.Graphics.DrawIcon(Icon, IconRect); }

            //绘制文本
            if (Text.Length != 0)
            {
                if (TextWithShadow)
                {
                    using (Image textImg = RenderHelper.GetStringImgWithShadowEffect(Text, TextFont, TextForeColor, TextShadowColor, TextShadowWidth))
                    {
                        e.Graphics.DrawImage(textImg, TextRect.Location);
                    }
                }
                else
                {
                    TextRenderer.DrawText(e.Graphics, Text, TextFont, TextRect, TextForeColor, TextFormatFlags.SingleLine | TextFormatFlags.EndEllipsis);
                }
            }
        } 
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (disposing)
            {
                _systemButtonManager?.Dispose();
                TextFont?.Dispose();
                BackgroundImage?.Dispose();
            }
        } 
        #endregion 
        #region 私有方法

        private void InitializeComponent()
        {
            this.SuspendLayout();
            // 
            // Form
            // 
            this.ClientSize = new System.Drawing.Size(528, 385);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "Form";
            this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            this.ResumeLayout(false); 
        }

        private void FormIni()
        {
            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;
            this.DoubleBuffered = true;  //设置本窗体双缓冲
            SetStyles();
        }  
        private void SetStyles()
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            UpdateStyles();
        }
        /// <summary>
        /// 通过获取系统消息,调整窗体大小。
        /// </summary>
        /// <param name="m"></param>
        private void WmNcHitTest(ref Message m)
        {
            if (CanResize == true && WindowState != FormWindowState.Maximized)
            {
                Point mouseLocation = PointToClient(new Point(Cursor.Position.X, Cursor.Position.Y)); //获取鼠标在屏幕的坐标点
                                                                                                      //左上斜角
                if (mouseLocation.X < 5 && mouseLocation.Y < 5)
                {
                    m.Result = new IntPtr(Win32.HTTOPLEFT);
                    return;
                }
                //右上斜角
                if (mouseLocation.X > Width - 5 && mouseLocation.Y < 5)
                {
                    m.Result = new IntPtr(Win32.HTTOPRIGHT);
                    return;
                }
                //左下斜角
                if (mouseLocation.X < 5 && mouseLocation.Y > Height - 5)
                {
                    m.Result = new IntPtr(Win32.HTBOTTOMLEFT);
                    return;
                }
                //右下斜角
                if (mouseLocation.X > Width - 5 && mouseLocation.Y > Height - 5)
                {
                    m.Result = new IntPtr(Win32.HTBOTTOMRIGHT);
                    return;
                }
                //上
                if (mouseLocation.Y < 5)
                {
                    m.Result = new IntPtr(Win32.HTTOP);
                    return;
                }
                //下
                if (mouseLocation.Y > Height - 5)
                {
                    m.Result = new IntPtr(Win32.HTBOTTOM);
                    return;
                }
                //左
                if (mouseLocation.X < 5)
                {
                    m.Result = new IntPtr(Win32.HTLEFT);
                    return;
                }
                //右
                if (mouseLocation.X > Width - 5)
                {
                    m.Result = new IntPtr(Win32.HTRIGHT);
                    return;
                }
            } 
            m.Result = new IntPtr(Win32.HTCLIENT);
        }

        private void UpdateMaxButton()
        {
            //获取窗体 最大化 状态。
            bool isMax = WindowState == FormWindowState.Maximized;

            if (isMax) //最大化状态,变换按钮图标、提示
            {
                SystemButtonManager.SystemButtonArray[1].NormalImg = RenderHelper.GetImageFormResourceStream("Control.Form.Res.SystemButtons.restore_normal.png");
                SystemButtonManager.SystemButtonArray[1].HighLightImg = RenderHelper.GetImageFormResourceStream("Control.Form.Res.SystemButtons.restore_highlight.png");
                SystemButtonManager.SystemButtonArray[1].DownImg = RenderHelper.GetImageFormResourceStream("Control.Form.Res.SystemButtons.restore_down.png");
                SystemButtonManager.SystemButtonArray[1].ToolTip = "还原";
            }
            else //非最大化状态,变换按钮图标、提示
            {
                SystemButtonManager.SystemButtonArray[1].NormalImg = RenderHelper.GetImageFormResourceStream("Control.Form.Res.SystemButtons.max_normal.png");
                SystemButtonManager.SystemButtonArray[1].HighLightImg = RenderHelper.GetImageFormResourceStream("Control.Form.Res.SystemButtons.max_highlight.png");
                SystemButtonManager.SystemButtonArray[1].DownImg = RenderHelper.GetImageFormResourceStream("Control.Form.Res.SystemButtons.max_down.png");
                SystemButtonManager.SystemButtonArray[1].ToolTip = "最大化";
            }
        }

        protected void UpdateSystemButtonRect()
        {
            //更新关闭按钮位置矩形。
            Rectangle closeRect = new Rectangle(Width - SystemButtonManager.SystemButtonArray[0].NormalImg.Width,
                -1,
                SystemButtonManager.SystemButtonArray[0].NormalImg.Width,
                SystemButtonManager.SystemButtonArray[0].NormalImg.Height);
            SystemButtonManager.SystemButtonArray[0].LocationRect = CloseBox ? closeRect : Rectangle.Empty;

            //Max
            Rectangle MaxButtonRect = new Rectangle(closeRect.X - SystemButtonManager.SystemButtonArray[1].NormalImg.Width,
                -1,
                SystemButtonManager.SystemButtonArray[1].NormalImg.Width,
                SystemButtonManager.SystemButtonArray[1].NormalImg.Height);
            SystemButtonManager.SystemButtonArray[1].LocationRect = MaximizeBox ? MaxButtonRect : Rectangle.Empty;

            //Min
            //如果没有最小化按钮,则画空白矩形,
            if (!MinimizeBox)
            {
                SystemButtonManager.SystemButtonArray[2].LocationRect = Rectangle.Empty;
                return;
            }
            //如果没有最大化按钮,最小化按钮,就画在关闭按钮旁,
            int MinLocation = MaximizeBox ?
                MaxButtonRect.X - SystemButtonManager.SystemButtonArray[2].NormalImg.Width :
                closeRect.X - SystemButtonManager.SystemButtonArray[2].NormalImg.Width;
            Rectangle MinButtonRect = new Rectangle(MinLocation,
                -1,
                SystemButtonManager.SystemButtonArray[2].NormalImg.Width,
                SystemButtonManager.SystemButtonArray[2].NormalImg.Height);
            SystemButtonManager.SystemButtonArray[2].LocationRect = MinButtonRect;
        } 
        #endregion
    }
}

 

代码,目前还有比较多的功能BUG。有能力,有兴趣的朋友,可以一起完善,可以加我们的QQ群:7261922

 

变压器计算公式

变压比:K=U1/U2=N1/N2

(式中:K--变压比,U1、U2--一、二次电压,N1、N2--一、二次绕组匝数)。

 

电压、电流关系:

U1/U2=I2/I1=K(即U1I1=U2I2)

(式中U1、U2--一、二次电压,I1、I2一二次电流)。

就目前所知道的参数:

电压15V,20W,这是次级的电压和变压器的功率,我们先根基这2个数来计算一下。

 

因为次级的电流由功率除电压可求出为

I = P / U = 20 / 15=(约)1.33(A)

那么初级的电流为

U1 / U2 =I2 / I1

=220 / 15 = 1.33 / I1

= 14.66 = 1.33 / I1,

I1 = 1.33 / 14.66

= 0.09(A)

U1是初级(原边)电压 ; U2是次级(副边)电压

N1是初级圈数 ; N2是次级圈数

I1是初级电流 ; I2是次级电流

 

附带 5份,设计实例 PDF,外链附件下载!

 

开关电源故障速修步骤


一、准备工作
  准备一带保护的简易测试插座,如图 1 所示。其作用是防止开关管击穿引起的电路起火和快速判断故障范围。

开关电源故障速修步骤
简易测试插座 串联 钨丝灯泡  <图 1>


二、开关电源常见故障速修步骤
开关电源原理框图见图 2 所示。

开关电源常见故障速修
开关电源原理框图 <图 2>
  1. 通电瞬间,灯泡闪亮一下后,逐渐熄灭,则电源从输入至整流滤波均正常,故障应在后面电路。否则电源保险或输入滤波电感开路。
  2. 若整流滤波电路正常,则检测开关管两端是否有 310V 电压,若无,则取样电阻 R0 或变压器初级开路。
  3. 若开关管电压正常,则检测开关管驱动电路是否有几伏至十几伏电压,若无则检测启动电阻和驱动电路。
  4. 若驱动有电压,开关管正常,则自激绕组有故障或反馈电路有故障。
  5. 若灯泡常亮,则开关管击穿(短路)或整流桥击穿(短路)。
  6. 若灯泡周期性亮灭,则负载有短路故障,可着重检测负载。
  7. 若更换开关管多次击穿,则检测峰值电压消除电路及负载是否有开路故障。
  8. 经过上述维修步骤并检测负载电压基本正常后,即可闭合开关 K,再次检测时若输出正常,
    则说明开关电源已修复。


注意:开关电源负反馈电路及变压器次级绝不能开路,否则会损坏电路其他部分。

PCB平面变压器可由独立的标准叠层电 路或小型多层PCB板组 件构成,或者集成到电 源多层PCB板内。PCB平面变压器有如下的优点:

  • 非常小的外形体积;
  • 极好的散热性能;
  • 很低的漏感;
  • 优越的性能可重复性;

通过对工作状态下的多层PCB板型电路的平面E型变压器的性能测试显示,与相同的 有效体积的传统线绕型变压器相比,平面变压器的热阻大大下降(高达50%)。这是由于平 面磁芯的比表面积有很大提高,更加有利于散热的原因,这就使得平面变压器能够工作在较 高的功率密度下还能保持在可接受的温升范围内。

全部内容请直接下载PDF!

R=(R1×R2)÷(R1+R2)

  • 1/R=1/R1+1/R2+…+1/R (并联电路中电阻的特点:总电阻的倒数等于各并联电阻的倒数之和)
  • I=I1=I2=…=In (串联电路中电流的特点:电流处处相等)
  • U=U1+U2+…+U (串联电路中电压的特点:串联电路中,总电压等于各部分电路两端电压之和)
  • I=I1+I2+…+I (并联电路中电流的特点:干路上的电流等于各支路电流之和)
  • U=U1=U2=…=U (并联电路中电压的特点:各支路两端电压相等。都等于电源电压)
  • R=R1+R2+…+R (串联电路中电阻的特点:总电阻等于各部分电路电阻之和)
  • 1/R=1/R1+1/R2+…+1/R (并联电路中电阻的特点:总电阻的倒数等于各并联电阻的倒数之和)
  • R并= R/n(n个相同电阻并联时求总电阻的公式)
  • R串=n*R (n个相同电阻串联时求总电阻的公式)
  • U1:U2=R1:R2 (串联电路中电压与电阻的关系:电压之比等于它们所对应的电阻之比)
  • I1:I2=R2:R1 (并联电路中电流与电阻的关系:电流之比等于它们所对应的电阻的反比)

欧姆定律

2022/10/6 22:40:21

标识:P电功率)    U(电压)    I(电流)    W(电功)    R(电阻)    T(时间)

主要公式:I=U/R             U=IR              R=U/I

 

由欧姆定律所推公式:

并联电路 I总 = I1 + I2 +...+ I n

U总 = U1 = U2 =...= U n

串联电路 I 总= I1 = I2

 

1、欧姆定律:  I=U/R  

U:电压,V;

R:电阻,Ω;

I:电流,A;   

 

2、全电路欧姆定律:  I=E/(R+r)  

I:电流,A;  

E:电源电动势,V; 

r:电源内阻,Ω;  

R:负载电阻,Ω   

 

3、并联电路,总电流等于各个电阻上电流之和  I=I1+I2+…In  

 

4、串联电路,总电流与各电流相等  I=I1=I2=I3=…=In   

 

5、负载的功率  

纯电阻有功功率 P=UI → P=I2R(式中2为平方)  

U:电压,V;  

I:电流,A; 

P:有功功率,

W; R:电阻  

 

纯电感无功功率 Q=I2*Xl(式中2为平方)  

Q:无功功率,w;  

Xl:电感感抗,Ω 

I:电流,A  

 

纯电容无功功率 Q=I2*Xc(式中2为平方)  

Q:无功功率,V;  

Xc:电容容抗,Ω  

I:电流,A  

 

6、电功(电能)  W=UIt  

W:电功,j;  

U:电压,V;  

I:电流,A; 

 t:时间,s   

 

7、交流电路瞬时值与最大值的关系  I=Imax×sin(ωt+Φ)  

I:电流,A;  

Imax:最大电流,A;  

(ωt+Φ):相位,其中Φ为初相。

 

8、交流电路最大值与在效值的关系  Imax=2的开平方×I  

I:电流,A;  

Imax:最大电流,A;   

 

9、发电机绕组三角形联接  I线=3的开平方×I相  

I线:线电流,A;  

I相:相电流,A;  

 

10、发电机绕组的星形联接  I线=I相  

I线:线电流,A;  

I相:相电流,A;  

 

11、交流电的总功率  P=3的开平方×U线×I线×cosΦ  

P:总功率,w;  

U线:线电压,V;  

I线:线电流,A;  

Φ:初相角   

 

12、变压器工作原理  U1/U2=N1/N2=I2/I1  

U1、U2:一次、二次电压,V;  

N1、N2:一次、二次线圈圈数;  

I2、I1:二次、一次电流,A; 

  

13、电阻、电感串联电路  I=U/Z 

Z=(R2+XL2)和的开平方 (式中2为平方) 

Z:总阻抗,Ω;  

I:电流,A;  

R:电阻,Ω;  

XL:感抗,Ω  

 

14、电阻、电感、电容串联电路  

I=U/Z 

Z=[R2+(XL-Xc)2]和的开平方 (式中2为平方) 

Z:总阻抗,Ω; 

I:电流,A;  

R:电阻,Ω;  

XL:感抗,Ω;  

Xc:容抗,Ω

 

珍藏再QQ空间10多年的模电基础,现拿出来,分享,见见世面!

主要介绍,一些模电的基础知识。

模拟电路基础

模拟电路基础

模拟电路基础

1/2, 16«12»
公告

欢迎加入我们!!!

开关电源 交流QQ群: 392599244

另启动 交流QQ群: 154186357

EM.CMS 交流QQ群: 26032741

恶魔界 交流QQ群: 7261922

搜索
最新评论
站点数据
栏目总数: 9 个
文章数量: 16 篇
评论数量: 1 条
标签云: 25 个
自定义标签: 0 个
合作伙伴: 3 位
附件数量: 22 个
当前在线: 158 人