Note: This article is the 1st in a series of posts about electronics.
For more years than I care to count, I have been interested in electronics and circuits in one way or another. I’ve been building useless toys and taking apart radios and such since I was just a few years old, but I never really spent any serious effort on it. Due to my overwhelming interest in computer programming and later databases, electronics never even reached “hobby” status. In my late teens, I applied my well-learned soldering skills and invested in some new gear to make a few bucks by modding Sony Playstations for hire. To do that, I bought a parallel-port-connected EEPROM programmer, so that I could just burn the chips (Microchip PIC, I think) myself. In addition to making and selling mod chips, I dove into the documentation and learned how to program the chips to do stupid simple things in assembly language. Assembly was not nearly enough fun, and programming the chips themselves was slow and painful, so I pretty much went nowhere with that.
Over the past few years I have had a few projects that were in one way or another electronics-based, including an online weather station (now defunct, since we moved to a townhome) and at about the same time, an ill-fated robot project based on an ATX PC. In trying to build a robot, I quickly realized that I don’t know near enough about the low-level things, and I picked a few disciplines that I needed to study up on:
- Microcontrollers and microcontroller programming — Robots need to do a lot of extremely fast fine-level control, and to offload various low-level tasks from the main CPU (such as checking wheel rotation sensors). There’s a lot to learn about both the interface aspects and the programming aspects of working with microcontrollers. Luckily the Atmel AVR line is awesome, and I was able to pick up on it very quickly due to its C-language gcc support.
- Communications interfaces — This is in many ways a subset of microcontroller programming, but it gets into a lot of very specific sub-areas, and a whole new area of electrical interfaces. Specifically I knew I’d need I2C, SPI, TTL serial, and potentially RS485, Ethernet and/or WiFi.
- Circuit board design (EDA) — This one is all about physical space and elegance, really. While you can build a lot of cool things by wiring together a bunch of separate components, I know I’d never be happy with the inelegance of it and the sheer size requirements and constraints placed on you by using only components designed and built by others. I needed to get access to the actual chips and lay them out myself using some electronics design automation (EDA) tools; I chose EAGLE.
- Surface mount technology — If you’re doing anything related to circuits these days you quickly realize that it’s getting harder and harder to find through-hole components—ones which have legs that poke through the circuit board—for everything you need. In order to build any remotely complex design you have to get into surface mount devices, which are generally much smaller, and sit on “pads” instead of poking through holes. Using SMT requires special tools and some additional knowledge, but they enable you to build much smaller circuits, so I figured I may as well learn.
- Servos and stepper motors — To make things move, you need motive power. The most common ways to accomplish that is either through servo phase-width modulation or stepper motor control.
In what I hope to be a series of blog posts, I will discuss how I went about learning several of the above topics to build one of my first major projects: a custom-designed LED-based analog clock based on an Atmel ATmega644 microcontroller and 128 0603 surface mount LEDs. You can see it in action here:
LED Analog Clock v2 minute transition sequence
LED Analog Clock v2 hour transition sequence
I hope that I can provide some useful information and insight in this series. Feel free to ask any questions in the comments section, or by emailing me at email@example.com.