Jul 18, 2010

The Amazing Technicolor Makerbot

Fully lit MakerBot

I decided the Wintermute needed some LEDs, but I didn't like the thought of doing static LEDs, so I'm working on adding LEDs all over. Some will be RGB and vary color based on various criteria, some will be single color and come on at certain times, and some will be single color and always on.

To get started, I needed a way to hold the LEDs. I wanted them to be small, so I wanted surface mount LEDs. So I designed and etched a board for the LEDs:
LED Board Design
(I'll put this on Thingiverse once I feel like it's usable. Leave a comment if you're interested.)

You can see in the photo some of the magnet wire I used to wire them together. (BTW: I'm not affiliated with any of these links, so I'm just letting you know what I used. I'll let you know if there's an affiliation at any point.) This turned out to be more like sewing than soldering, but it was kinda fun too.

Soldering the single-color LEDs isn't too hard. They're small, so you have to have a steady hand. I solder them by putting a small blob of solder on one side, holding the LED in place, and then melting the blob with the soldering iron so that the LED sinks in and ends up flush to the board. I'm not sure where I learned this, but it was on the Internet. It was probably on Sparkfun. Here's a Youtube video made by Sparkfun:


Here you can see some the right column is soldered in place, and the solder blobs on the left half of the other items:
LED Board (with blue LEDs soldered)

One note about design: I designed the RGB LEDs with the resistors in place, but for the individual LEDs I didn't put resistors on the board. This was partially a mistake (forgetting to make room for some resistors) and partially experience. The RGB LEDs are very sensitive. (I blew out two of them and had to remove them and put new ones in their place.) The single LEDs I'm using are fairly robust (it took 12v to blow them out ;-), and so I'm using a single (PTH) resistor for a string of three, with the three in parallel. Like this:
LEDs in Parallel


Once I have a row or column soldered up, I use scissors to cut them off of the board and solder them together using the magnet wire. Here's the RGB LEDs and resistors soldered up, with the right column of single-color LEDs cut off:
LED Board (with RGB LEDs soldered)
RGB LED (with RGB LEDs, detail)

And then cut out:
LED Board (with RGB LEDs cut out)

I'm still working on the control circuitry, which will control the colors based on one of several criteria. I'm thinking right now the most useful will be temperature of the nozzle and heated build platform.

Here is my current state of progress:
Fully lit MakerBot

I have blue LEDs in the "floor" and white LEDs below the Z-platform to illuminate the build platform from above. The build platform is a MBI Heated Build Platform and has a ring of red LEDs under it to show when it's heating. (That's not shown in this photo.) The Z-platform has RGB LEDs at the back and on the side of the extruder. In the photo, all of the red, green, and blue are at full voltage, so they're making "white". (The red in these RGBs is a little weaker than the green and blue.)

That's all I have time to blog for now, but I'll show how I connected them to the 'bot, as well as my progress on the control circuitry in later posts. (You can peruse my Flickr and see what I'm up to. It gets updated first.)

Jun 30, 2010

KC-Area Mini-Maker Faire

If you live the the Kansas City area (Northwest Missouri or Northeast Kansas) then visit the KC Mini-Maker Fair!

It's put on by Make:KC and CCCKC. I'm a member of CCCKC.

Hopefully I will be able to participate. In the least, I'll try to have Wintermute there! (I'm sure there'll be at least a few MakerBot Cucpcake CNCs to be seen.)

Official announcement: KC Mini-Makers Faire

Jun 3, 2010

Plastruder Fail — again!

Plastruder Fail w/MK5 Drive Gear

I just rebuild my plastruder and installed the new MK5 Drive Gear, and it failed catastrophically!

Ok, well, I didn't blow a retainer or anything, but I think that's a testament to the Drop-in Paxtruder that I'm using.

But man, can that thing push! It twisted the filament up in the tiny space available. Here's a few more photos to show the damage (click on any photo to see it bigger):

Plastruder Fail w/MK5 Drive Gear 2

Plastruder Fail w/MK5 Drive Gear 3

And here's what the filament looks like when I pulled it out:

Filament detail after fail 1
Filament detail after fail 2

You can see that there's something binding it up, but I think the real problem is heat. I cleaned this out and plugged it back in, and my temperature reads 109ÂșC at room temperature, so I think my thermistor failed.

If that happened mid-build then that would explain this. The temperature got too low and the plastic was no longer liquid enough to extrude.

