전체상품목록 바로가기

본문 바로가기

CUSTOMER CENTER

032-565-7590

OPEN AM 09:00 - PM 18:00 / LUNCH TIME PM 12:00 - PM 13:00
SAT/SUN CLOSE !!

BANK ACCOUNT

KB국민은행 720501-01-405297
예금주 한진데이타

FOLLOW US


현재 위치
  1. 센서류
광학식 위치인식센서(Optical flow sensor) (P5033)
이전상품 다음 제품 보기 확대보기
추천메일 보내기 상품조르기 대량구매문의

[]광학식 위치인식센서(Optical flow sensor) (P5033)

(해외배송 가능상품)
공급사 바로가기
기본 정보
상품명 광학식 위치인식센서(Optical flow sensor) (P5033)
상품코드 P5033-I33
제조사 CHINA
판매가 45,000원 (부가세 미포함)
배송비 3,500원 (77,000원 이상 구매 시 무료)

개인결제창을 통한 결제 시 네이버 마일리지 적립 및 사용이 가능합니다.

상품 옵션
옵션 선택

(최소주문수량 1개 이상 / 최대주문수량 0개 이하)

사이즈 가이드

수량을 선택해주세요.

위 옵션선택 박스를 선택하시면 아래에 상품이 추가됩니다.

상품 목록
상품명 상품수 가격
광학식 위치인식센서(Optical flow sensor) (P5033) 수량증가 수량감소 45000 (  )
총 상품금액(수량) : 0 (0개)

할인가가 적용된 최종 결제예정금액은 주문 시 확인할 수 있습니다.

상품상세정보

ADNS3080 마우스 센서와 렌즈가 결합된 제품으로 장애물 회피나 수평고도 홀드에 주로 사용됩니다. APM2.5보드, 아두이노등에 연결하여 사용하실 수 있으며, 드론(DRONE)에 활용 가능합니다.



  • 메인칩 : ADNS-3080
  • 해상도 : 30 x 30 픽셀
  • 업데이트 속도 : 6400 fps
  • 렌즈 : 8mm (변경가능)
  • 렌즈 마운트 : M12 x 0.5


Sensor’s x and y values can be converted to real distances based on altitude

In order to convert values from the sensor to real distances moved, we need to take into account the altitude. This is necessary because as you can see from the two pictures below, if we have two quads moving the same distance, but one at a low altitude, the other at a higher altitude, the lower quad will see surface features appear to move further and this will result in a higher optical flow values





We compensate for vehicle roll and pitch changes

Change in the vehicle’s roll and pitch will also cause changes in the x and y values returned by the sensor. Unlike the lateral movement calculations these are not dependent upon the distance of the visible objects. In the picture below you can see that as the quad has rolled 10 degrees but both flowers have moved from the center of the camera’s view in the 1st pic to the edge of the view in the 2nd pic.


 The expected change in sensor values can be calculated directly from the change in roll and pitch given the formula below. We subtract these expected changes from the real values returned by the sensor.

Once we have the x/y movements we can integrate these values over time with the current yaw to arrive at an estimate of position.




<아두이노 예제코드>


// Test the ADNS3080 Optical Flow Sensor
// based on: Example of AP_OpticalFlow library by Randy Mackay. DIYDrones.com
//

#include "SPI.h"
#include "ADNS3080.h"

#define AP_SPI_DATAIN          12  //MISO
#define AP_SPI_DATAOUT         11  //MOSI
#define AP_SPI_CLOCK           13  //SCK
#define ADNS3080_CHIP_SELECT   10  //SS
#define ADNS3080_RESET         9   //RESET

byte orig_spi_settings_spcr;
byte orig_spi_settings_spsr;
int _cs_pin=ADNS3080_CHIP_SELECT;
int _reset_pin=1; // set to 1 if you have reset connected
unsigned int last_update;
boolean _overflow=false;
boolean _motion=false;
int raw_dx;
int raw_dy;
unsigned int surface_quality;

void setup() 
{
  Serial.begin(115200);
  Serial.println("www.bot-thoughts.com\nOptical Flow test program V1.0\n");
  
  delay(1000);
 
  // flowSensor initialization
  if( initOF() == false )
    Serial.println("Failed to initialise ADNS3080");

  delay(1000);
}

void loop() 
{
  int value;
 
  display_menu();

  // wait for user to enter something
  while( !Serial.available() ) {
    delay(20);
  }

  // get character from user
  value = Serial.read();
 
  switch( value ) {
 
  case 'c' :
    //display_config();
    break;
   
  case 'f' :
    //set_frame_rate();
    break;
   
  case 'i' :
    // display image
    display_image();
    break;
   
  case 'I' :
    display_image_continuously();
    break;
   
  case 'm' :
    display_motion();
    break;
   
  case 'r' :
    // set resolution
    //set_resolution();
    break;
   
  case 's' :
    //set_shutter_speed();
    break;
   
  case 'z' :
    //flowSensor.clear_motion();
    break;  
    
  case '\r' : // ignore return type characters
  case '\n' :
    break;
   
  default:
    Serial.println("unrecognised command");
    Serial.println();
    break; 
  }
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DISPLAY FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Prints out a list of functions.
void display_menu()
{
    Serial.println();
    Serial.println("please choose from the following options:");
// Serial.println("     c - display all config");
// Serial.println("     f - set frame rate");
 Serial.println("     i - display image");
 Serial.println("     I - display image continuously");
 Serial.println("     m - display motion"); 
// Serial.println("     r - set resolution");
// Serial.println("     s - set shutter speed");
// Serial.println("     z - clear all motion");
// Serial.println("     a - frame rate auto/manual");
 Serial.println();
}


// Captures and displays image from flowSensor
void display_image()

  Serial.println("image data --------------");
  print_pixel_data(&Serial);
  Serial.println("-------------------------");
}


