张小哥

R6S Black Eye_Independent camera control module

 
Overview

1 Project Development Tools

1.1 Microcontroller Development (MCU Development)

The microcontroller is Atmega 32U4 and developed using Arduino. Atmega 32u4 corresponds to Leonardo of Arduino

1.2 PCB drawing (Pcb Layout)

PCB drawing uses Lichuang EDA

1.3 3D model construction (3D Software)

SolidWorks.

2 File content introduction (File description)

2.1 3D_Model

Includes shell source files drawn using SolidWorks and STL files for 3D printing.

2.2 Arduino_Code

Includes the Arduino source code for the black eye and controller, excluding the NRF/OLED libraries used.

2.3 PCB

Includes PCB schematics and PCB diagrams of the black eye and controller.

3 Basic working principles

The Arduino code is divided into two parts: Master & Slave, Master is the program of the control board, and Slave is the program of the black eye.

3.1 Master

3.1.1 Operating mechanism:

After the control board is started, the setup() section will be initialized.

1) Initialize the NRF module and start ACK mode.

2) Initialize Analog IO: A0 A1. Corresponds to the rocker potentiometer.

3) The initialization button is interrupted. (The button directly uses interrupts for input instead of scanning. Anyway, interrupts are enough XD)

4) Initialize the OLED and display the Black Eye icon for two seconds.

After the initialization is completed, the control board will continue to send data (command 7) through NRF in loop() and attempt to obtain ACK return packets.

If the data of the returned packet is correct, the connection is successful and the screen enters the working mode.

The ACK return packet includes the following information: servo speed, battery voltage, image transmission switch status, and servo switch status.

Regardless of whether the connection is successful or not, the control panel will still send control commands:

command 1/2/3/4: used to control the servo

command 5/6/8: used to control servo power/image transmission power/change servo speed

If there is no response after sending Command7 for more than 3 seconds, it is determined that the connection is disconnected.

3.2 Master

3.2.1 Operating mechanism:

Similar to Master, setup() performs NRF and IO initialization. A0 obtains the battery voltage, and control1/2 is used to switch the MOS tube that controls the image transmission and servo power supply.

In loop(), commands from Master will be continuously received and returned through ack after processing.

GitHub video address

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 13:41:36
  • Questions about phy
  • I can't access my ccs, please help
  • Looking for David_Lee, let’s talk on QQ. . .
  • Does anyone know the development environment for es6168 or es8381 chips from Essence?
  • Problems installing Android ADT
  • I2C Bus Problems

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号