A CNC Engraver Platform - Part 1

Friday, July 18 2014 @ 10:31 PM

I have been looking for a way to simplify the creation of PCBs with a fairly high degree of accuracy - my series of posts about using a laser diode from a DVD/RW drive was an experiment to see if I could use that to expose copper on a PCB by burning away a layer of paint applied to the board. Unfortunately it turns out they are not powerful enough for the task (although they are still useful for other things).

I started looking at other options including purchasing a CNC router to perform the task by cutting the copper layer away directly. Unfortunately the price of a full CNC router ranges from around $AU 600 to $AU 1500 depending on the size of the work area and if you get it as a kit or not - at this price it is a bit hard to justify given the purpose I want to use it for.

It then occurred to me that I could use a hybrid process - use a layer of paint to protect the copper from etchant and use a simple engraving tool to expose the areas I do want to remove. I did some simple tests using a cheap engraver from Jaycar and proved that you could use it to create relatively fine lines through a coat of spray paint.

The next step is to mount this on a device controllable through G-code commands so I can try it with complete boards. Because the amount of force required is far less than that needed to cut through the copper layer completely and you don't need precise control in the Z direction it should be possible to make the bed at a far cheaper price using easily obtainable materials. This is the first in a series of posts describing my attempt to do just that.

I'm writing these posts as I progress so I have no idea if the end result will be a working device or not. If you spot anything that I'm doing wrong or that I could improve please speak up in the comments. The project is hosted on GitHub so feel free to poke around.

Anticipated Design

The design I'm starting with is fairly simple - a work bed that moves in the X direction and a tool head moving in the Y direction. The tool head only has two states - active and inactive - there is no fine control over movement in the Z direction. There are a few goals I want to achieve with this design:

  1. Wherever possible all the parts should be easily available at a reasonable price from a number of sources - no speciality components or difficult to acquire pieces. I want the project to replicable if I want to build another one at some point or if someone else wants to build one for themselves.
  2. Where custom components are required they should be easy to print on a consumer level 3D printer like a MakerBot or Solidoodle.
  3. Although I'm planning on using the engraver as the tool head I would also like to be able to easily switch it out for a laser and be able to experiment with other tools as well. This means the basic tool head will simply be a mounting frame with a set of control and power lines available that you can attach whatever tool you want to use at the time.

I've settled on using a threaded rod as the drive mechanism for the bed (X axis) rather than a belt driven system - it seems less fiddly and the parts required to put it together are very easy to get as well as being cheap. I will most likely use the same mechanism for the Y axis but I will wait to see how well it works first before finalising that decision.

For the electronics side I'll stick with a standard Arduino or compatible as the main processor and use a motor driver shield to control the stepper motors. The hardware is relatively cheap and definitely readily available - there is also a lot of code available that can be pressed into service to drive the whole thing with minimal modifications. This means I can concentrate on the mechanical side of things without adding additional complexity.

Constructing the Base and Bed

The first step is to build a suitable base and put the mechanical components in place to drive the bed. The threaded rod mechanism requires bearings at either end of the rod and one end to be coupled to a stepper motor. The bed is attached to the rod with nuts and, as the rod is rotated, the nuts slide down the length of it taking the bed with them. We also need some guide rods at the edges so the bed cannot rotate around the drive screw and will remain balanced even if the load placed on it is uneven. The parts I'm using for this are:

  1. 9mm MDF for the base. It's relatively light for it's strength and an easy material to work with.
  2. Xmm MDF for the workbed.
  3. A length of 5/16" threaded rod and matching 5/16" hex nuts.
  4. Two 608 bearings to mount the threaded rod.
  5. Two lengths of aluminium tubing for the guide rods.
  6. A Nyloc nut to help with coupling the threaded rod to the stepper motor.
  7. A stepper motor.
  8. Limit switches for detecting the maximum movement.

All of the parts above came from Bunnings except for the bearings which I bought from a skate shop (they are the same type used in skate boards), the limit switches which came from Jaycar and the stepper motor which I bought from Little Bird Electronics.

Base Layout

I'm aiming for at least a 15cm x 15cm usable work area, it's large enough to be useful but small enough that the final assembly will fit neatly on a workbench. This means the bed will need to be at least the width of the work area and twice the length - so 30cm x 15cm at a minimum. The diagram to the left shows my planned layout for the base and shows the mounts and coupling components that will be required.

Bed Layout

Because the bed and the base are tightly linked they need to be constructed at the same time. The bed is somewhat simpler - it only requires attachments to the guide rods and the threaded rod. The diagram to the right shows how they are laid out.

I apologise for the quality of the diagrams, at this stage it is all very much a work in progress so I'm simply doing a basic layout using the Inkscape tool. The numbers on the components are the arbitrary part numbers I have assigned to the the printed parts - these are described in more detail below.

Coupling and Mounts

All the mounts and the motor coupling are 3D printed and are designed to use M4 bolts to attach them to the base. You can find the OpenSCAD source for them here. At the time of writing these are very much works in progress - I haven't had the chance to put them together yet.

Note: The components in the current design take a long time to print - with my printer (a Solidoodle 2) it takes about 12 hours of printing to make all the parts (4 print runs at an average of 3 hours per run). The largest part just barely fits into the print area I have available (6" x 6"). If you are trying to duplicate this project be prepared for a lot of print time.

At this stage I'm not entirely sure that the plastic components will be strong enough or if they will provide a tight enough grip on the components they are being attached to. I'm trying to avoid the use of non-removable connections so I'm using grub screws instead of glue to fasten the components.

