Welcome to Robot Dialogs. This is a place where I will record my progress, mistakes, errors, failures, lessons learned and hopefully occasional success in my designs and implementations of robots and other technical endeavors. I will try to make it as educational, informative and entertaining as I can...

Tuesday, December 13, 2011

Wooden Puzzle Box 2 (Part 2 of 2)

I've finished Puzzle Box #2 (see Part 1 of this design). Here are some details from the build.
I started by using a planer to cut all the 1.1x0.23 inch lattice trim pieces (from Home Depot) down to 1.1 x 0.2" inches (to fit the design). The lattice stock comes in 13 foot pieces, I cut those down to 6.5 feet before leaving the store. Each piece in the bill of materials was cut very precisely to match the drawing. Because pieces overlap everywhere their was very little room for error (I basically went for +/-0.01 inches tolerance). Many pieces were cut three at a time.
All told there were over 140 pieces. I cut a few extra of each piece because the saw would occasionally chew up an end, or a piece would have cracks or knots.
I worked on bite-sized chunks at a time, it was a complicated assembly process because I had to follow the design exactly in order to have the correct piece overlapping when larger pieces got glued together. Everything is held together by Elmer's wood glue, which when set makes a stronger joint than the wood...
Once I had all of the individual pieces glued into pieces like the one above, I taped all the pieces together to make sure that once glued into large sections, their would be no problems.
I then tore apart the taped version and sanded down all the rough edges. Next I began combining the small pieces into larger pieces. This was done carefully and with lots of clamps.
I ended up with three major pieces, each of which got another round of sanding and taped together again to check how the fit.
Last, each of the three major pieces was stained with two coats of Minwax "Polyshades" Stain and Polyurethane (which I've used several times before). This was a very challenging design and build, but it was pretty fun to finish too. I spent about a week designing it and another week and a half (hobby time...) constructing it, probably 40-55 hours total.

Next up on the project list is either patio furniture, or a tele-presence robot for CCCKC...I finally found something I can use the IOIO for.

Monday, November 28, 2011

Wooden Puzzle Box 2 (Part 1 of 2)

I'm working on a second wooden puzzle box... It has taken forever to get the design right in Sketchup (five six attempts)...trying to minimize the number of different components while only using a single type of wood... 1.1 inch x 0.2 inch trim. I'll keep taking pictures as I go and make another post later.

This design is open source, go nuts. The Sketchup file is available here. I've gotten the design down to 21 different piece lengths. A bill of materials made using the CutList plugin for Sketchup is here.

Final thought: I hate the lumber industry. If you say a piece of wood measures 1.25 by .25 inches, how the hell do you get off selling something not even close to that size? At what point did gross inaccuracy become okay?

Saturday, August 20, 2011

Potato GLaDOS (from Portal 2)

I haven't done a proper project in a long while, and this past weekend it finally got to me. So I decided to try my hand making a prop/replica of the tuberous AI from Portal 2. I give you Potato GLaDOS:

Most of it was sculpted from Sculpey and painted with acrylics. The audio comes from an old mp3 player I had lying around. The electronics consist of a LM386 audio amplifier, speaker, LEDs and a simple circuit to pulse the LEDs with the audio. 

Here's a long winded explanation breakdown of how it was made. There's a boat-load of build pictures out on Flickr. The audio was pulled from here and spliced together in Audacity.
Please support the developers and artists of these amazing games: Purchase Portal 2!

And remember: "This. Sentence. Is. FALSE".

Potato GLaDOS Build Notes

I started with pictures and models from the tubes. The image below is a particularly good example showing both sides.
Model Reconstructed by ~Zareste

I went to the grocery store and found some models that I could hire for pennies an hour. I used Sculpey for the potato and GLaDOS, but I didn't want to bake it for four million years, and I needed a hollow inside for all the electronics so I made a potato-ish shape with aluminum foil. Keeping the outer layer of aluminum foil as smooth as possible will help when the foil is pulled out of the baked Sculpey.

As you might expect potatoes are particularly easy to sculpt. Imperfections are the main feature...trying to keep fingerprints and fingernail marks out of the clay is the most difficult part of it. I don't have a picture, but the large hole (through which electronics are inserted) was cut out of the clay before it was baked. Scupley isn't too brittle after baking, but I didn't want to take a chance cutting a huge hole in it... I also put the nails in before baking so that the puncture spots would look more realistic.

After sculpting the parts and a few extra pieces for drop and paint tests it all goes in the oven at 275° F for 15 minutes per 1/4 inch. These parts took a little over 30 minutes. The clay wont be hard right when it's pulled out of the oven, but once it's cooled it will be pretty hard.

After baking the parts were sanded smooth and washed with a damp cloth before painting. Sharp edges can be removed by sanding or with a knife.The aluminum foil pulled out from the inside of the potato pretty easily, again the smooth outer layer of foil really helped.

For the smaller parts (the over-sized chip and the colored bangles on the alligator clip cables) Sculpey was used as well. Rather than fire up the oven again I just pointed a heat gun at them for 3-4 minutes (the temperature was 275° F-ish again).

To make the 'bangles'/chokes for the alligator clip wires I wrapped Sculpey around a nail, flattened two sides with hobby knife and then cut the other two sides to make it as square as possible. These pieces were baked (with a heat gun) and then scored at the right lengths. If the nails are smooth enough the cooled clay will slide right off.

I painted everything with acrylic paint. Sorry no in progress shots of that, I wouldn't be the right person to explain painting :). The Sculpey is very drill-able so after painting I drilled all the holes for the black wires and red LEDs.

Next (well actually first) came bread-boarding of the audio/LED circuit. Good luck figuring that out from the picture :). Circuit diagram below.

