Pillaging the Wealth of Information in a Datasheet

It’s a fair assumption that the majority of Hackaday readers will be used to working with electronic components, they are the life blood of so many of the projects featured here. In a lot of cases those projects will feature very common components, those which have become commoditized through appearing across an enormous breadth of applications. We become familiar with those components through repeated use, and we build on that familiarity when we create our own circuits using them.

All manufacturers of electronic components will publish a datasheet for those components. A document containing all the pertinent information for a designer, including numerical parameters, graphs showing their characteristics, physical and thermal parameters, and some application information where needed. Back in the day they would be published as big thick books containing for example the sheets for all the components of a particular type from a manufacturer, but now they are available very conveniently online in PDF format from manufacturer or wholesaler websites.

A 2N3904 in a TO92 through-hole package
A 2N3904 in a TO92 through-hole package

Datasheets are a mine of information on the components they describe, but sometimes they can be rather impenetrable. There is a lot of information to be presented, indeed when the device in question is a highly integrated component such as a DSP or microprocessor the datasheet can resemble a medium-sized book. We’re sure that a lot of our readers will be completely at home in the pages of a datasheet, but equally it’s a concern that a section of the Hackaday audience will not be so familiar with them and will not receive their full benefit. Thus we’re going to examine and explain a datasheet in detail, and hopefully shed some light on what it contains.

The device whose datasheet we’ve chosen to put under the microscope is a transistor. The most basic building block of active semiconductor circuits, and the particular one we’ve chosen is a ubiquitous NPN signal transistor, the 2N3904. It’s been around for a very long time, having been introduced by Motorola in the 1960s, and has become the go-to device for a myriad circuits. You can buy 2N3904s made by a variety of manufacturers all of whom publish their own data sheets, but for the purposes of this article we’ll be using the PDF 2N3904 data sheet from ON Semiconductor, the spun-off former Motorola semiconductor division. You might find it worth your while opening this document in another window  or printing it out for reference alongside the rest of this article.

Let’s take a look at all the knowledge enshrined in this datasheet, and the engineering eye you sometimes need to assign meaning to those numbers, diagrams, and formulas.

Continue reading “Pillaging the Wealth of Information in a Datasheet”

Documenting Poorly Documented LED Strips

While [Drew] was in China for the Dangerous Prototypes Hacker Camp, he picked up some very bright, very shiny, and very cheap LED strips. They’re 5 meter “5050” 12V strips with 20 LEDs per meter for about $15 a spool. A good deal, you might think until you look at the datasheet for the controller. If you want an example of how not to document something, this is it.

A normal person would balk at the documentation, whereas [Drew] decided to play around with these strips. He figured out how to control them, and his efforts will surely help hundreds in search of bright, shiny, glowy things.

You are expected to tell the difference between 'GMODE', 'OMODE' and 'CMODE' in this pinout.
You are expected to tell the difference between ‘GMODE’, ‘OMODE’ and ‘CMODE’ in this pinout.

The datasheet for the LPD6803 controller in this strip – available from Adafruit here – is hilarious. The chip takes in clocked data in the order of Green, Red, and Blue. If anyone can explain why it’s not RGB, please do so. Choice phrasing includes, “VOUT is saturation voltage of the output polar to the grand” and “it is important to which later chip built-in PLL regernate circuit can work in gear.” Apparently the word ‘color’ means ‘gray’ in whatever dialect this datasheet was translated into.

Despite this Hackaday-quality grammar, [Drew] somehow figured out how to control this LED strip. He ended up driving it with an LPC1768 Mbed microcontroller and made a demo program with a few simple animations. You can see a video of that below.

Continue reading “Documenting Poorly Documented LED Strips”

Down the Rabbit Hole of STM32 Clock Options

Once you venture beyond the tame, comfortable walls of the 8-bit microcontroller world it can feel like you’re stuck in the jungle with a lot of unknown and oft scary hazards jut waiting to pounce. But the truth is that your horizons have expanded exponentially with the acceptable trade-off of increased complexity. That’s a pretty nice problem to have; the limitation becomes how much can you learn.

Here’s a great chance to expand your knowledge of the STM32 by learning more about the system clock options available. We’ve been working with STM32 chips for a few years now and still managed to find some interesting tidbits — like the fact that the High Speed External clock source accepts not just square waves but sine and triangle waves as well, and an interesting ‘gotcha’ about avoiding accidental overclocking. [Shawon M. Shahryiar] even covers one of our favorite subjects: watchdog timers (of which there are two different varieties on this chip). Even if this is not your go-to 32-bit chip family, most chips have similar clock source features so this reading will help give you a foothold when reading other datasheets.

