Sunday, November 2, 2014

controlling camera with rc transmitter

controlling sony block camera through 
rc remote control using arduino

for this demo i used 3.3v as power source for the
rc receiver but in real life it will probably be a 5v
power source so youll need to figure a way who to 
do it (resistors, level converter...) 

so lets start 
what you need:
sony block camera (visca)
arduino (3.3v)
rc transmitter
rc receiver
monitor with av

fcb-ex11d

arduino mini 3.3v

rc transmitter - spektrum dx6i

ar6200

then you'll need to hook up the wires as so
camera rx to arduino tx
camera tx to arduino rx
camera gnd to arduino gnd
arduino digital pin 3 to reciever elev channel


then you left with video 
and the power of the camera
power specs says 6v-12v
and video is ntsc so any suitable 
monitor will do the job



and of course the code :)

/*  build and tested using 
 sony camera  block fcb-ex11d and 
 rc transmitter spektrum dx6i with 
 ar6200 reciever and connected to the elev channel */
byte address_set[4]= {0x88, 0x30, 0x01, 0xFF};
byte if_clear[5]= {0x88, 0x01, 0x00, 0x01, 0xFF};
byte command_cancel[3]= {0x81,0x21,0xFF};
byte zoom_teleVar[6]= {0x81, 0x01, 0x04, 0x07, 0x23, 0xFF};  //zoom in     81 01 04 07 2p FF - p=0 (low) to 7 (high)
byte zoom_wideVar[6]= {0x81, 0x01, 0x04, 0x07, 0x33, 0xFF};  //zoom out   81 01 04 07 3p FF - p=0 (low) to 7 (high)
byte zoom_stop[6]= {0x81, 0x01, 0x04, 0x07, 0x00, 0xFF};  //stop zoom
byte auto_focus[6]= {0x81, 0x01, 0x04, 0x38, 0x02, 0xFF};  //auto focus

const int thisdelay= 250;   //time between sets
const int zoom_out=3;          //Zoom 

void setup() {
  pinMode(zoom_in, INPUT);
  pinMode(zoom_out, INPUT);
  // initialize both serial ports:
  Serial.begin(9600);  
  //send Address set
  for (int i=0; i<4; i++){
    Serial.write(address_set[i]);
  }
delay(thisdelay);
  //send IF_clear set
  for (int i=0; i<5; i++){
    Serial.write(if_clear[i]);
     delay(thisdelay);
    }
  }


//zoom in
void loop() {
  int zoom_inState=pulseIn(3, HIGH, 25000);  
  if(zoom_inState>1550 )
  {
    delay(thisdelay);
    //Send zoom tele set
    for (int i=0; i<6; i++){
      Serial.write(zoom_teleVar[i]);
    }
  }

  //zoom out
  int zoom_outState=pulseIn(3, HIGH, 25000);
  if(zoom_outState < 1400 ) 
  {
    delay(thisdelay);
    for (int i=0; i<6; i++){
      Serial.write(zoom_wideVar[i]);
    }
  }
  //zoom stop
  if(zoom_outState < 1500 && zoom_inState > 1400 ){
     //send auto focus cmd
     for (int i=0; i<6; i++){
      Serial.write(auto_focus[i]);
     }
      //send zoom stop
    for (int i=0; i<6; i++){
      Serial.write(zoom_stop[i]);
  }
  }
}


void sendcommand_cancel(){
  for (int i=0; i<3; i++){
    Serial.write(command_cancel[i]);
  }
}

----------------------------------------------------------------------------------
                           for attiny85
----------------------------------------------------------------------------------
/*  build and tested using 
 sony camera  block fcb-ex11d and 
 rc transmitter spektrum dx6i with 
 ar6200 reciever and connected to the elev channel */

#include <SoftwareSerial.h>

#define  zoom  PB0          // zoom 
#define rxPin  PB1        // rx
#define txPin PB2        // tx

SoftwareSerial mySerial(rxPin, txPin);

