Overview

Welcome to the reconstituted notebook!

My name is Chuck McManis, and this is an online version of my Robotics
engineering notebook. I have been designing, building, programming, and
generally investigating small to medium scale robotics since 1984. I
also use a notebook, my favorite is the
Eureka Lab Notebook
with quadrule pages. A nice pocket companion is the
Maker Notebook.

The benefit of keeping a notebook is that you can always refer back to
things you’ve worked on in the past. Your previous experiments lead to
understanding which feeds future projects. This site is something of an
online version of my journey.

These are the most recent 5 articles on the site. I try to re-generate
this index every time I publish an article so it should show up here
when I do. For general indices of all the articles, or specific types
of articles (like ones related to hardware or software or reviews, Etc.)
see the links to the left in the navigation bar.

Wireless communication has become ubiquitous in our world. Most of the radios used in
these systems are now “software based.” That idea, that you could build a radio out of
software was both intriguing and perplexing to me, so I set out to learn about making
radios out of software …

Inevitably an SDR will show you the spectrum it is currently receiving in the form of a periodogram
or FFT. What it shows can be fairly intuitive, intensity is the vertical axis and frequency is the
horizontal axis. It is also fairly common to find a function call make_fft() or some such that will
take some values and convert them to an FFT. But I wanted to know what it was and how it was
made, so I set out to write my own.

How do you make a radio out of software? The question is perplexing to many.
As computers, analog-to-digital converters, and digital-to-analog converters
have become faster, more and more of work of building an analog circuit can be done in the digital domain.

Cross compiling for an architecture different than the one you were running the
compiler on used to be something of an art. For the Cortex-M however, ARM has
put a manufacturer supported port of the gcc toolchain for anyone to use. This
is a much better answer than the one supported by the package managers and you
should consider using it instead. A quick article on how to make that happen.

OpenOCD is an open source tool which can give you access to the ARM debug port. It
supports a wide variety of programmer protocols that are often built into evaluation
boards. Once you have a working OpenOCD setup, flashing and debugging your code is
much easier.

Programming Cortex-M chips without and operating system is slightly more complicated than
programming 8 bit micros. This article goes through some of the differences and gives a
working example of “hello world” running on an STM32F4 …

In the blink article I showed how to blink the
LED on the butterfly board with a minimum of support
from the C library. The “Hello World” of hardware. But sometimes you do want
to use the features of C that are part of the C library, even when you don’t
have an OS. Enter C library retargeting.

These days programming an “embedded” chip is a much bigger endeavor than
it was. This is because the price of 16 and 32 bit processors have
plummeted to the point where it becomes trivial to get a “big” processor
for even a “small” job, but there are costs to that too.

Working with embedded ARM systems using only a Linux system can be challenging
but Blacksphere Technologies has come out with an excellent tool to help
and its open source, so you change it to suit your needs.

As I build and learn about robots I come across books that I find
helpful. A very common question then becomes “What books should I
read to get started or learn more?” This article provides a place
holder for the recommendation list.

A common theme in robotics is a number of different sub-assemblies connected together
with wires. Now building wiring harnesses can be tedious when prototyping so a quick
way to prototype them is useful. This article talks about making your own jumper wires
so that you can connect a variety of things (boards, sensors, breadboards)
together easily and quickly.

Early on in Robotics one way to get intelligence on board was to use a
cast off PC or laptop. Some folks ran MS-DOS on these but others wanted to
boot to the bare metal. I researched a bit about what the exact mechanism
was to get from power off to running OS and found Ray Knightly’s work
useful. I’ve captured them here since his originals are no longer available
on his web site.

The world it is a-changin' as many have said. No where is this more
apparent than in the “hobby” electronics space. It used to be that one
of those plastic multi-drawer cabinets full of 74xx series TTL logic,
a few resistors, capacitors, and crystals was all you needed to create
a whole slew of interesting projects. Guess what, not any more.

Normally when you write in a “high level” language you expect the compiler to get you
reasonably close to a good solution. In this example I could not get VHDL to synthesize
a simple hex decoder without resorting to the HDL equivalent of writing in assembly
language.

On the premise that you must crawl before you can walk, this first
project was really all about learning how to use the WebPack ISE tools
rather than doing any serious learning about VHDL. However, I did manage
to learn something VHDLish in the process.

Sometimes the lessons you learn aren’t about the languages, rather
it’s about the tools. This was certainly the case with the HEX display
decoder. A simple project that took me down an interesting side road.

Design a 32 bit (8 decimal digits) counter that displays its count on
an eight digit, multiplexed LED display. The counter should count at a
rate of 10 counts/second and display a decimal point between digits 7 and

Use the CLOCK_10HZ and HEX_DISPLAY entities in this project. Include
the ability to optionally blank leading zeros on the display.

Programming for “Flashing” PIC chips requires a programmer. Early work like
David Tait’s Programmer depended on
bit banging the parallel port of a PC, as parallel ports started
disappearing, and serial ports soon followed, I looked for a way to program
PIC chips via USB and found a kit programmer that could do just that.

A continual challenge for roboticists is the making of piece parts. My particular challenge
was making decent wheels when toy car wheels wouldn’t do, but other things are also a challenge
like linkages or containers. One solution is casting your own parts out of plastic.

Let’s say you want to buy switches that have handles like an old
PDP-8. Impossible? Not quite. Bob Armstrong has put so much effort into
creating the front panel, I had to see if I could help him out with some
switch paddles.

When I was competing in BattleBots we had a number of robots in various
weight classes. These were typically controlled with regular R/C radios
and those radios generated a standard
servo control signal. I built a small board
to convert that signal into relay activation.