Wow.

Now to rebuild, again! Gah!

May 29, 2010

Say Hello to "Wintermute"

Wintermute, the serial-number free Makerbot Cupcake CNC


Wintermute; Pic 2

This is my clear acrylic MakerBot Cupcake CNC. I call it "Wintermute."

It's has a Drop in Paxtruder derived from Paxtruder-0.2 (and lasercut) by Craig Berscheidt. (He also lasercut the whole acrylic bot body for me. Awesome work!)

It also has a Heated Build Platform v2.0 (HBPv2) from MBI. (That's what is making the pretty red lights.)

I moved the Extruder Controller to the side of the Cupcake (following Keith's excellent post) partially so that I have room for the heat sink. I also wanted to be able to see the filament better. (The photo above is before I did this.)

One common problem with the HBPv2 is that the MOSFET overheats. A common solution is to make a relay circuit, and I might still end up with one, but as a quick solution I rigged up a quick heat sink from some 20AWG hookup wire (of the RadioShack flavor) with the insulation stripped off.

HBP2 MOSFET Heat sink

Then I soldered it onto the ground tab of the MOSFET.

HBP2 MOSFET Heat sink (attached)
HBP2 MOSFET Heat sink (attached)

You can see that it sticks out too far to clear the top of the Cupcake's frame, so mounting the extruder controller was required. In retrospect, I could have made the heat sink considerably smaller with the same amount of wire, and not had to move the EC, but I like it better this way.

I've been able to make a few prints, but then I started having extruder problems. Right now I'm rebuilding the extruder.

Wish me luck!

Apr 25, 2009

ASUS WL-520GU Webcam - Part 2 - Getting Started

This post is the second post in a series of posts about making a webcam server using a inexpensive wireless router, some open source software, and a cheap webcam. Read the first post for a little more background.

Why a Webcam

I wanted to be able to watch my 2-year-old's room to see if she was sleeping or not without risking waking her up by entering the room. I had a wireless camera a bought for ~$99 about a year ago and it's crap. It interferes with my WiFi. My WiFi interferes with it. It's not very good quality. And it can only be viewed in one place: the TV the wireless reciever is attached to.

So, my goals are:

  • Cheap: Under $100 for a complete camera setup, including means of transmitting to my iPhone or computer. If I add multiple cameras, then the per camera cost should either get cheaper or stay the same.
  • Compatible: I want to be able to view this on my iPhone or MacBook Pro. I want my wife to be able to do the same, ideally at the same time in another part of the house (or world.)
  • Expandability: I would like to be able to add cameras to the system, and easily switch between them.
  • Unobtrusive: I don't want a bulky setup hanging out in the corner of my daughter's bedroom. I'd like something that I can hide most of in a drawer and just have a tiny camera hanging out above a window sill or in the corner. The less messy cords and power plugs the better. It's also important that it be safe for a curious 2-year-old to be around, so the positioning and security of the power plugs and other cords must be carefully considered.

Some of those goals are a bit lofty, I know. Streaming to the iPhone requires H.264 encoding, and that might be a bit much to ask of a 200MHz router, especially if I add multiple cameras to one unit and have multiple people viewing those streams. If that proves to be impossible, I'll try to use my underused G5 as a streaming server, converting a simpler format (MJPEG, most likely, since that's what many webcams send natively) to H.264 with the help of a much more powerful processor.

Buying stuff

Router

As I've mentioned, I'm cheap. I like buying things on sale or sometimes used. So, when I read about the ASUS WL-520GU over on the mightyOhm blog, I immediately started looking for deals. When I bought mine, it was $40 on NewEgg.com. Even when there's no specific coupon or rebate, it's still only $50.

If you decide you would like to use a different router, then a lot of these instructions might still apply so long as you're going to use OpenWRT. You can see if you're device is supported by browsing the Table Of Hardware.

Note: As I write this the OpenWRT team is busy moving and updating the wiki, so that link might go stale. Even the "Supported Devices" link on their home page is broken currently, so you might have to dig some to get to it. In any case, you should search the forums to see if anyone else has asked about the hardware you want to use. Keep in mind that sometimes the manufacturer will change the internals of a device without changing it's name or UPC code, so you have to sometimes buy the device and look at the back and see if it says v1, v2, etc. So far, ASUS seems to fairly clearly state when they make changes, but I can't say how much you can trust that.

Webcam

The web cam isn't as easy of a choice. There are many, many different webcams, with ranging features and quality levels, not to mention prices. Many of them would put us over the $100 mark by themselves. Assuming the router costs about $45, and we'll need a USB hub and USB thumb drive, we've got about $30-$35 dollars to spend on a webcam.

I got lucky and found a Logitech QuickCam Communicate STX at a local Target for $30, and that actually included another (normally less expensive) webcam with it. I haven't found that deal since.

Things you should look for when choosing a web cam:

  • Make sure it's compatible with the gspca/V4L2 drives used by OpenWRT. I had a hard time finding a list I could link to, but I did find this one. That's close, but you really want to check the list from your OpenWRT before you build, because there might be some more added. When I get to the installing of OpenWRT part, I'll explain more. Keep in mind that manufacturers change the internals of a product without changing it's name, sometimes making it incompatible with Linux. The only way to know for sure is to plug it into your computer and check the vendor and product IDs. I'm using a Mac, so I open the System Profiler with the device plugged in and grab it there. On Linux you can use lsusb. I don't have a clue about Windows, but I'm sure it's possible. (Feel free to share how in the comments, in case others want to know.)
  • You probably want it to be small, for unobtrusive use.
  • You might want one with a built-in microphone. The STX I'm using has one, but I still haven't gotten it working. I'll try again later and report.
Other USB Stuff

All that's left is a USB hub and a USB flash drive. You probably already have some of these laying around. Most of them will work, so it's mostly up to price and aesthetics.

For the USB hub, I just use a tiny little mobile USB hub that I had. I have no idea what it cost at the time, but I doubt I paid the $20 it goes for on Amazon.

For a flash drive, I'm actually using a tiny little flash card reader (like this one) and a 1GB microSD card. The router sees it like it's any other flash drive. It doesn't have to be big, unless you plan on keeping recordings around on the drive instead of sending them to another computer or just streaming them into the ether. That old 128MB or 512MB flash drive you hardly use anymore might do the trick quite nicely.

Void your warranty

Warning: What we are about to do to your poor ASUS WL-520GU will void it's warranty. You might also turn it into a bunch of spare parts. Proceed with caution, and use common sense. Please.

Adding a serial port to the router

It's really hard to top the instruction over on the mightyOhm blog. Actually, I wouldn't want to try, since that's where I got my information. (Thanks, Jeff!)

However, since I did a few things differently, I will give a very rough outline here:

  1. Open your router, voiding your warranty. In order to do this you have to pop off the rubber feet from the bottom of the router and remove the screws hidden underneath. I cut the feet so that I could stick them back on and leave the screws accessible. The top will not pop off. It has a little bit of a latch, so you can leave the screws out and not worry too much about it falling apart when you pick it up.
  2. Remove the solder from the header that is just below the ASUS logo (when the logo is upright) with a soldering iroon and a solder sucker. This part is not easy, since the "bottom" pin is on a ground plane, and will require a lot of heat. I have a 15W iron, and so I used a BernzOMatic butane-powered mini heat torch to heat the other side at the same time. I have scorched and destroyed several PCBs with this torch, so you have to be careful not to get too hot too fast. Once the solder melts, use the solder sucker to pull the solder out quickly before it cools and solidifies.
  3. Here's where I varied from the mightyOhm instructions. He said to use a 4-pin straight male header, and I instead used a 4-pin right-angle male header. Asus WL-520GU Serial Port Then, instead of soldering up a piece of perfboard and some female headers, I just used the female-to-female jumpers from SparkFun and a strip of straight headers. Asus WL-520GU Serial Port Using the schematic provided by mightyOhm, I wired header to the FTDI cable by placing the small strip of straight headers in the FTDI cable and then connecting the cables in this order, from top to bottom as show in the photo above:

    1) 3.3V → (unconnected) 2) RX → Orange 3) TX → Yellow 4) GND → Black

    I was able to run the wires around the edge of the board and out thru the mounting hole on the back of the router. That way I can close the case and still have access to the serial port on the router.