byte address_set[4]= {0x88, 0x30, 0x01, 0xFF};
byte if_clear[5]= {0x88, 0x01, 0x00, 0x01, 0xFF};
byte command_cancel[3]= {0x81,0x21,0xFF};
byte zoom_teleVar[6]= {0x81, 0x01, 0x04, 0x07, 0x23, 0xFF};  //zoom in     81 01 04 07 2p FF - p=0 (low) to 7 (high)
byte zoom_wideVar[6]= {0x81, 0x01, 0x04, 0x07, 0x33, 0xFF};  //zoom out   81 01 04 07 3p FF - p=0 (low) to 7 (high)
byte zoom_stop[6]= {0x81, 0x01, 0x04, 0x07, 0x00, 0xFF};  //stop zoom
byte auto_focus[6]= {0x81, 0x01, 0x04, 0x38, 0x02, 0xFF};  //auto focus

const int thisdelay= 250;   //time between sets

void setup() {
         pinMode(rxPin, INPUT);
         pinMode(txPin, OUTPUT);
  pinMode(zoom, INPUT);
  // initialize both serial ports:
  mySerial.begin(9600);  
  //send Address set
  for (int i=0; i<4; i++){
    mySerial.write(address_set[i]);
  }
delay(thisdelay);
  //send IF_clear set
  for (int i=0; i<5; i++){
    mySerial.write(if_clear[i]);
     delay(thisdelay);
    }
  }


//zoom in
void loop() {
  int zoom_inState=pulseIn(zoom, HIGH, 25000);  
  if(zoom_inState>1550 )
  {
    delay(thisdelay);
    //Send zoom tele set
    for (int i=0; i<6; i++){
      mySerial.write(zoom_teleVar[i]);
    }
  }

  //zoom out
  int zoom_outState=pulseIn(zoom, HIGH, 25000);
  if(zoom_outState < 1400 ) 
  {
    delay(thisdelay);
    for (int i=0; i<6; i++){
      mySerial.write(zoom_wideVar[i]);
    }
  }
  //zoom stop
  if(zoom_outState < 1500 && zoom_inState > 1400 ){
     //send auto focus cmd
     for (int i=0; i<6; i++){
      mySerial.write(auto_focus[i]);
     }
      //send zoom stop
    for (int i=0; i<6; i++){
      mySerial.write(zoom_stop[i]);
  }
  }
}


void sendcommand_cancel(){
  for (int i=0; i<3; i++){
    mySerial.write(command_cancel[i]);
  }
}

Tuesday, October 28, 2014

lg laptop camera hack

here is the pinout for lg laptop camera module
it is directed for the 6-pin version
lg laptop camera pinout
21QCMMA0070
EBP56601301
DAQCMMB76CO

lg laptop camera pinout 2
6-pin from left to right 

all you need to do is just solder it to usb wire
in the following order:

pin1:    gnd
pin2:  audio
pin3:  audio
pin4:       +5
pin5:  data+
pin6:   data-

lg laptop camera pinout 3
the top wire is the first out of six wires

Monday, October 27, 2014

diy bicycle auto led switch

having a trouble of forgetting 
to turn on or off your bicycle tail light?

well no more just build an automatic
 powering switch for the light whenever you riding 

for start i had a led shower-head 
that i got from my father that switches 
colors according to the water temperature
throughout a thermistor (resistor who change
 its resistance according to the temp)       

so i needed to hack the thermistor (temperature sensor) 
in order to control the different led colors
 (blue, green, red)  
to do so i used a 22kohm variable resistor
 for checking the resistance of each color
and then i could control the led with simple resistor




the last one was blinking red which was a great thing 
as it save me the use of another component 

so i just needed to hook it to a battery and a switch 
and figure a way to mount it to the seat 

the end result



Sunday, January 5, 2014

micron a10

micron A10 thermal imager

pinout

internal look

power board

success

just need to add a 75ohm resistor to gnd and
thermal video camera