The grub screw concept was introduced to me by a friend. Essentially you need to provide a way to introduce a nut into your print with a bolt hole that will engage with the nut while keeping a slice of plastic between the two. This allows you use the tip of the bolt to apply pressure to the target surface by using the plastic to absorb the force. My friend goes to the extent of dropping the nut in to the print at the opportune time so the print continues around it, my approach is to provide a slot (with a suitable hexagonal shape at the bottom) that you can drop the nut into and insert the screw to the side of it.

In this section of the post I describe the parts that are needed and provide a basic description of their design and requirements. So far I have tested these for sizing and interaction but haven't fully assembled them yet so changes may be required. In the headings for the various components I've included the part numbers I have assigned to them (see the layout diagrams above) so it is a bit easier to match the part type to the purpose it serves.

Guide Rod Mounts (Parts 1, 2 & 6)

Part #2

There are three types of these, the first is used to attach the guide rod to the base and simply consists of a hole for the guide rod to fit in, a slot to hold the nut for the grub screw and bolt holes for attaching to the bed (this is part number 2), the rod is fixed in place with the grub screw. The second type is a simple variation of the first which adds a slot to mount the limit switch (this is part number 1). The arm of the limit switch extends upwards so when the bed has reached its limit of travel the controller knows it cannot move in that direction anymore.

The third and final version is used to attach the bed to the guide rods. This version does away with the grub screw and the hole for the rod passes completely through. The fit on this needs to be relatively tight to avoid wobbles but still loose enough to allow it to slide freely across the guide. I'm planning on using a silicon based lubricant to help with this.

Bed Drive Mount (Part 7)

Part #7

This part (shown to the left) is very simple - it clips on to a hexagonal nut that is screwed on to the threaded rod. My concern with this part is that the orientation of the print means that the force applied to it (and it will be subject to all movement force for the bed) will be in the same orientation of the print layers, although I don't expect a large amount of force to be applied the part may degrade over time.

Bearing Mount (Part 3)

Part #3

The bearing mount (shown to the right) simply needs to hold the 608 bearing in place while allowing it to freely spin. The threaded rod will be mounted in these bearings which will allow it to rotate freely without allowing it to move laterally. There is only a single bearing only mount required, for the other end I merged it with the motor mount to make a single piece.

Motor Mount (Part 4)

Part #4

This is the largest individual piece in the collection - it merges a bearing mount (as described above) with a holder for the stepper motor while allowing space for the motor coupling (described below). The piece, while large, is very straight forward. The only issue to take into account is ensuring the fit for the motor is tight enough that it doesn't wobble when it changes direction. My initial print for this is a little loose (see the image to the left) but I think I can correct for that with some suitable filler material.

Motor Coupling (Part 5)

This part is the most risky - it's job is to couple the shaft of the stepper motor with the threaded rod. To do this I am using a Nyloc nut on the threaded rod and a grub screw to attach the stepper motor shaft.

Part #5

If you are not familiar with Nyloc nuts they are a standard hexagonal nut with a nylon coating on the thread - they require a significant amount of force to screw on to (or screw off) the thread they are put on. This is fairly straight forward and relatively low risk - the hexagonal shape is a lot easier for a 3D printed plastic part to grip on to than a screw thread, by making the part a suitably tight fit you will get a coupling on that end that will transfer the rotational force with very little slippage.

My concern is the coupling to the circular shaft of the stepper motor - some motors provide a shaft with a flat surface on one side, the ones I am using are circular. My coupler design uses a grub screw to attach the motor end so it is purely a pressure based connect - at the moment I'm not sure if the force applied will cause slippage or not (I'm hoping not). This design would certainly not be suitable for applications that would require strong lateral forces (such as cutting through metal, even the thin layer of copper on a PCB). As I'm not planning to do that I'm hoping it will be fine.

Next Steps

I have completed the first design for all the 3D parts and have printed out most of them, the remaining parts are printing now. Over the weekend I will start to put everything together and see how well it all works out. I will be posting updates to my Google+ feed as I go about this and write up the results in a follow up post as soon as I get the chance.

The construction process should be fairly straightforward, how well it works once assembled is something I need to measure fairly carefully. I am hoping for at least an accuracy of 0.3mm - that would allow me to build the type of PCBs I want, if I can get an accuracy of 0.1mm out of the device that would be a great bonus.


Android Wear - A Makers View of the Samsung Gear Live

Sunday, July 13 2014 @ 01:01 PM

This post is a little bit different from the normal content I have here - I recently bought myself a Samsung Gear Live running Android Wear. Now that I've had it for a few days I thought it would be worthwhile doing a review from the point of few of someone who likes to tinker with their devices.

In this review I'm more interested in what I can do with the watch so I'm not going to go into a lot of details about the hardware and software that make it up. If you would like more details about those aspects I recommend the series of reviews at Ars Technica:

In my review I'll give an overview of the device itself and the Android Wear software that runs on it and then show you some ways you can start using it as an accessory for your own projects. I'd like to apologise in advance for the quality of the photos - it turns out to be very difficult to take good quality photos of an LCD screen that wants to turn off very quickly. Where possible I've used images from other sources instead.

Overview

