Category

Tutorials

Category

One of the best ways to describe a transistor is as an “electronic switch.”  They are solid state devices that make up almost everything in our world.  This video by Veritasium, which is a bit older, covers how n and p-type transistors actually work.

This complements the Addohms videos on BJTs and MOSFETs, which are more about how to use them.

If you’ve never watched a Veritasium video, do yourself a favor and set aside a few minutes. He’s like the Alton Brown of science.

What was one of the first things you were taught, when learning to program?  “Comment Your Code!”  And of course, like all programming students, you ignored that advice.  Or, if you are like me, you made vague comments as the lines of “variable called var.”

Tonight I opened up some code I haven’t touched in two years.  Code that when I wrote it, made perfect sense to me… at the time.

The code was for my binary clock project, BinBoo.  So I need your help, check out the code below and see if you can help me remember what it does!

Warning, the title of this post is a little bit misleading. It isn’t just one-click to get cleanly formatted code, it’s actually two.

There are two things seasoned programmers will tell new programmers, that they don’t understand (at first):

  1. Always comment your code
  2. Properly indent code

The problem?  As a new programmer, you might not know how to do #2 until you get some experience.

When your project needs a transistor, there are tons of choices.  Which makes answering the question “Which transistor should I use or buy?” a daunting task.  Fear not, before wading through spec sheet after spec sheet, consider one of these four general purpose transistors.  Every electronics enginerd’s toolbox should have a few of each.

Transistors are one of the most versatile discrete components in electronics.  In digital circuits, they switch on and off while in analog circuits they are used to amplify signals.  For most projects, they are used to turn on a load that would kill the I/O pin of a microcontroller or microprocessor.   For most circuits either a BJT or MOSFET can be used, depending on the load current you need to switch.

[Edit Note]  Jan (comment below) points out that there are European Equivalents that may be more available for those located in that part of the world. For NPN Check out the BC547, for PNP the BC557.

Here are some more details on each of these.