Using the KY-008 Laser Module with Arduino.

/home/wpcom/public_html/wp-content/blogs.dir/10d/72092500/files/2014/12/img_1550.jpg

This small, 5mw laser is available on eBay for as little as £1. It seems that on some boards the silk screen printing was reversed, so if the module does not seem to work it’s worth reversing the connections. The pin connection are as follows

Pin – = Gnd
Pin (middle pin)
Pin S = +5V/Signal

A simple test sketch is:

// Simple Laser test, connect pin S to Arduino pin 13 and - to Gnd

void setup ()
{
pinMode (13, OUTPUT); // define the digital output
}
void loop () {
digitalWrite (13, HIGH); // turn on the laser
delay (1000); // delay one second
digitalWrite (13, LOW); // turn off the laser
delay (1000); // delay one second
}

I intend to expand this post over the next few days to a Broken Beam detector.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s