Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
An Intro to Microcontrollers

By djkimmel in Technology
Mon Oct 23, 2000 at 07:36:38 PM EST
Tags: Hardware (all tags)
Hardware

I've looked over the Technology section here at K5 and noticed that it focuses almost exclusively on software or more "hands off" technology, such as the cable vs DSL article.

I'd like to offer an introduction to something much more hands on - a programmable, easy to use, microcontroller.


The first little bit of this article will talk about how I came around to hacking with microcontrollers. It will probably come off as self-centered, but I feel that I can't adequately describe what I'm talking about without describing how I got there. I will try to keep this part as short as possible.

The Beginning

In the beginning, I had no computer. Instead, I had a soldering iron and books. Instead of writing programs, I drew schematic diagrams. Instead of compiling programs, I wired circuits up on a breadboard. Instead of using a debugger, I used a multimeter and a logic probe. Instead of prebuilt libraries like GTK and libc, I had Integrated Circuits.

I enjoyed this. I was even, strangely enough, happy when I got my first jolt of 120V across my hand. It was a stern reminder that electricity is not to be trifled with and that it can, and sometimes will, bite back when you're trying to tame it. This was the first major highlight of my electronics experience - this stuff is REAL!

Some time after my hands-on experience with 120V, I used my Commodore Vic-20 to create a game show-style buzzer system for something that my Jr. High school was doing. I soldered some wires to the user IO port on the Vic-20, soldered some switches to the other end of the wires, and wrote up a little program to poll the IO port and show you who buzzed in. Sure, it was fairly lame, but I was the only kid in that school who could have pulled that stunt. This was the second major highlight of my electronics experience - this stuff is amazingly cool when it's programmable!

Then my interest in electronics wanned as components increased in price and my income remained steady at next-to-nothing. So I got more into programming. The Vic-20 had long since fried from various modifications I made, so my days of doing neat stuff with the user IO port were relegated to my memories and I was stuck in the world of software only. Granted, this was fun, but it never bit me, not like electricity had anyway. The world of software has no teeth and can't bite in a physical way like electricity can, the most it can usually do is gum your files to death (unless you get some big company mad at you - then THEY bite!). Also, software seemed purely abstract, even though it did useful and amazing things, it still had a very nebulous, non-physical, quality about it. Fortunately, it was very easy to program and debug, much easier than building and debugging electronic circuits was. Overall, I was quite happy writing software, even if it didn't "feel" quite as real as building hardware did.

About a year ago I got to thinking "Wouldn't it be nice if I could do again what I did with my Vic-20? Wouldn't it be great if I could, once again, combine hardware and software into something useful and physical?"

Enter the Microcontroller

One day, I remembered a PC Magazine article that I read about a microcontroller and how someone used it to determine the winner of a model car race when both cars finished at nearly the same time. Ok, it was one of those opinion pieces that they run, possibly by John Dvorak, but it still contained useful and accurate information when it came to this topic. Eventually the name of the microcontroller surfaced out of the murky depths of my memory. The microcontroller was called the "Basic Stamp." The Basic Stamp is made by Parallax, which also makes and sells other types of microcontrollers.

The Basic Stamp comes in four major flavors:

  • Basic Stamp I - this is the bare bones one. Limited program space, not very fast, but cheap.
  • Basic Stamp II - This is a higher end one - there is more space for your program and it runs significantly faster than the Basic Stamp II
  • Basic Stamp IIsx - this one is even faster than the Basic Stamp II and has even more program space
  • Basic Stamp IIe - This is midway between the Stamp II and IIsx. It provides the increased program space of the IIsx, but not the increased speed and power consumption.
The Basic Stamp comes in a number of shapes and sizes:
  • One features a Basic Stamp I plus prototyping area on something a little bigger than a 9-volt battery
  • Another features a Basic Stamp I on something that looks like a SIMM, except with pins instead of a row of contacts.
  • Yet another form features a Basic Stamp II on a 24-pin carrier. It is the size of a standard 24-pin integrated circuit and houses the Basic Stamp interpreter, EEPROM, voltage regulator, and other support circuitry.
Regardless of the packaging, you can see that a Basic Stamp consists of a PIC microcontroller, an EEPROM, and a little bit of support circuitry - there are pictures here. In addition, you can buy the Stamps in various kits, which include prototyping areas, easy access to the IO lines, and a proper serial port so that you don't have to make your own serial cable.

Programming the Basic Stamp

The first step to programming the Basic Stamp is to realize that there is no operating system, since it's not needed. There is no dynamic memory allocation because you don't need it. Of course, if you want to, for example, use an external memory board and write routines to manage the memory you are free to do so. Just because it doesn't exist in the Stamp by default doesn't mean it can't be done. The environment on the Stamp is more barebones than the smallest Linux distribution you can imagine, and can probably be outmatched by a graphing calculator. These are the limitations of the microcontroller world.

To write a program for the Basic Stamp, you use some software on the PC which handles editing, compiling, and downloading the program to the Stamp. Downloading is done through a serial port if you are using a Stamp II and a parallel port if you are using a Stamp I. As far as I know, there is no open source software for developing Stamp programs, but I'm sure that if there is a need somebody will write such a thing.

When a program is running on the basic stamp, there are two ways that it can interact with its environment. The first, and easiest, is the debug command, which sends data back to the host computer through the serial port. As the name implies, this should only be used for debugging. Another gotcha of the debug command is that it does not work for the Stamp I. The second is to read and write to the IO lines. This can be accomplished by commands like serin and serout, which can be used for serial IO, pulsin and pulsout which can send or receive a short pulse on an IO line, along with specialized functions like rctime, which is designed to time an RC network, and x10out, which is specifically designed for sending commands to an X10 powerline interface module.

Since the environment of this chip is generally a larger circuit, many of the commands make sense. For example, serin and serout are perfectly suited for interfacing with the Matrix Orbital displays that were made so popular in the Linux world by lcdproc. Through various modules built by Parallax and other companies, the Basic Stamp can control everything from LED and LCD displays to infrared range finders, servos, and other things that could serve to build anything from an autonomous robot to an industrial manufacturing system using a Basic Stamp as the brain. Some examples of this are shown on Parallax's Customer Applications page.

Some of the modules that are sold for use with the Basic Stamp and other microcontrollers include things like the StampMem module, which is useful for storing data that is gathered over a long period of time, and the Pocket Watch, which can serve as a real time clock. Of course, if you desire more accuracy, an Atomic clock reciever module is also available.

I think the Basic Stamp is a good way to learn about microcontrollers and embedded systems in general, and also a good way to experiment with hardware and the interaction between hardware and software. I also think that this is a good place to start for the software hacker that wants to learn about hardware but doesn't know where to start - it lets them keep their software programming skills and apply them to new and interesting things.

The Basic Stamp certainly isn't the only microcontroller of this nature out there, but it is a fairly popular one and a good place to start for someone who wants to expose themselves to the world of microcontrollers.

Additional Resources

  • Parallax - the manufacturer of the Basic Stamp and various addon modules. They have a lot of documentation and sample programs available at their site.
  • HVW Technologies - a company in Calgary, Alberta, Canada, that supplies Basic Stamps and related stuff. Not much use to those outside of Canada, but a good place to see what's available.
  • Parallax's Distributor Page - more useful to those outside of Canada, a list of all distributors of Parallax products.
  • LOSA - List of Stamp Applications. If you're interested in what people have done with the Stamp, this is the place to start. People have done everything from rotating LED clocks to controlling a system to feed a cat through a tube using the Basic Stamp!
  • Parallax's Customer Applications page - a few high-end applications of the Basic Stamp
  • Questlink - While not specifically Stamp related, has loads of information about electronic components, including purchasing and data sheets.

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Poll
My prefered choice of micro controller is
o Basic Stamp 5%
o PIC 42%
o Screw Microcontrollers - I'll build it out of logic gates! 33%
o Embedded Linux 14%
o Embedded NT (shudder) 3%

Votes: 54
Results | Other Polls

Related Links
o Technology section
o Basic Stamp
o lcdproc
o StampMem
o Parallax
o HVW Technologies
o Parallax's Distributor Page
o LOSA
o Parallax's Customer Applications
o Questlink
o Also by djkimmel


