super_star

【RA】Intelligent control equipment based on Renesas MCU

 
Overview

1. Description of the topic

    基于瑞萨MCU的智能控制设备,原理图设计上主要以一个功能板的形式进行开发,预留未使用到的io口,可以方便后续进一步diy,增加自由度;开发板预留透传接口,后续可以选择性接入BLE透传模组或者WiFi透传模组等等;
    本设计一个版本将基于这个功能板设计一个智能控制器,实现本地控制设备的开关(例如开关灯,将传统的墙控转换为智能控制设备,解放双手);
     1、第一阶段,会以离线版本,搭配OLCD显示屏+按键+电机驱动电路,实现本地的定时开关灯
     2、第二阶段,会增加BLE透传模组,实现一个更倾向于低功耗的无线控制器
     3、第三阶段,会接入WiFi透传模组,实现语音、APP控制等。
    会先从第一阶段,进行设计开发,后续会持续更新第二版本,第三个版本,当前设计的最大优势是开发板功能可扩展性较强,三个版本可以使用同一个开发板已经固件进行开发设计,由功能选择模块,进行选择。如有问题或建议,欢迎随时沟通

2. Schedule

  1. 4/11 - 4/15 Confirm the general direction of the project and what needs to be achieved specifically.
  2. 4/16 - 4/18 Design schematics and pcb files.
  3. 4/18 - 4/22 Submit for review, place unit devices, and apply for board printing.
  4. 4/23 - 4/26 Calculate the shell size, draw the 3D shell, and submit the 3D printing order.
  5. 4/26 - 4/30 Solder the circuit board and install the RA keil5 development environment.
  6. 4/31 - 5/4 Software development and debugging.

3. Physical picture

Actual picture.png

Figure 1 Description of the physical module

Figure 2 Normal work

4.Description of some functional modules

4.1 OLED display module

The 0.96-inch OLED driver IC is SSD1306;

image.png
Figure 3 OLED screen Figure 4 Schematic diagram

  1. GND power ground
  2. VCC power supply positive (3~5.5V)
  3. The D0 pin of SCL OLED is the clock pin in IIC communication.
  4. The D1 pin of SDA OLED is the data pin in IIC communication.

4.2 SG90 motor

Here the SG90 motor is driven through pwm

Figure 5 SG90 steering gear Figure 6 Drive pwm waveform

4.3 BLE transparent transmission module

The HC05 module is a high-performance master-slave integrated Bluetooth serial port module that can be paired with various Bluetooth-enabled computers, host phones, PDAs, PSPs and other smart terminals. The module supports a very wide baud rate range: 4800~1382400. Moreover, the module is compatible with 5V or 3.3V microcontroller systems and can be easily connected to your products. It is more flexible and convenient to use.

Figure 7 HC05 Bluetooth transparent transmission module

1. LED pairing status output; if the pairing is successful, it will output a high level, if it is not paired, it will output a low level.
2. KEY is used to enter the AT state; high level is effective (the default is low level if left unconnected).
3. RXD module serial port receiving pin (TTL level, cannot be directly connected to RS232 level!), can be connected to the TXD of the microcontroller.
4. TXD module serial port sending pin (TTL level, cannot be directly connected to the RS232 level!), can be connected to the microcontroller. RXD
5, GND ground
6, VCC power supply (3.3V~5.0V)

4.4 Mode selection module

The reserved mode selection switch can initialize different functions through the combination of different modes.
image.png

Figure 8 Mode selection

4.5 Download, burn, reset circuit

image.png

Figure 9 Type-c driver circuit
Figure 10 CH340 drive circuit Figure 11 Reset circuit JLINK download circuit

5. Software main process description

Figure 12 Program flow chart

6.Hardware description

6.1 Welding instructions

  • Since ic pins are densely packed and type-c pins are close together, it is easy for tin to stick together during the soldering process. It is recommended that the reasonable use of tin paste + soldering oil can solve this problem well.
Picture 3 (There was no tin paste + soldering oil during the first welding, which caused the pins to be soldered together, so I quickly bought tin paste + soldering oil overnight) Picture 4 (after rescue)

8.3D shell

image.png

Figure 8 3D shell exploded view

image.png

Figure 8 3D housing front view

9. Problems encountered

  1. When powered by 5v, the rtc time is inaccurate and an interrupt occurs once every 1 second. However, during actual measurement, it was found that this was not the case. The reason still needs to be investigated.
  2. When powered by 5V, the OLED IIC serial port communication will be stuck, causing the main program to be unable to proceed. At first, we have been troubleshooting the code logic and hardware circuit design problems, but later directly verified on the development board and found that the 3.3V power supply , it can drive normally. This problem is really a headache. If you have friends who have encountered similar problems, you can communicate with them.
  3. As mentioned before, when welding densely packed pins, you can use soldering oil and soldering tin, which is really useful.

10. Harvest

I am very grateful for the opportunity to participate in this Lichuang EDA & RA training camp. Indeed, I have learned a lot from this process.

  1. Become more familiar with and understand the tool development and use of Lichuang eda.
  2. Newly exposed to a development process of Renesas MCU,
  3. From the initial circuit design to welding to debugging to software implementation, I encountered some problems along the way and accumulated some experience, which can avoid unnecessary pitfalls in the future, and the possibility of falling into them again and being unable to get out.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 16:17:37

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号