Space Whale

GY-63 (MS5611) 기압 센서 본문

MCU

GY-63 (MS5611) 기압 센서

우주 푸른바다 그리고 고래 2020. 8. 14. 16:02

드론을들어 날려보면 일정한 높이에 드론이 있지않아 고도제어(Z방향)를 지속적으로 해야 한다. 여기에  공기의 흐름에 따라 수평적 위치(X방향, Y방향)도 동시에 제어를 해야 한다. 쉽지않은 일이다.

물리적으로 프로펠러의 추력을 조정해서 무게와 움직임이 있는 관성체를 제어하는 것은 제어시간과 반응시간의 차이가 발생하기 때문에 어느쪽의 과도한 제어가 입력되면 안정상태가 깨지게 된다.

따라서 고도유지를 자동으로 하기위한 방법으로 기압센서를 적용한다.

고도변경 명령이 아니면 현재 설정된 고도를 유지한다.

제어로 설정된 고도와 현재의 고도를 비교하여 현재의 고도 피드백하여 설정고도로 유지한다.

기압제어 센서를 활용하여 현재의 기압을 고도로 치환하여 사용하는 방법을 적용한다.

먼저 사양부분을 포스팅 합니다.   

 

GY-63 모듈

 

GY-63 모듈

 

GY-63 Sensor Module

 

Data Sheet

 

MS5611 datasheet.pdf
0.56MB

 

MS5611 
- Barometric Pressure Sensor, with stainless steel cap

MS5611

SPECIFICATIONS 

 High resolution module, 10 cm 
 Fast conversion down to 1 ms 
 Low power, 1 μA (standby < 0.15 μA) 
 QFN package 5.0 x 3.0 x 1.0 mm3 
 Supply voltage 1.8 to 3.6 V (MS5611 Chip : 모듈 3.3 V LDO 전압 레귤레이터사용 3.3V~5V 사용가능
)
 Integrated digital pressure sensor (24 bit ΔΣ ADC) 
 Operating range: 10 to 1200 mbar, -40 to +85 °C 
 I2C and SPI interface up to 20 MHz 

 

FUNCTIONAL DESCRIPTION

 

SERIAL INTERFACE Protocol 선택 

SPI MODE

외부 마이크로 컨트롤러로부터 SCLK (Serial CLocK) 입력 받아 SDI (Serial Data In) 통해 데이터를 입력 받습니다. SPI 모드에서 모듈은 Clock 극성 위상에 대해 모드0 모드3 모두 지원하며, 센서의 출력은 SDO (Serial Data Out) 통해 응답합니다 CSB (Chip Select) 인터페이스를 활성화 / 비활성화 하는데 사용되며, 다른 장치가 동일한 SPI 버스에서 통신 있습니다칩을 활성화 하여 사용하기위해서는 해당 Chip CSB 핀을 LOW상태로 통신이 이루어 지며, 명령이 전송 또는 명령 실행이 끝난 High 상태로 Chip 비활성화 상태로 놓습니다.

 

COMMANDS
The MS5611-01BA has only five basic commands:
1. Reset
2. Read PROM (128 bit of calibration words)
3. D1 conversion
4. D2 conversion
5. Read ADC result (24 bit pressure / temperature)

 

SPI INTERFACE  
Size of each command is 1 byte (8 bits) as described in the table below. After ADC read commands the device will return 24 bit result and after the PROM read 16bit result. The address of the PROM is embedded inside of the PROM read command using the a2, a1 and a0 bits.

 

RESET SEQUENCE
The Reset sequence shall be sent once after power-on to make sure that the calibration PROM gets loaded into
the internal register. It can be also used to reset the device ROM from an unknown condition

CONVERSION SEQUENCE The conversion command is used to initiate uncompensated pressure (D1) or uncompensated temperature (D2) conversion. The chip select can be disabled during this time to communicate with other devices. after the conversion, using ADC read command the result is clocked out with the MSB first. If the conversion is not executed before the ADC read command, or the ADC read command is repeated, it will give 0 as the output result. If the ADC read command is sent during conversion the result will be 0, the conversion will not stop and the final result will be wrong. Conversion sequence sent during the already started conversion process will yield incorrect result as well.

 

 

SPI 통신조건 확인

 - Clock Polarity는 idle 상태에서 Clock핀을 Low 설정
 - Clock Phase 첫번째 edge에서 함.
 - MSB First (8Bit)
 - 데이터 속도는 20Mhz 이하로 설정

 

APPLICATION CIRCUIT
The MS5611is a circuit that can be used in conjunction with a microcontroller in mobile altimeter applications. It is designed for low-voltage systems with a supply voltage of 3 V.

 

아래 그림에서 보면 SPI통신을 하고자 하면 PS 핀을 GND(Low) 로 연결을 해야 하며 I2C통신을 할때는 VDD(High)상태로 연결을 해야한다.

 

 

 

 

'MCU' 카테고리의 다른 글

◈ MPU-6050를 이용한 3축 회전각도 계산  (1) 2020.07.03
◈ HC-06 블루투스 모듈  (0) 2020.06.27
433MHz RF 무선 송수신모듈 ( FS1000A/XY-MK-5V)  (0) 2019.12.07
STM32F302C8T6 Nucleo-64  (0) 2019.12.07