Building robots is a lot of fun, and of course you need tools to build things.
This article is a survey article of tools that I use on a regular basis when
building robots. I try to give you an idea of what I use the tool for and why
I use it. That may help inform your efforts to equip your own robotics
laboratory.

The “Dino Track” was a simple one channel Radio Controlled car offered
by Radio Shack one year. During the closeout at the end of the year I
bought several from the store for $4 each to use as ‘prey’ in my robot
predator prey project. Taking it apart was quite fun.

One of the things I needed to do for my electronic speed controller was to
use the output from an R/C receiver to control it. Those receivers generate
a pulse which normally drive an rc-servo
so I needed to meausure pulses accurately. This article describes the way
I built and debugged code to do that on the PIC chip.

This shows a closeup of the modification I made to the
LAB-X3 in order to use the input capture
pin as an input capture pin. This moved it away from the LCD. If you
want to use my code unchanged you will need to make this mod

When developing for a new architecture it is useful to have a system that
is set up to let you quickly prototype ideas. When moving on to PIC16F628
development for my speed controller and Servo Gizmo projects I needed such
a tool. I evaluated the MPLAB-ICD from Microchip
and the LAB-X3 bundle from MicroEngineering Labs.

Input devices tend to consume precious I/O pins on your projects. A
new breed of input device, the Rotary Mechanical Encoder, has come down
in price (from the high $20 each range to under $5) so that you might
consider using them. I set up a PIC program to do just that.

One of those perplexing things you find when doing robotics is that
manufacturers seem to be your enemy. They want you to use their parts
but they make doing so, in a cost effective way, very hard. That is fine
if your company is buying you tools, but if this is a side project, look
out. This article was my take on this strange situation.

These are David Tait’s original materials for his 16F84 programmer. The cool
thing about the 16F84 was that it had an EEPROM in it and could be reprogramed
without erasing via a UV light. Now of course every chip is programmed with
flash memory and UV lights have faded away.

Everything you needed to know about inexpensive hobby servos. These
servos are used in a variety of robot projects, from the BoeBot to
robotic arms. fortunately they are all constructed along similar lines
and use a similar signaling mechanism.

This article was pretty famous for a while. Basically I built an electronic
speed controller, like the ones used in R/C models, based on a PIC and four
transistors. It has been copied many times, when I re-visited the topic I
did so with the ServoGizmo.

I’m an engineer that likes to build embedded systems. I went to USC
where I got a Bachelor of Science degree in Electrical Engineering and
then headed to Silicon Valley to make things. I worked as a EE for Intel
but had always supported myself both before and during college by programming.
I got an opportunity to join Sun Microsystems just as Sun went public
and from that point on nearly all of my day to day work was software.

However, I liked to keep my “hands dirty” and building robots has always
been a way to do that. At USC I picked up the habit of writing things down
in a lab notebook, and I continued that as I built robots. I have often
used those old notes when presenting a talk or teaching a class on robots
and one day someone said “Chuck you really should put all of this online.”

The first version of my notebook appeared online in the mid-90’s when HTML
was new and tables were the cool new browser feature. I ran it off my
private pages using a friend’s ISP (webprofessionals). As my web site grew
I moved it to its own server and grabeed the ‘mcmanis.com’ domain when it
became available. Unfortunately a mishap at a friends where I was
“co-locating” my server resulted in being destroyed by fire (and his
garage and a quarter of his house). I recovered some of my notebook
from the Internet Archive, and recreated some from my paper notebooks.

I then invested in “Front Page”, a Microsoft product, and used it as a
content management system. The fact that it had a WYSIWYG editor was
fantastic but its support for CSS was pathetic. In fact its support
for anything other than the Microsoft infrastructure and ISS was poor
but it was useful enough to make the site in. However by about 2006 tracking
all of the links and trying to get the look I wanted became impossible.

I went to work in 2006 for Google, and discovered that you could put
AdSense on your web pages and make a few dollars a month. Some people
made a living at it but that required either monster traffic or some
really egregious site design. I made a few pages with ads, they did
ok, I looked at the site, wanting to both unify its look and put ads
on pages automatically, and that broke the camels back. FrontPage could
not handle it. I decided to re-design everything and that was a big
weekend project.

5 years later the site was basically unchanged. I hadn’t cracked the
nut, I had upgraded to “ExpressionWeb” but that was, if anything, even
more embedded in the Microsoft Ecosystem. I needed a way to generate the
site from my tools, on my schedule. So I embarked on writing my own
content mangement system or CMS. Armed with Markdown, Python (and later
Perl) and some templating code. I finally got to the point where I
could actually publish stuff again. And because I think it might be
fun some day to make an e-book out of it, I decided to give it its
own place in the mcmanis.com namespace. So welcome to the new home
at robotics.mcmanis.com. Update your bookmarks, look around, and
let me know what you think.

In 1984, I met Dick Prather who was putting up notices in a local
Silicon Valley surplus electronics store. Dick had been heading up
the Robotics Special Interest Group (SIG) for the
Homebrew Computer Club
As the Homebrew Computer Club was fading, Dick decided to strike out on
his own and converted the SIG into a club in its own right and called
it the
Homebrew Robotics Club. He was
the leader and President of that club for approximately 10 years.
In 1992, when Dick stepped down for personal reasons I stepped up. The
club continued to meet, now with yours truly as President, at various locations
from the Cuptertino Public Library, Sun’s Java building in Palo Alto, a
middle school in Campbell, and the Carnegie Mellon satellite campus at Moffet
field. In 2004 the combination of my work and my kids who were being home
schooled by then overwhelmed me and I turned over the reins to Wayne Gramlich
who runs the club to this day. I expect his 10 year term to expire some
time in 2014 :-).