임베디드 보드/아두이노

TF-Luna ToF Ranging LiDAR -8m 거리 측정

ZEROWIN.TECH 2020. 7. 30. 19:28
728x90

 

 

1cm의 해상도로 측정 범위가 최대 8m 인 ToF (Time of Flight) 거리 센서 기반의 싱글 포인트 LIDAR. 고유 한 광학 구조 덕분에 안정적이고 정확하며 매우 민감한 측정을 수행 할 수 있습니다. 최대 거리 8m에서의 측정 오류는 2.5cm에 불과합니다. 이 센서는 크기가 작고 무게가 작습니다. 소형 차량의 장애물 감지 센서 또는 비행 물체의지면 충격으로부터 보호하기에 적합합니다.

 

데이터시트

https://github.com/May-DFRobot/DFRobot/blob/master/TF-Luna%20LiDAR%EF%BC%888m%EF%BC%89%20Datasheet.pdf

 

May-DFRobot/DFRobot

www.dfrobot.com. Contribute to May-DFRobot/DFRobot development by creating an account on GitHub.

github.com

https://github.com/May-DFRobot/DFRobot/blob/master/TF-Luna%20LiDAR%EF%BC%888m%EF%BC%89Product%20Manual.pdf

메뉴얼

 

 

May-DFRobot/DFRobot

www.dfrobot.com. Contribute to May-DFRobot/DFRobot development by creating an account on GitHub.

github.com

거리측정 관련 여러가지 센서들이 있습니다. 측정 거리에 맞게 선택하시면 됩니다.

https://www.dfrobot.com/product-1995.html

 

 

TF-Luna (ToF) Micro Single-point Ranging LiDAR- DFRobot

You have choosen:[[togetherChouseinfo.num]] Total amount: [[currency]][[togetherChouseinfo.price]] [[togetherChouseinfo.price]][[currency]]

www.dfrobot.com

 

소스코드

아두이노 시리얼 포트를 이용하여 쉽게 확인이 가능합니다.

/* For Arduinoboards with multiple serial ports like DUEboard, interpret above two pieces of code and
directly use Serial1 serial port*/
int dist;//actual distance measurements of LiDAR
int strength;//signal strength of LiDAR
int check;//save check value
int i;
int uart[9];//save data measured by LiDAR
const int HEADER=0x59;//frame header of data package

void loop_ridar()
{
  if (mySerial.available())//check if serial port has data input
  {
    if(mySerial.read()==HEADER)//assess data package frame header 0x59
    { 
      uart[0]=HEADER;
      if(mySerial.read()==HEADER)//assess data package frame header 0x59
      { 
        uart[1]=HEADER;
        
        for(i=2;i<9;i++)//save data in array
        {
          uart[i]=mySerial.read();
        }
          check=uart[0]+uart[1]+uart[2]+uart[3]+uart[4]+uart[5]+uart[6]+uart[7];
          
          if(uart[8]==(check&0xff))//verify the received data as per protocol
          {
            dist=uart[2]+uart[3]*256;//calculate distance value
            strength=uart[4]+uart[5]*256;//calculate signal strength value
            //Serial.print("dist = ");
            //Serial.print(dist);//output measure distance value of LiDAR
            //Serial.print('\t');
            //Serial.print("strength = ");
            //Serial.print(strength);//output signal strength value
            // Serial.print('\n');
          }
      }
    }
  }
}

테스트영상