How To …

1. Prepare a line drawing for engraving

Line drawings are fairly easy to set up for engraving on a laser cutter/engraver, and engrave best if the drawings have thick, clear, lines. If the lines are faint, then they may end up being pixelated when converted to a bitmap. If the image is hand-drawn, then scan it in colour using 600 dpi (you can then lower the resolution later to suit the type of engraving you want).

The process will be illustrated using one of the example drawings from the Sensory Objects Project, and using Photoshop CS4. You can use other image editing applications (such as GIMP) and they will do the job just as well, but you will need to modify these instructions accordingly. If you find any difficulties using other applications, then please email me.

The drawing below is by Sam, which was drawn on paper using coloured markers. It has been scaled to 15cm x 11cm at a resolution of 300 DPI.

Sam's drawing (scanned original)

Sam’s drawing (scanned original)

Before this can be converted to a a 1-bit bitmap, it must first be converted to greyscale (merging any layers first). This is what the image looks like after to converting to greyscale:

Sam's drawing converted to greyscale

Sam’s drawing converted to greyscale

As you can see, the drawing is not very high contrast. If you engrave this now, the engraving will be quite shallow and indistinct from the background. To get a better engraving it is a good idea to increase the contrast, and you can do this in PhotoShop using the threshold adjustment. Threshold can be found under

Image > Adjustments > Threshold …

This is the same image with the threshold modified to give the maximum contrast, but without reducing the image quality too much:

Sam's drawing with contrast improved using threshold adjustment

Sam’s drawing with contrast improved using threshold adjustment

If you were to save this image as a 1-bit bitmap now, and then engrave it, the drawing would be recessed into the material (i.e. the black part of the image would be removed from the material). However, in this instance we would like to create a relief from the drawing, so that the original line drawing is raised above the background plane. So there is one more stage to complete – invert the image. In PS use

Image > Adjustments > Invert

then save the image as a 1-bit bitmap. We retained the original 300 dpi for this image when it was saved as a bitmap, though you could try a higher/lower resolution and see if there is a difference.

Sam's drawing inverted

Sam’s drawing inverted

The above image is now ready to engrave. On the LaserScript 3060 (with a 60W tube), we used a speed setting of 200, a power setting of 20 and scan gap of 0.05, although it is recommended to use a scan gap of 0.085 for an image at 300 dpi. We have tried both and the difference is barely perceptible. if you have a 40W tube, then you will probably need to increase the power setting slightly. As a guess try 25 instead of 20, but I would recommend that you do a test engrave first using a scrap of wood and check the result (just engrave the letter ‘A’ and see how it comes out).

After having set up the image, we engraved it into 3mm laser cutting birch plywood. Here’s the resulting engraving:

Sam's engraved shell

Sam’s engraved shell

You can just about see that the line drawing is raised against the background plane, and this makes it very nice to feel.

2. Calculate the scan gap for a given image DPI

If you wish to engrave an image (e.g. a line drawing or photograph) then you will need to set up the scan gap to correspond to the DPI of the image so that you obtain the correct resolution for the engraving. There is a simple formula for doing this:

DPI to Scan Gap = 25.4/DPI

For example, if you have a 300 dpi image, this formula would give a scan gap of about 0.085. Change the scan gap when you are engraving – it’s usually found on the same dialog as the speed and power setting.


3. Driving a stepper motor with an ATTiny85

This was an experiment to how well an Atmel ATTiny85 could driver a cheapo (off-the-shelf) stepper motor. The unit is a standard 28BYJ-48 stepper motor, with its associated ULN2003 based driver board, bought from ebay for about £3.00. It was tested initially by  connecting the driver board to an Arduino UNO to make sure that it worked okay. The steps which follow are what you need to do if you want to try the same.

You’ll need a 28BYJ-48 stepper motor, with its associated ULN2003 based driver board, and Arduino UNO with USB cable, an ATTiny85 microcontroller, a 10uf capacitor and jumper cables.

1. First off you need to plug the stepper motor into the driver board (easy – just plug it in!) and then connect the driver board to the UNO. Connect IN1 to IN4 on the driver board to pins 3, 4, 5 and 6 on the UNO.

If you use an external power source for the stepper motor board (which is what I have done below, using a 9V battery) a wire from the negative terminal on the stepper motor board needs to be connected to the GND on the UNO. You can use a DC power source from 5V to 12V. I initially used a 9V PP3 battery for testing.

If you don’t use an external power source, then just connect the 5V on the UNO to the + on the stepper driver, and GND on the UNO to the – on the stepper driver.

Here’s a diagram of the connections using an external power source:

Connection diagram for stepper driver and Arduino UNO

Connection diagram for stepper driver and Arduino UNO

2. You can test the stepper using the built-in stepper library supplied with the UNO, but I found that the AccelStepper library was way better, and would recommend that you download and install for testing your stepper motor. When you have it installed, try the following sketch (from 42Bots):

#include <AccelStepper.h>
#define HALFSTEP 8

// Motor pin definitions
#define motorPin1 3 // IN1 on the ULN2003 driver 1
#define motorPin2 4 // IN2 on the ULN2003 driver 1
#define motorPin3 5 // IN3 on the ULN2003 driver 1
#define motorPin4 6 // IN4 on the ULN2003 driver 1

// Initialize with pin sequence IN1-IN3-IN2-IN4 for using the AccelStepper with 28BYJ-48
AccelStepper stepper1(HALFSTEP, motorPin1, motorPin3, motorPin2, motorPin4);

void setup() {

}//–(end setup )—

