zoukankan      html  css  js  c++  java
  • 加热算法,加热温度控制加热功率,加热功率控制加热速度(PWM)

    uint8_t user_heating_algorithmPID(void)
    {
        uint32_t temp_1;
        uint16_t Adcn;
        nrfx_err_t err_code;
        HEATING_ENABLE();
        nrf_delay_us(1000);//ÑÓʱ1000us=1ms
        err_code = fu_peripheral_saadc_sample_convert(FU_SAADC_CHANNEL_LOADER, (nrf_saadc_value_t*)&Adcn);
        APP_ERROR_CHECK(err_code);
        uMachine_V.heating_V = uGetOutPut_Voltage(Adcn);
        if(uMachine_V.Heating_Temperature < uMachine_V.Heating_SET_Temperature)
        {
            temp_1 = uMachine_V.heating_V*uMachine_V.heating_V/1000;
            if(uMachine_V.Heating_Temperature > Heating_ctr_power)//Heating_ctr_power=(Heating_top_SET_Temperature-(Heating_top_SET_Temperature/5)) 
          {
    if(uMachine_V.Heating_power > Constant_temperature_power) { uMachine_V.Heating_power=uMachine_V.Heating_power-((uMachine_V.Heating_power*(uMachine_V.Heating_Temperature-Heating_ctr_power))/(uMachine_V.Heating_SET_Temperature-Heating_ctr_power)); } else { uMachine_V.Heating_power = Constant_temperature_power; } } if((uMachine_V.heating_V <= 14000)&&(temp_1 < (uMachine_V.Heating_resistance * uMachine_V.Heating_power)))//ÏÞÖƵçѹΪ10V£¬ÍòÒ»µç×è²âÊÔ²¿×¼£¬µçѹ¾Í¿ÉÄÜÉýµÃºÜ¸ß { if(uMachine_V.heating_speed < 70) { uMachine_V.heating_speed++; } } else { uMachine_V.heating_speed--; } HEATING_ENABLE(); if(uMachine_V.heating_EN != 2)uMachine_V.heating_EN = 1; } else { HEATING_DISABLE(); uMachine_V.heating_EN = 0; } fu_pwm_duty_set(uMachine_V.heating_speed, FU_PWM_CH_ATOMIZER); return 0; }
    经验再多也只能看作加法,而经过理论升华的经验,就可以看作乘法!
  • 相关阅读:
    RK3288 GMAC整理
    Linux电源管理-Linux regulator framework概述
    SRAM、DRAM、SDRAM、DDR、DDR2、DDR3
    内核错误值
    module_param和module_param_array用法
    VGA
    如何获取显示器的EDID信息
    进程间通信--共享内存
    Java 中的 CAS 简述及原理解析
    volatile 关键字特性解析及单例模式下的使用
  • 原文地址:https://www.cnblogs.com/TorryLong/p/13067782.html
Copyright © 2011-2022 走看看