« Book Reviews | Main

Project Yodel Toaster

Wednesday, August 10, 2011

There's an older video game named Spelunx, a kind of kid-oriented Myst-style game with worse graphics, made by the same company that put out Myst, Cyan.

A notable feature in the extremely-hidden backstory of this game, is an in-game book, a key plot point of which is a royal decree issued for persons everywhere to construct the very best yodeling toaster in the kingdom.

Given the lack of competition in this area, I believe I should be declared the de-facto winner of this particular competition :-) And yes, it still toasts.

WARNING: Toasters operate directly on mains/line power, and can get very hot. This isn't just a standard disclaimer, toasters (at least my cheap GeneriBrand NoSafetyOversight Edition) are apparently not expected to be reparable/openable and contain exteremely dangerous circuitry. The main toast lever on my model presses down on a quarter-inch by 3-inch thin strip of bendable copper that makes contact with another static copper contact farther down when depressed. This huge unexposed strip was, of course, line power, which was just applied to the heating coils whenever they needed to be heating. The timer functionality was implemented mechanically. So simple. So cheap. So dangerous to work around with the power on while testing your half-assembled yodel toaster.


The Willing Victim


On a related note, I cannot confirm or deny that the table below is being held up by a soda bottle, nor that the table in question is actually a door.


Parts/Tools Used


  • Small phillips screwdriver
  • Angle Grinder (seriously)
  • Old 5V wallwart
  • Audio-playing electronics
  • Sheet Metal (I used a spare breadboard backing plate)

Creation of an Electronic Audio Solution


I was originally going to put in a tiny AVR and bit-bang out the audio into a PC speaker, but the amount of flash on the microcontrollers I had was prohibitively small for storing sound samples, even with a few space-saving tricks. The off-the-shelf solution was like $8 from an online electronics place (google 'diy audio greeting card' or similar to get several different models/suggestions), so I had no problem going with that.


Disassembly of the Toaster's Plastic Housing


This toaster was easy to disassemble, as if the manufacturer was secretly encouraging yodel-based modifications, with normal phillips screws on the bottom holding a few plastic outer shell parts together. The only unusual part was how they all snapped together and how the plastic lever extension had to be removed first before continuing disassembly. While performing this step, look for areas of open space that will be A) Not excessively warm during device operations and B) Enough space to fit your electronics guts.


Making The Parts Fit


YMMV; this step will obviously vary wildly or may be completely optional with differing base toaster models.

Keep in mind when performing modifications that you won't want your poor PCB getting too warm during Normal Toasting Operations (NTOs).

Toaster innards

Toaster, incision sites marked and ready for surgeon

The surgeon delicately performing the operation on the patient with an angle grinder


Addition of Audio Circuitry


Find a nice way to mount your electronics guts into the chassis. Try not to short it out on the metal heat shield, and try not accidentally desolder the PCB during NTO.

In order to make a clean looking single-power-cord going into the device, with no external signs of yodel-capabilities, I fished a spare 5V-DC wallwart out of my housemate's Box-O-Extra-Wallwarts(TM), and integrated this into the device.


Addition/Integration of Button Circuitry


I confess I have not taken apart any toasters besides this one, so do not consider me a subject matter expert. In my particular model, as described in the warnings section, the lever just presses a strip of wire connected directly to mains down to make contact with the resistive heating circuit. I really hope this isn't how they all do it, that's gross.

Anyways, you should either somehow latch onto whatever contact they have, make your own contact that triggers when the button is pressed and/or comes up after finishing a toast action. Having the depress-action (falling edge) also resulting in a yodel gives the added benefit of alerting you that your toast is complete! In my case the toaster did not have a bell for this functionality like others might, so this was a welcome feature to have.

In my case, I ended up cutting a small piece of sheet metal from a spare breadboard backing and very carefully folding it, which was actually a joy to work with, even given the small size of the mechanical/electrical contact I was extending. I then wired this up along with a matching contact to form a press-button circuit to my electronics.

Categories: Projects

DEFCON 19 Badge Puzzle: PDP-8 Assembly

Wednesday, August 10, 2011

