MYSHOP

최근 본 상품

이전 제품

다음 제품

현재 위치

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

(해외배송 가능상품)
공급사 바로가기
기본 정보
상품명
광학식 위치인식센서(Optical flow sensor)(P5033)
판매가
49,500원
원산지
CHINA
상품코드
P000EHYK
수량
수량증가수량감소
세액
4,950원
공급사
한진데이타
SNS 상품홍보
SNS 상품홍보

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

상품 옵션
옵션 선택

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

사이즈 가이드

수량을 선택해주세요.

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

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

 

상품상세정보



제품소개

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

주요기능

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


예제코드

<아두이노 예제코드>

// 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 xy 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!!");

// xysqual
Serial.print("dx: ");
Serial.print(raw_dxDEC);
Serial.print("\tdy: ");
Serial.print(raw_dyDEC);
Serial.print("\tsqual:");
Serial.print(surface_qualityDEC);
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_pinHIGH); // reset sensor
delayMicroseconds(10);
digitalWrite(_reset_pinLOW); // 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_DATAOUTOUTPUT);
pinMode(AP_SPI_DATAININPUT);
pinMode(AP_SPI_CLOCKOUTPUT);
pinMode(_cs_pinOUTPUT);
if( _reset_pin != 0)
pinMode(ADNS3080_RESETOUTPUT);

digitalWrite(_cs_pinHIGH); // 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 ij;
boolean isFirstPixel = true;
byte regValue;
byte pixelValue;

// write to frame capture register to force capture of frame
write_register(ADNS3080_FRAME_CAPTURE0x83);

// 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(pixelValueDEC);
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 xy 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;
}


회로설명

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.

사진갤러리



응용

< APM2.5 보드와 연결시 >




제공문서




상품결제정보

* 세금계산서 발행방법은 게시판 공지사항 참조.
* 기술문의는 이메일(
master@toolparts.co.kr)로 문의.

전자부품 특성상 제품에 이상이 있거나, 상품정보와 상이한 경우 외 에 단순 고객변심으로는
교환 반품이 불가능 합니다 구매전 이점 유의해 주세요!!!

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

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

배송정보

  • 배송 방법 : 택배
  • 배송 지역 : 전국지역
  • 배송 비용 : 3,300원
  • 배송 기간 : 1일 ~ 2일
  • 배송 안내 : 산간벽지나 도서지방은 별도의 추가금액을 지불하셔야 하는 경우가 있습니다.
    주문하신 제품은 입금확인후 1~3일 내에 출고되며 (해외배송)으로 표시된 제품은
    해외배송 제품으로 배송기간이 약 10일~14일정도 소요될수 있습니다.
    구매전 해외배송 제품은 배송기간을 꼭 확인해 주세요.
    해외배송 진행하신상품은 반품 불가능 합니다.

교환 및 반품정보

교환 및 반품이 가능한 경우
- 상품을 공급 받으신 날로부터 7일이내 단, 가전제품의
  경우 포장을 개봉하였거나 포장이 훼손되어 상품가치가 상실된 경우에는 교환/반품이 불가능합니다.
- 공급받으신 상품 및 용역의 내용이 표시.광고 내용과
  다르거나 다르게 이행된 경우에는 공급받은 날로부터 3월이내, 그사실을 알게 된 날로부터 30일이내

교환 및 반품이 불가능한 경우
- 고객님의 책임 있는 사유로 상품등이 멸실 또는 훼손된 경우. 단, 상품의 내용을 확인하기 위하여
  포장 등을 훼손한 경우는 제외
- 포장을 개봉하였거나 포장이 훼손되어 상품가치가 상실된 경우
  (예 : 가전제품, 식품, 음반 등, 단 액정화면이 부착된 노트북, LCD모니터, 디지털 카메라 등의 불량화소에
  따른 반품/교환은 제조사 기준에 따릅니다.)
- 고객님의 사용 또는 일부 소비에 의하여 상품의 가치가 현저히 감소한 경우 단, 화장품등의 경우 시용제품을
  제공한 경우에 한 합니다.
- 시간의 경과에 의하여 재판매가 곤란할 정도로 상품등의 가치가 현저히 감소한 경우
- 복제가 가능한 상품등의 포장을 훼손한 경우
  (자세한 내용은 고객만족센터 1:1 E-MAIL상담을 이용해 주시기 바랍니다.)

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


서비스문의

상품사용후기

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

게시물이 없습니다

상품문의하기 모두 보기

상품 Q&A

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

게시물이 없습니다

상품문의하기 모두 보기