KoblentsBlog Photography
Contact About
Ches
Overcoming Learning Hurdles by Preprogramming
I recently got back the first revision of a circuit board meant to teach surface mount soldering and embedded programming. I then realized the board posed a hurdle to the learning process I could overcome for $4.
Back when dinosaurs roamed the earth, and it was only three years ago, surface-mount sockets were either prohibitively expensive or my google-fu was poor. The best prices for sockets I could find started at the high double digits, and went deep into triple digits. Today, you can buy a SOIC-8 socket for $2.50 and a SOIC-16 socket for $8. (Technically, the SOIC-8 socket is a SOIC-16 socket with half the pins unusable, so I opted for the SOIC-16 socket, which also does SO8, 10, 12, and SO14). This is incredible, and it means that I can preprogram surface mount microcontrollers before I or someone else solders them.
This is supremely important to me, because I believe the number one killer of people's interest in hobby electronics is the lack of feedback. When I compile a program, and there's an issue, the compiler tells me! (Of course, if it's GCC and C++, it tells me three pages of expanded template details, and I have no idea what the real error is.) If there's a runtime issue, I may get an ugly segfault, but I can debug with gdb and/or I can use print statements. However, when we play with hardware, we're lucky to get intelligent errors.
Why is the Arduino so popular? It's popular because it just works. We plug it in, and we load test code on it, and the LED blinks. We program our own thing, and when it doesn't work, we write debug data to serial, and we get it working.
When a bare chip doesn't work, however, it just doesn't work. Your code compiled, and the programmer says the chip is loaded, but nothing is blinking. If you're good at this, you've got debug and emulation utilities set up, you step through your program and find the issue, you can write data to serial or USB. If you're just starting out, it just sits there, a black piece of plastic and metal, mocking you.
But wait, it gets better! (Or worse, if you're not a masochist.) When you're a beginner at both programming and soldering, you now have two complex points of failure - in your code, and in your handiwork. If you design the board yourself, now you've got three. (Thanks to Seeedstudio Fusion and Osh Park, making a board is almost trivial - I routinely teach people how to go from nothing to gerbers in two hours; this is therefore not a moot point.)
The point of this article is this: If you're learning SMT soldering, you can simply buy a surfboard or SMT breakout board and solder something. You can work on your technique and get beautiful solder joints. However, the vast majority of the 'casual' population (read: normal people, even many engineers) have no patience for inspecting a board under a magnifying glass, saying "Yep, that's a good joint," and putting it down to never look at again. The vast majority wants something that actually works, and shows off their skills, and provides immediate feedback.
A preprogrammed microcontroller does all that.
Sure, I can get the same effect with passive components. I can make a surface mount board that just has a couple resistors and LEDs, and if you've done it right, powering the board causes them to light up. Yawn. I've considered a better effect by making a bi-stable multivibrator, which would be just a fancy way to get a pair of LEDs to oscillate in such a way that when one is on, the other is off. I've considered an even fancier 555 chip to do something similar. Heck, I can throw a potentiometer into the 555 circuit to let the person learning have something to play with.
The problem with all of those approaches is an extreme lack in flexibility in the final product. Those are all great ideas for providing immediate feedback, but after the board is confirmed working, it gets thrown in the bin.
A board with a programmable microcontroller, on the other hand, continues to be interesting after it's finished. That's important. And a preprogrammed microcontroller provides immediate feedback. That, in my opinion, is a 1-2 knockout punch that makes this a good teaching tool.
So, to recap, a beginner jumping into learning SMD soldering, embedded programming, and possibly board design will learn best when:
  • They are interested in what they're doing, not just as a means to learn but to produce a usable result
  • They can deal with only one variable at a time, or the fewest possible variables
  • When they solve a particular issue, they get immediate feedback
  • They understand each step (good documentation!)
  • They can finish the lesson and go off on their own with what they've made to learn more
By using a microcontroller, we cover the first and last point. By preprogramming it, we cover the second and third points. By writing proper documentation, we get rid of guesswork.
Ches Koblents
September 20, 2013
 
« Newer Older »
© Copyright Koblents.com, 2012-2024