Hot Wire Foam Cutter
I have been interested in a hot foam cutter for several months now. After researching the design I discovered it only takes a few parts that I could buy locally, and I could do it easily in an afternoon. It certainly seemed like a good way to spend a lazy Sunday.
To make a hot foam cutter all you need to do is cause a wire to heat up, and that is easily accomplished by running a small eclectic charge through it. But to do this you need to use the correct type of wire. Luckily for me someone has already discovered that you can use a guitar string, and this is a lot cheaper/easier than finding nichrome wire. I made up a shopping list of required parts that I would need to purchase:
- Large Plastic Cutting Board ($10)
- 1″ Square Dowel ($2.50)
- Metal Brackets ($5)
- Guitar String ($1)
For under $20 I had managed to assemble my parts list, and I was ready to start construction. I grabbed my big jar of loose screws and random parts to find all the necessary nuts/washers/etc that I would need.
I used a series of L brackets to secure the top piece in place. I might have gone a little overboard using 4 brackets on the arm’s junction, but I had them and didn’t want to worry about it later. I bolted them to the cutting board, and the arm seemed pretty secure. For the top wire holder I added a spring to the screw so that I could easily keep the wire tight, this was something I saw on another DIY wire cutter that I thought was a great idea.
I wanted to use a plastic cutting board so that the foam would easily slide across the top of the surface. This meant though that I would need to keep the top of it flat, and hide the bottom of the wire holder under the board. I used some washers to pad the screw enough so that the end of it sat below the surface of the cutting board. Now the foam could freely slide over the top.
I added a few feet to the bottom of the board to keep it raised off of the table, and tightened up the guitar wire. To power the cutter I had intended on using my custom power supply from a previous project. I clamped the +5v signal to the top, and the GND signal to the bottom of the wire. Instantly the guitar string heated up warm to the touch. You can vary voltage as needed, but 5V seemed to be about right. As a note, the wire only heats up between the + and - charge. The extra wire I have wrapped around the arm in the picture does not heat up at all, although I am sure I will trim this off in the future.
I grabbed a small piece of pink foam and gave it a test run. The results were great, and I couldn’t be happier with the finished product. In all it took about an hour and a half to build the foam cutter, and now it’s time to start working on some terrain….
Arduino Matrix Orbital LCD Library
I’ve had an old USB LCD sitting in my htpc for the past few years. I no longer used it for display purposes; it wasn’t even plugged into a USB port. I knew there had to be a way for me to re purpose it for an arduino.
Luckily for me I was not the first one to attempt something like this, and there were several other sources of information on how to do it. The best site I found was from Roo Reynolds, who did this exact thing with a slightly different lcd model.
Using his description as a guide I proceeded to connect up my LCD display, a LK202-24-USB version 1.4 display. One thing of note that is the manual for this version does not have the correct picture of the serial interface header. The printing of the rx/tx pin labels are incorrect, but I discovered that they should be connected just as Roo did on his sight. Below I have connected the arduino to the LCD using an old internal pc cdrom cable. I have only connected the Arduino Tx to the LCD Rx (green wire to cdrom cable black wire), since for my purposes I do not need to receive information from the LCD.
I now had an LCD that can display information from any arduino. Rather than connecting the arduino IDE’s serial monitor interface to read debug information, I can just connect this display. With the use of the Software Serial library I am also able to free up the serial interface for other uses (such as XBee).
Since I wanted this code to be reusable it seemed like a good opportunity to create my first arduino library. I wrote two classes that implement the standard commands for Matrix Orbital LCDs (LCDSerial and LCDSwSerial). As their name implies the first class uses the serial port and the second uses a configurable new software serial port (this library is required). Both classes implement the standard Print.h, so the print and println commands can be used.
Here is an example sketch showing the library in use, and as you can see it is easy to switch between using the serial port and the software serial port classes.
// Example sketch for Matrix Orbital LK202-24 Display.
// This should work with other MO displays, but not verified.
// You must install the NewSoftSerial library for this to compile.
// http://arduiniana.org/libraries/NewSoftSerial/
#include <NewSoftSerial.h>// Use below include for serial lcd
#include <LCDSerial.h>// Use below include for software serial lcd
#include <LCDSwSerial.h>// Uncomment the below line to use the serial pins
// rxpin is 0, txpin is 1
//LCDSerial lcd;// Uncomment the below line to use software serial
// it is set to use rxpin as 12, txpin as 13
LCDSwSerial lcd(12,13);int x = 0;
void setup()
{
// Initialize serial port to 19200, the default for this LCD
lcd.begin(19200);// Clear the LCD Screen
lcd.clear();
}void loop()
{
// set cursor position
lcd.cursorSet(5,2);
lcd.print(”S “);
delay(5000);// move cursor left
lcd.cursorLeft();
lcd.print(”L”);
delay(5000);// move cursor right
lcd.cursorRight();
lcd.print(”R”);
delay(5000);// return cursor home and down
lcd.cursorHome();
lcd.println(”H”);
delay(5000);// print character after new line
lcd.print(x);
delay(5000);// move cursor back one space
lcd.backspace();
lcd.print(”B”);x++;
}
Now in future arduino sketches I can just create an instance of one of these classes and have access to all of the lcd commands. If you are concerned about the class size you can comment out the commands that you do not intend to use from the .h and .cpp files in the library.
Download the LCDSerial Library!
ATX Variable DC Power Supply
Every good workbench needs a dc power supply, and mine is no different. With the upcoming projects I have in mind several things will be running off of battery power. And rather than be constantly recharging batteries I thought it was time to build my own power source.
There is a wealth of information out there on how to use a standard ATX computer power supply. Here are the two sources that I used:
Instructable for ATX Power Supply
The parts were relatively cheap, and most of the things I already had lying around the house. I decided that I didn’t want to break open the power supply and do any actual modification to it. This way in a computer emergency I still have a fully functional psu ready to go.
For convenience sake I also wanted to add a digital display to the box so I could tell what the voltage of the variable binding post was without connecting my multimeter. The LED volt meter I purchased from the ebay seller at sure-electronics.net, and the going rate for these is ~$10 shipped from somewhere in Asia. So plan a couple weeks ahead! There are several models that require different voltages to operate, and provide different input ranges for the meter. I purchased one that was powered by 5V, and would accept a range of 0-20V for display. Since I am only providing a maximum of 12V out, this was well within range. The exact model number was: ME-PM105, and you can find these in several different colors.
The power supply has binding posts for GND, +5V, +12V, and a variable supply from ~2-12V. You can also connect a 3.3V post to the PSU, but I ran out of room on the project box.
To allow easy replacement of the power supply I used an atx extension cable. The female part was used as the plug in port on the back, while the male part was removed allowing access to the wires for connections.
Here is a shot of it in action, powering up a RC transmitter!
Soldering Station Review
As part of building my workbench I thought it was time to invest in a soldering station. Attempting to solder with my $10 radio shack iron and it’s 1/2 melted tip, while holding solder, a wire, and trying not to move the prototype board on my desk was trying to say the least.
I wanted a half way decent soldering station, but didn’t really want to pay what the Weller stations were going for. I few months ago I attended a hack day event here in DC, and the local group was using an Aoyue station. If it could survive the abuse that they put it through on a daily basis I figured it would last me forever. It’s even better that you can find them for under $40 online.
To make the job even easier I went off the recommendations of the ladyada website in their advanced electronics kit. I ordered both the panavise jr. and the helping hands. With these two clamps I was able to make quick work of several arduino shields. It makes a huge difference in both the quality of the job and the enjoyment to have the right tools!
In the picture above you can see how with the two vises I now have 2 free hands to solder with, one for the iron and one for the solder. The panavise jr. is rock solid and really holds the smaller boards in place. With a little fidgeting the helping hands can hold just about any component in place while you solder it. I’d highly recommend this combination!
Building An Electronics Workbench
After the construction of laserpup I realized that my office desk was no place to be working on electronics projects. Soldering, prototyping, testing, these are all things that I knew I would be spending a lot of time doing in the future, and I wanted a comfortable place where I can take over the world….
I picked out an empty spot in my office and went to work researching plans. I came across this web site that gives on instructions on how to build a low cost DIY workbench that is meant for a garage or shop. While the plans weren’t exactly what I wanted, they looked to be easy enough to adapt.
Since this is in my office I wanted it the same height as my desk, so I can be lazy and slide my chair back forth between the two. This also meant that the bottom shelf would have to be half the depth so my chair would slide under. I also wanted to add a top shelf for storage, and to provide a place to mount a good light. After taking everything into account I ended up with the following dimensions. It has a 12″ deep bottom & top shelf, a 24″ deep working surface, and is 5′ in length.
I didn’t expect this to be the prettiest thing in the world, but since I would probably be seeing it every day I thought it would be best to at least paint the thing. I also wanted to put down something on the work surface so that it wasn’t bare wood. I had no idea what to use, but after a some searching around I found what I thought would be perfect. I purchased a 25′ roll of 12″ wide silicon sheet rubber on ebay, this was wide enough to cover the shelves with one strip and the table with two. And it was cheap!
To finish it off I mounted a 4′ shop lamp in the top shelf to light up the entire surface. I added one power strip to the side and one to the back. A couple plastic bins and storage containers from home depot and my bench was complete. The only thing left to add is an ethernet switch to the right side.
In all it took me about a weekend to cut, assemble, and paint everything. It was a relatively easy project, and everything to do it was available at the local hardware store (minus the rubber top).
Parts Breakdown:
- 8-10 2×4x8s
- 1 sheet OSB (cut for free by home depot)
- 1 box deck screws
- 3 metal brackets to mount top shelf to bench
- 1 quart of grey primer
- 1 shop light
- 2 power strips
- 25′ sheet of silicone rubber
The total cost for the project including all the parts was ~$100. I’ve been busy using it for the past few weeks and couldn’t be happier with it.
We’re an Official Work of Art!
I would like to give a big thanks to both my girlfriend and Arge for my recent birthday present. It’s a commissioned 3d representation of LaserPup, how sweet is that!
The detail is amazing, and if you like it please take a minute and visit Arge’s other work at http://www.ArgeArt.com. Pictures don’t really do it justice, but here’s one anyways to give you an idea.
LaserPup - Javascript Examples
As promised here is an overview of how I did the javascript code for LaserPup.
Creating the Image Map
I created an imagemap of the circle graphic that passes the x & y coordinates of the image to a javascript function when clicked. The imagemap breaks the graphic into clickable 8×8 squares, I wrote a quick perl script to create the imagemap code, which was easier than doing it by hand.
Perl File Example:
#!/usr/bin/perl
open OUTPUTFILE, “>output.txt” or die $!;$xstep = 8;
$ystep = 8;
$xmax = 160;
$ymax = 160;print OUTPUTFILE “<map name=”floormap”>n”;
for($y=0; $y<$ymax; )
{
$yend = $y + $ystep;
for($x=0; $x<$xmax; )
{
$xend = $x + $xstep;
print OUTPUTFILE ” <area shape=”rect” coords=”$x,$y,$xend,$yend” alt=”$x,$y” title=”$x,$y” href “javascript:setlaser($x,$y)”>n”;$x = $xend;
}
$y = $yend;
}print OUTPUTFILE ” </map>n”;
close(OUTPUTFILE);
Example of imagemap:
<map name=”floormap”> <area title=”56,152″ shape=”rect” coords=”56,152,64,160″ href=”javascript:setlaser(56,152)” alt=”56,152″></map>
Creating the Javascript
The javascript function setlaser(x,y) is called when the image is clicked, and it calls the iobridge web interface to update the servo positions. In my graphic the y servo value is actually the radius of where the user clicks in the circle. There was slightly different code for each quadrant of the circle, but basically I calculated the hypotenuse of a triangle with x & y values and that is the radius. Anyone remember A^2 + B^2 = C^2, I certainly never thought I would use that one again!
function setlaser(x,y)
{
var radius = 0;// Here would be code to calculate radius from x & y position values
// Make sure var is an integer
// ServoMinPWM + (ServoMaxPWM - ServoMinPWM)/(MaxGraphicSize/ClickPosition)x = parseInt(x);
x = Math.round(600 + (2400-600)/(152/x));radius = parseInt(radius);
radius = Math.round(1150 + (1850-1150)/(152/radius));// Send values to iobridge
widgetSetString(’xservowidgetid’, x);
widgetSetString(’yservowidgetid’, radius);
}
Here is the code for Turning On/Off the Laser Pointer, the buzzer and light is similar:
function laserpress()
{
// Get the Red Dot and Button Images
var laserbutton = document.getElementById(”laserbutton”);
var laserdot = document.getElementById(”laserdot”);// If Laser Was Off (laseron is a global variable)
if(laseron == 0)
{
// Set button image to redbutton
laserbutton.src = “lp/redButton.png”;// Change CSS value of laserdot so it is displayed
laserdot.style.display = “block”;// Send command to iobridge to turn on laser
widgetSetState(’laserwidgetid’,1);
laseron = 1;// Call buzz function that tells iobridge to pulse buzzer
buzz();
}
else
{
// Set button image to graybutton
laserbutton.src = “lp/grayButton.png”;// Change CSS value of laserdot so it is NOT displayed
laserdot.style.display = “none”;// Move laser back to center position
setlaser(72,72);// Send command to iobridge to turn off laser
widgetSetState(’laserwidgetid’,0);
laseron = 0;// Call buzz function that tells iobridge to pulse buzzer
buzz();
}
}
I’ve had some good feedback, and one suggestion was to have an autonomous mode. It was very simple and now LaserPup plays by itself! Here is the function that is called for that:
function randomlaser()
{
if(randomState == 1)
{
// Calculate Random Servo Positions & Time (1-5secs)
var x = Math.ceil(Math.random() * 152);
var y = Math.ceil(Math.random() * 152);
var time = 1000 + Math.ceil(Math.random() * 4000);// Move Laser
setlaser(x,y);// Set timer for next move
setTimeout(randomlaser, time);
}
}
LaserPup - The Internet Enabled Dog Toy
Introduction
Over the past few weeks I have read about several projects for the iobridge: internet dog feeder, Jason’s fish cam, and the servo-beer. These got me thinking about small projects that I could use the new device for. It didn’t take very long before I came up with idea for LaserPup. One of my favorite things in the world is my dog, and one of his favorite things in the world is his laser pointer. Over the past 4 years he’s gone through several of them, and it continues to be one of his favorite toys.