I sort of combined the content of these instructables to achieve this circuit:
Blinking LEDs to Music (The IRL2703 is WAY overkill for this application.)
Simple LM386 Audio Amplifier
I found some round prototyping boards at RadioShack (actually all of the electronics you can pick up there). The LED stuff went on one round board and the control/amplifier on a smaller board. GLaDOS's 'eye' is simply a clear marble. It creates a pretty good lens effect. In the middle of the yellow LEDs I put a small piece of aluminum foil (not shown) to reflect light up through the marble.

The red LEDs were put into their respective holes and the small wire used to connect them to the battery was super-glued to GLaDOS/the chip.

The speaker was sandwiched in between the control and LED boards and copious amounts of hot glue was applied.

The hotglue around the LEDs got some black paint layers to block out unwanted light.

The small wires to the red LEDs were also painted to match...sorta.

Apply power, cross fingers....
It works!

The alligator clip wires were super-glued into holes on GLaDOS. The yellow one in the model (first picture) has some extra bits near to GLaDOS.  Those extra bits I made with heat-shrink wire wrap and another peice of Sculpey painted black. The six black wires around the circumference are all that is used to hold GLaDOS onto the potato. I think they're supposed to be staples, but whatever.

Completed GLaDOS portion.

The yellow wires that wrap around the potato were hot glued (on the inside) into place. The audio comes from an old mp3 player stuffed inside the potato.

Complete Potato GLaDOS. (Off.)

Complete Potato GLaDOS. (On.)

Video goodness:
The audio was pulled from here and spliced together in Audacity.
Please support the developers and artists of these amazing games: Purchase Portal 2!

Questions are welcome, but the Cake is still a lie.

Saturday, July 30, 2011

Adventures In Server-land: Power Up (Post-Boot) Server Status Email