Testing the serial port.

I'm on a Mac, and so my instructions will be slanted that way. Most of this info should transfer to Linux/*BSD quite easily. I'm sure it won't be hard to find information online on how to do this on Windows.

Connect the FTDI cable to your computer's USB port. (You might need to install drivers first.) Then open a terminal emulator and connect to the router. The settings: 115200 baud, 8N1. Over on mightyOhm, Jeff says he likes Zterm for the Mac and Hyperterminal on the PC. I don't know about Hyperterminal, but I've never been much of a fan of Zterm.

Instead, I use screen. It's built into MacOS X, and works like a charm, mostly because you never leave Terminal.app. The only part I don't like is the hand-cramp required to leave the program. To connect (assuming you have only one FTDI cable attached at a time):

$ screen /dev/cu.usbserial-* 115200

That will connect you to your router. You can type in commands to the normal UNIX shell. You may have to hit return at first to bring up the prompt. As an exercise, you can restart your printer while connected to see the startup logging.

When you're ready to disconnect the cable (or just leave screen) type: Ctrl-A, then "k" for kill, then "y" when it's asks "are you sure." Please refer to the mightyOhm post to see what a typical startup of the WL-520GU looks like.

In the next episode...

In the next post, I'll show you how to custom compile an OpenWRT and load in onto your router.

