Snack 'N' Hack

June 23, 2010, 6:13 pm
Filed under: Uncategorized

The more-or-less maximum frequency of a standard 22 fret guitar is around 1,100 HZ.

Therefore, for Analog to Digital conversion, a low-pass filter of most signals above say 1,300 HZ would be essential to reducing random artifacts and noise.  The Biscuit and Colin’s Effect Pedal prove that very standard, low end PICs can be used for high-quality 8-bit audio applications.  Both also employ low-pass filters at the beginning of their signal chains to reduce random noise and artifacts.

In the following diagram two op-amps are combined to form a 4-pole Butterworth low pass filter with a cutoff frequency of 22-kHz.  This is NOT my work, it is from another PIC guitar effects pedal.

To get accurate A/D conversion from audio, it is ESSENTIAL that some sort of input buffering and filtering be performed.  For me, this is one of the hardest parts of the process, but I plan on having the filter built very soon.

Just another note: Guitar harmonics above the sampling rate will cause noise in the signal.  Therefore, some harmonic loss is an inherent part of this process.  You wouldn’t be building a bit-crusher if you were looking for audio purity.

The Hack is Back!
March 13, 2010, 2:45 am
Filed under: Uncategorized

After a long and hard winter the hack is back.  I’ve got a full-time relatively high paying job which has its pros and cons.

Pro: I have enough money to actually buy materials for my hacking addiction.

Con: I don’t have as much time as I did to actually hack (though I’m basically low-level hacking all day at work).

I am returning to the Tigernome project.  I found another Lights Out game at Goodwill for $2.50, so I am taking another crack at the hack.  I have a better screw-driver this time, so I didn’t make the mistake of damaging the board.  Also, I know more about the circuit, so I won’t be separating the boards.  All of the transistors on the board are necessary for correctly amplifying and switching the signals from the membrane switches.

Well! It feels good to be back on top.


C-64 Mobile Internet Device (no, it’s not Ben Heck’s laptop).

Blinking Driven Directly from Microcontroller
November 30, 2009, 7:54 pm
Filed under: Uncategorized

I have spent the last two weeks scratching my head and building Transistor based digital switching devices.  Every experiment ended in what might be called “failure,” but today the lights are blinking.  A few days ago I started to doubt the code produced by Matrix Multimedia’s Flowcode for PIC Micro – and for good reason.  When I read the code I realized that the way they had their blink LED routines written would not work for Port A of the Pic 16f887 – which is an analog port that requires special setup.

Once I discovered their error I began to write my own code and had a few more problems getting MPLAB to export correctly to my programmer utility.  I recently switched my development environment and admittedly I’m getting used to some of the quirks.

Friday I wrote some simple Assembly for the PIC that should make an LED light – and voila! it did (after a bit of tweaking as always).  Also, I found a great resource.  Pic List has a delay code generator that makes nice concise loops to any exact interval.  Yes, we can all write our own delay loops, but having one at an odd interval on demand is nice.  Yes, I used the code generator to produce a 1 second delay.  Yes, I am lazy.

As you can’t see from the picture – the Microcontroller is directly driving the LED Matrix (which as you remember must be brought to ground).  No problems yet and it’s been blinking those 4 LEDs for about an hour.

Yippee Yay Hooray!


It Blinks! Flowcode Sucks!
November 30, 2009, 7:10 pm
Filed under: Uncategorized

This post is both a celebration and a condemnation.  First, let us celebrate – I got LED Blink going on the Tiger Light’s Out! Game Matrix.  Second, a condemnation of Matrix Multimedia’s extremely buggy program Flowcode.  I have wasted too much of my life being frustrated with their bugs and will no longer be coding the ‘easy way’.  Nothing’s easy if it doesn’t work.

LED Blink + 1

Matrix Multimedia – 1,000,000

Flowcode Sucks – my official opinion.

Transistors as Digital Switches
November 26, 2009, 4:07 pm
Filed under: Uncategorized

used without permission


This will be a short post, I promise.  The Lights Out! game requires parts of the circuit to be taken to ground to light up LEDs.  This is a common configuration and a transistor in combination with a resistor or two and your Microcontroller’s I/O pin is enough to make a digital switch.

Honestly, I’m no electrical engineer and I have no formal training in this area, so I haven’t gotten mine to work quite right yet.  I can get the PIC (my favored microcontroller) to turn on said LED, but I haven’t achieved blinking on the Matrix yet.  Which, as you all know, is the proof of mastering  a system.  You have to make that LED blink.

These are the links I’m learning from.  When I get my resistor values correct and the LED blinking I’ll post my diagram and code.  Until then, read up for your own edification:

Pure’s Explanation

code circuits and construction’s explanation focusing on high current circuits