Samsung have released a number of smart watches over the past few years, from the original Galaxy Gear (running Android) to the Gear 2 (running Tizen) and the Gear Fit. The Gear Live, despite being one of the first devices running Android Wear at launch seems to be almost a side project for them (it's not mentioned on their wearables site for example).

Unlike the version of Android for phone and tablets Android Wear seems to be far more tightly controlled by Google so the hardware vendor has much less influence on the behaviour of the device - just about everything I describe here (at least in terms of the software) will behave exactly the same way on the LG G Watch (the other launch device) as well as the upcoming Motorola Moto 360. The biggest differences involve form factor, battery life and what embedded sensors are included.

It's worth making clear that Google Wear devices are not standalone devices, they are an accessory for your phone - a bluetooth screen instead of a bluetooth headset if you like. Take away the phone (or even go out of range) and there is very little you can do with them (apart from tell the time of course).

To use the watch you need an Android phone running Android 4.3 or later - there is no support for iOS or Windows Phone and I doubt there ever will be. Choosing a wearable will lock you into the ecosystem - with Android Wear it is Google, the rumoured iWatch will be Apple. Migrating from one to the other will most likely be a difficult process.

Physical Appearance and Performance

Digital vs Real

Neither the Samsung or LG device could be called stylish - they are more solid, functional devices designed for use rather than looks. They are quite large and clunky for a watch, but not overly so (see the image to the right for a comparison). A nice feature of the Samsung over the LG is the curved back - this lets it fit comfortably on the curve of your wrist where a flat back may feel awkward given the size.

The display is nice and large, it's easy to read indoors but can be difficult to see in bright sunlight. The screen on the Samsung has a slightly higher resolution (320 x 320 pixels) and uses an OLED display rather than LCD.

The watch responds quickly and animations are smooth. The CPU embedded in the device is a quad-core ARM processor running at 1.2GHz with 512Mb of RAM so it has plenty of processing power available. Interestingly the LG and the Samsung both use exactly the same chipset in their watches - I'm assuming it's some sort of Google reference design that the manufacturers have then extended slightly.

An aside: I am forever surprised by the amount of computing power that we routinely carry around with us without thinking much about it. In the late 90s I worked with high end (at the time) Unix workstations worth many thousands of dollars that had less processing power and memory than this watch.

The battery life is more than acceptable - you do have to charge it every night much like a mobile phone but you easily get a full day worth of charge out of it. I've been using mine fairly heavily through the day from about 7:00 AM onwards and still have a 65% charge left by 6:00 PM when I get home - you could probably, at a stretch, get a charge to last two full days if needed.

Communications between the watch and the phone is done over Bluetooth and seems to have a range somewhere between 20 and 50 meters. This varies a lot though, it depends on a lot of external factors including radio interference. I can safely go to the next room without losing the connection but further than that is a bit random - at home it seems to work fine from anywhere in the house, at work more than a room away and it will drop out.

I've found the easiest way is to simply carry my phone in my pocket all the time, which a lot of people do anyway so it's not a big change in behaviour. There are a number of apps available already that will cause the watch to notify you when it is out of range (normally you just get a small icon in the top right of the screen). Currently I'm using the Find My Phone application for this and it has the added benefit of helping you to find your misplaced phone with an audio alert.

Overall there are not a lot of behavioural changes to make to start using the device - it simply replaces your existing watch. Rather than adding a new device to your collection you are simply substituting an existing one - unlike Google Glass the watches are far more subtle and quickly feel comfortable.

Setup

The setup process is driven through the phone - simply download the Android Wear application and follow the instructions it give you. This will find the device, synchronise it with your phone and then manage the communications for you. Once set up there is very little you need to do in terms of managing the device.

When you set it up out of the box it will download a firmware update (it has done this twice for me now, new features seem to be appearing on a regular basis). Over a Bluetooth connection this is a fairly slow process so be prepared to wait for a while.

One issue I had during setup was that it didn't recognise all the Android Wear compatible apps I already had on my phone - I had to power cycle the phone and use the 'Resync Apps' setting in the Android Wear application to get everything up to date.

Notifications

The primary purpose of the watch (apart from telling you the time) is to display notifications. Basically any notification that would normally appear on your phone will now appear on the watch as well. Cards from Google Now will be added as well which means you get all those predictive notifications (traffic reports, where you parked your car, etc) that make Google Now so useful. The interface uses the same card metaphor that Google Now and Google Glass use as well which makes it very easy to navigate on a small screen.

Main Screen

Initially notifications are shown on the main screen as small cards, swiping up will allow you to scroll through the current notifications. For each notification you can tap on it to get more information (the full text of an email for example) and then swipe left to display more detail or display the actions available for that notification. Swiping right will discard the notification altogether. It is a very simple set of operations that gives you a lot of flexibility and makes it extremely easy to deal with incoming notifications.

It seems like overkill to have a device that simply shows you notifications but it is really very useful. For a start, Google did a lot of work with the 4.3 version of Android to provide a richer interface to the notification system which means they are no longer limited to simple strings of text - they can be associated with images and linked back to the original application (or a smaller 'Wear' version of the app) so you can do a lot more things with them. The older, plain notifications will still show up as well so you don't have to wait for an upgrade to the application to see events from it on your watch.

You can filter the notifications you see as well - the Android Wear application on the phone has a settings dialog that lets you block notifications from specific apps. They will still appear on your phone but won't be sent to the watch itself.

It is difficult to describe how much of a difference this actually makes. After a few days of using the watch I am so used to it that it has become integral to how I work on a day to day basis. You often hear the term 'information overload' bandied around to describe how we are bombarded with small snippets of information on a daily basis - there is only so much you can do to reduce the amount of incoming information so the obvious next step is to simplify the management of that information, sorting the useful and important bits from the flow in the current context. Google Wear, if not solving the problem, certainly goes a long way in the right direction. The video below gives you a good overview of how you interact with it:

Now that I have the watch on I tend to keep my phone on silent all the time and inspect notifications on the watch to determine if it's something I need to deal with immediately, later or not at all. It's unobtrusive and avoids the 'always playing with his phone' perception (especially good in meetings). Of course you are just swapping 'playing with your phone' to 'playing with your watch' but the process is a lot quicker and far less distracting.

Wearable Applications

Google Wear is more of a reactive device - it's designed to let you quickly react to incoming events. That doesn't mean you can't instigate events on it though - this is where the applications come in.

Unlike the Android interface where you are presented with a collection of applications to chose from to launch most are started through a voice based interface. First you attract the devices attention with the 'OK Google' key phrase and then state what you want to do.

The speech recognition on the device is really well done (still not perfect, but good enough that you can use it every day without getting frustrate) and makes good use of natural sounding phrases such as 'send a text to contact name', 'take a note' and 'remind me to action tomorrow afternoon'.

I had to devote some time to clean up my contact list so the primary name for all contacts was something I would generally call them, instead of 'Tesla, N' for Nikola Telsa I might put 'Nick' or 'Nick Tesla'. This makes it more likely that the voice recognition will match the right contact. Of course I have 'Mum' and 'Dad' in the list :)