Display: Sort:
An Intro to Microcontrollers | 71 comments (71 topical, editorial, 0 hidden)
Non-virtual geek tech (2.70 / 10) (#1)
by dreamfish on Mon Oct 23, 2000 at 06:29:24 PM EST

Very interesting, written by a guy who knows his stuff and likes to get in there and build things. I haven't touched hardware in years, not since university (I did Electronic Engineering). Now I spend all my life in the abstract world of software.

The Vic-20 stuff takes me back! It was my first computer in the early '80s. Though the nearest I ever came to I/O control on it was wiring up the joystick ports to (sensing) switches. Ah, halycon days, when computers were simple :)

Old fasioned hacking. (5.00 / 1) (#19)
by Dr Caleb on Mon Oct 23, 2000 at 10:58:34 PM EST

I actually did something like this, commercially.

I took an old Amiga 500, over clocked it with a 68040-20Mhz and added 4Mb of 60ns ram. Then I made a membrane keyboard that hooked to the mouse ports (the Amiga had 2!!). The ports were simple TTL inputs. Between the keyboard and the ports were simple 16k roms that changed the row/columns on the keyboard into inputs that the mouse ports could handle.

Then I wrote a program to decode the mouse movements into row/column addresses. These inputs then allowed me to translate the keyboard of a fast-food restaraunt till into something the we could use, as the till had no types of outputs by itself.

It was really cool. We needed the hopped up Amiga's because they were used for live animation, based on what the person working the cash till was doing. Worked really well, until that amiga bankrupcy thing. Any idea how hard it was to make an IBM type PC jump through the hoops that the Amiga would, right out of the box??


Vive Le Canada - For Canadians who give a shit about their country.

There is no K5 cabal.
[ Parent ]

Electronics design (3.40 / 20) (#2)
by Signal 11 on Mon Oct 23, 2000 at 06:32:30 PM EST

As an enterprising newbie to electronics, the biggest problem I have been faced with is finding a site that can give me a broad understanding of the various analog and digital parts out there. Interfacing resistors and capacitors and all that is not difficult, but I have many a time struggled for weeks trying to accomplish something that I later found out was available in a single 8 pin IC.

OpAmps, for example - I needed to create a circuit that when the resistance across a certain component dropped below a certain threshold, would flip an output high (+5v). Seems simple enough, but I needed several transistors in an array to produce the gains required, and I spent many nights cleaning up the remains of former transistors when it overloaded.

FINALLY, I found out about the 1458 and related 741 OpAmps. There it was, just provide a reference voltage in one input, and the apparatus in the other and viola.

What does this have to do with microcontrollers? Not much. But alot of geeks I've met want to learn electronics. It is suprisingly similar to programming... whereas it is handson, most of electronics is based on math and formula.

It is strangely satisfying to be able to flip the switch and see your device just start working. You don't get that from programming. I'd like to have that happen alot more, but there are no guides beyond basic "resistor,capacitor,transistor" kinds of electronics.

If I could see an article on how to build *real* circuits, that would be SO wonderful.


--
Society needs therapy. It's having
trouble accepting itself.

OT: Disturbing comment ratings. (4.28 / 7) (#4)
by maynard on Mon Oct 23, 2000 at 07:04:53 PM EST

I just saw this comment rated at a 1.00, presumably because someone has a personal bug up their butt over Signal 11. So, I had to vote it up beyond what I think it deserves just to even the score out at a 2.50. This is ridiculous; it ruins the whole point behind mojo and rating individual comments. Ratings shouldn't be about whether you like the guy at the other end of the keyboard, but whether this particular comment is of value to the community as a whole. I don't care if Signal 11 is well liked or absolutely hated by others, this particular comment didn't deserve a 1.00 simply because Signal 11 wrote it.

And I'm not here defending Signal 11 for his current and past behavior, good or bad. That's irrelevant! Please behave with some level of honesty when rating comments. Please leave your personal agendas, politics, and biases behind as well. Frankly, if this becomes the norm we might as well toss mojo and comment rating altogether because it'll be meaningless.

Oh well, I had to get this off my chest; rate it to hell now.

Cheers
--Maynard

Read The Proxies, a short crime thriller.
[ Parent ]

Thank god for you (4.80 / 5) (#5)
by rusty on Mon Oct 23, 2000 at 07:09:18 PM EST

The system is working then. Some (ass) rated unfairly, you noticed it and rated fairly. If even a majority of people rating are honest, the system works. The comment now stands at 3.33, which at least resembles a fair score. I agree with you that rating based on username is worse than idiotic, but when you see bad rating, correct it. The more who do, the better it works. :-)

____
Not the real rusty
[ Parent ]
Look at it this way... (3.50 / 1) (#11)
by Sigma 7 on Mon Oct 23, 2000 at 09:08:09 PM EST

There are users that have a personal vendetta against Signal 11. Since they can freely rate postings of other users, they will unfairly rate the postings of Signal 11 to a score of 1 or 0. This is an attempt to reduce the karma of Signal 11 past half of its current value.

They can try all they can, but there is one slight detail that prevents them from succeeding.

[ Parent ]

Detail? (none / 0) (#13)
by tzanger on Mon Oct 23, 2000 at 09:23:20 PM EST

They can try all they can, but there is one slight detail that prevents them from succeeding.

What detail is that? I didn't see anything of particular importance from your link.



[ Parent ]
Re: Detail? (none / 1) (#14)
by Sigma 7 on Mon Oct 23, 2000 at 09:32:45 PM EST

What detail is that? I didn't see anything of particular importance from your link.
The link is an editorial comment. Set your display preferences to show editorials if you want to see the detail.

[ Parent ]
Relax (4.00 / 2) (#18)
by loner on Mon Oct 23, 2000 at 10:36:50 PM EST

I'm sure as time goes on many K5 regulars will gather groups of lovers and haters, but as Rusty pointed out the system has a way of balancing itself out. For every user who unfairly rates an article as 1, another will rate it 5 to adjust things.

The good news is that on K5, mojo (or karma as you call it you ex-/.er you :-)) doesn't have that much importance. Hell I've had most of my recent comments rated worse than Signal 11, and I'm still breathing and participating in discussions here like everybody else.

The worst I see is if people start going to a user's info page and from there systematically rate every one of their comments as 1, now that'll be ugly! But that goes with the territory, on the 'net it's easy to treat others unfairly because you don't have to look'em in the eye as you do it, or even after you do it...

[ Parent ]

Yes, but a post shouldn't be taken on it's merit (none / 0) (#27)
by Holloway on Tue Oct 24, 2000 at 04:27:30 AM EST

Oh how I hate the theoretical.

I negatively vote posts that I believe are the result of troll's trolling away. This usually means that I browse their posting history - the point being I don't take each post on it's own merit, and it would be silly to.

It doesn't affect the whole of what I would vote upon, but what someone's done affects what I think of them and I take that into account.

If I read a vaguely imflamatory post by slashdot poster 'Anne Marie' I'll label that post flamebait, or a troll due - just because of the history.

:: No it wasn't me.


== Human's wear pants, if they don't wear pants they stand out in a crowd. But if a monkey didn't wear pants it would be anonymous

[ Parent ]

Be fair to trolls (3.50 / 2) (#60)
by Nick Ives on Wed Oct 25, 2000 at 03:43:44 PM EST

But what chance of reform does that give ex-trolls then? If someone goes around posting trolls then let them get bad mojo, but if they then post good posts, then let them get good mojo.

Rating someone down just because of who they are and what they have done in the past isnt fair, it isnt right and it is in no way morally sound. If someone has genuinely turned over a new leaf and is willing to participate properly and is willing to stop trolling/spamming/whatever, be fair to them and let them have a chance to start again. Just because an ex-troll posts something thats inflammatory that doesnt mean it was an actual troll. Sometimes some subjects are just very touchy and get inflammatory responses. Useing a posters posting history against them in such a manner just isnt fair to them or the community in which they are posting (in this case Kuro5hin).

You may think that your behaviour is some form of justice for their behaviour, that they deserve to pay for being a troll, but its not justice at all, its just revenge. Exacting revenge on someone for being a troll makes you as bad as the troll. Try to keep that in mind, and in the future try to be fairer to trolls and ex-trolls.

[ Parent ]
Re: Be Fair to Trolls (2.00 / 1) (#62)
by Holloway on Wed Oct 25, 2000 at 06:32:42 PM EST

Oh, I completely agree. It shouldn't affect the greater part of your voting (as I said) - but it would be silly not to take what a persons' done into account.

The difference between flamebait and troll can be defined by the posters history.

If a known troll posts and well written piece of brilliance I'd vote it up. However, people do have to outgrow their history and they should expect to just turn over a new leaf.

One wouldn't vote on a politicians speech without considering that five years ago he was pompous enough to force "potatoe", or that although your test-drive of that new SUV was flawless you know of a 95% fatality rate in this model.

Again, this should account for most of your vote - only a small portion -, but to ignore a history ignores the motivations and context of the post.


== Human's wear pants, if they don't wear pants they stand out in a crowd. But if a monkey didn't wear pants it would be anonymous

[ Parent ]

But what are you voting on? (none / 0) (#67)
by PrettyBoyTim on Thu Oct 26, 2000 at 09:24:11 AM EST

I was under the impression that the idea of voting was to help others who are reading the thread get the best out of it that they can. By voting someone's comment up, you aren't therefore some condoning them or their views - you're just saying to others who might be reading - 'this post is interesting'.

[ Parent ]
I vote on the post, but consider the history (3.00 / 1) (#69)
by Holloway on Thu Oct 26, 2000 at 09:40:44 PM EST

I was under the impression that the idea of voting was to help others who are reading the thread get the best out of it that they can

How does my way of voting not do this? I think that a person's posting history goes somewhat towards how you should take what they're saying today - just like real life.

By voting someone's comment up, you aren't therefore some condoning them or their views - you're just saying to others who might be reading - 'this post is interesting'

Hmmm... yes, I think I have a different reason for voting than most people. I think that many slashdot trolls have shown that misleading but authorative looking posts get voted up - and that this is a general principle of interactions with others (online or not). A post isn't insightful or interesting on its' own if the poster has a history of lying or excessive posturing - I take this into account.

Um, yes.




== Human's wear pants, if they don't wear pants they stand out in a crowd. But if a monkey didn't wear pants it would be anonymous

[ Parent ]
Differences between programming and circuit design (4.80 / 5) (#7)
by aragorn on Mon Oct 23, 2000 at 07:56:25 PM EST

One main difference between electronics and programming, though, is that it's quite possible to pick up a very good understanding of programming without stepping foot in a classroom. Programming is mainly about being able to grasp a problem and think up a logical way to solve it. Syntax is more of a detail. With electronics, the scale is tipped a great deal in the other direction. To build a good circuit that does it's job in an efficient manner, it is necessary to have a very deep understanding of what parts are out there and how these parts work, sometimes down to the atomic level.

A good example of this is inductors. You'll notice that most electronic supply houses don't cary a broad range of inductors. But most good ones will be able to sell you various toroids or cylinders made of magnetic materials and a spool of wire. It's then up to you to make this inductor. Making it involves having a very firm grasp of how the magnetic domains in the material will react, what kind of magnetic field is set up around the wire, etc. This is the "syntax" of electronics and as you can see it takes up a much larger portion of the problem-solving task than it does in programming.

This is why it's so much more difficult to pick up electronics than it is to pick up programming. And, by extension, this is also a big part of the reason that you don't see comprehensive websites about electronics. People who have knowledge about it are more than happy to share what they can, but the sheer volume of information is too great for one person to spit out.

BTW, I'm presently enjoying my third year towards getting an EE degree and I've picked up 3 programming languages (Perl, C, and VB) and 4 different C API's (ANSI, 'HC11, PalmOS, Win32) while I've been here. That's why I feel I'm fairly qualified to try to explain the differences.

Take it easy.

[ Parent ]

Electronics and Programming (4.00 / 2) (#12)
by tzanger on Mon Oct 23, 2000 at 09:20:44 PM EST

One main difference between electronics and programming, though, is that it's quite possible to pick up a very good understanding of programming without stepping foot in a classroom.

I don't see how there's too much of a difference there... I design industrial power electronics and I've never set foot in a college or university programme. I took grade 11 electronics in Grade 9 and OAC (Grade 13, it is, or rather was, an Ontario, Canada thing) electronics in Grade 11. I ended up on my own electronics program for high school because I'd picked up pretty much all that they were teaching on my own and with my friend Karl. My dad knew electricity and got me hooked. His dad knew a bit more of the electronics side but by far our electronics knowledge came from each other and the self-education we went though.

Hell, I took grade 10 and 12 electronics just so there'd be enough people to run the class! One of my proudest moments in high school was teaching 17 students how to program microcontrollers (little 8051s with a weird data entry method: "Groups of 3". I went back to visit one of the teachers a couple years ago: they're still using my notes! As I said, that was one of the proudest moments in my high school life.

Back on topic... I believe you can pick up most "macro" trades (electronics, programming, woodworking, music...) without school. It all depends on your determiniation, your friends, luck and how good a library you have access to.

With electronics, the scale is tipped a great deal in the other direction. To build a good circuit that does it's job in an efficient manner, it is necessary to have a very deep understanding of what parts are out there and how these parts work, sometimes down to the atomic level.

This is only true if you're interested in optimizing a design or are designing integrated circuits. Most electronics designs can still be accomplished with throughhole components: resistors, caps, diodes, transistors and ICs (op-amps and the digital variety). Granted more and more and more designs are throwing in a microcontroller and I tend to disagree with it in a lot of cases (time to market is faster but it's more wasteful) but you can still have a LOT of fun and get one HELL of an education with a few good books, a decent multimeter and a drawerful of salvaged components.

A good example of this is inductors. You'll notice that most electronic supply houses don't cary a broad range of inductors. But most good ones will be able to sell you various toroids or cylinders made of magnetic materials and a spool of wire. It's then up to you to make this inductor. Making it involves having a very firm grasp of how the magnetic domains in the material will react, what kind of magnetic field is set up around the wire, etc. This is the "syntax" of electronics and as you can see it takes up a much larger portion of the problem-solving task than it does in programming.

Not many AF designs require inductors, however. You're entirely correct about them, but I don't feel the need to know much about them and the design of them is what is preventing people from running out and designing circuitry. There's a very real expense and a very real base of knowledge problem with electronics. You need to know more about electronics to get something simple done in it than you do to get a simple C program running. And your C mistakes are likely not to cost you another computer (or component in the computer). Simiarly, just about any old computer will do and chances are you have one already. With electronics you need the components and the equipment to get yourself up and running, even on the simple designs.

I agree with you that it is easier to learn programming than it is to learn electronics. The time to gratification is a lot less too. And there are hundreds if not thousands of electronics sites. None really comprehensive, I'll agree, but I feel that the main reason you don't see many of those websites lies in the Letters section of the current electronics mags. They used to be filled with intelligent, "real" questions from people who were experimenting and learning. Nowadays it disgusts me to see all of the "I want you to design a circuit which does x for me." or "How do I do y?" without any effort on the writer's part. It's gotten so bad that the column now includes a section to point out a few consultancy firms. (Another thing that disgusts me is the ratio of ads:info in those mags, it's well over 75% now.)

Personally I have a (small) few pages on electronics on my website. I also have some info on my adventures in Palm programming and other small resources, including my knowledgebase. The pages are mainly there to help me remember lessons I've learned so I don't keep asking the same questions, but others may enjoy the info as well.



[ Parent ]
Truly an art form... (none / 0) (#23)
by Dr Caleb on Mon Oct 23, 2000 at 11:47:21 PM EST

Not many AF designs require inductors, however. You're entirely correct about them, but I don't feel the need to know much about them and the design of them is what is preventing people from running out and designing circuitry.

I never used inductors much, but when I was designing switch mode power supplies, I do remember a bit.

The math still astonishes me. When designing an inductor or a torroid, everything comes into play. The composition of the core, the gauge of the wire, the length, how close the wire is wrapped, etc.

I recall after several weeks of discussion, we came up with a torroid to suit our needs that was spherical, approx 3/4 of an inch, 1/8" in width, 3/16 thick. We used 2 strands of 20 gauge copper, 1/32" apart, 5 3/4" long, wrapped 11 times clockwise from ground. (All measurements approximate - it's been a long time...).

All of these factors came into play, the most pressing what kind of core we could get from our suppliers, and it's characteristics. Suffice to say, I still have one of these power supplies, and it is still going strong. I can cross the +12 and -12 rails, and it doesn't blow a fuse, simply folds back the current to meet the new resistance factors. It replaced a design that was 10 pounds, and delivered 1A across the gnd/12v lines, 3A on the 5v lines. The new one was approx 1.5 pounds, and didn't blow fuses or generate heat.


Vive Le Canada - For Canadians who give a shit about their country.

There is no K5 cabal.
[ Parent ]

Inductors (none / 0) (#34)
by tzanger on Tue Oct 24, 2000 at 10:40:29 AM EST

I never used inductors much, but when I was designing switch mode power supplies, I do remember a bit.

Oy Vey! Yes switchmodes... flyback or forward? primary or secondary regulated? (with multiple output:) single feedback or multiple? The chances for letting the magic smoke out of the precious transistor is very high with switchmodes. :-)

Hell I remember using the venerable LM723 (I think that's the part) as a decent regulator. It allowed for Kelvin connections and regulation all over the place.

The math still astonishes me. When designing an inductor or a torroid, everything comes into play. The composition of the core, the gauge of the wire, the length, how close the wire is wrapped, etc.

Don't forget about the geometry of the core, any air gaps (and their size and shape), whether the primary and secondary are wound together or seperately... Amazing. Magnetics is deep dark chocolately juju. I love it. (too bad I'm not too good at it. :-)



[ Parent ]
Ah, the Art of Analog... (4.00 / 1) (#43)
by analog on Tue Oct 24, 2000 at 01:24:33 PM EST

Magnetics is deep dark chocolately juju. I love it. (too bad I'm not too good at it. :-)

That's okay; neither is anybody else. ;) I think one of the biggest shocks someone coming from a computer background has when trying out electronics is that what happens on paper and what happens in the real world are frequently two different things, and it's not just the newbies who get bitten by it.

A friend of mine used to work for a company that manufactured RF amplifiers. They had a small group of engineers (three or four guys, maybe) who created the initial designs, and a shop whose job was to turn their designs into an initial prototype (these guys were technicians, not engineers). He loves to tell a story of a time when the engineers had sent some schematics to the prototype shop, and the guy who was going through them to check the design out suddenly got up and stormed into the engineering offices yelling "you can't do that!". There apparently followed some heated language to the effect of "I don't care how good it looks on paper..."; as you might imagine, inductors were the culprit here. There's definitely a reason we used to say FM stood for Fabulous (*ahem*) Magic.

I still have my bench set up, but haven't touched it in probably a couple of years; you guys have made me itch to fire up the ol' soldering iron again. As you can see by my nick, like you this was my first love. Microcontrollers are fun, but there's nothing like the feeling of satisfaction you get when you figure out why a recalcitrant circuit won't work, and come up with a good solution for it. 'Course, there's nothing quite like the feeling of frustration that frequently precedes it either...

[ Parent ]

Learning electronics (4.25 / 4) (#15)
by S.Prat on Mon Oct 23, 2000 at 09:40:44 PM EST

An excellent book for learning basic (and not-so-basic)electronics is The Art of Electronics, by Horowitz & Hill. It does a very good job of providing an intuitive explanation of how different circuits work, and, where and why you would use them. The book covers just about everything: extensive analog, digital, and interfacing, as well as RF, low-power, and uPs. The only part of the book that is dated is the section on microprocessors and microcontrollers, but even there, the older tech provides a good learning tool. Their treatment of analog circuits (everything from resistors to phase locked loops) is the best I have seen anywhere. I was given a copy in high school, was able to learn a lot from it before going to college, and still find it useful for work.

[ Parent ]
Muchas Gracias (none / 0) (#42)
by Strider on Tue Oct 24, 2000 at 01:23:26 PM EST

Order Summary for order placed 10/24/00 7:58:35 AM:
The Art of Electronics, Second Edition 1 $ 67.95


Thanks.
---
"it's like having gravity suddenly replaced by cheez-whiz" - rusty
[ Parent ]
GODDAMIT RUSTY! KEEP THE SUBJECT! (4.40 / 5) (#16)
by tzanger on Mon Oct 23, 2000 at 09:45:39 PM EST

RUSTY: IF I WANT TO CHANGE THE SUBJECT TO SOMETHING MORE RELEVANT I'LL CHANGE IT MY GOD DAMN SELF!! HELL EVEN EMAIL DOESN'T DO THIS!

As an enterprising newbie to electronics, the biggest problem I have been faced with is finding a site that can give me a broad understanding of the various analog and digital parts out there.

If you're that new to electronics (not an insult), grab Getting Started in Electronics by Forrest M. Mims III. It's about $15 at any Radio Shack (hell use your :Cue:Cat if you like to find more about it. :-)

It covers basic electricity to introductory digital and analog electronics. It was my Bible growing up.

From there, grab the Engineer's Mini Notebooks (couple bucks each), grab some breadboards and start working. Actually my favourite toy was the 30-in-one electronics "lab", also available from Rat Shack. I don't know if these are available any more (Rat Shack used to be a really good place to get this stuff) but they're great. Easy to read, easy to use, easy to play with. I wished I had the 200-in-one back then. <sigh>

FINALLY, I found out about the 1458 and related 741 OpAmps. There it was, just provide a reference voltage in one input, and the apparatus in the other and viola.

They won't work worth a shit unless you're using +/- 12V supplies. a 1458 is two 741s on one die. The problem with the 741 is that it can only peg an output within a few volts of its supply. So if you're powering it from 5V, you'll get about 1-3V out of it. Use an LM339 (comparator) and tie the output high through a 10k resistor or so. They are open-collector which means that they can only pull their output low. So you tie the output to whatever level you want them to be when the comparision output is "low" and you're set. Or get any of the new rail-to-rail output op-amps and have a blast. Maxim Makes all manner of stuff.

If I could see an article on how to build *real* circuits, that would be SO wonderful.

You won't. You have to learn that because it's very much an art, not a science. Get that Mimms book I wrote about above. Read all his stuff (he's got a really good electronics book I always had out from the library, but the name escapes me). Read up on Grossblatt. Learn about Bob Pease (he's a weird one but very smart, I shared some apricot brandy with him a couple years ago). Don Lancaster knows his stuff but he's not beginner material. Neither is Pease for that matter. :-)



[ Parent ]
Learning Electronics (none / 0) (#59)
by mutagen on Wed Oct 25, 2000 at 01:53:07 AM EST

The Mimms stuff is a GREAT intro to electronics. Thats the book that made it all click for me so many years ago. Pease is wonderful reading, but not until you've mastered the basics. To understand parts, you're going to have to read. Dry boring stuff, the spec sheets, the semiconductor books. Read it to put you to sleep, read it instead of Slashdot when you're slacking at work. Look at other electronics around you and try and find out what the chips do. Cheap or old consumer stuff has lots of common parts in it, even lots of surface mount stuff corresponds to standard parts. And build some fun stuff!
Nada
[ Parent ]
Buy a book (3.00 / 1) (#37)
by sugarman on Tue Oct 24, 2000 at 11:56:52 AM EST

Sorry, Sig11, but this is still one of those areas where you'ld be better off in getting a hardcopy. While e-books might work for coding references, electronics is still closely related to the workshop (in my experience), and it's often nice to have the hardcopy, especially when the PC is in the other room.

Best bet? Go to the bookstore in one of your local Tech colleges and see if you can find the booklist for one of thier courses. Then track those down. You might not need the old Yellow TTL Bibles, but there is probably something equivalent.


--sugarman--
[ Parent ]

Older books still have the right stuff. (4.00 / 1) (#58)
by Stormbringer on Tue Oct 24, 2000 at 09:03:16 PM EST

Walter Jung's Op Amp Cookbook, along with the National Semi App Notes volumes, were very educational for me, ditto his IC Array Cookbook along with the RCA Analog book.
For RF, Solid State Design For the Radio Amateur by Wes Hayward is IMO still a hands-on classic, though you'll get a lot more out of it if you're a ham and can use the equipment you build.
Don Lancaster's cookbook series is still around and still a goldmine.
To see terse beauty equivalent to tight C code, look at internals schematics of things like the LM308, the LM358 and the LM311... oh, and the 7400 and 7474 too. Try NSC for the analog, TI for the digital; PDFs of the databook pages are available for most all the parts these days. Hit a search engine when a trail runs dry, it can be easier than trying to remember who bought what product line when (Signetics -> Philips, Fairchild -> NSC -> Fairchild; Intersil -> GE -> RCA -> Harris...?)
For most of this, the best place to learn is on a piece of solderless breadboard. The 24-gauge wire used for telephone wiring works fine. Take the trouble to design the device before you build it, and always go heavy on the power-rail decoupling, especially if there's clocked logic (such as a microcontroller) on the board.
Get a 'scope! Without it you can't see what you're doing. These days the old warhorse Tek 465 can be had for less than a good Linux box.
 
stormr

[ Parent ]
Now If That Doesn't Bring Back Memories (3.20 / 5) (#3)
by michaela on Mon Oct 23, 2000 at 06:40:00 PM EST

Are you sure it was PC Magazine? There was a guy that wrote for Byte magazine, and later his own magazine called Ciarcia's Circuit Cellar. I am probably spelling the name wrong, but his name was Steve Ciarcia.

He covered many subjects, ususally in the context of microcontroller. Many articles centered around building your own home control circuits including alarms, security cameras, motion detectors that could be used with the other components.

When X10 came along, he covered it as well. Sometimes he would show how one could build their own copy of it. Other times he would explain how it works so you could expand its capabilities.

I'm envious of those who can hack electronics the way I hack computers. My dad was an EE and, sadly, he never really taught me any of this stuff. I think that my life is poorer because of it.
--
That is all

Circuit Cellar (3.66 / 3) (#8)
by tzanger on Mon Oct 23, 2000 at 08:24:19 PM EST

Do you mean this? It's Circuit Cellar Ink, and is a very good beginner's magazine.



[ Parent ]
Thanks. (none / 0) (#20)
by michaela on Mon Oct 23, 2000 at 11:00:51 PM EST

That's exactly what I meant. I had no idea CCI was still published.

(I'm also pleasantly surprised that I spelled Ciarcia correctly. )
--
That is all
[ Parent ]

Circuit Cellar (none / 0) (#70)
by sigwinch on Sat Oct 28, 2000 at 08:23:22 PM EST

I'll second that, and add that Circuit Cellar is not just for beginners.  Although it does have articles on basic electronics ("here is how to use an amplifier" and such), it also has articles about bleeding edge technology.  They do assume some basic familiarity with circuits and Ohm's law and so forth.  For a total novice, I'd recommend the Radio Shack Engineer's Mini Notebooks first, followed by a subscription to Circuit Cellar.

CC is also well edited.  A lot of writing in hobbyist magazines is stream of consciousness hey dude this is an impressive transistor william faulker school of writing.  That's cute and nonthreatening, but it gets tiresome month after month.  CC is conversational, but professional.  They try to keep it interesting and informal, but also focused and informative.

The guy who runs Circuit Cellar, Steve Ciarcia, is an old hand.  Back in the early and middle '80s, he had a column in Byte magazine (called Circuit Cellar, coincidentally).  This was back when Byte was still "The Small Systems Journal" and Jerry Pournelle wrote "The User's Column".  I.e., before Byte became "The Magazine of Technology Integration" and became just another glossy corporate mouthpiece.  One of his original "Circuit Cellar" columns was building your own modem, from scratch!  Such an article in one of today's mass-market magazines is unthinkable.  Another of his articles used an array of, IIRC, 64 microcontrollers to compute the Mandlebrot set faster than an AT could.  ("Imagine a Beowulf cluster of 8051s!" ;-)  Ciarcia has managed to keep a lot of the flavor and fun of the old columns in Circuit Cellar magazine.

As an aside, Ciarcia also wrote a book about building a Z80-based computer from scratch.  It even had instructions for building a diode ROM, so you could make it work without needing a PROM programmer right away.  That's right, you could program the sucker with a soldering iron!  I learned how computers really work from that book.


--
I don't want the world, I just want your half.
[ Parent ]

Excellent Story (4.11 / 9) (#6)
by Fred Nerk on Mon Oct 23, 2000 at 07:50:41 PM EST

Congratulations djkimmel on writing one of best articles I've read here at kuro5hin. Very well presented, heaps of useful information, and such a refreshing change from the normal round of legal & political debates.

It's also a trip back for me.. It's been a long time since I last plugged a home-made circuit into the serial port of my VIC20. It really makes me wish I had more spare time (and cash) for playing around with this stuff again.

I think that should be my new-years-in-the-middle-of-the-year-resolution.

Inspiring.. (and another good resource) (2.50 / 6) (#9)
by pi on Mon Oct 23, 2000 at 08:52:09 PM EST

I have been itching to get my hands and head into embedded systems for quite some time, but always pushed it to the back burner for some reason or another. This article got those genital-tingling juices flowing again, and now that I am gainfully employed (and not a student working in a cafe), I am going to pick up some hardware and have at it. Thanks for the good article, djkimmel!

As an added bit of MLP, here is another potent resource for those interested in microcontrollers.

pi
-- "egad, a base tone denotes a bad age!" - tmbg
Ahh electronics... (4.64 / 17) (#10)
by tzanger on Mon Oct 23, 2000 at 08:56:26 PM EST

My first love.

I've been into electronics since as far as I can remember. Way back when it was only in the context of taking a screwdriver to anything with screws with my brother beside me, my trusty sidekick. Later on it was hooking up whatever I could. Smoking resistors, blowing up LEDs, you name it. I=V/R became a hard rule as my LED collection dwindled. However, that led to knowing that Bad Boys Rape Our Young Girls But Violet Goes Willingly. Doesn't help with the gold and silver bands but what the hey, that's only two to memorize instead of 10. :-)

Getting Started in Electronics, by Forrest M. Mims III... Now that was a book! You can probably still get it at Radio Shack for under $5 and it takes you through electricity, passives, diodes and transistors, a bit on op amps and then into digital. Published on note paper, this book was my Bible. I still have my original copy somewhere, with the covers torn off and the pages creased, burnt and torn. I own every single Engineer's Mini Notebook now, even though I don't use them anymore. They're a part of my past. A part where you could buy decent books which didn't focus on the software and didn't require a masters degree in mathematics to understand.

Interfacing with computers (my C64 and later my dad's XT) was incredible. I learned C with a friend of mine whom I had met in Grade 3 and still talk to to this day. We taught each other. Throwing motors on Lego and hooking it up to the computer. Ripping apart anything we could find in dumpsters (and finding a REALLY cool platter motor which could embed lego in drywall). Learning why you put diode across inductors and how to reboot computers if you didn't. Experimenting with a He-Ne laser I'd picked up somewhere. Futzing with his dad's 30 year old Heathkit oscilloscope. I can't begin to imagine how much time we spent in his basement just learning, and I can't imagine how our lives would be different if we had the Internet back then.

Computers have always been a secondary issue for me. I like programming, but it's the hardware which makes it real for me. I love the smell of resin-core solder (not this awful frying cockroach smelling enviro-green friendly stuff) and the "tink tink" noise the iron makes as it warms up. The smell of an overheating carbon comp resistor is like an old friend warning of imminent danger. Computers are infinitely configurable but the shoving around of bits leaves me somewhat empty.

The author mentions basic stamps. Why not go for broke and use the Real Deal? PIC assembly language is *not* hard to learn (~35 instructions) and the sheer power you have without the BASIC interpreter riding your ass is enormous. Benshaw, the company I work for, has a solid state reduced voltage soft starter I designed with a PIC processor. 8MHz (2MIPS), it phase-angle fires six SCRs and sequences relays while monitoring three phase power and a serial communications link. The software is robust enough to take about 1800 A/D measurements across 8 channels per second and consistently measure the various currents and voltages even as they change frequency and the power factor shifts. The software has about 13 bytes of program memory to spare in the PIC16C77's 8k program space and maybe 3 bytes of data memory sitting around. You don't get a feel for true programming and sacrifice until you've had to bytepack data structures and weigh various methods of optimization to get that right blend of speed and size. My brother, a software guy, would disagree. (I think his exact words were "How the HELL do you get anything done if you have to keep track of how many BITS everything takes?!")

Back to my point: The software (well firmware) is exciting. The flexibility put into it enabled me to say "yes" to a number of sales requests long after the hardware was done. But it is the hardware which I am proud of (well kinda... I'd me more proud if I didn't get vetoed on a number of issues... :-) -- It's the hardware my 4 year old son asks about and is learning to identify. It's the hardware which makes the thing real. The software brings it alive but the hardware is the body and the soul of the machine.

Personally I can't stand the way hobbiest electronics is today. Pick up a copy of Poptronics (ewwww, when you combine Radio-Electronics and Popular Electronics there has got to be a better name than that!!), Circuit Cellar Ink, the British mag we can get here but I can't remember the name of... pick up any of these and what do you find? Microcontrollers and that's just about all. Nobody bothers with a two-transistor LED flasher anymore; they throw a bloody PIC12C508 or (the hobbiest's favorite) the 16[CF]84. Nobody wants to bother with hardware, they all want to write code and do as little soldering as possible. Ironically, I've turned to the (free!) trade rags: EDN, Electronics Design, Wirless Systems Design, etc. for my fix of lean design.

The industry is partly to "blame" if you will. FPGAs and analog design blocks make designs smaller and cheaper and faster and more complex, but they remove any and all ability to learn from them. I learned about electronics from ripping things apart, changing values, tweaking and experimenting. Today's student has none of these anymore. Hell even the DMCA comes into play here: Taking apart my cell phone may now be illegal!

I fear that soon you won't be able to find the electronics hobbiest. Everyone will be a code monkey because it's one of the last technical arenas which are large enough for the armchair enthusiast to dabble in. Perhaps RF will yield a future but then again perhaps not: it's very difficult to design things that radiate when you are using breadboards and aligator clips. :-)



Wow man... (3.00 / 1) (#21)
by Dr Caleb on Mon Oct 23, 2000 at 11:29:20 PM EST

You must be my twin brother! But I'm the evil one!

I still have that friend from grade 3. His dad was an RF engineer for a local TV station.

Ever put a large oil capacitor across 120vac? Ever tried a hot dog across 3 phase dryer sockets? :-O I still have my copy of "Getting Started" and the first two engineers notebooks.

I still remember pulling apart old stereos for their magnetic core memory. That stuff was cool!

But I never did get to play with He/ne laser. Probabally for the better though ;-)


Vive Le Canada - For Canadians who give a shit about their country.

There is no K5 cabal.
[ Parent ]

Sounds like... (3.50 / 2) (#28)
by sec on Tue Oct 24, 2000 at 05:11:12 AM EST

Ever put a large oil capacitor across 120vac? Ever tried a hot dog across 3 phase dryer sockets? :-O

Sounds like you're lucky you're still alive. :P

But I never did get to play with He/ne laser. Probabally for the better though ;-)

A He/Ne laser isn't powerful enough to be very dangerous. The power supply can be, though. OTOH, if you have a CO2 or a YAG laser...

(BTW, check out Sam Goldwasser's Laser FAQ at http://www.repairfaq.org/ for more information than you ever wanted to know about lasers.



[ Parent ]

Electronics (3.00 / 1) (#32)
by tzanger on Tue Oct 24, 2000 at 10:33:58 AM EST

Ever put a large oil capacitor across 120vac? Ever tried a hot dog across 3 phase dryer sockets? :-O I still have my copy of "Getting Started" and the first two engineers notebooks.

Never did the oil capacitors, but my friend did get electrolyte in his eye after the valve blew open because he hooked up a 750000uF 35V "computer grade" (you know the LARGE blue cylinder caps with screw terminals) capacitor backwards.

As far as cooking hot dogs: Did that with a 10A 12V supply. Took forever and the silver forks I used (grandma's of course) contaminated the ends of the dog... Years later I used 44kV and had tons (watts?) of fun.



[ Parent ]
PIC asm, electronics as a hobby, etc (3.00 / 2) (#22)
by djkimmel on Mon Oct 23, 2000 at 11:38:24 PM EST

You say that PIC asm is very powerful, and I completely agree.

Personally, I like to think of choosing the Stamp over PIC (or vice versa) as a tradeoff between speed (PIC) and ease (Stamp). For example, in my post I mentioned that the Stamp has instructions to send X10 codes to a powerline interface module - in PIC asm you would have to do this yourself. This isn't necessarily a bad thing, but it is that much more code that you have to write to accomplish your goal.

I think that for most hobbyists, myself included, the Basic Stamp is a good introduction into the world of microcontrollers and those who want more power can learn PIC asm. Along the same lines, Windows or MacOS is a good introduction into the world of computers but those who want more power can choose to use Linux or something similar.

As for electronics as a hobby, you are so right. I've watched the number of shelves for descrete components at Radio Shack dwindle as fast as their selection of multimeters and books. There used to be an entire shelf devoted to books on electronics at the local Radio Shack - now there is half of a shelf, if that.

Fortunately, companies like Active Electronics are picking up the slack and catering, partly, to the hard core hobbyist. Instead of a mere shelf of books, Active Electronics has an entire wall of books! There are aisles and aisles of thousands of components, all packaged in good quantities - you can buy 20 resistors for $1 and 3 555 timer ICs for $1. As evidence of the marginalization of electronics as hobby, the local Radio Shack is about 5 minutes away in one of the largest malls in the city. Active Electronics is 15 minutes away in a light industrial area.

-- Dave
[ Parent ]
kids these days... (none / 0) (#33)
by tzanger on Tue Oct 24, 2000 at 10:35:25 AM EST

Fortunately, companies like Active Electronics are picking up the slack and catering, partly, to the hard core hobbyist. Instead of a mere shelf of books, Active Electronics has an entire wall of books! There are aisles and aisles of thousands of components, all packaged in good quantities - you can buy 20 resistors for $1 and 3 555 timer ICs for $1. As evidence of the marginalization of electronics as hobby, the local Radio Shack is about 5 minutes away in one of the largest malls in the city. Active Electronics is 15 minutes away in a light industrial area.

I didn't know that Future/Active had a storefront! They're a big mail order place around here though, as is DigiKey (although DigiKey is EXPENSIVE!).



[ Parent ]
Strange (none / 0) (#50)
by Spendocrat on Tue Oct 24, 2000 at 03:45:49 PM EST

Are you in Winnipeg, Manitoba, CA perhaps? This is the exact same setup we have here. Radio shack lives in the largest mall in the city (Polo-Park) and Active is about 10 minutes away on the side of a major traffic artery (route 90). And allow me to bemoan the fact that the Radio-shack salesman I spoke to didn't even know *what* thermal grease was, driving me to find Active in the first place. Yaay :D

Sorry for the regional-centricness here, the poster's description of the situation gave me a major case of mental imagery.

[ Parent ]

Edmonton, Alberta, CA actually (none / 0) (#51)
by djkimmel on Tue Oct 24, 2000 at 04:31:51 PM EST

I'm not really surprised that the situation is so similar. Active seems to cater, mostly, to tech companies that need the parts to build a one-time product or need to prototype something. Having them sit in the industrial area makes perfect sense in this context. Fortunately, they also cater to hobbyists, but their location kinda sucks for it.

Here in Edmonton, there is a Radio Shack at every major mall - West Edmonton Mall even has TWO Radio Shacks! Active Electronics is located on Calgary Trail North, near 63rd Ave. Its kind of a light industrial/commercial area. They seem to be doing well enough at that location, they've been there for close to 10 years I think.

-- Dave
[ Parent ]
Indeed (4.00 / 2) (#53)
by scott@b on Tue Oct 24, 2000 at 06:25:32 PM EST

The hobbiest electronics area is going downhill, partly because of the increasing integration and partly because of lack of interest, and a bit becasue of lack of resources. That sort of thing seems to happen to many hobby areas on a somewhat cyclic basis, althouhg there are long term trends.

A lot of kids go into software because it's quick thrills, you can get lots of flashing colours without a lot of hardwork (and your folks will buy you a PC while they might not want to fork out the same amount of money on a pile of electronics 'junk')

Yes, the increasing integration makes simple hardware desing less and less visable. But then how many people really want spend all that effort to get something simple to work when you can do it quicker in firmware. I remeber helping a friend build a variable spped windshield wiper control, something that is standard today and if you wanted to do it would be easy to do with a micro and some power control. The !@#$%^&*() thing we did kept drifting as the temperature changed, she got so pissed at the wipers running faster and faster as the engine heated up 8-)

Now, I built my first 'computer' out of a big pile of relays, so I'm no stranger to hardware. But the amount of effort it took to get 10 digit math and a 32 instruction program space was such that I'd take a PIC any day. These days I favour the Motorola MPC8xx embedded PowerPC line, lots of communications I/O smarts and memory management.

There's a real lake of hardware sources. Sure there's the distributors such a Digakey and Advance. However some of the older ones are dropping out (Radioshack), and there's nothing like the surplus dealers that were around in my younger days. WW2 and Korean war vintage hardware of all sorts, stuff from local industries. Tubes and caps and transformers from tiny audio to hugh three phaser multi KV ones, CRTs, weird logic modules, jet engines... (sigh)

Other hobbies have declined in the past. Almost no one does home chemistry any more, the worries about toxics and legal hassels, the govenment controls because of the environmental issues and the anto-drug effort (someone told my that sodium hydroxide - lye - is a regulated material in some states of the US). Compare the activy in this hobby today vs that 30 to 80 years ago.

Even the radio hams are changing. Having classes that don't need to know Morse Code makes sense, given that electronics has added other ways to move text messages. But there just seems to be fewer and fewer of `em, and more and more bought vs built equipment.

I do wish it were otherwise. Hands on is a good way really learn something, after a bit of book learning. Hopeful the books keep you from hurting yourself too bad, I survived all the dangerous stuff I did with no more than a few minor scars, while the hands on teaches the real world aspects - cosntants aren't, variables don't, resistors and wires are reactive, capacitors and inductors have resistance. But maybe we've gtton too afraid of harming ourselves to learn by doing something that someone has labled "potentially harmfull".

Alligator clips ... test tubes ... microscope slides ... lens and prisms and razor blade slits ... loud booms and bright flashes in the night ...

[ Parent ]

Mind reading (2.75 / 4) (#17)
by nutate on Mon Oct 23, 2000 at 09:47:51 PM EST

Great to hear from people who have actually done this stuff. At my school's Computer Music Center they use the basic stamp II for making custom midi controllers, and I am about a week away from getting one myself to play around with... hook it up to GDAM and get kicking. Sliders, etc.

Needless to say, I haven't read the body of the article, or many of the comments, but wow, nice timing, and I'm sure I'll gather lots of helpful info from the ensuing discussion.

Resources? (3.25 / 4) (#24)
by beerwolf on Tue Oct 24, 2000 at 12:56:11 AM EST

Would someone please be kind enough to post resources (both web and dead-tree) for aspiring newbies who want to dabble in electronics? I am not "search engine shy" but would appreciate getting comprehensive resources from people in the know. Thanks,
[beerwolf]
One of my favorites... (4.00 / 1) (#29)
by sec on Tue Oct 24, 2000 at 05:17:43 AM EST

http://www.iserv.net/~alexx/lib/libindex.htm

This has links to all kinds of pages, including a number of tutorials.



[ Parent ]

Very informative! (2.00 / 3) (#25)
by MoxFulder on Tue Oct 24, 2000 at 12:59:12 AM EST

Thanks for all the information! I've always been interested in hardware hacking and electronics and microcontrollers, but I've never known how to get into it. I'd definitely consider buying one of the Basic Stamps when I have more free time :-)

"If good things lasted forever, would we realize how special they are?"
--Calvin and Hobbes


Striking a fusion between hard and soft ware (3.75 / 4) (#26)
by andrewmuck on Tue Oct 24, 2000 at 04:18:17 AM EST

I have to shamelessly promote my own website since it matches so well ;)

I have some simple PIC code, how to use a cheap HD44780 LCD with Lcdproc. Even how to build your own 6 chip computer.

Naturally its all opensource. Come and have a look...
< /shamelessplug >

Mmmmmm Ladder Logic (2.25 / 4) (#30)
by Rand Race on Tue Oct 24, 2000 at 08:21:54 AM EST

Like many others, this makes me itch to whip out one of my old C-64s (I still have 3) and get to soldering. But as I think more about it, I realize that I now have the resources to go out and buy myself that Hitachi PLC (Programable Logic Controller) I've wanted ever since my electronics class built a big ass train set controlled by one.

I wonder how much one of those EC series bricks run for...


"Question with boldness even the existence of God; because if there be one, He must approve the homage of Reason rather than that of blindfolded Fear." - Thomas Jefferson

An alternative to Basic Stamps... (3.66 / 3) (#31)
by Bloodwine on Tue Oct 24, 2000 at 09:19:23 AM EST

I have been interested in getting into robotics so I have been researching various aspects of hardware and I stumbled across a microcontroller that can be programmed using C++, Java, or a Basic language that is 100% compatible with Visual Basic. It is the OOPic (Object-Oriented Programmable Integrated Circuit) and can be found at www.oopic.com

The site contains a detailed manual (with sample code).

Ooh a whole 120V and Basic!!! (1.83 / 6) (#35)
by FeersumAsura on Tue Oct 24, 2000 at 10:43:29 AM EST

Well here in the UK we use real mens voltages. 240V at 50Hz now thats what I call fun <g>. I'm not sure if I would ever recomend anyone to use PIC BASIC, it's like recomending that people use BASIC or FORTRAN. PIC BASIC is not powerful enough to anything really worthwhile and doesn't give enough code control. I'd recomend that beginners start with PICS 16484 <a href="www.microchip.com>Microchip or Atmel AVRS using Assembly. With a PIC you've only got 35 commands to learn. How difficult can that be. Compared to the horrible mess that C is it's a dream.

I'm so pre-emptive I'd nuke America to save time.
Minor correction. (3.00 / 1) (#47)
by h0tr0d on Tue Oct 24, 2000 at 02:58:03 PM EST

That would be a PIC 16F84 not a 16484.

-- It appears that my spleeing chucker isn't working again.
[ Parent ]

You're right (none / 0) (#65)
by FeersumAsura on Thu Oct 26, 2000 at 05:19:45 AM EST

That's my dodgy typppping<g>

I'm so pre-emptive I'd nuke America to save time.
[ Parent ]
Well if you want to get into a pissing match :-) (none / 0) (#55)
by tzanger on Tue Oct 24, 2000 at 07:48:52 PM EST

Well here in the UK we use real mens voltages. 240V at 50Hz now thats what I call fun

well okay then, I deal with 575VAC at meaningful (couple to a couple thousand) Amps on a daily basis. And when I'm not in the low voltage arena I'm working on medium voltage devices: 2300 - 7200VAC at up to a couple hundred Amps. I've been around but not played with the high voltage (13kV+) stuff yet.

Yeah I saw your <G> in the post, but I had to take a minute to lay the smack down on you guys on the other side of the pond. :-)



[ Parent ]
Shit... (none / 0) (#56)
by tzanger on Tue Oct 24, 2000 at 08:18:27 PM EST

Yeah I saw your <G> in the post, but I had to take a minute to lay the smack down on you guys on the other side of the pond. :-)

That was supposed to include "... when you start talking about your 230V systems and how manly they are." :-)



[ Parent ]
Well our power stations are bigger than yours (none / 0) (#64)
by FeersumAsura on Thu Oct 26, 2000 at 05:18:53 AM EST

If you want real high voltages go down to your local power station. Our main lines transmit at 415KV and the smaller ones transmit at 220(?)KV and for the really small lines we just use 11KV.
What job do you do? HV transformer work? Slightly off topic now, our electricity is more manly because we deliberately chose a frequency which is more likely to stop your heart. Or is that just stupid?

I'm so pre-emptive I'd nuke America to save time.
[ Parent ]
HV work (none / 0) (#66)
by tzanger on Thu Oct 26, 2000 at 08:58:59 AM EST

If you want real high voltages go down to your local power station. Our main lines transmit at 415KV and the smaller ones transmit at 220(?)KV and for the really small lines we just use 11KV.

*nod* I believe hour transmission lines go up around the half-MVdc or so but I really have never done anything but stare at them. :-) Our director of engineering has been to the chopper stations where they use just horrendous rows of series-strung LASCRs to convert the AC to DC and back for transmission and transformation. He says it's really eerie.

What job do you do? HV transformer work?

Nope. Industrial motion control. Solid state reduced voltage starters and AC drives.



[ Parent ]
Re: Ooh a whole 120V and Basic!!! (none / 0) (#71)
by psergiu on Mon Nov 06, 2000 at 07:15:14 AM EST

> I'm not sure if I would ever recomend anyone to use PIC BASIC

But it's OK for beginners and ppl who want to do something quick'n'fast. My first computer was an Z80 spectrum clone with basic. The incentive to learn "ASM" to do some things faster came only after i had learn all that was to learn and do all that was to do with basic.
Why doesn't anyone makes a small chip-size version of the sinclair spectrum ... come on: 16k eeprom/flash, 48k ram, 8 bit cpu - everything 'cept the tv out module would fit in a 24 pin socket ... Put a lcd to that, load programs from your walkman - and there you have - pocket spectrum - endles possibilities. I'd definitelly buy this.

-- Win a FREE 66Gb VXA Tape drive !
[ Parent ]
PC Magazine Column (3.75 / 4) (#36)
by Greyjack on Tue Oct 24, 2000 at 10:46:37 AM EST

I remember that same column, though I never got around to buying a Stamp. Still, was easy 'nuff to find on ZDnet with a quick search. And it was Bill Machrone, not Dvorak. Anyhow, here it is if you're interested in a take on the Stamp circa 1997.

--
Here is my philosophy: Everything changes (the word "everything" has just changed as the word "change" has: it now means "no change") --Ron Padgett


Tiny computers... (3.66 / 3) (#38)
by dolske on Tue Oct 24, 2000 at 11:56:54 AM EST

Funny, I've been playing around in this realm for a little bit too. The device I settled on is a <A HREF="http://www.ibutton.com/TINI/">TINI -- a $50 Java based system on a SIMM. It includes 512K of RAM, 512K of flash, an ethernet controller, and some other odds and ends. Development for it is really, really simple. Write and compile your java code, and FTP it to the TINI. It even includes a telnet server and shell that approximates a Unix environment.

Why did I do this? Well, remember those coke machines that universities were always putting online? The company I am (was) working for has a beer keg, and I thought it would be cool to do the same. Y'know, current temperature, percent remaining, etc. It's only "live" on our internal network, but you can find details, pictures, and a mirror on <A HREF="http://www.dolske.net/hacks/beer/">my website.

Stupid links... (1.00 / 1) (#40)
by dolske on Tue Oct 24, 2000 at 12:19:03 PM EST

Everything looked fine with "Preview"... Why do the links get broken? *sigh* Let's try this once more...

BeerKeg project
TINI

[ Parent ]

Previews of links is borked (1.00 / 1) (#41)
by fluffy grue on Tue Oct 24, 2000 at 12:48:36 PM EST

WHen you preview, the < and > get converted into &lt; and &gt; for some reason (but ONLY on the open tag, not on the close tag), for some reason.
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]
[ Parent ]

Don't forget the 8051! (3.00 / 5) (#39)
by JonesBoy on Tue Oct 24, 2000 at 12:14:01 PM EST

PIC chip fanatics are everywhere, but I still love the 8051 and the 8051 variants. Most silicon fabbers make a 8051 variant, but most of them are SMT and require special stuff to solder and program them. I personally love the dallas 80c520. It comes in a DIP package, is avaliable in plastic or UV erasable packaging, and a programmer is avaliable for $200. It is a little on the steep side, but they are wonderful chips with lots of parallel and serial I/O, high speeds, and memory. There is a shareware chip emulator that will run your programs availible for about $30, and compilers can be found for free. I have seen people make fuel injection computers with these chips. If anyone wants more info, just mail me.

Hardware hackers and microcontroller junkies are a dying breed. Most manufacturers are getting asian companies to design their hardware and replacing the software for increased functionality. It is almost impossible to find a job working with these things, I tried but gave up. Has anyone had similar experiences?

-JonesBoy Jones741@hotmail.com
Speeding never killed anyone. Stopping did.
Jobs in electronics (none / 0) (#44)
by tzanger on Tue Oct 24, 2000 at 02:29:50 PM EST

Aren't that hard to find... Well kinda. Everyone wants you to write code or be a VHDL guru. And what's left is often RF or very high speed logic (kind of a combination of VHDL and RF. :-)

There are tons and tons of everyday electronics jobs out there, I have yet to really see them advertised. My job (Research and Development) is more development but it's working with microprocessors/controllers and DSPs, analog stuff and nothing too too esoteric. I also get to play with Real Power (230-575VAC, couple amps to couple thousand) and even some medium voltage (2300-7200VAC). We do some high voltage as well (13kV and up) but that's more for the older guys since they have the real knowledge. :-)

If you think about it there's tons of electronics jobs: the phone on your desk. Your pager and cellphone. The PDA in your coat pocket. Your son's Furby. the countless power supplies. TVs. Microwaves. Key fobs. The list is endless.

My favourite job search is monster.ca, but you can use the .com variant for US and world-centric jobs.



[ Parent ]
Just starting to use the 8051 (none / 0) (#48)
by h0tr0d on Tue Oct 24, 2000 at 03:09:52 PM EST

Had a friend call the other day and ask for some help with his 8051 based MP3 player. Being more familiar with the PIC and Zilog mc's I was wondering if would have any advice or informative/reliable links that would be of help to get me up to speed.

Thanks!

-- It appears that my spleeing chucker isn't working again.
[ Parent ]

8051 Links (5.00 / 1) (#57)
by Stormbringer on Tue Oct 24, 2000 at 08:28:58 PM EST

http://www.8052.com
http://www.dcity.org/8051/index.htm
http://www.rehn.org/YAM51/
There IS a GPL'd C cross-compiler for the 8051, but you still have to know the chip to take full advantage of it... http://sdcc.sourceforge.net/
The hardest thing about 8051 is understanding the way the memory fields overlay:
- internal RAM region 00-1Fh IS four banks of logical registers r0-r7.
- the lower half of the addressable bits ARE the bits of internal RAM locations 20h-2Fh, the upper ones are on 8-byte boundaries.
- directly accessing locations 80h-FFh always accesses the SFRs.
- the only way to access internal RAM 80h-FFh is via logical pointers r0 and r1 and the stack pointer. In a 128-byte-RAM derivative (such as the original 8051), that region is vaporland.

Intel has a 15-meg PDF consisting of page-scans of their 8051 manual. It's worth its weight in sweat; get it from http://developer.intel.com/design/auto/mcs51/manuals/272383.htm . I carry my copy on a CDR.
Notice the way the bank-select bits in the PSW mirror the r0-addressing. This kind of functionality-to-number alignment is common throughout the chip; recognizing it will allow you to do things in macroassembly that are painful otherwise. stormr

[ Parent ]
Electronics. How quaint. (2.50 / 6) (#45)
by Mark 'Kamikaze' Hughes on Tue Oct 24, 2000 at 02:41:15 PM EST

Long ago, I used to do electronics projects, mostly controlled from my Atari 8-bit - a speech synth board, a "LOGO turtle" robot that never quite worked right, and so on.

But now there's LEGO Mindstorms. You can skip right to the good bits - programming and building your gizmos - without solder fumes. Plus, many people (like, those with jobs) just don't have the time for electronics projects any more...


-- Mark Hughes
Mindstorms are cool, but... (2.00 / 1) (#49)
by Pope Slack on Tue Oct 24, 2000 at 03:29:54 PM EST

>>You can skip right to the good bits - programming and building your gizmos

When I was really into electronics, designing and constructing were half of the good bits!

Granted, Mindstorms are cool (especially of you have more money than time),
but there's something to be said for the fun of building something from individual components,
rather than pre-built blocks, and then have it work as you designed it.

--K

[ Parent ]
Quaint? (4.00 / 2) (#52)
by tzanger on Tue Oct 24, 2000 at 05:49:27 PM EST

But now there's LEGO Mindstorms. You can skip right to the good bits - programming and building your gizmos - without solder fumes.

You missed the point of the whole article. Lego Mindstorms give you a body to write software for. What we're all reminiscient of is the solder fumes (resin core, not the enviro green friendly shit that smells like frying cockroaches), the schematic design and layout, the cooking components and most importantly, the versatility that electronics gives you. Lego Mindstorms don't hold a candle to the kinds of things most of us are talking about, and even when we're talking about hooking things to the PC (often with lego skeletons), there's something that doing it yourself, making that motor fit, using fast motors, or geared down ones, or steppers...

Quaint? Only if you're not into the hardware.



[ Parent ]
No, I got the point of the article. (none / 0) (#61)
by Mark 'Kamikaze' Hughes on Wed Oct 25, 2000 at 04:57:15 PM EST

I even used to read mags like Midnight Engineering and such (are they still in print? I saw one a while back...). I'm just not addicted to solder fumes any more, and I have a clear enough memory to remember that really, electronics projects were a pain in the arse. What I used to do them for was to make neat stuff that just wasn't available in any other form. But now that stuff is available in another form, and I can concentrate on higher-level design. Hell, that's what you're advocating yourselves, with this silly BASIC stamp, instead of using a real CPU and programming in assembly with a ROM burner like REAL MEN. When I was doing this stuff, I'd have been ashamed to know anyone who used something like that.

But out in the real world, where practicality and usefulness is more important than machismo, I don't think you quite understand what all can be done with Mindstorms... Programming one with nqc (Not Quite C, which uses the admittedly rather weak standard firmware) or pbforth (which replaces that firmware, but you have to program in friggin' Forth) lets you write very complex onboard programs in real languages (not just BASIC, as with the BASIC Stamp - who wants to program in BASIC?!?); the IR tower lets you send and receive from your computer; and you can wire up homemade motors to the controller if the standard ones, the rotation sensor, and some gearing aren't sufficient. So far, I've not hit the limits of what I can do with this stuff.


-- Mark Hughes
[ Parent ]
Mindstorms are okay for some things... (none / 0) (#63)
by tzanger on Wed Oct 25, 2000 at 07:57:34 PM EST

I'm just not addicted to solder fumes any more, and I have a clear enough memory to remember that really, electronics projects were a pain in the arse.

Hmmm... I don't find electronics design a pain in the arse and a lot of the things I do simply can't be done with Mindstorms. They're great for rapid prototyping of a variety of motion systems but often they limit you just after you've got it just working.

Hell, that's what you're advocating yourselves, with this silly BASIC stamp, instead of using a real CPU and programming in assembly with a ROM burner like REAL MEN.

You mean like what I'm advocating <a href="http://www.kuro5hin.org/?op=comments;sid=2000/10/23/181752/14;pid=0;cid=10#10">here? I'm very much into the bare bones stuff (it's what I do for a living after all) and I did point out that using PIC asm was better if you required the power and flexibility, just the same as I suggested that the mindstorms might not give you the power and flexibility you desire.

But out in the real world, where practicality and usefulness is more important than machismo,

Now there's a condescending attitude if I ever read one... I design embedded systems for a living; I know what's important. For many of the things I do, Mindstorms are an excercise in futility; either they are too slow or don't have the range and flexibility or are just plain too weak. As I said above, most robotics are a breeze with Mindstorms. Hell even some non-motion systems are cool because they do have a few pins of I/O.

Something else you don't seem to realize is that the prototyping of Mindstorms don't take into account the time and hassle involved in reengineering the software to fit the new (final) system. NQC is pretty decent but it's pretty much useless for talking to an I2C device or experimenting with a peripheral on a microcontroller.

Mindstorms are cool for robotics and motion systems; however they're not the end-all be-all of electronics design and the people who don't use them don't have a superiority complex nor too much testosterone.



[ Parent ]
Excellent Article and Thanks! (3.50 / 4) (#46)
by h0tr0d on Tue Oct 24, 2000 at 02:49:17 PM EST

Not only is this an excellent article but it has great timing as well. As an embedded systems applications software engineer I have recently been wondering why I got into this in the first place. I can remember that there were specific reasons that I chose embedded programming over pc programming but have been struggling to find that reason. At the same time I have been vehemently hating what I am currently doing. This article brought back all those good memories that led me to this in the first place. It's the hardware. Microcontroller's are such wonderful things to play with. You not only get to write the code but tweak the hardware as well. That is why I got into this. Guess it's time to look for a job at the OS/firmware level where I can get my hands onto some hardware because this applications stuff is boring me to death. Or, maybe I'll just get back to my many personal microcontroller based projects that I've had on the back burner for some time. Thanks very much, this couldn't have had better timing. I needed this reminder as to why I chose to do this for a living.

-- It appears that my spleeing chucker isn't working again.

Cool (2.50 / 2) (#54)
by end0parasite on Tue Oct 24, 2000 at 07:30:16 PM EST

This Basic Stamp sounds and looks cool, and I am considering buying one. First, though, I'd like some testimonials. Has anyone here ever actually used a Basic Stamp or do you know a friend who has used one? Just any testimonial that you have heard would be helpful. Thanks.

prototyping (3.00 / 2) (#68)
by readytostrike on Thu Oct 26, 2000 at 05:06:10 PM EST

A common problem for hobbyists is the ever shrinking packages that are appearing. SOIC is not that big of a problem, but things like TSSOP ICs are giving me a headache. The legs are really fragile and doesn't take much effort to break.

Unfortunately, DIP packages are fast dissappearing. The last time I heard, through hole for low-powered transistors/regulators are becoming obsolete.
Ready To Strike
Cybernetics - Engineering for Humanity!
An Intro to Microcontrollers | 71 comments (71 topical, 0 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!