According to contest creators, the last part of the message (the text after the ::) on the badge is meant to be PDP-8 instructions. Ignoring the last character of the one-bit-extra first four groups (which encodes ['1', 'o','5','7'] , representing the name of the contest's creator Ryan "1o57" Clark) of these pairs, we have:

101010001000

111010000000

001010010011

111100000010

000000000000

000000000000

000000000000

This, as far as I can tell, translates into:

JMP 8

CLA

TAD 19

HLT

... and the all-zeroes sequences that follow could /technically/ be ANDing the AC with zero, but, they're after the halt, and zeroed out memory tends not to really mean much in a more sane context.

But, these instructions don't really make too much sense. Why would someone program this? Did they make a typo with the JMP 8?

Very odd.

Categories: Projects

Custom Messages in QR Codes

Sunday, June 19, 2011

QR code featuring CSH logo

QR codes are cool! The Reed-Solomon coding for error correction in them can be fairly robust, and given the appropriate QR-code format settings, enough to push in plenty of invalid (but aesthetically pleasing!) data.

I whipped one up for Computer Science House, pointing at our website and containing our logo (or, at least, my 8x8 pixel re-imagining of the logo). A slightly larger logo could be accommodated via the generation of a secondary URL for the purposes of manipulation of the raw QR code image (i.e. something akin to example.com/redirect/a6p356adfaa, which could /then/ link to csh.rit.edu in a redirect).

With this, one could theoretically generate a QR code with la large amount of bit-overlap with a logo, thus minimizing the amount that error correction has to make up for. However, the math for this is.... complex. I suppose one could easily attempt a brute-force strings-generation while generating qr-codes, and keep the one generated with the most overlap, but I have not calculated the scope of this problem, thus not having determined its feasibility.

Categories: Projects

Functionally Awesome

Tuesday, April 19, 2011

I've been pretty swamped with work lately, but I've found time to start doing Project Euler problems, which are pretty fun to solve. I've completed 16 of them today! It's a pretty great way to exercise my mind with new ways of thinking, and it's quite excellent for learning/practicing Haskell. Plus, I gave the bug to my buddy Alex Grant, who is currently catching up to me on Euler problems, in a vague attempt to prove that Ruby is just as valuable a language for this sort of programming problem, as well as having a lot of fun himself. I may have lost him with the release of Portal 2 though... oh well, he'll be back. :-)

I've been on a weird Haskell kick recently, and I gave an intro presentation on the language for BarCamp Rochester 2011, and it was well-received. Other than learning new things and doing considerably more math-for-fun than I'm used to, life has been pretty good. I also have a trivia-solving piece of software in the works, and I'm pleased with the performance it has so far. Hopefully I'll finish and unveil it by this year's Innovation and Creativity Festival at the Rochester Institute of Technology!

Categories: Projects

Installing a Gentoo VServer Guest on a Debian VServer Host on IA64/Itanium2 Platform

Monday, January 25, 2010

There is like, zero documentation for doing this on the Internet. No one else wants to install Gentoo in a VServer guest on a Debian Itanium2 host? Lame.

This quick overview contains many things specific to my personal setup; therefore:

  • You will want to check your local gentoo mirror to see what the current ia64 tarball is.
  • You will want to change the name, hostname, and network address of your vserver
  • You can use whatever directories you want; the actual files will go in /var/lib/vservers/<hostname>/ , (and /etc/vservers/<hostname>/ ) and you can delete the stage3 tarball after you’re done.
  • So you don’t get confused, “jolt” is the name of my debian host machine, and “coffee” is the vserver guest I am creating.

#Install the Vserver kernel and utilities if you already have not.

jolt:/space/vserver# aptitude install linux-image-vserver-mckinley util-vserver vserver-debiantools

#Reboot to boot into new kernel.

jolt:/space/vserver# reboot

#Are you running the new kernel? It should say “vserver” in there somewhere.

jolt:/space/vserver# uname -a
Linux jolt 2.6.26-2-vserver-mckinley #1 SMP Thu Nov 5 07:44:36 UTC 2009 ia64 GNU/Linux

#Get the latest Stage3 tarball from a mirror close to you.