One complaint I have is that there is a very small window of opportunity to cancel the action if the voice recognition makes a mistake and it's not really obvious that you can cancel it (a button appears that looks more like a progress indicator than a button - tapping on it will actually cancel the operation). A text message I tried to send to my sister saying 'Are you at Shawns?' got interpreted as 'Are you trans?' and sent before I could cancel it (the response was 'WTF?'). As I said, the voice recognition is good, but not perfect.

Because, of course.

There are custom applications available (as in applications that get installed on the watch itself rather than 'Wear Aware' apps) and the number is growing on a daily basis. You don't really download an Android Wear application though, they are an add-on to a normal Android application - you install the primary application on your phone and (if it has one) the 'sidekick' application will be pushed to your watch. Naturally one of the first games to appear that plays directly on the watch is a Flappy Bird clone.

Like Glassware these apps can attach themselves to their own keyphrase or you can launch them by name by saying 'start application name' or navigating to them by touch. The touch option is a bit annoying - you can either say the 'OK Google' keyphrase or tap the screen to get into action mode, swipe up to get to a menu, scroll all the way to the bottom to see the 'Start ..' option, tap that and then select your application. I get the feeling Google really don't want to see a lot of applications that need to be 'started' - as I said it is more of a 'reactive' device and applications should really just allow you to do things with notifications sent to it by the host application running on the phone.

Your Own Apps

Now, as makers we would really like it to show our own notifications and trigger our own actions. It would be easy enough to simply send text messages or emails (they will show up as notifications) but it would be nice to have a an interface that is a bit less general than that. Here are some of the options that are available to you for that.

The Android SDK

Obviously you could write your own custom application, the Android SDK is available for free, supports Google Wear as well as 'standard' Android, runs on Linux, Windows and OS/X and you can deploy applications to your own device without going through the Play Store. If all you are interested in is sending notifications to the watch you don't even have to write a Google Wear device - just sending a normal phone notification (preferably through the new notification API) will do the trick.

If you already have experience developing Android applications this might be a good solution for you, if not it is a pretty steep learning curve to climb before you get the results that you want. You probably don't want to install a separate application for every device or set of events you want to see either.

If This Then That

If you haven't already played with IFTTT you probably should. Essentially it allows you to set up simple rules with a 'this' (event) side and a 'that' (action) side. Both 'this' and 'that' are selected from a fixed set of 'channels' (as I'm writing this there are 116 available channels) which include some popular hardware device interfaces and web services.

IFTTT has had an 'Android Device' channel for a while and has recently introduced an 'Android Wear' channel as well. On the 'this' side the channel allows you to trigger an event by pushing a button in the custom IFTTT application that gets pushed to your watch, on the 'that' side you can send notifications to your watch (with text and an appropriate image).

Unfortunately IFTTT isn't a very open service, if you want to interact with something that isn't already implemented as a channel you only have a few options available to you:

  1. Use the RSS channel to read an RSS or Atom feed from a server you control and use that to provide detail to IFTTT. You can use filters on the data in the RSS entry to trigger an appropriate action. The delay between you adding a new entry in the RSS file and it being processed by IFTTT can be very long though (measured in hours, or even days).
  2. Implement the WordPress API on a server you control and point the IFTTT 'WordPress' channel at it. The timing is a bit better than RSS (but not much) and it allows you to use it for the 'that' (action) side of the recipe as well.

Another downside is that activating a trigger requires you to either navigate to the IFTTT application by touch using the awkward process I described above or saying the phrase 'start I F T T T' which is not exactly intuitive. Despite this, if the services you want to integrate are already supported by IFTTT and you can accept a delay between the event occurring and the action being triggered this may be all you need.

InstaPush

One of the channels available on IFTTT is Instapush and you can use this directly through a very simple REST API as well as through IFTTT. Basically, this service allows you to send a notification to any iOS or Android device. On Android these notifications will automatically appear on your watch. At the moment in only supports basic text notifications, hopefully support for richer notifications will appear in a future release.