Mike Martel’s General Explanation – Not Microcontroller Oriented.

My friend Rob also tried to explain it, but it’s hard for me to get this sort of thing without pictures.


Fun Time Eggrolls
November 26, 2009, 3:38 pm
Filed under: Uncategorized

This blog has two purposes – to share my love of embedded systems design – and FOOD!  The sunchokes never got an interesting recipe.  Instead we ended up making a post-apocalyptic potluck to go with a 70’s vision of the future. (A good list of Post-Apocalyptic movies) We decided on something old, something new, and something I’ve forgotten.

For something old we made home-made soft pretzels.  For something new we made FUN TIME EGGROLLS!  C and me have a great time making Sushi because she’s vegan and I’m nuts.  Whenever we go to make Sushi it turns into a taste experiment, and I hope that FUN TIME EGGROLLS! will be the same in the future.  To make FUN TIME EGGROLLS! you will need 1 stuck caps-lock key and the following ingredients:

1. Sushi Wrappers

2. Strange or Interesting things to wrap.  We like local fresh ingredients like Kale and garlic, but often find ourselves scratching our heads at the Asian Supermarket and saying, “Well, let’s throw it in and see what happens.

You’ll need to heat a pan with oil in it to about medium high temperature.  As with much Asian food, Eggrolls cook quickly and you’ll need to keep an eye on them.

1. Open the package of eggroll wrappers

2. Figure out what you’re going to stuff them with.

3. Cook whatever you’re putting in there (I recommend fresh vegetables – though cabbage and pork are traditional) as much as they need cooking.

4. Wrap them like a diamond shaped burrito, sealing the edges with just a pinch of water.

5. CAREFULLY put them in the oil to cook for about 45 seconds or until brown and slightly warty.

6. Put them on a plate to cool for at least 1 minute before eating – those suckers are dang hot.

7. We encourage you to be creative in your eating.  Use fresh, local, and organic when possible.  Two out of three is an OK compromise.  I hope to hear about some Moose Rolls from our brothers up north and perhaps Iguana Rolls from those reading from Oaxaca Mexico. (That’s not a racist comment, Iguana is a specialty of the region, though I can’t recommend it as anything but an oddity.)

How to Hack a Lights Out – Part 1
November 24, 2009, 4:08 pm
Filed under: Uncategorized

I bought the Lights Out game, standard 1995 edition, from my local Goodwill.  The Goodwill is always full of new parts and inspiration.

My brother is DJ Nigel One and he needs a good Midi Controller for his new project.  When I saw the Lights Out game it reminded me of the monome.  I got it home and started the tear down.  After I cut it all to pieces I was left with this:

The top board has an LED Matrix and Membrane Button Matrix.  The Lower Board has the IC and what I would later discover to be the LED driver circuit.

As you can tell, my workbench is very organized.  My MultiMeter Jimmi can be seen to the left.  The next problem I faced was analyzing the logic of the matrix. I stared at the two separated boards and my stomach filled with buckshot. Things like VCC, Gnd, and Pin functions would have been much easier to analyze with the boards connected and the game running.  Oh well.

If I, in my infinite wisdom, were to design these boards I would have put voltage on pin 1.  Does that make any sort of scientific sense? No.  However, when I gave pin 1 5V, nothing blew up, but nothing happened either.

If Pin 1 was 5V then one of these other pins had to take the circuit to ground and DO SOMETHING.  With one aligator clip attached to Pin 1 and 5V I gently began stroking the other pins with an Aligator clip taken to ground.  I discovered that somewhere in the middle of my sweep one lonely LED would light.  AHAH – Take two of those suckers to ground and you light up an LED on the matrix.

I will spare you the agonizing details of the hours I spent watching House on Hulu and analyzing the LED matrix, but eventually a pattern emerged and I was able to put together the following sheet of pin combinations to light the LEDs.

Lights Out LED Matrix Pinout (Note – Pin 1 should probably be 4.5V – I used 5V without a problem – so far.)

Pin 9 + Pin 2

Pin 9 + Pin 3

Pin 9 + Pin 4 Pin 9 + Pin 5 Pin 9 + Pin 6

Pin 9 + Pin 7

Pin 9 + Pin 8

Pin 10 + Pin 2

Pin 10 + Pin 3

Pin 10 + Pin 4

Pin 10 + Pin 5

Pin 10 + Pin 6

Pin 10 + Pin 7 Pin 10 + Pin 8 Pin 11 + Pin 2

Pin 11 + Pin 3

Pin 11 + Pin 4 Pin 11 + Pin 5 Pin 11 + Pin 6 Pin 11 + Pin 7

Pin 11 + Pin 8

Pin 12 + Pin 2

Pin 12 + Pin 3

Pin 12 + Pin 4

Pin 12 + Pin 5