jolt:/space/vserver/base-images/# wget http://mirrors.rit.edu/gentoo/releases/ia64/current-stage3/stage3-ia64-20091229.tar.bz2

#Build the vserver. –context is just a unique number you set from 1-49152, non-inclusive. Everything else is relatively self explanatory.

jolt:/space/vserver/base-images/# vserver coffee build –context 1253 –hostname coffee –interface eth2:129.21.50.66/24 –initstyle gentoo -m template — -d gentoo -t /space/vserver/base-images/stage3-ia64-20091229.tar.bz2

jolt:/space/vserver/base-images/# cd /var/lib/vservers/coffee
jolt:/var/lib/vservers/coffee# cp -L /etc/resolv.conf ./etc/resolv.conf
jolt:/var/lib/vservers/coffee# chroot ./ /bin/bash
jolt / # env-update
>>> Regenerating /etc/ld.so.cache…
jolt / # source /etc/profile
jolt / # export PS1=”(chroot) $PS1″
(chroot) jolt / # emerge –sync
(chroot) jolt / # eselect profile list
Available profile symlink targets:
[1] default/linux/ia64/10.0 *
[2] default/linux/ia64/10.0/desktop
[3] default/linux/ia64/10.0/developer
[4] default/linux/ia64/10.0/server
[5] hardened/linux/ia64/10.0
(chroot) jolt / # eselect profile set 4
(chroot) jolt / # cp /usr/share/zoneinfo/US/Eastern /etc/localtime
(chroot) jolt / # nano /etc/make.conf
(chroot) jolt / # cat /etc/make.conf
#Gentoo Itanium VServer make.conf Created: 2010-01-14 by Clockfort (devnull@remove_this_part_for_spam_reasons.csh.rit.edu)
CFLAGS=”-O2 -mtune=mckinley -pipe”
CXXFLAGS=”-O2 -pipe”
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST=”ia64-unknown-linux-gnu”
MAKEOPTS=”-j5″

# Portage Options
EMERGE_DEFAULT_OPTS=”–ask –verbose –tree –jobs=5″
PORTAGE_ELOG_CLASSES=”info warn error log”
PORTAGE_ELOG_SYSTEM=”save”
AUTOCLEAN=”yes”
FEATURES=”parallel-fetch userfetch collision-protect buildpkg”
PORT_LOGDIR=/var/log/portage

# Portage Sync/Download Locations
GENTOO_MIRRORS=”http://mirrors.rit.edu/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.wallawalla.edu/pub/mirrors/ftp.gentoo.org http://lug.mtu.edu/gentoo/”
SYNC=”rsync://rsync.namerica.gentoo.org/gentoo-portage”

# Use Flags
USE=”$USE symlink” # Kernel
USE=”$USE mmx sse sse2″ # CPU
USE=”$USE pam ssl” # Authentication
USE=”$USE bash-completion” # Completion
USE=”$USE X gtk svg qt3support” # X support
USE=”$USE xulrunner” # native browser integration
USE=”$USE jpeg png” #image support
#FEATURES=”${FEATURES} candy”

(chroot) jolt / # passwd
#Ignore the scanelf “unaligned access” error you get, it won’t hurt anyone, just slow things down a bit.
(chroot) jolt / # emerge syslog-ng
(chroot) jolt / # rc-update add syslog-ng default
#Remove reference to /proc/kmsg
(chroot) jolt / # nano /etc/syslog-ng/syslog-ng.conf
(chroot) jolt / # emerge vixie-cron
(chroot) jolt / # rc-update add vixie-cron default
(chroot) jolt / # exit
jolt:/var/lib/vservers/coffee# vserver coffee start
jolt:/var/lib/vservers/coffee# vserver coffee enter
See also:
http://linux-vserver.org/Installation_on_Debian
http://www.gentoo.org/proj/en/vps/vserver-howto.xml
http://linux-vserver.org/Frequently_Asked_Questions
http://www.gentoo.org/doc/en/handbook/

Categories: Projects

Intel 8088 and IA64, with some Xen from Outer Space Inbetween

Saturday, January 24, 2009