There is a little bit of set up required (read the Instapush Getting Started page for more details) but the API itself is very straight forward. Essentially you need an APPID and an APPSECRET string to identify yourself, an event type to identify the event being sent and a dictionary of trackers which are values to be inserted into the notification text.

Where I work we have a number of build processes that can take a very long time to complete - I wrote a small Python script to notify me when they start, succeed and fail so I don't have to keep checking the output log. The notification I get sent has the text 'Project '{project}' build has {status}' where project and status are variables passed to the event. To invoke it I simply use the command line like the following ...

buildevent.py test-project failed

... which will send a notification to my phone (and to my watch) with the text "Project test-project build has failed". The source for this utility looks like this:

#!/usr/bin/env python
#----------------------------------------------------------------------------
# Send build events via InstaPush (http://instapush.im)
#----------------------------------------------------------------------------
import sys
import json
import requests

#--- Instapush validation
APP_URL    = "http://api.instapush.im/post"
APP_ID     = "enter_appid_here"
APP_SECRET = "enter_app_secret_here"

#--- Usage information
USAGE = """
%s project status

  The 'project' parameter specifies the project name, the status describes
  the build status."
"""

def pushEvent(activity, trackers):
  global APP_URL, APP_ID, APP_SECRET
  headers = {"X-INSTAPUSH-APPID": APP_ID, 'X-INSTAPUSH-APPSECRET': APP_SECRET, 'Content-Type': 'application/json'}
  data = {"event": activity, "trackers": trackers}
  return requests.post(APP_URL, headers=headers, data=json.dumps(data))

if __name__ == "__main__":
  # Check command line arguments
  if len(sys.argv) <> 3:
    print (USAGE % sys.argv[0]).strip()
    exit(1)
  # Send out the event
  pushEvent('status', { 'project': sys.argv[1], 'status': sys.argv[2] })

The code to send an event is in the 'pushEvent()' function - only a few lines. I do cheat a bit and use the requests module to simplify making the REST request.

It would be very easy to integrate this into your application to send events from any source you like. I'm going to integrate this into the code driving my Bluebell device to send notifications to my phone (and watch) as well.

Conclusion

I certainly don't regret buying the watch - I came very close to getting the original Galaxy Gear when it came out but was put off by the lack of an SDK or any other way to customise what it displayed. The same went for the Pebble, although it did provide an SDK it seemed like a lot of work to get what I wanted displayed on the watch face.

Your mileage may very though, I had an advantage in that I was already deeply invested in the Google ecosystem so everything would integrate well without having to migrate email accounts, cloud services and the rest of my digital life to get the most out of it. For me this device was a natural extension of the services I already use and had the added benefit of being easy to talk to with existing services and some simple code. Given that it is based on an operating system I am already very familiar with means that I can do some more detailed development on it if I need to.

Although I'm hesitant to recommend that you should go out and buy one (everyones requirements are different) I can certainly recommend that you give it a serious look. Wearables are not going to go away anytime soon and replacing existing technology that we wear on our wrist every day with something that has a lot more functionality is not a huge leap.


Fun With Lasers: Part 3 - Burning Things

Sunday, July 06 2014 @ 08:50 PM

The first two parts of this small series concentrated on acquiring and then powering a laser diode from a DVD/RW drive. In this post we get to the fun stuff - using the laser to cut and burn.

I tried the laser jig I described in the previous post on a range of different materials to see what effect it had on them. If you are going to try this for yourself make sure you adhere to the safety guidelines I outlined in the first post. As we are using the lasers heat to burn through materials there is going to smoke and (depending on the material) some of it can be toxic so make sure that any experiments you do are in a well ventilated area.

Foam and Plastic

This type of material is perfect for this laser - plastic has a low melting point and (as long as it's not reflective and doesn't contain any red pigment) the laser goes through it very rapidly. This is the only material I've tried that I could achieve a complete cut at any reasonable depth.

2mm Foam

The image to the left shows the result after applying the laser to 2mm thick craft foam. I had some thin strips of various colours as well as rainbow coloured sheets - perfect for seeing what difference the colour of the material has. With foam the laser has an almost immediate effect and can be moved fairly rapidly (2 or 3 mm/sec) to continue the cut.

The foam does need to be a dark colour though and not reflect a lot of red light. If you look at the bottom of the image you will see that the cut comes to a dead stop at the boundary of the yellow section - this was not done on purpose. I was moving the laser at the same rate past that boundary but it was not providing enough energy to cut through the foam.

Any black plastic is another good candidate for use with the laser. It is easy to scour designs into thicker plastic and thinner plastic (like duct tape) can be cut through directly. I haven't provided any photos of these though - the duct tape is the most interesting but the cuts are very thin and I was unable to capture a good photograph that showed it clearly.

Wood and Paper

I didn't have a lot of samples of paper to test with apart from the normal white photocopier paper - it turns out that matte black paper is very difficult to find. Everything I could find had a glossy finish which simply reflected too much of the laser light to allow enough heat to develop to mark or cut.

White Paper

Although I could not start a cut on plain white paper I found that if I started at an already darkened area (a pencil mark or a printed character) I could initiate a cut and then continue it into the lighter coloured areas. The image to the right shows a cut started on a laser printed character and continued into the main part of the page (again at 2 to 3 mm/sec). Once the cut started the surrounding area becomes dark enough to absorb enough energy to continue the cut as you move the beam.

Balsa Wood

This turned out to be a common theme with lighter coloured materials, my experiments with wood had very similar results. I collected a range of different woods from around the lab - I wound up with some balsa, some pine, paddle pop sticks and MDF. Obviously you will not be able to cut through wood but you can make a deep enough burn to permanently mark it.

