標(biāo)題: HC89F003+msc9926w+apm4953無線充電項(xiàng)目學(xué)習(xí) 附PCB與MCU源程序 [打印本頁]

作者: guowen1068    時(shí)間: 2020-8-12 14:51
標(biāo)題: HC89F003+msc9926w+apm4953無線充電項(xiàng)目學(xué)習(xí) 附PCB與MCU源程序
無線充電的學(xué)習(xí),有畫板資料

Altium Designer畫的PCB圖如下:


單片機(jī)源程序如下:
  1. #include "power.h"
  2. #include "rc.h"
  3. #include "adc.h"
  4. #include "usart.h"

  5. FILT VccFilt = {0};                                                                //電壓濾波系數(shù)
  6. FILT CurrentFilt = {0};                                                //電流濾波系數(shù)
  7. unsigned long CurrentValue = 0;                //系統(tǒng)輸出電流

  8. /***********************************************************************
  9. 函數(shù)名稱:Current_GetValue
  10. 函數(shù)功能:獲取當(dāng)前的輸出電流
  11. 輸入?yún)?shù):無
  12. 返回參數(shù):輸出電流,mA
  13. 備    注:無
  14. ************************************************************************/
  15. unsigned int Current_GetValue(void)
  16. {
  17.         Adc_GetValue(AN4);
  18.         CurrentValue = Rc_Filter(Adc_GetValue(AN4),&CurrentFilt);        //當(dāng)前的電流采樣
  19.         CurrentValue *= 0.9988878393665;                                                                                                        //當(dāng)前電流mA
  20.         CurrentValue *= 1.18;                                                                                                                                                        //校準(zhǔn),和USB測(cè)試儀器的測(cè)量電流匹配
  21.         if(CurrentValue > 65536)CurrentValue = 60000;                                                        //防止瞬間過大,超過返回范圍
  22.         return CurrentValue;
  23. }

  24. /***********************************************************************
  25. 函數(shù)名稱:Power_GetValue
  26. 函數(shù)功能:獲取當(dāng)前的系統(tǒng)功率
  27. 輸入?yún)?shù)        :無
  28. 返回參數(shù)        :輸出當(dāng)前功率
  29. 備    注:無
  30. ************************************************************************/
  31. unsigned char Power_GetValue(void)
  32. {
  33.         unsigned int voltValue;
  34.         Adc_GetValue(ANPOWER);
  35.         voltValue = Rc_Filter(Adc_GetValue(ANPOWER),&VccFilt);
  36.         voltValue = (voltValue * 5) >> 8;                                                        //獲取當(dāng)前電壓值
  37.         CurrentValue = CurrentValue * voltValue / 1000;
  38.         if(CurrentValue > 256)CurrentValue = 200;
  39.         return CurrentValue;                                                                                                        //當(dāng)前功率W,保留小數(shù)點(diǎn)后一位
  40. }
復(fù)制代碼


51hei.jpg (21.38 KB, 下載次數(shù): 173)

51hei.jpg

51hei.jpg (6.23 KB, 下載次數(shù): 154)

51hei.jpg

PCB1.zip

3.29 MB, 下載次數(shù): 139, 下載積分: 黑幣 -5

pcb

WireSend V1_1.zip

183.91 KB, 下載次數(shù): 155, 下載積分: 黑幣 -5

無線充代碼


作者: desig    時(shí)間: 2020-12-6 16:41
這個(gè)是發(fā)送部分是不。
作者: Chen963979972    時(shí)間: 2020-12-29 08:54
這個(gè)代碼是Qi協(xié)議是完整的嗎。而不是直接調(diào)用庫
作者: Chen963979972    時(shí)間: 2020-12-29 08:55
有原理圖嗎

作者: protodrive000    時(shí)間: 2021-1-26 01:30
有復(fù)現(xiàn)的老哥嗎
作者: 25Hzzz    時(shí)間: 2021-3-23 11:54
很好的資料,程序是Qi協(xié)議,不是調(diào)用庫
作者: korren    時(shí)間: 2021-3-24 16:31
有沒有原理圖參考一下?
作者: fanjj    時(shí)間: 2022-2-15 11:23
在做無線供電相關(guān)產(chǎn)品,學(xué)習(xí)一下
作者: HR313    時(shí)間: 2022-3-6 17:49
軟件不是配這板的吧
作者: laowu0813    時(shí)間: 2022-3-15 22:16
非常不錯(cuò)的!
作者: nannan2    時(shí)間: 2024-1-15 21:56
Thanks
作者: nannan2    時(shí)間: 2024-1-15 21:57
Thanks





歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1