Made major progress (between the hours of 12AM and 6:30AM) this morning on getting the most recent pull of Bell Lab's Plan 9 sources to work quite right under CSH's Xen cluster (running Xen 3.3). Ethernet interface not currently working. That'd be nice to have. :-/

After that, though, I hope to port some house services over to a superior operating system :-)

I also got a book on 8088 assembly with which I hope to enhance the capabilities of our IBM PCJr. My roommate (Alex Grant, webmaster for CSH) started a BBS-like service for it, which is running in our room.

My friends Bob and Will are still convincing me to learn IA64 assembly and work with them porting plan9 to this platform... they may be crazy. That said, I'm on page 48 of an IA64 reference guide :-) It's a pretty sweet architecture, really, but there are quite a few "gotchas" for assembly programmers that I could see making writing compilers and kernels hard. Ah well.

Categories: Projects

Dueling Banjos, Part 1

Sunday, December 28, 2008

Had to start a project blog to appease Dumont, our beloved R&D director!

So, in some flash of 6AM brilliance, I decided I'll be doing a seminar when I get back on programming different types of network architectures - i.e., traditional client-server architecture, peer to peer, multicast broadcast, etc. Sounds not so interesting, right?

So, the "flash of brilliance" part was inspired by my friend's Scott and Angelo, as seen on Scott's website. The idea is, I'll give the seminar on Computer Science House, and give EVERYONE ON FLOOR some client programs to run; when my server programs touch communicate to these clients, they start the next "verse" of the song "Dueling Banjos", all synchronized together. (i.e. A group of computers start playing the first part of the song, then it switches to another group of computers...)

Thus, in my demonstration of each architecture, attendants will be able to hear a deafening cacophony of dueling banjos, and even better, because it's audible, they'll be able to hear WHY some architectures are better than others for certain applications; for instance, broadcasting the server to a multicast address (two of which are available on floor) will result in the least variation in delay time, so the music will be more in-sync. They'll hear for themselves that the peer-to-peer architecture, on the other hand, isn't very well suited to this particular application, and results in very de-synced music in which everything is playing at once, eventually.

This will be awesome. I've already written the source code completely for two out of the three network architectures I want to go over, but I may want to add more architectures. The code is written in Java, because A) It's what the freshmen know, because it's taught in CS class, so it'll be easier for me to explain each architecture, and B) By using Java's audio classes (which are not very elegant at all, by the way) and compiling to Java byte-code class files, it's very portable, meaning everyone on floor can run the application, especially important considering floor has a very high proportion of GNU/Linux and Mac OS X users, with a few misguided saps like my room-mate who run Windows.

Talking to R&D: (09:36:57 PM) Me (AIM): for bar camp, I'm thinking I'll do a presentation on different kinds of networking client/peer architectures (09:37:13 PM) Me (AIM): but the example programs I made are AWESOME (09:37:18 PM) Dumont: oh? (09:38:14 PM) Me (AIM): The example program plays "Dueling Banjos"; i.e. in one architecture, one computer plays a banjo line, then it sends a packet to the other guy who plays the guitar line, who sends a packet... (09:38:18 PM) Me (AIM): It's awesome to see (09:38:41 PM) Dumont: wow... (09:38:44 PM) Me (AIM): And in the normal client/server architecture, it supports an near-infinite amount of clients connecting as either the bass or treble parts (09:38:51 PM) Dumont: OMG (09:38:51 PM) Me (AIM): so you end up with a roomfull of PCs dueling it out (09:38:53 PM) Dumont: ALL OF FLOOR! (09:38:53 PM) Me (AIM): musically (09:38:54 PM) Me (AIM): YES (09:38:55 PM) Dumont: ALL OF FLOOR! (09:38:56 PM) Me (AIM): EXACTLY (09:38:57 PM) Me (AIM): EXACTLY (09:38:59 PM) Dumont: IT MUST HAPPEN! (09:39:01 PM) Me (AIM): EXACTLY (09:39:37 PM) Me (AIM): it took me FOREVER to cut up the audio in audacity (09:39:39 PM) Me (AIM): but it was worth it (09:39:51 PM) Dumont: that'll be awesome (09:39:55 PM) Dumont: must do this when we return (09:39:59 PM) Me (AIM): ^_^

Categories: Projects