With lighter coloured woods it was very difficult (if not impossible) to start the burning process, as with the white paper I had to darken an area of the wood first (I just used a pencil) and, once initiated, the burn would continue without interruption.

Paddle Pops

The denser the wood the slower the laser can advance to continue the burn and the longer it takes to initiate it. Even though MDF is far darker than pine or balsa it still need assistance to get started and the movement rate of the laser was reduced to less than 1mm/sec in order to reliably continue it. This was the rate I used by hand and was just enough to continue a surface mark, if you want to make deep burns the rate would need to be even slower.

PCB Etching

You cannot cut through even the thin layer of copper on a PCB with a 400mW laser, using it to facilitate PCB etching is a multi-step process:

  1. We need to coat the copper side of the PCB with a material that can be burnt away with the the laser.
  2. Burn away the coating to expose the copper that we want to get rid of.
  3. Etch the board as normal and then remove the excess coating.

The results (when using a commercial laser etcher) can be very impressive (as seen in the image to the left). What I wanted to find out was how well I could replicate that with a lower powered laser.

The original post I came across described using a thin layer of spray paint to provide the protective surface that will be burnt away. I tried that with a matte black enamel spray paint and was unable to make any mark in the surface at all.

Sample Paints

On the assumption that a general use paint would contain heat resistant material I decided to experiment with some different types of paint and ink (as shown in the image to the right). Unfortunately I made no progress with any of these either, I was not able to even leave a mark in the coating let alone burn it away to expose the surface beneath. My current working theory is that the heat dissipates too quickly (copper is a good conductor after all) before the covering material can heat up enough to ablate.

Summary

Given that my original goal for these experiments was to be able to use the laser to help create PCBs the results are a bit disappointing. It was certainly fun to play with (lasers!) but in terms of utility it is a bit limiting - at the power levels available at least.

As an alternative tool head for a CNC machine or a 3D printer it would be useful, adding the ability to cut foam and paper or permanently mark wood and plastic. There is a reasonable investment of time and effort required to get it working though so you would have to justify that against how often you would use it.

As a tool for preparing PCBs a 300mW or 400mW laser is simply not going to do the job unfortunately.


Fun With Lasers: Part 2 - Powering a DVD/RW Laser Diode

Sunday, July 06 2014 @ 03:35 PM

This is the second post about my experiments with laser diodes, you can read the first one here. In this post I cover adding a lens to focus the beam and protect the diode, building a suitable power supply to drive the laser without destroying it, and finally putting the whole assembly in a safe to use mounting frame.

Adding a Lens

The easiest, and safest way, to mount your diode is to use a pre-made laser diode assembly. These can be purchased on eBay for a reasonable price (just search for "laser diode housing") and include a heatsink, a mount for the TO-18 diode case and an adjustable lens to focus the beam.

I was a little unsure how to assemble everything at first, the image to the left shows how all the various parts fit together. For the most part there are no tools required to assemble everything, you do need to fit the laser diode into the mount provided which does require some force.

Make sure that you solder the power leads to the diode before mounting it. You will need a reasonable length on the cables (about 15cm to 20cm should be fine) so you have a bit of freedom of movement.

To avoid damaging the diode I used a file to enlarge the hole for it but I overdid it a bit and made the hole a bit too large. To compensate for that I used some wax to ensure the diode wouldn't move - it's probably not the best solution but it seems to be working fine.

Normally you would need to apply enough pressure to force the diode into place without damaging. Most advice I have seen on this is to use a small vice to do the task.

Building a Power Supply

If you have extracted a diode from a DVD/RW drive as described in the previous post you should have a 650nm RED laser with a power rating between 300mW and 400mW (a 16X DVD/RW drive should have a 300mW diode, a 32X will generally have a 400mW).

It can be difficult to determine the exact specifications of the laser diode you have (on all the devices I've pulled apart the diodes have no part numbers or any other markings on them) so getting the power supply right requires a little bit of trial and error.

The best place to start is with a 200mA constant current supply. These can be built around an LM317 voltage regulator.

Constant Current

In this case we need a power supply that regulates the current, rather than the voltage. The LM317 is perfect for this task - it can provide an output current of up to 1.5A and requires minimal external circuitry. The schematic to the right shows the design I used.

The output current is controlled by the resistor network between the output and adjust pins on the regulator chip using the formula:

I = 1.25 / R

The network I use has two 10 Ohm resistors in parallel (giving a 5 Ohm total resistance) and a trimpot in series for fine tuning. This allows for a minimum resistance of 5 Ohms and a maximum output current of 250mA. The laser diode has a forward voltage drop of 2.5V so the total power passing through the circuit will be over 500mW - standard 1/2W or 1/4W resistors are not good enough so I used 10W wire-wound resistors instead.

This is jumping ahead a little bit but I found that a 200mA supply is not to generate the full 300mW output the laser is capable of due to the diodes conversion efficiency. We need around 350mA output instead. I added another 10 Ohm resistor to the parallel network reducing the base resistance to 3.3 Ohm and allowing for over 600 mA if needed.

An alternative solution would be to reduce the resistance of the two existing resistors - if you swap the 10 Ohm resistors with 5.6 Ohm ones you will get a similar boost in the output current range.

Tuning the Current

To start with we want the regulator to output a steady 200mA before we attach the laser diode so we need to tune the power supply first. You will need an input power of 9V to 12V, 3 1N4001 diodes and a multimeter capable of measuring up to 500mA of current.

Connect the 3 diodes in series (this will simulate the 2.5V forward voltage drop of the laser diode) and connect this to the output of the power supply with the multimeter in series. Apply the input voltage and adjust the trimpot until you get a steady 200mA reading on the multimeter.

Tuning the Power

I recommend starting with the 200mA current for your initial work. This is not driving the laser at it's full capacity though (the output will actually be about 180mW).

I haven't been able to find detailed datasheets for the laser diodes so ensuring maximum power output mostly done through guesswork and experimentation. The biggest issue is the conversion efficiency of the diode and this is effected by heat as well (you don't want the diode to get much above 60 degrees Celsius).