Apr 14, 2009

ASUS WL-520GU Webcam - Part 1

First post on this blog, Yay! Oh, so much to say, so little time.

Let's start with my current off-time-project: WL-520GU Webcam.

The goal:

Use a simple, cheap, and physically small device and a cheap webcam to make a security camera / baby monitor / nannycam. This device would stream the video over ethernet or (preferably) WiFi to my iPhone and MacBook Pro. (I may have to use an intermediate computer to get the video to the iPhone, which has to be in H.264 format, but I'll avoid that as much as possible.)

The equipment (so far):

Thanks to posts by Jeff at MightyOhm, I've been tinkeri.ng with the ASUS WL-520GU. It's a pretty slick, cheap router with a USB port. More importantly, it can be reflashed with a linux OS that you compile yourself.

There are several choices of OS, but I chose the same one Jeff did: OpenWRT.

I'm cheap, so when it came to picking a webcam, I searched for deals first, and compatibility second. This isn't necessarily the best route, since there are many many webcams on the market, and a lot of them are not supported on linux.

The good news is that linux support for webcams recently became a lot better, and is now part of the linux kernel. (Knowing that earlier would have saved a lot of hair-pulling.) I ended up with the Logitech QuickCam Communicate STX. I got lucky to have found it cheap: ~$30 for it and another webcam bundled together at a local Target.

Note: There are a lot of things to consider when buying a webcam for use on Linux, let alone with a tiny processor. I will try to make another post about this soon (and came back here and link to it.) For now, just know that you should look up compatibility first, and that manufacturers change a product's internals without changing the name or packaging, so be sure you can return it (or have another use for it) unless you don't mind possibly wasting some money.

The downsides:

  • The WL-520GU's factory-installed linux is based on kernel 2.4, and the wireless drivers from Broadcom are not open source. This means that to switch to 2.6, we lose wireless until the b43 drivers are ready for this device (if ever).
  • The USB2 drivers that are stable for this device require the current 2.6-based kernel.
  • The webcam drivers that are part of the OpenWRT packages distribution are not upgraded for 2.6. After a lot of head-bashing, I figured out that the drivers are now part of the 2.6 kernel. However, OpenWRT still doesn't include support for compiling these modules in the default distribution. I'll explain how to add this in a later post.

Progress:

  • The console port soldered in, like the instruction over on mightyOhm, but with a few modifications.

    Asus WL-520GU Serial Port

    Instead of using breadboard and straight headers, I used right angle header and female-to-female jumpers from SparkFun and a strip of straight headers.

    SparkFun has since added female-to-male headers to their inventory, and I might use those in the future and eliminate the straight headers. The straight headers do leave the cable in order and tidy when the FTDI cable isn't hooked up, however, so I might stick with this method anyway.
  • OpenWRT running on the 2.6 kernel with USB 2.0 support, usb-storage (and associated filesystems), gspca2 (a.k.a. V4L2), and support for the specific chipset used in my webcam. Unfortunately, this means that WiFi is broken, since the drivers for the WiFi in the Wl-520GU aren't ready in the newer 2.6-based kernel.
  • Formatted a 1GB USB drive to ext3 format and setup opkg to install new packages on it.
  • Compiled and installed gstreamer, ffmpeg, ffserver, and motion onto the USB drive. (I'm using about 40MB of the USB drive's 1GB so far, so there was no chance of installing internally!) I know I don't need all of these, and each has it's place. I think this alone will end up being a post.

So, let's get started!

Sadly, the full-on instructions will have to wait until my next post.

Update: Part two is available here.