Lately my projects have taken a back seat to some other higher priority stuff (including setting up the new web page for CCCKC (my local hackerspace) and various KC Maker Faire duties.

On my own time I've been working to build a low power server. Something I can leave on all the time without burning holes in my wallet. Really that's just an excuse...any money I would have saved was dumped into good hardware and setup time, but whatever. I think the main point is that (when I've finished) I should have a server that I can leave on and have reliable file storage/access anywhere. And I will have learned something (supposedly).

The Server:
At full load this server uses less than 70 watts! (My main PC uses 160W at idle, 300-400W at full load...)

I don't think I'll go into full detail with every software thing I've done so far (I can't remember most of the steps, and I'm not really qualified to explain them). I will however give the short list:
  • Ubuntu Server 11.4
  • LAMP (Apache, mySQL, PHP) Mostly so I can have a quick easy status check from any device.
  • smartmontools - For S.M.A.R.T hard drive monitoring
  • mdadm - For raid (still playing with raid drives, burning in disks and practicing for failures.)
  • samba - still tinkering... local file share access (tests show ~100MB up/down speeds...awesome!)
  • sftp - still tinkering... remote file share access (dunno yet...)
  • lm-sensors - CPU temperature
  • hddtemp - HD temperatures
Anyways I started this post to talk about a script I made while tinkering today. Firstly I followed this guide to get command line email via gmail working...and then went about making a robust post-boot status report script. This serves three purposes:
  • After a power failure/reboot I get an email immediately.
  • The email has important/useful status information about the server before any users get there hands in the mix.
  • The script serves as a library of useful sys-admin commands. Things I wouldn't normally use and, therefore, forget easily.
Here's what I did:

Create a file called onboot-report.sh with the following:
Note: You should change some@email.com to your own email...and you may need to change the FILE and MAIL_FILE locations... Most of those commands are explained very well here.

Now the only thing left is to make onboot-report.sh run after power-up:

In Ubuntu you just have to run the script in the file /etc/rc.local by adding the following:
I also have the following in /etc/rc.local I find it extremely useful because it lets me know that I can reestablish ssh sessions after a reboot without plugging in a monitor... It's not very complicated, it just makes the PC speaker beep three times after it's completely powered up.

Oh, maybe it's obvious, but after you install "beep" (sudo apt-get install beep) you can only test it from the server itself (tty1-ttyX) not via ssh (which will just beep your local PCs speaker).

Saturday, May 28, 2011

GameBoy (Classic) Work In Progress Part 5

21.2 FPS! I'm borrowing a ChipKIT Max32 from a friend. Hooked it up to the long running GameBoy Classic LCD project I've been working on and after some optimized code I hit 21.2 FPS! Best result yet.
I'm used a simple java program to generate a version of my AVR C code in optimized Processing (Arduino-ese). I had to un-roll loops to the point of absurdity that's why I started using code generation...

Java code is here.

Up on my plate in the near future:
  • IOIO Tinkering - I need to come up with a project worthy of android powers.
  • 30 Days of Creativity - June 1-30 - I'll be doing this again for sure!
  • Maple Tinkering - I think this board might be the next step for the GameBoy Project. I have to return the ChipKIT Max32...the thing can only toggle an I/O pin at 719 kHz (I can get something better at the same price point).
  • And most importantly the KC Maker Faire: June 25-26:

Saturday, February 26, 2011

GameBoy (Classic) Work In Progress Part 4

I finally dug the GameBoy back out of the project box and started making some more progress on it. I'm still working with an ATMega32, but now I've cranked it up to the full 16Mhz it can handle...

I also took some new data from the GameBoy LCD control signals with the Logic Sniffer. This time I wasn't clocking the GameBoy with my micro-controller. Instead I used the GBs original crystal, so the data is from the actual signals with actual timing that the GameBoy uses.

I was able to break down the timings of the signals and essentially emulate them with the ATMega32. The logic I use to determine what pixel data to push out was simply if(x = y) then the pixel was turned on. I figure a diagonal line is a good test that doesn't look like the crazy vertical and horizontal screen artifacts you sometimes get with the GB.

This picture is very deceiving, the contrast is a lot better in the picture than on the actual screen. The ATMega32 can't quite output data as fast as the GBs CPU, and even though I can emulate the signals I still don't fully understand them. I feel it's going to take a lot more effort to actually understand the non-obvious signals.

When I finally understand them I hope to be able to slow the frame rate down, leaving an old image on the screen while I compute the next. Unfortunately my attempts to leave the image on screen while doing other stuff just lets the screen clear... I hope this is fixable, otherwise I'll have to either devise some sort of video ram setup that takes new data but always keeps the screen refreshing while leaving another chip to create the data and send it to the ram or I will have to upgrade to some much higher frequency micro-controller that can do both. From what I can tell the Z80 in the classic GB does both, but to pull it off it has dedicated hardware to pull data from shared memory and drive the LCD, while the main Z80 just handles the game logic and graphics computations and just stores into the shared memory...probably over simplified that explanation... you can go read the GB's patent if you want the real story/architecture.

Oh, my current source code is inexcusable. Give me some time to figure out the purpose of the LCD signals and then I'll put up some code. Also, you'll need the OpenBench_LogicSniffer_JAVA_CLIENT_2.1 to view that data.