Books On Electronics For the Lay Programmer? 335
leoboiko writes "I'm a computer scientist and programmer with no training whatsoever in hardware or electronics. Sure, we designed a simple CPU (at a purely logical level) and learned about binary math and whatnot, and I can build a PC and stuff, but lately I've been wanting to, you know, solder something. Make my own cables, understand multimeters, perhaps assemble a simple robot or two. Play with hobbyist-level electronics. How does one go about educating oneself in this topic? I've been browsing Lessons in Electric Circuits online and it's been helpful, together with Misconceptions About 'Electricity' which went a long way in helping me finally to grok what electric charge and power actually are. I've reached the point where I want an actual dead-tree book, though. Any recommendations?"
Starter for electronics (Score:4, Interesting)
http://www.arduino.cc/ [arduino.cc]
Pragmatic Programmers on Electronics (Score:3, Interesting)
Also check out MIT OCW (Score:2, Interesting)
Not a book, but course materials and video lectures.
I'd also recommend (Score:2, Interesting)
http://www.linear.com/designtools/software/index.jsp [linear.com]
and there is a yahoo group.
http://tech.groups.yahoo.com/group/LTspice/?v=1&t=directory&ch=web&pub=groups&sec=dir&slk=1 [yahoo.com]
Re:The Art of Electronics (Score:5, Interesting)
On topic I found "Teach Yourself Electricity and Electronics" by Stan Gibilisco to be a very useful book for hobbiest stuff.
Practical Electronics for Inventors (Score:3, Interesting)
"The Art of Electronics" by Horowitz is definitely the standard for electronics, but for me it delved too much into the theory. It is extremely thorough, but maybe not geared towards people just wanting to build their own first small circuits.
Bridge the gap between HW and SW (Score:4, Interesting)
1. Break down assembly language even further and look into OP codes as well as the FDOES (Fetch-Decode-Operands-Execute-Store) cycle. Think clocks and busses. [microprocessor architecture, bus architecture, instruction set, instruction architecture]
2. Move further into details of how ALU and memory are implemented: how flip-flops are used to store state, and how ALU's adder circuits, etc. can be implemented using NAND gates. Know what a 7401 is. [digital circuit design, half adder, full adder, flip-flop, register]
3. Then at a lower level, study how NAND gates themselves are implemented using transistors. Know about BJTs and FETs. [transistor electronics, electronic circuit analysis and design, BJT, FET]
4. You can be happy at the transistor level, but to solder things that actually work (and at the same time, know what you're doing), you have to study electric circuits and power electronics [electrical engineering, power electronics, ohm's law, thevenin, kirchoff's circuit laws]. Know how to read the color bands on resistors and appreciate the cheeky mnemonics for BBROYGBVGW
5. If you want to grind your own sand to make your chips and transistors, you may want to look up material science
*Be careful not to inhale the lead fumes, lest you suffer brain damage
Now if someone could recommend books for each stage...
(It's hard to recommend self-learning hardware, because I was taught hardware and am self-learning Computer Science.)
Re:Art of Electronics. But... (Score:2, Interesting)
$1000 is a huge overkill. Hopefully you can find a good electronics surplus store near you.
I've bought fully functional top of the line '80s scopes (Tek 7000 series) for $20 at surplus stores. You should be able to find a decent used scope for under $100.
Get an analog scope for your first one. They are dirt cheap used and will give you more insight into how oscilloscopes work.
Because most of todays new parts are surface mount, you will eventually want to get a quality soldering iron. Trying to solder SOT-23s with a 1/4" tip is a royal pain. I recommend Metcal RF heated irons. It has excellent temperature regulation (maybe the best?) and heats up in less than 10 seconds. You should be able to pick up a used one for less than $100 off of ebay.
Re:The Art of Electronics (Score:3, Interesting)
Practical experience! (Score:5, Interesting)
1. Solderless breadboard, and an assortment of transistors, resistors, capacitors, inductors, 555 timers, op-amps etc. Do some simple circuits with them - make logic gates with BJTs and resistors, then do the same with mosfets (construct some CMOS gates out of discrete transistors for instance). Experiment with power supplies - buck converters to step DC voltages down, boost converters to step voltages up. Make sure you have several of each, because you'll probably let the magic smoke out of some of them.
2. Decide on a simple practical project. I chose to make a solar power system for my garden - an 80 watt pv panel sourced from ebay. The first project was to turn on lights at night from the battery that had been charged by the panel in the day. This consisted of a voltage comparator to detect when the solar panel voltage had fallen below a certain level. The output is connected to a power transistor that turns on the lights.
3. More complex stuff. Get a heap of 74 series or 4000 series logic ICs and make something with it. This will teach you how the real world has a nasty habit of creeping into your digital designs: glitches, why we need decoupling capacitors, synchronizing clocks, that kind of thing. I built an RS232 nixie tube display. It had no microcontroller - the UART was entirely implemented in 4000 series logic. I built it on tri-pad proto board. This required me to learn how to build several things: a simple switch mode power supply to boost 12v to 170vdc for the tubes, as well as the UART.
4. It is your fate to home brew a computer. My next project was a Z80 based single board computer on 160x100mm (Eurocard). It has a CTC, PIO, real time clock, paged memory, 512k of flash memory and 32k of RAM, and an expansion connector. The flash was initially programmed by a similar circuit to the nixie tube UART, but with a simple address generator circuit added. Once the initial program was written, the Z80 system could write its own flash.
I'm now up to the stage where I'm doing more challenging designs, such as an ethernet card for an 8 bit system, implemented almost entirely surface mount components, the glue logic being in a programmable logic chip called a CPLD (the little brother of the FPGA). There are even more real world considerations that mess with digital design here: how to avoid ground bounce, PCB layout considerations to make the board work at all, and also a good bit of real fun programming: writing a driver for it in assembly language
There's a great deal you can do as an electronics hobbyist: for example, you can make your own PCBs for fine pitch surface mount components if you have access to a laser printer: I've made my own PCBs for chips with 0.4mm pin pitch (that's 0.2mm traces and 0.2mm spacing) using nothing but gEDA PCB (which is GPL'd PCB layout software), a laser printer, a clothes iron, copper clad board and etchant. Sparkfun Electronics have some great tutorials on hand soldering surface mount components, by the way. As you progress, you'll want to be able to do this because there are a lot of interesting ICs that are only available in some sort of surface mount package.
HAM Radio (Score:1, Interesting)
As recommended elsewhere, The Art Of Elelctronics is a great book.
However, nothing beats a group of peers to teach you. In addition to TAOE, I recommend getting involved with your local HAM Radio club and hopefully find a handful of really good old-school analog electronics guys.
You can search for a local club here: http://www.arrl.org/FandES/field/club/clubsearch.phtml
Nilsson and Riedel: Electric Circuits (Score:2, Interesting)
I didn't really go to class much, so most of my learning was straight out of this book. It is very easy to understand, and everything is covered from a basic level. It covers what all of the basic circuit elements are, how to analyze circuits, opamps, and circuits with reactive components, i.e. inductors and capacitors. It does not cover too many other topics, but it is an excellent reference on basic circuit analysis techniques which I still refer to today when I need to refresh my memory on basic circuit techniques. It will help you learn basic techniques very effectively which online resources do not often include, especially not all in one place. I find that it's style of writing and layout is much easier to understand than Horowitz and Hill's The Art of Electronics, which is frequently recommended as a self-study book, but the scope of that book is much different from this one.
For finding out what basic circuits you will find useful, I would honestly just recommend using google, it will help you find much of what you need to know. Find any of the myriad sites that have a list of basic circuits, and just look through them.
You indicated an interest in robotics, and usually most of the work goes into the physical construction, and programming a microcontroller. My books in this area are unfortunately not at my current residence, but you should buy a book on robotics specifically, make sure it covers the physical design and construction. You will also need to choose a microcontroller platform, the two most popular for hobbyists are Atmel and Microchip. The former is IMHO a better solution as it is more flexible and uses an open toolchain. Microchip is easier to get started with, but you are limited because you need to use their proprietary toolchain (or a third party toolchain that may not support all chips properly), and free compilers are usually only shareware, otherwise you have to write in assembly (which is not a bad idea).
For a hobbyist you will want an nice array of parts, you should get a resistor kit with a bunch of values, get a capacitor kit but it doesn't need to be big if you also buy a bunch of 0.1uF ceramic and 10uF electrolytic capacitors which you will probably use a lot of, get some 2N3904/6 transistors (basic NPN and PNP transistors), some MOSFETs that can handle some decent current, a breadboard with wires, and some basic chips like the 555 timer, a decade counter, maybe some logic gates, and some opamps (I'd recommend the LM358 since it can operate with a single power supply voltage).
Re:Forrest M. Mims III (Score:4, Interesting)
It looks a bit different [amazon.com] than it did when I read it.
Note that what you'll be able to do when you understand the stuff in this book is very little. You'll be able to make tone generators, and blinking lights.
What good is that? Well, given a basic microcontroller, you'll probably learn enough basic electronics sense to not burn out any of your components, and you'll probably learn enough to be able to read other people's circuit schematics.
That may be all you need of the electronics part to start you down into the exciting world of digital signal processing without a computer, which I have always thought of as the exciting part.
Re:Forrest M. Mims III (Score:2, Interesting)
Re:The usefulness of textbooks (Score:3, Interesting)
The Lab Manual is basically what they use in Physics 123 at Harvard, the course originally taught by Horowitz and Hill, where their course notes eventually evolved into AoE.
I took Physics 123 back in 1999 or so, Paul Horowitz was still there at the time, But Hill had left and was replaced by Thomas Hayes (the other author of the Lab Manual). It was an amazing class. There were non-science majors in there who had zero electronics or engineering knowledge, but were doing great.
After something like 4 weeks, the whole class had to build a device that took audio from a radio, encoded it into PWM digital pulses, transmitted it via an IR transmitter across the room, receive w/ an IR receiver, decode the PWM back into audio, and play it through a speaker. No schematics for the subsections were provided, and we were able to do it successfully in 3 hours. Again, this coming from a group of people most of whom had little prior electronics knowledge.
The second half of the course is super cool too, it's digital electrons, and you start w/ simple glue logic, but then work your way up and at the end of the course you wire together a whole 68k computer (using the 68008 CPU) from individual components. That was the coolest part, IMHO. You program w/ a little keypad, use hex-LED displays for address and data bus, and write little programs. Some people even went further with their computer and hooked up two digital-analog converters to connect to an oscilloscope in XY mode, and made a Pac-Man game (that happened before the year I took the class).
So in a few months people with zero electronics knowledge make a wireless audio transmitter/receiver, and an entire digital computer, all using essentially the AoE student manual. Amazing course of study.
Teach Yourself Electronics (Score:3, Interesting)
Some useful links... (Score:1, Interesting)
Mag Lab Education [fsu.edu] - Electricity and Magnetism: A to Z
Make Magazine [makezine.com] - all about hobbyst stuff - try searching here for "multimeter", or "soldering", or "PCB"...
Microelectronics Videos [vt.edu] - very good videos about microelectronics and fiber optics
UVA Virtual Lab [virginia.edu] - Amazing multimedia resources covering many aspects of electricity and magnetism
ePanorama [epanorama.net] - practical projects, texts, tutorials, and many more...
MIT OpenCourseWare [mit.edu] - if you want to go really deep in theory...
anyone wants to complete this list???
Electronics for Dummies: basic, practical, logical (Score:2, Interesting)
No joke. I mean, come on posters. leoboiko wants a book for the basics, not for programming microcontrollers.
Electronics for Dummies starts with the tools you need and minimal but practical math, introduces you to the basics like resistors and capacitors, discusses the circuit and reading a schematic, goes over soldering and then dips its toes in more advanced stuff like microcontrollers, robotics and even making your own breadboards. It tops it all of with project idea. It is a logical, clear progression and an excellent reference.
Funny, I'm in the same situation as you, a programmer who just got interested in electronics four days ago after being amazed at the maker faire in san mateo. I looked at a number of these books. Art of Electronics? The Navy Manuals? Go simpler.
You'll have a blast! Just a few chapters into the book I got an idea for a proximity sensor. I ran to the radio shack and picked up the parts then hacked together a circuit. It sends out infrared light and detects the reflection when your hand is near. The completed circuit triggers a transistor, allowing an led to light up in varying degrees as your hand moves closer and back.
Awesome! And that's only three days into this book.