As a general rule of thumb I've found the output is about 86% of the input current - so at 200mA you are getting around 170mW, at 350mA you are getting around 300mW. If you have a 400mW laser (out of a 32X DVD writer for example) you will need to be driving it at 460mA. Please note that these are guesstimates and have worked with the lasers I have - pushing the current too high (or running the laser for extended periods at high current) will damage it.

Building a Frame

At this stage we have a powered laser with a focusing lens and protective casing and that's probably all that's needed for basic experimentation. I was a bit concerned about the cylindrical lens casing however - I didn't want to have it slip out of my hands and accidentally beam light directly into my (or any other hapless bystanders) eyes. I also wanted to a way to keep the laser a constant distance away from the target surface so I could replicate experiments with some consistency.

To help with this I designed a simple square frame that I could mount the lens assembly in. The design is pretty straight forward (see the image to the right) so I won't cover it in too much detail. You can download the OpenSCAD and STL files for it here.

Once the frame is put together it's a simple matter of inserting the lens assembly and positioning it so the focal point for the laser light is in the centre of the bottom part of the frame. Now I can simply place the frame on the material I want to test against and move it around to test the time it takes to burn or etch that surface.

Next Steps

Now that we have everything in place it's time to find out what a laser of this power can and can't burn. Ideally I would like to be able to burn a thin layer of black paint from a copper surface (and thus expose the copper for later acid etching) but there are other interesting applications as well (cutting stencils out of thin material or slicing up foam for simple constructions for example). In the next post I'll detail the results of those experiments.


Fun With Lasers: Part 1 - Extracting a DVD/RW Laser Diode

Friday, July 04 2014 @ 06:44 PM

This post is the first of a series about building a tool to simplify the production of PCB boards at home. I was inspired by this post about using diode lasers to prepare PCBs for etching - it seemed far quicker than the toner transfer method I'm currently using (in terms of active 'hands on' time at least) and the results seem to have a much higher precision. I already have a 3D printer so I was hoping to make an attachment to the print head that would hold a laser diode and use it to prepare the boards for me.

The trouble with things like this that you find on the internet is that they cannot always be replicated - so the first step was to see if I could access a laser diode and use it to burn paint from a PCB. This post is all about that process.

Safety First!

I must point out that playing with lasers is inherently dangerous and you MUST take all precautions before doing so - even reflected laser light can permanently damage your eyes.

Here are some simple precautions you need to take before trying this for yourself:

  • Make sure you have a pair of laser safety glasses suitable for the wavelength of laser you are going to be using. These are relatively cheap and easily available. Wear them every time you use the laser.
  • Do not point the laser directly at yourself - reflected laser light (even at the relatively low powers being used here) can permanently damage your eyes, direct light can cause permanent blindness.
  • Lasers generate a lot of heat in a very small area - this is a fire hazard and you need to take it into account.

Generally you should treat a laser as if it were a power tool - it's useful but if used without due caution you could easily lose a limb or a major organ.

Getting a Laser Diode

Laser Diode

The easiest way to acquire a laser diode with reasonable amount of power is to extract one from an old DVD/RW drive. These drives will generally contain two diodes, a 300mW to 400mW red (650nm) diode and an infrared one - we are only interested in the red diode. The diodes are in a TO-18 package, it looks like a small tin can with the diode lens at the top and three legs out the bottom.

There are plenty of tutorials on the internet showing how to extract the diode but I found that not all DVD drives are the same (the images in this post are from my third diode extraction - each of the drives was different). What is shown here is repeated elsewhere on the internet but I'm trying to be as generic as possible - rather than a specific set of instruction this is more of a guide of what to look for.

NOTE: This is a time consuming process which requires some patience and care. If you are applying excessive force at any step you are probably doing it wrong, step back - take a breath - and think it through. It is very easy to damage the diode so you do need to be careful to get the optimum results.

Tools and Parts Required

Before you begin make sure you have everything you need handy. I wound up using the following tools:

  1. Jewellers Screwdrivers - the standard set of phillips and flat headed drivers you can buy from most hardware stores will do the trick.
  2. Needle nose pliers - something with a good grip and small gripping area at the tip.
  3. Small Wire Cutters - the wire cutter on the pliers will not be good enough, you need something with a cutting edge at the tip.
  4. Small Files - not your normal woodworking files, you need something small. I have a set I got from a hobby shop for working with plastic models - they work well with soft metal as well.
  5. Dremel - any rotary tool really. You will need a cutting disk to go with it.
  6. Helping Hands - something to hold small parts firmly in place while you work on them.
  7. Soldering Iron.
  8. 3V Battery Pack - you will use this to do basic testing of the diode. I used a small 2 x AA battery pack for this.

