Category Archives: Uncategorized

Wow… so much for “regular” updates!

I can’t believe that I slacked off on posting anything for over a year.  It would be reasonable to assume that maybe I haven’t been doing anything in the lab but I actually have stayed pretty busy over the past year.  I was just very bad about posting anything.  So it is time to do a brief recap and start fresh.

While I haven’t made much progress on my end goal of building a Mars rover style vehicle, I did do several entertaining projects.

  • Built a half-decent vehicle frame from aluminum stock and HDPE
  • Created a CAD drawing and 3D print of my great-grandfather’s airplane design (
  • Modified a automatic sprinkler system that is based on a Raspberry Pi to light an LED based on which zone is active
  • Learned how to etch my own Printed Circuit Boards
  • Built Santa’s Game o’ Chance for Teri’s Christmas present
  • Built a testbed to measure the accuracy of different stepper motor drive mechanisms.  Eventually I hope to use this knowledge to build a 3D printer and/or a CNC router.
  • Caught a motor driver on fire (see previous bullet)
  • Reverse engineered some digital calipers, soldered in lines to the circuit board to get output data and hooked them up an Arduino to record measurements (see two bullets ago)
  • Received a Logic Analyzer for Christmas and learned how to use it

Besides these, there were several other smaller projects  that kept me busy.  So, I can’t say I wasted my time.  I had fun and learned stuff.

Now comes the test… will I remember to write up any more projects before another year passes?  Time will tell.


The Start of My Robot Army

I successfully took a cast-off toy robot that I got from the thrift store for $5.00, added sensors and a microprocessor and turned it into a self-directed line following robot.  In December, I was browsing the the Arc, looking for something that would make a good project when I found a Robosapien V1.  

At the time, I had no idea what it was or did but it was heavy, shiny and only cost five dollars so I brought him home.   Turns out that it is a fairly high-end, remote controlled robot.  When new, they retailed for around $100.  I figure a 95% discount was a good deal even if it was missing the remote.  

A little Google-fu quickly showed how I could tap into the existing control system and add a second micro-processor.  By adding an Arduino as a Master Controller and soldering a line to the wire that connects to the built-in infrared receiver, I could make the robot think that it was receiving commands from the remote control.  With that, I could make it walk, wave its arms or make various noises. All that was missing was a purpose.  A mission.  What would it be?

Not having anything against people named Sarah Connor, I skipped the whole Travel Back In Time And Change History To Ensure The Rise Of The Machines thing.  Instead, I decided to add some infrared sensors to the feet and turn him into an entry for an upcoming Line Following Robot contest that my employer is hosting.

The first step was to tie in some lines to the existing control system for power, ground and the control signal.  Opening the back and accessing the control board is pretty simple.  Some more Google-fu and a little time with the multimeter let me identify ground, the 6 volt unregulated supply, the 3.3 regulated supply and the control line.  I would like to take a lot of credit for that amazing piece of work but the control board is labeled pretty well so it wasn’t exactly rocket science.  So I soldered in the new lines, drilled a hole in the body for the cable to run through and put him back together.  A dab of hot glue where the cable runs into the body provides strain relief.

Next I had to mount some sensors on the feet.  That wasn’t technically difficult but the placement of the sensor is crucial to his line following performance and the place I wanted to mount them was not structurally viable.  So I had to add a Flexible Support Structure to both feet.  (That’s Big Words for using hot glue to attach a strip of plastic on the front that I could mount the sensors on.)

After that, I was ready to take the lines from the robots innards and the lines from the sensors and hook them up to a suitable micro-controller.  I started with an Arduino Micro since it is easier to work with than the Trinket.  After I got all the bugs worked out, I ported the code to the Trinket.  And as they say, it was just a Small Matter Of Programming and Voila!  It all worked perfectly the very first time.  (For some definitions of “first”)  🙂

The cost for the hardware is very reasonable.  All told, I’m into this thing for maybe $20.  Of course, if you factor in the amount of time I spent working on it, the cost would sky-rocket.  Fortunately, I work cheap when I’m having fun.  It probably shouldn’t have taken as long as it did to build this but I was treading some new ground in my personal knowledge quest and figuring out new things can be very time-consuming.

One of the following videos show the robot standing there looking cool and the other shows him “racing” around the track.  So make some popcorn, pour yourself a soft-drink, send YouTube to the big screen TV and enjoy the show.


Finally – a line follower that works pretty well

This video shows the line following robot I built recently.  There are a few fun things about this one (besides the fact that it works).

1) No microprocessor.  The control circuit is built with a few ICs, some resistors and some capacitors.  No software at all.

2) Pulse Width Modulation using a 555 timer for adjusting the motor speed

3) Sensor sensitivity controlled by a voltage divider potentiometer

There is also some ugliness…  First, it is built on a breadboard.  I haven’t started doing my own printed circuit boards but I will someday. Second, the sensor leads are too long.  Grotesquely long.  Stupid long.  Longer than a three hour staff meeting that starts at 2:30 on a Friday afternoon.  These sensors will eventually go on a different project that will need longer leads and I don’t want to cut them.  And obviously the chassis is not very polished.  Sturdy and functional but not pretty or impressive.  Let’s just ignore the blemishes and focus on the positives, m-kay?


Top-down View with all the wires obscuring the breadboard


The breadboard with all the wires out of the way


View from the front showing the four infra-red sensors