There is a clock diagram at the top of that post which is small enough to be unreadable. You can get a better look at the diagram on page 12 of this datasheet. Oh, and just to save you the hassle of commenting on it, the chip shown above is not an f103… but it just happened to be sitting on our desk when we started writing.

Hack Your Datasheets Using Datasheet.net


If you use datasheets (which is probably every reader of Hackaday) you need to check out this tool that seeks to add modern features to the decades-old component specification delivery system. That link takes you to the announcement of the launch of Datasheet.net.

What you see above is the biggest feature the service brings to the table, the ability to create “snippets” from datasheets by clicking and dragging the area you’d like to save (you can even get a public link to the snippet). Once you have selected a snippet there are a few tools that allow you to make annotations on it. We’ve used the rectangle tool to highlight the clock speed and divider settings in this snippet for an ATmega328 uC. The interface also offers the ability to draw arrows, freehand, or to add text to the snippet. At the bottom of this example we used the description area to notate the fuse settings (in hex) which we most often use with this chip. These snippets and annotations can then be shared with other users of the service, and there’s also a comments section below the snippet for your team to use. See examples of this in the video below.

This solves one of our biggest beefs with PDF datasheets — the ability to jump back and forth and to easily find commonly used sections. This datasheet is 567 pages long and not fun to paw through looking for the same info repeatedly. It also offers rudimentary “favorite” flagging to keep a list of your oft-used sheets — but we’d like to see more options for categorizing our collection. We also find it hard to get by without the Table of Contents functionality we’re used to in our normal document view (evince). We’ve already pestered the lead developer, [Ben Delarre], to add this feature. He’s the same guy who came up with the schematic sharing site CircuitBee. Now would be a great time to mention that this service is owned by Hackaday’s parent company SupplyFrame.

Datasheet.net has a mammoth source of datasheets available through the search, but the list of planned feature additions includes datasheet upload. Also on the list is a “Discussion” feature which sounds interesting to us. What if, through the discussion engine, searching for datasheets also turned up a list of open hardware projects that use this part? We are also drooling over the ability to embed these snippets directly in webpages. [Ben] tells us that’s already built but they didn’t have time to add it to the UI before launch. Gone will be the days of taking screenshots of PDFs for your blog writeup!

PDF delivery of datasheets revolutionized access to information about electronic components. We’re hoping that this marks the next evolution. In addition to better working features, wouldn’t it be nice if you could actually get notifications when new datasheet revisions or errata were published?

Continue reading “Hack Your Datasheets Using Datasheet.net”

Hackaday Links: Sunday, July 21st, 2013


Adafruit tears down a set of brainwave cat ears. They’re made by Necomimi and use your brain waves to adjust a pair of plush cat ears on the headgear.

If your desktop computer is sitting on the floor you may have damaged USB dongles by hitting them with your knees. [Megacier] prevents this from happening again by building a flexible dongle link.

Can anyone help [Brian Benchoff] find a datasheet for this International Rectifier 92-O350 so he can fix up his old VT100 terminal?

Here’s a quick example of how to graph data from a Raspberry Pi on the sen.se cloud service.

Have some extra fun with your oscilloscope by displaying any image. This set of conversions starts with a picture and ends with an audio file that will draw it on the scope’s screen.

You’ve probably already heard that the Sikorsky Prize for human powered helicopter has been claimed. If you didn’t see any footage of the flight now’s your chance. [Thanks Adam]

AVR Programming 03: Reading and compiling code

In the last installment of our tutorial series we built a simple circuit on a breadboard and programmed an ATmega168 to make it run. That proves that you know how to follow directions, but the eureka moments of doing everything yourself are on the way. This time around you will get down and dirty with the datasheet, learning where each line of the sample code came from, and give your recently installed compiler a test drive. We will:

  • Talk about bitwise operators and how they work when coding for microcontrollers
  • Discuss C code shorthand
  • Review the sample code from Part 2 and talk about what each line of code does
  • Learn to compile code

If this is the first you’ve heard about our AVR Programming series, head back to Part 1 and start from the beginning. Otherwise, take a deep breath and we’ll being after the break.

Series roadmap:

Continue reading “AVR Programming 03: Reading and compiling code”