Obviously you will also need a DVD/RW drive. I recommend collecting a few (at least two) before starting. It took me three attempts to extract a completely undamaged laser diode (the first two still worked despite the damage but were not optimal). The older the drive the easier it is to extract the diode, newer drives have more compact write heads and more tightly packed components.

And it goes without saying that you have the necessary safety equipment - most importantly a pair of laser safety goggles. At various times during the process you will need to apply power to the laser diode to test it - at these times please ensure the following:

  1. You are wearing your laser safety goggles.
  2. Always point the laser away from you (one of the lasers is an infrared laser and shows no visible beam).
  3. Make sure there are no metal fragments or shiny material in front of the laser - you do not want any reflections coming back at you.

Step 1: Expose the Read/Write Head

This is the simplest part - the laser diodes are on a small assembly that is moved back and forward over the surface of the DVD. All we want to do is extract that assembly and leave the rest of the drive untouched. We need to expose that assembly so we can get at it and unfortunately I didn't take any photographs of this part so you will have to go by description alone. Thankfully it's pretty straightforward.

First you will need to remove the outer metal shell of the DVD drive. Usually this involves removing 4 screws that hold it into place (there may also be a plastic clip connecting the front panel to the shell that you will have to release).

Once the metal case is removed you need to open the DVD tray to give yourself a bit of room to work in. There is usually a plastic slide you can push to do this. After that you need to remove the logic board - first unplug (or cut through) any cables connected to it and then detach it from the case. In all of the drives I have worked on it is simply attached by a plastic clip, some of the examples I have seen on the internet show it attached with screws - it should be fairly easy to disconnect and remove regardless. At the end of this you should be looking at something like the image to the left.

Step 2: Remove the Read/Write Head

The Read/Write head is suspended between two metal rods (see the image above), we need to remove it from the rods and (preferably) leave everything else intact. Generally you can achieve this by undoing a few screws and sliding the assembly off the rails it is attached to.

The image to the right shows it removed (the head assembly is in the bottom left of the image). In this photo I have re-attached the sliding rod it was attached to - this could be re-used at a later date for a small plotter or CNC machine.

Step 3: Remove the Laser Diode Assemblies

When you look closely at the read/write head assembly you can see the laser diodes attached to it. These consist of the laser diodes themselves wrapped in a heat sink and some wiring attached to it. At this stage we want to remove the laser diodes and heat sinks, the wiring is not of any use to us so we can sacrifice it. It is easiest to simply cut away any connecting wires and get them out of the way first.

In most cases I've found that the heat sinks are held in place by a mix of mechanical force and some waxy substance. You can scratch away the wax, check for any screws that may be present and remove them in necessary and then gently wriggle the heat sinks away from the main assembly - what you will end up with should look like the next image.

As I mentioned earlier there are two lasers in a DVD drive - one is a low power infrared laser (and doesn't generate any visible light), the other is red diode that we really want. At this stage we need to test both diodes to determine which one is the one we want to continue working with. The remaining parts you can either discard or keep for use later - I added everything I didn't use to a junk box on the assumption it might be useful later (one of the reasons the 'Garage Lab' requires a garage and not just a cupboard).

Step 4: Identify the Red Laser

As I mentioned in the previous step you should have removed all connecting wires to the laser diodes. You may need to make use of a solder sucker, desoldering braid or other desoldering tools as well as judicious use of side-cutters to achieve this. The end result should look something like the image to the right.

You can use a simple two AA (or AAA) battery pack to check the laser output, this will provide enough power to activate the laser diode without damaging it. Before you do this step make sure that;

  1. The lens of the laser is pointing away from you and there are no reflective surfaces in it's path.
  2. Wear your laser safety glasses.

The markings on the laser aren't very clear so you will need to test each pin combination. Simply attach the ground to one pin and touch the positive wire to each of the other pins in turn; repeat this process for each pin combination until you get a result.

One of the lasers will generate red light, the other generates infrared which you will not be able to see. If you don't get a response from either diode it has probably been damaged either before or during the removal process - you will have to start again with a different DVD drive.

Step 5: Remove the Heatsink

The diode needs to be removed from the heatsink material so we can insert it into a lens assembly. They are packed very firmly into the heatsink so trying to remove it by force (just pushing it out) will only damage the head of the diode. Luckily the heatsink is made of very soft metal so the safest way to remove it is to cut through the heatsink and then peel it away from the diode.

The technique I have used with some success is to carefully cut through the thinnest part of the heat sink with a dremel using a cutting disk. You need to take some care that you don't cut into the diode itself so check how deep the cut is at regular intervals. When the cut is deep enough you can grip each end of the heatsink with a pair of pliers and peel it apart.

This process involves a bit of trial and error - if you find yourself applying a lot of force with the pliers you probably need to cut some more before trying again. The end result should be a nice (and hopefully undamaged) laser diode:

Next Steps

Now we have a laser diode and we have proven it works. The next step is to build a decent power supply for it, add a lens to concentrate it on a specific point and see if it can do what we want it to. I will cover these steps in the next post.


Follow me on Google+ to see build images, construction notes and previews of upcoming projects.

Recommended Sites

  • EEWeb

    Electrical Engineering News, Resources, and Community.

  • Sprites Mods

    A collection of projects from a very talented engineer.

  • Blondihacks

    A great collection of hacks and projects by Quinn Dunki.

  • Embedded Projects

    Embedded Projects from Around the Web.

Donate Doge

Like the site? Be kind and send a few Dogecoin my way.
DAqGZFkVj9meRgHMve9W5KQshdvZ3UCtGF