void loop() {

//Change direction when the stepper reaches the target position
if (stepper1.distanceToGo() == 0) {

This sketch will accelerate the stepper up to a maximum speed. Stop. Reverse direction, then accelerate up to maximum speed in the other direction. Make sure that whatever sketch you are using to drive the stepper motor is working okay before going on to program the ATTiny85. If it doesn’t work correctly on the UNO, it won’t work correctly on the ATTiny. You can find more details of about the AccelStepper library here.

3. Programming the ATTiny85

This is the fun part! We’ll turn the UNO into a programmer for programming the ATTiny85 microcontroller.

Unplug the stepper motor from the UNO for the time being and put it to one side. Now check your Arduino IDE and see if you have the ATTiny core files installed by looking through:

Tools > Board

If you can find an entry that reads something like ATTiny85 @ … then you have it installed. If not, then go to here and follow the installation instructions. If you have to install the core files, remember to restart the Arduino IDE before you continue.

Using jumper cables, connect the ATTiny to the UNO using the following connections:

  • Arduino +5V      —>  ATtiny Pin 8
  • Arduino Ground —>  ATtiny Pin 4
  • Arduino Pin 10   —>  ATtiny Pin 1
  • Arduino Pin 11    —>  ATtiny Pin 5
  • Arduino Pin 12    —>  ATtiny Pin 6
  • Arduino Pin 13    —>  ATtiny Pin 7

If you are not sure of the pin connections to the ATTiny, you can download the datasheet from here. Look at page 2 for the pinout. For reference, here are the connections from the Arduino UNO to the ATTiny85:

Programming the ATTiny85 with an Arduino UNO

Programming the ATTiny85 with an Arduino UNO

Note that the pin 1 dot  on the ATTiny85 is at the top right corner of the chip in the diagram above – the yellow wire is connected to pin 1.

With the Arduino IDE open, first check that the board is set Arduino UNO. No go to:

File > Examples

and load the ArduinoISP sketch. Compile and upload it to the UNO.

Now place the legs of the 10uf capacitor into GND and reset on the UNO board, making sure that the short leg goes into GND. (If the jumpers are in the way, then you can always put the capacitor on the breadboard and connect it to the UNO with jumpers.)

Load the Stepper Motor program back into the IDE and change the motor pin definitions to the following:

// Motor pin definitions
#define motorPin1 0   // IN1
#define motorPin2 1  // IN2
#define motorPin3 2  // IN3
#define motorPin4 3  // IN4

This is necessary, as the port numbers are different on the ATTiny85 from those on the UNO.

Go to:

Tools > Board

and choose ATTiny85 @ 8 MHz (internal oscillator, BOD disabled). Also, go to:

Tools > Programmer

and select Arduino as ISP. Now compile and upload the stepper motor sketch to the ATTiny.

4. Connect the Stepper Motor to the ATTiny

Connect the motor driver board as follows:

IN1 –> PB0

IN1 –> PB1

IN2 –> PB2

IN3 –> PB3

For testing, you can connect both the ATTiny and the driver board to the Arduino to power them, as in the diagram below:

Connecting the stepper motor to the ATTiny (using the UNO as a power source)

Connecting the stepper motor to the ATTiny (using the UNO as a power source)


Here’s a picture of the ATTiny mounted onto a stripboard, and with a voltage regulator to feed it a steady 5V from a 11.1V lipo battery.

ATTiny85 with voltage regulator

ATTiny85 with voltage regulator

The stepper motor connected to the ATTiny:

Stepper motor driven by an ATTiny85

Stepper motor driven by an ATTiny85

The video below is a short clip of the ATTiny/stepper combo:


4. Fixing Broken Wires on a littleBits Fan

We have had quite a lot of littleBits fan modules with broken wires. The problem does not appear to be from misuse, but from poor design. The connector block is attached to the fan by two thin wires, which easily break off near to the fan motor. You can see the three most recent cases of detached wires below:

Three littleBits fan modules with detached leads

Three littleBits fan modules with detached leads

Soldering the wires back on isn’t difficult, but is fiddly. It’s a good idea to start by using a bit of bluetack on either side of the fan to hold it whilst you work:

Hold the fan with some bluetack

Hold the fan with some bluetack


The broken wires will still be attached to the solder pad on the fan:

Broken wires attached to solder pads

Broken wires attached to solder pads


Remove the old bits of wire from the solder pads using a soldering iron to give a clean(er) pad for soldering the wires back in place.

Solder pads on fan when old bits of wire are removed

Solder pads on fan when old bits of wire are removed

Notice that there are four pads marked, from left to right, A, -, + and I. The red wire goes on the ‘+’ pad and the black wire goes on the ‘-‘ pad. Tin the wires before you solder them on, as it makes the wires easier to solder.

Tin the wires before soldering

Tin the wires before soldering


Use another piece of bluetack to hold the wires in place whilst you solder them on:

Hold wires in place with bluetack

Hold wires in place with bluetack


Solder both wires in place using a small amount of solder:

Solder the wires in place

Solder the wires in place


Whilst this is fine to fix the wires in place, they will no doubt come off again fairly soon. A good idea is to glue the cable in place to stop the connections being strained. I use a hot glue gun for this, applying a small amount to the cable. First push the cable through the fan frame:

Push cable in place

Push cable in place


Put a blob of hot glue on the cable to lock it into position:

Hot glue the cable into position

Hot glue the cable into position


We have found that this technique really improves the life of the fan, though there is still the issue of it breaking at the connector block … we’ll find a fix for that one soon.

Leave a Reply

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

You are commenting using your 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