Welcome to

The Secret
Laboratory

Author: Gary Holbrook Created: 5/24/2009 11:39 PM
Fun electronics projects.

A while back, I proudly wrote about my newest foray into the realm of AT90USB.  The past few days, I've been working on some code for the board.  Not much, just some simple changes to the stock Atmel CDC demo.  At first I just put the Atmel demo on the chip and plugged it into my computer.  Perfect.  A USB serial port.  Last night, I plugged it into a Linux system.  It pretty much worked.  Tonight, I decided to try getting my two computers to actually talk to the device.

Not so much luck.  I stripped out everything except a blurb which is supposed to print a string when you press a button.  It seemed to work under Windows, but behaved erratically under Linux.  The I realized, it was behaving badly under Windows as well.

The string of text just kept displaying, whether I touched the button or not.  Sometimes if I tried to transmit text, communications would come to a screeching halt...

Read More »

DSCN6584   Per usual, I have an Evil Genius (TM) scheme in the works.  The scheme involves using Linux to control a robot.  Of course, I need a way for the CPU to talk to the peripherals.  USB is a great choice, especially since AT90USB is cheap and easy to use.

The chip shown to the left costs only about as much as its FTDI counterpart, except that it can be completely programmed in C.  This is the latest incarnation of my development board.  One of the buttons is reset, and the other one triggers the bootloader.  For the sake of simplicity I will probably emulate a USB serial port and then use the serial port to talk to the board from Linux.  A generic HID class would also work, but that might be a bit more work than I want to commit to right...

Read More »

Last summer Atmel released exciting news.  They had gone into production with their new 32 bit series of processor, the AT32 (alternately called AVR 32).  Unfortunately the debugging tools are a bit too expensive for me, and creating a circuit containing the processor, RAM, and flash memory would take much expertise that I have not got.  Further, the chance of getting the whole thing running without the complete debugging environment is extraordinarily slim. 

Lucky for me, Atmel released a microcontroller version of the chip.  This version is much more accessible to fiddlers like myself, although it only started becoming available for purchase in the last couple of months.  In the meantime, I slathered at the mere thought of getting my grubby mitts on one of these chips.  Well, I finally did.  The only one available for order at the time was a 144 pin TQFP.  Since I've never worked with this chip, my first task was to create an adapter board that I could use to get the chip running in a test environment.

...

Read More »

My nephew recently made an inquiry as to the possibility of creating a low cost non contact digital tachometer.  With my typical over-optimism, I nearly shrieked "No problem!  Piece of Cake!".  This didn't turn out to be entirely true, but the demonstration project I put together was pretty straight forward. The first thing I needed was an optical sensor.  Obviously ambient light can be a problem, so I wanted something tuned to infrared.  As fortune would have it, someone had the brilliant idea of putting an infrared emitter (LED) and a detector (a phototransistor) in the same case!  The sensor I ended up using is an Omron EE-SF5. DSCN6317_edited-1For...

Read More »

It was pointless to even glance around before unleashing a rivulet of colorful language.  Nobody was near enough to hear my complaint.  Fortunately.  Another chip had been bricked by my careless use of PonyProg, and unlike the two recent DIP Atmega168s...this one was an Atmega128, mounted in my favorite development board from Olimex.  The madness had to end.  For the third time I had reset a chip to use its low speed internal oscillator, making it too slow for ICSP access.  These micro controllers are so small, they don't even make good paperweights.

It was time to buy a better programmer.  Something USB based that I could use directly from AVR studio.  After finding the AVR Dragon, I thought my problems were solved.  The Dragon does ICSP, JTAG, DebugWire, and Parallel\High Voltage programming.  All for $50.  What else could I possibly need?

Well...ICSP wires would have been nice.  As it turns out, the Dragon is the barest of the bare.  After several attempts to get the finicky Dragon to program...

Read More »

A while ago I bought the MG Chemicals budget etchant kit.  The kit comes with a sparging unit, five liter tank, and air pump.  It was about $30, which sounded reasonable at the time.  Having tried using the tank a couple of times, I'm not smitten.  The board holder would probably work really well for a 9" board...but since I work with small, simple circuits...the holder (integrated into the sparging unit) is worthless.  I ended up drilling holes in my board to hang the board from.

That brings me to the sparging unit.  This thing is supposed to circulate the etchant in the tank, and around the board by bubbling air into the tank.  Right.  First, the tubing is really stiff (think fish tank tubing), so the sparging unit never wants to sit straight.  Also...all the air came out of only one end of the unit, so the distribution was not uniform.  Could I have fixed this?  Maybe...except the thing is submerged in a vat of acid.

Alright.  I was pretty irritated when my boards didn't turn out well, so I went...

Read More »

Recently I wrote about my first experience with surface mount technology.  As part of that ongoing project, I needed a capable chip mounted on a development board.  That chip turned out to be an Atmega169 TQFP, which I will clock at 16Mhz.  To date, I'm still working only on single sided boards.  This would be my most ambitious project yet.

Like the last board that I made, I printed this one with a lithographic process.  The mask was printed on velum and then transferred to the positive sensitized board using a fluorescent lamp.

DSCN6096_edited-1

  Velum actually works surprisingly well.  It doesn't warp when printed, and holds toner quite well.  Even though this board is very basic, you can see that the routing is quite...

Read More »

This was a bad week for electronics.  I bricked my Atmega 128 development board, and I also discovered that I had ordered the wrong low pass filter.  The IC was $10, and it was supposed to be a DIP8-easily accessible for development.  Oops.  I accidentally ordered an SOIC chip.

Last night I was in The Secret Laboratory, trying to get something done.  After some very fine soldering, I failed to thaw out my bricked development board.  Next I decided to try building an adapter board for the low pass filter.  I had already created the photo mask, but this would be the first time I tried to use the photo-lithography method of creating a board.

Velum makes a good printing medium (especially if you have a laser printer) because it resists crinkling and warping.  My first three attempts failed to produce useable boards, though.  At 10:30PM I gave up and went upstairs to see what Aimee was doing.  She was sleeping.

Since I've been having a difficult time sleeping lately, I did what any other bored...

Read More »



A good friend and I have had a long standing "contest" to see who could build a small robot to navigate a path first.  Now, my cohort could have beaten me to the punch on this any time he wished.  His technical expertise is far beyond my own.  He hasn't, though, and this has been a great opportunity (several years in the making) for me to learn about embedded electronics.  After all this time, I am pleased to announce the completion of a very imperfect path navigating robot.

The tracking algorithm is very simple.  The robot travels forward until it gets close to a barrier, then it "looks" around to find the best direction to turn.  It can choose to turn 45 degrees either direction, however I biased the code for 90 degree turns.  If the 45 is truly the best path, it can be utilized.

The bot appears a bit epileptic.  This is because it has a tendency to track ever so slightly to the left.  Every few clock cycles I have it track back the other direction. 

DSCN6017

...

Read More »

Last week I received the Circuit Bridge silkscreen kit.DSCN5978  With great anticipation, I ripped into the packaging and proceeded to read absolutely no directions.  Ok, I read some.  The kit was $20 and came with a contact frame for exposing the mesh, instructions, a paint squeegee,  and two small pieces of high resolution material, already pre-sensitized. 

In the picture to the right, you can see the contact frame and the circuit design that I used to expose the mesh.  You might be observing that I was crazy enough to use regular paper instead of a transparency.  You are correct!  Even more surprising...it worked! 

Exposing the mesh was a simple matter of layering the paper, ink side down, on top of the mesh inside the magnetic contact...

Read More »