KY-008 650nm 5V Laser sensor Module (HCMODU0104)

Modules for various types of sensors including accelerometers. gyro's, IR motion, etc
Post Reply
admin
Site Admin
Posts: 727
Joined: Sun Aug 05, 2012 4:02 pm

KY-008 650nm 5V Laser sensor Module (HCMODU0104)

Post by admin » Mon Apr 25, 2016 1:32 pm

Image



This 100mW laser module emits a small intense focused beam of visible red light. The example provided below shows how the module can be used with an Arduino and photo resistor module (available here) to perform basic remote signaling.

Warning: This is a low power laser device, however as with all laser devices care should be taken when in use. You should never look directly in to its beam or point the laser at another person. Doing so may cause permanent eye damage. This item is not suitable for children.




Item Code: HCMODU0104
Operating voltage: 5V
Max Current (Laser on): ~30mA


PINOUT
1 – GND
2 – 5V
3 – S (Control: HIGH = Laser on);


This module can be purchased here.

The connection diagram below is for use with the transmit sketch.

Image


Receive Sketch

Code: Select all

/* Laser receive sketch */

/* Sets the threshold level.
   If the 'L' LED stays on when the laser is not on then increase this value.
   If the 'L' doesn't light up when the laser is on then reduce this value */
#define THRESHOLD 100

/* Used to control the 'L' LED on your Arduino */
#define LED_PIN 13

/* Connect the 'S' pin of your LDR module to analogue pin A0 */
#define LDR_PIN A0

void setup()
{
  pinMode(LED_PIN, OUTPUT); // Set the LED pin as an output
}

void loop()
{
  /* Has the laser been detected? */
  if(analogRead(LDR_PIN) < THRESHOLD)
  {
    digitalWrite(LED_PIN, HIGH); //If so then turn the 'L' LED on.
  }else
  {
    digitalWrite(LED_PIN, LOW); //If not then turn the 'L' LED off.
  }
}

Transmit Sketch

Code: Select all

/* Laser transmit sketch. */

/* Connect the 'S' pin of the laser to pin 13 on your Arduino. */
#define LASER_PIN 13


void setup()
{
 pinMode(LASER_PIN, OUTPUT); //Set laser pin as an output
}

void loop()
{
 digitalWrite(LASER_PIN, HIGH); //Turn laser on for 1 second
 delay(1000);
 digitalWrite(LASER_PIN, LOW); //Turnlaser off for 1 second
 delay(1000);
}

Post Reply