If you are curious about the hardware, read on.  From right to left in the above photos, you can see the following parts.

Stage 1 – Adjustable voltage divider.  This allows me to control the dark/light sensitivity of the sensors.

Stage 2 – A quad comparator is used to compare the four input sensors to the reference voltage described above.

Stage 3 – A quad NOR gate is used to determine whether either sensor on a given side is over the line.  There are two outputs from this chip, one for each side.  If an output is high, it is used to turn off the corresponding motor.

Stage 4 – Motor driver chip, SN754410NE dual H bridge.  The sharp-eyed will notice that I have actually stacked two ICs and soldered them together.  I needed this for an earlier project where the DC motors were drawing more current than a single chip can provide.

Stage 5 – 555 timer and the bits needed to build a PWM circuit.  This lets me tune the motor speed by adjusting the potentiometer on the left.

So am I proud of this?  Meh… it would probably do pretty well in a high school robotics competition but it isn’t exactly Skynet.  But I had a lot of fun and it puts me one step closer to the larger, more capable robot that I want to build one day.  Baby steps? Yes. But the steps are getting bigger.

Raisin Box Robot


Stick some electrical tape on a piece of poster-board and what do you have?  A racetrack, of sorts.  A robot racetrack.  There are all kinds of robotics competitions but one popular style is called Line Following.  You take a “racetrack” as described above and construct a robot that can go around the course on its own.  Technically, it isn’t extremely difficult to build a line following robot.  The challenge is being the quickest, the most accurate, the smallest or the most creative.

Today’s entry is in the fun and creative category.  I decided to build a line follower using an empty raisin box for the body.  This is not an ideal platform because it is mostly vertical, which means that it has a high center of gravity and a tendency to tilt and rock.  You can see this in the RaisinBoxBot video.  But nonetheless, it followed the line.  

Most people that build a line following robot use some form of microprocessor because it is a much easier.  However, I decided to go the other way for this one and do it all in hardware.  The entire circuit consists of two sensors, a comparator, a motor driver chip and some resistors.  It was a lot of fun doing it that way and let me learn more about hardware.

This is not what was inside the box when we bought it from Safeway

Now I think I’ll cannibalize the hardware, build a better chassis and try to make a version that rolls a bit smoother than this one.  


Lindsey and Kelsey Build a Robot er… Pigbot

When some families get together, they do activities like jigsaw puzzles or craft projects.  Not ours.  While my daughters were home for the Christmas break, they wanted to try their hands at building a robot.  We talked about simple “My First Robot” projects and came up with a robot design they felt comfortable with.  Then I gave them all the parts they needed and stood by to help where needed and then they got to work.

Of course, Lindsey and Kelsey can’t do things the plain & simple way so it took about three minutes for them to decide that this wasn’t going to be a simple, unadorned robot.  Due to their mutual love for teacup pigs, this robot was going to be Pigbot, complete with snout, ears and a tail.


It is a pretty simple robot – two servos for drive motors and three contact switches on the front to detect when it runs into something.  Here’s a video of it in action –

And to answer your unasked question – they are 24 and 21.  Still my babies.Image

Desktop Power Supply

A fairly standard project for electronic beginners is to build a desktop power supply from an old computer power supply.  I know some of you are thinking “Huh?  Why on Earth would you do that?”  When you are playing with a new circuit, you always need a DC power source and it isn’t convenient to keep digging out batteries and a battery case to get the voltage you want.  Instead, you would like an easy way to get different voltages that you can use to power different circuits.  The answer is a desktop power supply like this one:


A “Real” power supply that costs “Real” money

This one would be great but it costs $331.  When you’ve already spent far too much on your new hobby, the quest for continued marital harmony suggests that you forgo spending hundreds of dollars on a new piece of equipment and build one yourself.  That’s how I ended up with this:


It isn’t as pretty and doesn’t have as many features but it was far cheaper than a store-bought unit.  (To be honest, there are cheaper store-bought power supplies but comparing mine to one that costs $79 would make you wonder why in the heck I made my own.)

To build this, I used an old computer power supply from a computer that I bought back in 2000, a stereo speaker that we got at the Arc for $4.00 and various bits and pieces that *should* have cost me about $20.  Of course, I ordered some wrong parts mistakenly and then wasted a board with some ham-fisted soldering but, in theory, I built this for less than the cost of buying one new.  I’m happy with the functionality but the craftsmanship isn’t where I want it.  One of the LEDs is misaligned with the others and the hole I cut for the digital display is too big on one side.  Even though it isn’t pretty, it has features that one wouldn’t find in a cheaper unit:

  • 12, 5 and 3.3 volt rails
  • Adjustable rail that goes from 1.2 to 10.5 volts
  • Digital display of the output voltage
  • USB port for devices that use USB power
  • Genuine BradLab© construction

Here are pictures from construction:



Power Supply Prototype

Power Supply Prototype

Tonight’s accomplishment is a working prototype of a desktop power supply that I’m building. It has four channels – 12V, 5V, 3.3V and a variable voltage channel. Now I need to transfer these breadboard circuits to a protoboard and find a suitable box to stuff it all in. When done, the front panel will have an On/Off switch, a adjustment dial, a display LED and banana jacks for the four power rails. I may also add a USB port for powering USB devices.

This is a pretty standard project for electronics beginners but it was fun to put it all together and not smoke, melt or toast anything. It actually worked on my first test, which is not exactly typical for me. 🙂