This is not LaserPup
So what is LaserPup? It is not a dog with a laser beam attached to his head, as cool as that would be. In its simplest form it is an internet enabled dog toy. I have created a small device that mounts in the ceiling of my basement where my dog likes to play. It is comprised of two servos, a buzzer, and a laser pointer. The servos move the laser pointer around on the floor, alleviating the need for my arms to do it myself. Because really, there is nothing more exhausting than sitting on the couch watching TV while your dog chases the laser around the floor. The buzzer is used to notify the dog that it is time to play, and also that play time is over. This is really a bit of a social experiment, and I’m curious how long it will take before he understands what it means (if ever).
LaserPup YouTube Demo
What makes the project possible is the iobridge, as it allows me full control of the servos and the small electronic circuit over the internet. To stream the action I installed a small webcam in the room, and to combat darkness I added an X10 controlled light. Finally I designed an interface page for the iphone (using iui as a base) that controls it all, and now my new toy travels with me everywhere.
Disclaimer:
I understand that some people don’t believe that laser pointers and dogs are good mix. In some dogs it can lead to OCD, and strange behaviors. I am confident that this is not an issue with my dog, but realize the dangers and will continue to monitor him.
Hardware Design
Once I decided to actually construct this project it was time to gather supplies. Here is what I needed to complete my device:
- I/O Bridge with Servo Module
- Webcam
- 2 Servos
- Buzzer
- Laser Pointer
- Spare Electrical Components from parts bin (Transistor, Resistors, LEDs, etc.)
- X10 Module
It has been many years since college, which was the last time I put together a digital circuit. I was lucky enough to find my old EE breadboard, and a trip to Radio Shack gave me the spare components I needed to get started. After the week long wait for the everything else it was time to get building.
The first thing I did was connect up the servo module board, the two servos, and the iobridge. I powered on the iobridge and followed the directions to link it to my web account. On the iobridge website I configured the servo board, and created two widgets for variable servo motion. In all this about 15 minutes before I had web control from the iobridge site working to move my servos.
The servos moved, but I needed to fine tune them to the ranges of motion I needed. To make a complete circle on the floor I figured that the X-Axis needed to move 180 degrees, and the Y-Axis needed about 80 degrees. I had two Hitec HS-322D servo’s in my possession, and I set out on the internet to find the PWM timings. So if anyone else is interested in the values for this particular servo:
-90 Degrees -> 600 usec
-45 Degrees ->1050 usec
0 Degrees -> 1500 usec
45 Degrees -> 1950 usec
90 Degrees -> 2400 usec
If the servos are vibrating then you’ve issued a timing outside the valid range, and you can damage the servo. Once I put in the correct min/max and starting points the servos were fully operational, and had the range of motion I desired.
Now that the servos were working it was time to create a digital circuit! I would need to use two digital out lines of iobridge, one to control the laser pointer on/off and one to control the audio buzzer. Now I could have run both of those directly off of the 5V digital out line, the iobridge would have supported the necessary current. But just to play it safe, and because I had the necessary parts, I decided to turn them on/off through transistors being used as a digital switches. By wiring it this way the current to power them is drawn from the power supply, and not the digital logic that produces the DOUT signals from the iobridge.
For the first prototype I used LEDs in place of the laser pointer and buzzer. I then created iobridge widgets for the two digital out lines, each one has an on and off switch. By connecting the two DOUT lines of the iobrige to the base of the transistors I was able to turn on & off the LEDs from the iobridge website. Now I had full control over the web of all my necessary electronic pieces through widgets.
Next I took an old laser pointer device that ran off of 3 1.5V watch batteries, and removed the electronics with a dremmel. I soldered a wire across the push button switch to short it, and keep it always in the on position. Next I replaced the two LEDs on my breadboard with the laser and a small buzzer. At this point the LaserPup module was ready for assembly!
After creating a quick circuit diagram I soldered the electronics onto a small prototyping board. This was mounted with the servos in a box, and ready for installation in the ceiling. Since I didn’t want the ioBridge mounted in the ceiling (I want it available for other projects), I decided to create a simple interface board that would connect my custom modules using a standard ethernet cable. The physical construction of the device was finally complete.
Software Interface Design
The iobridge website provides javascript code to drop onto your webpage and control all of your widgets. There is also an api that allows you to interface with your controls in custom javascript, and this is what I would be using. Since the desired interface of this project is my iphone, I designed the page to fit perfectly when the phone is in the horizontal position. On the page I have the live video feed to the laser pointer room, along with three interface objects.
The second button controls a x10 light that is in the laser pointer room. If it’s too dark then you can not see the video feed, and what fun is that.
The first button turns the laser pointer on and off. When turning the laser pointer on, it will also turn the buzzer on for two 1 second pulses. When turning the laser pointer off it will move the servos back to the default position, and turn the buzzer on for one 1 second pulse. We’ll see how long it takes my dog to figure out what the buzzing means!
The circle graphic controls the position of the laser pointer in the room, but only if the laser pointer is turned on. If you click on the circle, an image map is used to feed the coordinates to javascript that then calculate the correct servo positions and set the values. Thanks to the iobridge team there, they provided me two lines of javacript that mapped x/y coordinates to servo PWM positions.
Conclusion
I would eventually like to make an updated interface that uses the iphone’s accelerometors as the control. Since the current interface is written in javascript, Safari only gives access to 3 positions from the iphone (-90,0,90). I will have to develop an iphone application, and not a web page, to finish what I envision. Please check out the demo and tell me what you think, as you can see from the video Skyler is a big fan! Leave a comment below, or email me at joe@laserpup.com
ioBridge RJ45 Breakout Board
My new iobridge is great, and I already have several project ideas. The problem I faced was how to connect multiple projects, in different locations of my house, to one central iobridge. Ethernet is the cheapest multi-wire cable I could think of, with 8 separate wires it will pass enough signals for most projects. As an example my LaserPup module requires 6 lines: 2 PWM servo signals, 2 DOUT signals, and +5/GND. That still leaves 2 to spare.
I purchased a few RJ45 jacks from digikey, and once they came in I noticed that the second row of pins is offset. This means it wouldn’t fit in the holes of a .1″ prototype board, but that was nothing a little bending of the pins to align them wouldn’t fix.
With that figured out I soldered together a simple breakout board that had one RJ45 jack, an 8 pin male header, and an 8 pin female header. This would give me the versatility to send any signal down any pin of the ethernet cable. By using two headers I can connect to the board with a bare wire or one that has a header attached. It also allows me a second point to easily connect a multimeter for testing and debugging.
Now for all of my remote iobridge modules, I will just add an RJ45 port and use a standard cat5 cable to connect them together.




