// display_image - captures and displays image from flowSensor flowSensor
void display_image_continuously()

  int i;
  Serial.println("press any key to return to menu");

  Serial.flush();
 
  while( !Serial.available() ) {
  display_image();
  i=0;
    while( i<20 && !Serial.available() ) {
      delay(100);  // give the viewer a bit of time to catchup
      i++;
    }
  }
    
  Serial.flush();
}


// show x,y and squal values constantly until user presses a key
//
void display_motion()
{
  boolean first_time = true;
  Serial.flush();
 
  // display instructions on how to exit
  Serial.println("press x to return to menu..");
  delay(1000);
 
  while( !Serial.available() ) {
    updateOF();

    // check for errors
    if( _overflow )
      Serial.println("overflow!!");

    // x,y,squal
    Serial.print("dx: ");
    Serial.print(raw_dx,DEC);
    Serial.print("\tdy: ");
    Serial.print(raw_dy,DEC);
    Serial.print("\tsqual:");
    Serial.print(surface_quality,DEC);
    Serial.println();
    first_time = false;
  
    // short delay
    delay(100);
  }
 
  // flush the serial
  Serial.flush();
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ADNS3080 SPECIFIC FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

// reset sensor by holding a pin high (or is it low?) for 10us.
void reset()
{
  // return immediately if the reset pin is not defined
  if( _reset_pin == 0)
    return;

  digitalWrite(_reset_pin,HIGH);                 // reset sensor
  delayMicroseconds(10);
  digitalWrite(_reset_pin,LOW);                  // return sensor to normal
}


// Read a register from the sensor
byte read_register(byte address)
{
  byte result = 0, junk = 0;

  backup_spi_settings();

  // take the chip select low to select the device
  digitalWrite(_cs_pin, LOW);

  // send the device the register you want to read:
  junk = SPI.transfer(address);

  // small delay
  delayMicroseconds(50);

  // send a value of 0 to read the first byte returned:
  result = SPI.transfer(0x00);

  // take the chip select high to de-select:
  digitalWrite(_cs_pin, HIGH);

  restore_spi_settings();

  return result;
}


// init - initialise sensor
// initCommAPI parameter controls whether SPI interface is initialised (set to false if other devices are on the SPI bus and have already initialised the interface)
boolean initOF()
{
  int retry = 0;

  pinMode(AP_SPI_DATAOUT,OUTPUT);
  pinMode(AP_SPI_DATAIN,INPUT);
  pinMode(AP_SPI_CLOCK,OUTPUT);
  pinMode(_cs_pin,OUTPUT);
  if( _reset_pin != 0)
    pinMode(ADNS3080_RESET,OUTPUT);

  digitalWrite(_cs_pin,HIGH);                 // disable device (Chip select is active low)

  // reset the device
  reset();

  // start the SPI library:
  SPI.begin();

  // check the sensor is functioning
  if( retry < 3 ) {
    if( read_register(ADNS3080_PRODUCT_ID) == 0x17 )
      return true;
    retry++;
  }

  return false;
}


//
// backup_spi_settings - checks current SPI settings (clock speed, etc), sets values to what we need
//
byte backup_spi_settings()
{
  // store current spi values
  orig_spi_settings_spcr = SPCR & (DORD | CPOL | CPHA);
  orig_spi_settings_spsr = SPSR & SPI2X;
  
  // set the values that we need
  SPI.setBitOrder(MSBFIRST);
  SPI.setDataMode(SPI_MODE3);
  SPI.setClockDivider(SPI_CLOCK_DIV8);  // sensor running at 2Mhz.  this is it's maximum speed
  
  return orig_spi_settings_spcr;
}


// restore_spi_settings - restores SPI settings (clock speed, etc) to what their values were before the sensor used the bus
byte restore_spi_settings()
{
  byte temp;

  // restore SPSR
  temp = SPSR;
  temp &= ~SPI2X;
  temp |= orig_spi_settings_spsr;
  SPSR = temp;

  // restore SPCR
  temp = SPCR;
  temp &= ~(DORD | CPOL | CPHA);   // zero out the important bits
  temp |= orig_spi_settings_spcr;  // restore important bits
  SPCR = temp;

  return temp;
}


// write a value to one of the sensor's registers
void write_register(byte address, byte value)
{
  byte junk = 0;

  backup_spi_settings();

  // take the chip select low to select the device
  digitalWrite(_cs_pin, LOW);

  // send register address
  junk = SPI.transfer(address | 0x80 );

  // small delay
  delayMicroseconds(50);

  // send data
  junk = SPI.transfer(value);

  // take the chip select high to de-select:
  digitalWrite(_cs_pin, HIGH);

  restore_spi_settings();
}


// get_pixel_data - captures an image from the sensor and stores it to the pixe_data array
void print_pixel_data(Stream *serPort)
{
  int i,j;
  boolean isFirstPixel = true;
  byte regValue;
  byte pixelValue;

  // write to frame capture register to force capture of frame
  write_register(ADNS3080_FRAME_CAPTURE,0x83);

  // wait 3 frame periods + 10 nanoseconds for frame to be captured
  delayMicroseconds(1510);  // min frame speed is 2000 frames/second so 1 frame = 500 nano seconds.  so 500 x 3 + 10 = 1510

  // display the pixel data
  for( i=0; i    for( j=0; j      regValue = read_register(ADNS3080_FRAME_CAPTURE);
      if( isFirstPixel && (regValue & 0x40) == 0 ) {
        serPort->println("failed to find first pixel");
      }
      isFirstPixel = false;
      pixelValue = ( regValue << 2);
      serPort->print(pixelValue,DEC);
      if( j!= ADNS3080_PIXELS_X-1 )
        serPort->print(",");
      delayMicroseconds(50);
    }
    serPort->println();
  }

  // hardware reset to restore sensor to normal operation
  reset();
}

bool updateOF()
{
  byte motion_reg;
  surface_quality = (unsigned int)read_register(ADNS3080_SQUAL);
  delayMicroseconds(50);  // small delay

  // check for movement, update x,y values
  motion_reg = read_register(ADNS3080_MOTION);
  _overflow = ((motion_reg & 0x10) != 0);  // check if we've had an overflow
  if( (motion_reg & 0x80) != 0 ) {
    raw_dx = ((char)read_register(ADNS3080_DELTA_X));
    delayMicroseconds(50);  // small delay
    raw_dy = ((char)read_register(ADNS3080_DELTA_Y));
    _motion = true;
  }else{
    raw_dx = 0;
    raw_dy = 0;
  }
  last_update = millis();

  return true;
}


  


< APM2.5 보드와 연결시 >





 








상품결제정보

고액결제의 경우 안전을 위해 카드사에서 확인전화를 드릴 수도 있습니다. 확인과정에서 도난 카드의 사용이나 타인 명의의 주문등 정상적인 주문이 아니라고 판단될 경우 임의로 주문을 보류 또는 취소할 수 있습니다.  

무통장 입금은 상품 구매 대금은 PC뱅킹, 인터넷뱅킹, 텔레뱅킹 혹은 가까운 은행에서 직접 입금하시면 됩니다.  
주문시 입력한 입금자명과 실제입금자의 성명이 반드시 일치하여야 하며, 7일 이내로 입금을 하셔야 하며 입금되지 않은 주문은 자동취소 됩니다.

배송정보

  • 배송 방법 : 택배
  • 배송 지역 : 전국지역
  • 배송 비용 : 3,500원
  • 배송 기간 : 1일 ~ 2일
  • 배송 안내 : - 산간벽지나 도서지방은 별도의 추가금액을 지불하셔야 하는 경우가 있습니다.
    고객님께서 주문하신 상품은 입금 확인후 배송해 드립니다. 다만, 상품종류에 따라서 상품의 배송이 다소 지연될 수 있습니다.

교환 및 반품정보

교환 및 반품이 가능한 경우
- 구매자의 단순변심일시 상품을 수령 받으신 날로부터 7일이내 이며 구매자가 반품비를 부담합니다.
- 제품에 하자가 있을경우 상품 수령후 3개월이내 이며 판매자가 반품비를 부담합니다.

교환 및 반품이 불가능한 경우
- 반품/교환 요청기간이 지난 경우
- 제품이 멸실 또는 훼손된 경우 (단, 상품의 내용 확인을 위해 포장등을 훼손한 경우는 제외)
- 고객 주문후 제작에 들어가는 주문제작 상품
- 복제가 가능한 자료가 있는 상품의 포장을 훼손한 경우(CD, DVD, BOOK의 경우 포장 개봉 시)
사전 반품확인 없이 반품된 제품은 착불로 다시 고객님께 반품처리됩니다. 그외에 궁금한 사항은 고객센터로 연락부탁드립니다. 

※ 고객님의 마음이 바뀌어 교환, 반품을 하실 경우 상품반송 비용은 고객님께서 부담하셔야 합니다.
  (색상 교환, 부품 교환 등 포함)

서비스문의

상품사용후기

상품의 사용후기를 적어주세요.

게시물이 없습니다

상품문의하기 모두 보기

상품 Q&A

상품에 대해 궁금한 점을 해결해 드립니다.

게시물이 없습니다

상품문의하기 모두 보기



장바구니 0

맨위로


 

WORLD SHIPPING

PLEASE SELECT THE DESTINATION COUNTRY AND LANGUAGE :

GO
close