机电学院电子信息工程系
电 学生姓名:班 级:学 号:实习地点:
一、
无线计:········3子 工 程 实 习 报 告
目 录
RGB小夜灯
验
实设本文档如对你有帮助,请帮忙下载支持!
实验提纲 ·········································3
二、硬件设计:···································4
1.焊接任务········································4 2.调试任务········································4 3.实验验收········································5 4.获取实验数据··································5 附录
三、报告总结:··························18
1.问题反馈······································1
9
2.建议 ·····································1
9
一、
无线RGB小夜灯实验设计:
实验提纲:WIFI控制的RGB小夜灯 功能描述:能够在安卓手机端设置RGB颜色,并通过WIFI控制小夜灯调色调亮。 焊接任务:完成MCU最小系统板、WIFI扩展板、传感器HUB、RGB光源LED板的焊接。
在双面PCB上焊接直插器件——2.间距接插件,晶振等,焊接贴片器件——0805阻容,0805LED,ASM1117-3.3,0805电感,贴片Micro-USB座等 调试任务:
1、 完成MCU最小系统板中的供电部分测试、
用实验电源给MCU板5V电源网络供电,记录STM32芯片输入电压。连续调低MCU板供电电压,记录STM32芯片输入电压为2.0V时对应的实验电源输出电压值 。
2、 MCU最小系统板烧写测试
了解烧写工具,接线方法,记录最小系统板的烧写过程,观察是否烧写成功。 3、 WIFI扩展板供电测试
本文档如对你有帮助,请帮忙下载支持!
用实验电源给WIFI扩展板5V电源网络供电,记录WIFI模块电源两端的输入电压。连续调低WIFI扩展板供电电压,记录WIFI模块输入电压为3.0V时对应的实验电源输出电压值。测试WIFI链接手机时,模块的功耗。 4、 RGB光源LED板功能测试
观察LED颗粒是否能调色调亮。 5、 WIFI扩展板连接与通信距离测试
观察扩展板与手机或电脑的连接稳定性,并记录有效的通信距离。 6、 系统功耗测试
各个模块组装完成后,用实验电源供电,测试整机最大功耗与最小功耗。 7、 用纸壳或亚克力等材料自行设计外观。 8、 对STM32源代码进行优化。
选做。自行优化,实现扩展创新功能。如实现对接入SENSOR HUB板的多个LED模块的流水效果控制。 实习报告撰写:
按照实习报告统一格式撰写。
二、硬件设计:
1.设计目的:焊接制好的最小系统电路板
2.设计内容:实现对单片机最小系统开发板和JTAG程序下载线的焊接,保证
硬件焊接无误。
3.设计工具:电烙铁,吸锡器,焊锡丝,镊子,钳子,万用表,电脑 4.负责老师:陈分雄、杨勇
二、1焊接任务:Color LED Board焊接 时间:12月21日-12月23日 地点:信息楼401
目的:学习焊接 掌握电烙铁的使用 完成Color LED Board焊接 内容:学习焊接方法,观看视频,
先练习焊接,在废旧电路板上焊接 领取实验材料 对比实验样范 进行焊接 老师指导验收 Sensor HUB 焊接
时间:12月24日-12月25日 地点:信息楼401
目的:完成Sensor HUB焊接 内容:练习焊接
领取实验材料 对比实验样范
本文档如对你有帮助,请帮忙下载支持!
进行焊接 老师指导验收 程序下载
STM32_BASE Board焊接 时间:12月28日-12月29日 地点:
目的;完成STM32_BASE Board焊接 内容:领取实验材料 对比实验样范 进行焊接 老师指导验收 交给老师焊接芯片 二丶2调试任务
时间:12月29日-1月2日 地点:
目的:完成无线RGB小夜灯的调试 内容:将各个板块进行组合 下载相应检测软件
进行调试,用万用表检测电路是否正确 用手机进行WIFI控制RGB小夜灯 二丶3实验验收 时间:1月2日 目的:实验验收
内容:交与老师检测验收 二丶4获取实验数据 时间:1月2-3日 目的;获取实验数据
内容:使用万用表检测32板 和WiFiboard板 的有效输入个输出
使用手机进行通信距离测试 附录1STM32—BASE程序
/* Includes ------------------------------------------------------------------*/ #include \"stm32f10x.h\"
#include \"platform_config.h\" #include \"stm32f10x_usart.h\" #include \"misc.h\"
#include \"stm32f1_delay.h\"
本文档如对你有帮助,请帮忙下载支持!
#include \"ws2812b.h\"
/* Private typedef -----------------------------------------------------------*/ typedef enum { FAILED = 0, PASSED = !FAILED} TestStatus;
/* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ extern uint8_t RXFRMOK ; //Ö¡½ÓÊÕ±êÖ¾ extern uint8_t RXAAOK; //Ö¡Æðʼ±êÖ¾ extern uint8_t ReceiveBuf0[ReceiveMaxLength];//½ÓÊÕ»º³åÇø USART_InitTypeDef USART_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; void RCC_Configuration(void); void GPIO_Configuration(void); void NVIC_Configuration(void); void Delay(__IO uint32_t nCount);
void USART_OUT(USART_TypeDef* USARTx, uint8_t *Data,uint16_t Len); int main(void) { uint16_t i,index; uint8_t DATA_HEADER[4]; uint8_t DATA_DEV[4]; uint8_t DATA_R; uint8_t DATA_G; uint8_t DATA_B;
/* System Clocks Configuration **********************************************/ RCC_Configuration(); GPIO_Configuration(); NVIC_Configuration(); HAL_InitTick(); Timer4_init();
/* USART configuration ------------------------------------------------------*/ /* USART2 configured as follow:
- BaudRate = 115200 baud - Word Length = 8 Bits - One Stop Bit - No parity
- Hardware flow control disabled (RTS and CTS signals) - Receive and transmit enabled */
USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
本文档如对你有帮助,请帮忙下载支持!
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; /* Configure USART2 */
USART_Init(USART2, &USART_InitStructure);
/* Enable USART2 Receive and Transmit interrupts */ USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); USART_ITConfig(USART2, USART_IT_TXE, ENABLE); /* Enable the USART2 */
USART_Cmd(USART2, ENABLE); WS2812_testBreath(40); WS2812_testBreath(40); delay_ms(100); WS2812_send(30,30,30); delay_ms(1000); GPIO_ResetBits(GPIOA, GPIO_Pin_8); while (1) {
if(RXFRMOK == 1) { //{\"put\":RGB,\"R\":000,\"G\":000,\"B\":000} //USART_OUT(USART2, ReceiveBuf0 ,35); index = 0; for(i=2; i<5; i++)//HEADER { DATA_HEADER[index++] = ReceiveBuf0[i]; } DATA_HEADER[3] = '\\0'; index = 0; for(i=7; i<10; i++)//RGB { DATA_DEV[index++] = ReceiveBuf0[i]; } DATA_DEV[3] = '\\0'; index = 0; //DATA DATA_R = ((uint8_t)(ReceiveBuf0[15]-0x30))*100 + ((uint8_t)(ReceiveBuf0[16]-0x30))*10 + (uint8_t)(ReceiveBuf0[17]-0x30); DATA_G = ((uint8_t)(ReceiveBuf0[23]-0x30))*100 + ((uint8_t)(ReceiveBuf0[24]-0x30))*10 + (uint8_t)(ReceiveBuf0[25]-0x30); DATA_B = ((uint8_t)(ReceiveBuf0[31]-0x30))*100 + ((uint8_t)(ReceiveBuf0[32]-0x30))*10 + (uint8_t)(ReceiveBuf0[33]-0x30); if(strcmp(DATA_HEADER,\"put\")==0 && strcmp(DATA_DEV,\"RGB\")==0 )//dev is OK? { WS2812_send(DATA_R,DATA_G,DATA_B); }
本文档如对你有帮助,请帮忙下载支持!
delay_ms(100); USART_OUT(USART2, \"ok\ RXFRMOK = 0; RXAAOK = 0; } // /* Turn off LD1 */ // GPIO_SetBits(GPIOA, GPIO_Pin_8); // /* Insert delay */ // delay_ms(100); // /* Turn on LD1 */ // GPIO_ResetBits(GPIOA, GPIO_Pin_8); // // /* Insert delay */ // delay_ms(100); } }
void RCC_Configuration(void) {
/* Setup the microcontroller system. Initialize the Embedded Flash Interface, initialize the PLL and update the SystemFrequency variable. */ SystemInit(); //
/* Configure all unused GPIO port pins in Analog Input mode (floating input trigger OFF), this will reduce the power consumption and increase the device immunity against EMI/EMC *************************************************/
RCC_APB2PeriphClockCmd( RCC_APB2Periph_USART1 |RCC_APB2Periph_GPIOA RCC_APB2Periph_GPIOB |
RCC_APB2Periph_GPIOC, ENABLE); /* Enable USART2 clock */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE); }
void GPIO_Configuration(void) {
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; //LED GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; //USART2 TX GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //¸´ÓÃÍÆÍìÊä³ö GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure); //A¶Ë¿Ú
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; //USART2 RX
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //¸´ÓÿªÂ©ÊäÈë GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
本文档如对你有帮助,请帮忙下载支持!
GPIO_Init(GPIOA, &GPIO_InitStructure); } /**
* @brief Configures the nested vectored interrupt controller. * @param None * @retval : None */
void NVIC_Configuration(void) {
NVIC_InitTypeDef NVIC_InitStructure;
/* Configure the NVIC Preemption Priority Bits */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0); /* Enable the USART2 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); }
void USART_OUT(USART_TypeDef* USARTx, uint8_t *Data,uint16_t Len) { uint16_t i; for(i=0; i * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval : None */ void assert_failed(uint8_t* file, uint32_t line) { /* User can add his own implementation to report the file name and line number, ex: printf(\"Wrong parameters value: file %s on line %d\\r\\n\ /* Infinite loop */ while (1) { } } 本文档如对你有帮助,请帮忙下载支持! #endif /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 附录2原理图及相关引脚图 附录3实验样范 三,实验总结 通过多天的实习我已较为熟练的掌握了焊接电路板,充分的认识到了电子工程实习的困难与较多的问题,其中程序与硬件的交汇为我们的生活带来许多便利。通过实习我多该课程有了更深的理解与认识 问题反馈及建议:实验中出现了焊接问题,有漏焊,少焊,以及焊反的问题,往往都是验收时才知道出现了问题,这就要求学生能认真仔细参考范例进行焊接,其次就是焊接正确但程序调试有问题,这就需要老师的指导了。 建议:多点老师来监督指导,有很多完成了但到老师那检测很难,其次就是希望多些实验材料,以免焊错后无力补救 指导老师评语: 成绩评定: 指导老师(签字): 注:成绩评定分为优、良、中、及格和不及格五个等级 因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- shangjiatang.cn 版权所有 湘ICP备2022005869号-4
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务