Showing posts with label Breadboard. Show all posts
Showing posts with label Breadboard. Show all posts

Wednesday, March 9, 2022

Widget Wednesday: Breadboard Power Supplies/Adapters

First things first:  What is it good for?  Supplying a even flow of DC (direct current) to your electronics project at an expected voltage.  ("A clean signal" is the term my favourite electronics repair folks like to throw around.)  Granted, this seems pretty obvious on the surface but we tend to take that "even flow" part for granted.  Fiddling with electronics -- particularly micro-controllers (MCUs) -- will likely change that.

For relatively simple electronics (e.g. LEDs), it's likely you wouldn't notice that its power supply's voltage level is dropping for a few milliseconds at a time because the human eye can't perceive that.  Micro-controllers, in contrast, live microsecond-to-microsecond.  A voltage-drop on an input circuit can be interpreted as a sensor being tripped.  A voltage drop on the MCU's "Reset" pin will reboot the code uploaded to its memory.

With batteries, these fluctuations generally aren't so much an issue as what happens when the voltage level drops too low.  Power supplied by an outlet can be another story but, barring outages, you should only have to worry about this at setup time.  (For today's purposes, we're going to rule out any solar-/wind-powered project that doesn't have a rechargeable battery in the mix.)

Let's talk about batteries, though.

Pros:

  • Project not tied to an outlet.
  • Shouldn't require additional electronics to "clean up" the signal.
  • Lithium-Ion and AA, AAA, 9V rechargeable batteries (and a charger) are easy to find & inexpensive relative to the long-term cost of non-rechargeables.
  • Calculating current consumption is a good kick in the shins for reading the datasheet.

Cons: 

  • Require a way to monitor for low battery.
  • Project downtime while swapping in freshly-charged batteries.
  • Rechargeable AA and AAA cells operate at a different voltage level than alkaline equivalents.  (Grrrrr...)
  • Not rated for temperatures below the freezing-point.

Personally, I lean on rechargeable NiMH (Nickel Metal Hydride) AA and AAA batteries for everyday electronics anyway, so the up-front cost of the batteries and the charger made sense.  One trip to Canadian Tire and done.  

AA battery-holders are a common form-factor and come in a variety of capacities:  1, 2, 3, 4, and 6.  The holders are dirt-cheap and the ends of the positive and negative leads are generally pre-stripped.  Which means that they, in a pinch, can be jammed directly into the positive and negative power-rails of the breadboard.  I absolutely do not recommend that -- mainly because you don't have to do it too many times before you mangle the ends.  For breadboard prototyping purposes, you (or your favourite electronics repair shop) can solder the raw end of each tip to one end of something called a "male header-pin," and cover the solder-point with shrink-tubing:

 



Again, this is an option only for the prototyping phase of a project.  For a project in active use?   Just don't.  I stone-cold mean it.  That's beyond too dangerous.  The "ground" wire coming loose is bad enough; the "positive" wire coming loose means that anything within its range can become its ground wire.  That includes you, bee-tee-dubs.  And both?  [shudder]  (The possibility of two loose wires at once is why I like to cut positive leads longer than the negative leads.  It's not stupid-proof, mind you, but a little extra insurance doesn't hurt.)

That's where something called a breadboard power adapter comes in.  A power adapter is separate from a power supply in that it outputs a DC current but does not generate it.  Its header-pins seat into the breadboard at least an order of magnitude more securely the ends of the battery pack's leads.  (Sometimes securely enough that seating/unseating the adapter risks bending/breaking header-pins if you're too forceful all at once.  This is particularly common with new breadboards.)  

In addition to securing the power connection to your breadboard, adapters offer amenities such as:

  • Smoothing out ripples in the current.  Maybe.
  • Providing a "standard" socket (e.g. barrel-jack, USB, JST).
  • Providing a specific voltage-level (e.g. 5V, 3.3V).
  • (Possibly) including an On/Off switch (something you'll appreciate when the project is in use).

Let's look at a few examples, with their strengths/weaknesses.

 

This model allows you to power your breadboard via either a 2.1mm barrel-jack or a USB-A male connector.   USB generally standardises on 5V.  The barrel-jack gives you more flexibility which we'll get to in a bit.  Either way, you should figure on your project consuming no more than 500mA of current at any given time.

 


On the plus side, this style is fairly inexpensive, despite basically being the Cadillac of breadboard power adapters.  For mixed-voltage projects, you have the option of powering one side at 5V and the other at 3.3V (a.k.a. 3V3) via jumper-blocks (the yellow rectangles on the left and right).  

On the downside, this form-factor is a pig for space.  On a full-size breadboard, this will probably be negligible.   Half-size breadboards, on the other hand, might require you to break out your Tetris skills.  But their biggest drawback, by far, has been their quality.  My first batch of five came with one D.O.A. and another bricked the first time I pressed the power-button and heard a fateful "snap" in place of the usual springy "click."  (Which is a clue to why I tend to buy them five at a time*.) 

And, even with higher-end power-supply, they have a tendency to just wear out over time.  In fairness, I use these 24/7 in production, rather than occasional prototyping.  

Right.  I promised to get back to the barrel-jack power-supply and voltages.  As I mentioned, USB pretty much comes with 5V baked in.  (Although of course you're going to double-check with your multi-meter, riiiiiiiiiiiight?!?!?!)  The barrel-jack is engineered to expect something more than 5V and step it down.  Now, if your project is based on 3V3, 5V should probably be okay.  But I've had brown-outs with a 5V wall-wart -- a decent-quality one, too.  Switching to 9V made that problem go away.

Oh, and before I forget -- make sure your breadboard positive and negative power-rails match the adapter's +/- labels.

 

 

This model functions much the same.  Fewer bells and whistles mean that it takes up less breadboard space.  Same 2.1mm barrel-jack, but the USB connector is a USB-C (a.k.a. "USB micro").  The tiny black slider-switch in the middle toggles between 5V and 3V3 for the entire unit.  In other words, both breadboard power-rails operate on the same voltage; you can't cherry-pick like the above model.

To be honest, I have really only used this model for mockups & prototyping, not a Boarduino workhorse.  So I can't speak to to the overall quality or longevity of this model.  As with its heftier counterpart, make sure that its +/- pins match the red and blue stripes on the power-rails of your breadboard**.



Okay, this is basically a hack.  The (Sparkfun) breakout board attached to the mini-breadboard is technically meant to interface with all five potential wires of a USB connection.  But that doesn't mean that you can't ignore the middle three pins and use the 5V VCC (positive DC voltage) and GND (negative DC voltage) for your own nefarious (and squee) purposes.

Like all hacks, this is a use-at-your-own-risk kind of deal.  Most notably, there is absolutely no reverse-polarity protection.  You mix up positive and negative?  The "magic smoke" (or worse) is all on you.  This will also not doctor the electrical input.  Whatever voltage is input will be output.  And, probably more important for project stability, there is zero current conditioning -- it will not smooth out drops in voltage or protect you from brown-outs.  Now, if you power your project from, say, the USB port on your laptop, this shouldn't be an issue.  (Or if it is, you have bigger issues.)  Anything else is up to you and your electrical engineering know-how (or lack thereof).

There are other form-factors for these power supplies.  Adafruit, for instance, offers one with adjustable output voltage; Sparkfun offers a beefier version of the mini-supply.  This is just what I have in my stash at the moment.

Mostly, I've been talking about breadboard adapters in terms of power provided by an outlet via a wall-wart.  2.1mm barrel-jacks tend to be the standard (in North America, anyway).  (You might be able to find a wall-wart with a USB-micro connection, but normally you want to save those for your Raspberry Pi)  The prevalence -- meaning re-usability -- of the 2.1mm jack, however, is why I would make the rare argument for splurging on higher-end models.  The current/voltage that comes from our outlets can be shockingly (pun intended) sloppy.  That's why any serious electronics -- including the better wall-warts -- are engineered to clean up the signal. 

 



For battery-powered options, I'd tend to opt for the longevity and and sheer capacity of a Lithium-Ion power stick over NiMH rechargeables.  All other things being equal, of course.  Your project specs -- milliamp-hours of current, size, temperature, etc. all have to be factored the trade-offs that are engineering.

I'm too lazy to double-check my notes, but I think that the next installment will start to tackle resistors.  Until next time, Tchein ton siault d'beluets!

- - - - - 

* If that looks like red nail polish on the barrel-jack, you're absolutely correct!  This adapter's USB power-supply is the only functioning input.  So the red is intended to distinguish this particular unit from others.  See what I mean about this style being notoriously flakey right out of the box? :~/

** Yes, breadboard plastic can get that yellow.  ABS plastic does that.  This workhorse saw some kilometers as the "brains" of a project in continuous service for a couple of years.  I've since learned to be more mindful about distributing current-load, trust me.

Wednesday, February 16, 2022

Widget Wednesday: Breadboard Basics

As much as I lost my heart to -- and built my first Arduino project on -- Adafruit's Trinket, the game-changer (for me) was stumbling across the chip-on-board form-factor.  That form-factor is not unique to the Arduino universe, where it's sometimes called "Boarduino."  We'll get to that in a later post.  For now, however, I want to focus on the mechanics of the breadboard itself.  Because [extremely schmoozy voice] that's where the magic happens [/extremely schmoozy voice]

First things first:  What is it good for?  "Prototyping" is the obvious answer.  But, chez fivechimera, there's also a long -- and sometimes even honourable -- history of prototypes being "good enough" for literal years of full-time use. Until they're not and the parts go back into their Cabela's tackle-boxes for next time.

This is not a novel concept: "Breadboarding" gets its name from the days of yore -- by which I mean literally a hundred years ago -- when you wired up your project by literally pounding nails into a breadboard (or any wide slab of wood), and winding copper wire around them to create a circuit.  Homebrew ("cat's whisker") radios were a Very Big Deal.  (See also: https://www.mikeselectronicparts.com/wp-content/uploads/building-a-crystal-radio.pdf)  

But, doubtless, one big selling point in those pre-Radio Shack days, was that once that project's usefulness ended, one could always pry loose the widgets, un-string the wire for later use (copper is expensive, y'all!), and pull the nails from the breadboard to restore it to its blank-canvas state.

And so reusability is the main reason I prefer the Boarduino form-factor.  Assuming that you're working w/in certain constraints, reducing project footprint is the second-best reason.  Assuming, of course, that the project can live inside certain limitations:

  1. Current limitations:  Each small hole (a.k.a. "tie point," a.k.a. "pin") on a solderless breadboard should never carry more than 500mA, or 1/2 of an Amp. of current through it.  Theoretically, they can take up to one Amp.  Just don't.  Most especially projects that will be up and running for awhile.  It's not worth the risk.
  2. Voltage limitations:  Stick to 5 volts DC.  Again, you want to stay well within the safety zone.  
  3. Pin spacing:  If the widgets you're planning to plug into your breadboard don't have pins 2.5mm (or 0.1 inch) apart, you're going to need to make other wiring arrangements.  We'll get to those options in a subsequent post.
  4. "Stupid-proofing":  Nothing in a breadboard's construction limits current polarity.  By which I mean, if you mix up positive and ground, the breadboard will not step in to save you.  At best, your project just won't work.  A short can melt the breadboard plastic.  (Ask me how I know.)  You also risk frying any widget connected to the faulty wiring -- up to and including the microcontroller.
  5. Layout limitations:  Do you have enough room on the breadboard for the microcontroller chip (a.k.a. MCU) and all your widgets?  If not, how are you going to work around that when your project is up and running in the real world?

Which brings me to breadboard sizes and their features (or lack thereof).  There might be a few exotic outliers, but here's the range I've stumbled over through the last few years:


I would say that they come in all shapes and sizes, except that the shape is limited to rectangular.

Half-size (top left):  In my experience, this is usually the optimal size for a Boarduino projects. The holes ("pins") come in two flavours.  



  • The two rows that run (horizontally) along the long edges of each side are often referred to as "power rails."  Traditionally, red is connected to the positive end of the power source and runs, uninterrupted from one end to the other.  Ground is wired into blue.  By default, the power rails on each side are independent of each other.
  •  If we consider the power rails to be "rows," then the other flavour of pins can be considered "columns."  These run perpendicular to the rails.  The five pins of each column -- highlighted in neon green -- are connected to each other.  They are not, however, connected to the column on the other side of the trench that runs between them.  

Full size (right):  Similar to the half-size with more "tie points" and often more flexibility.  Depending on the manufacturer, you might need to bridge the two halves of the power-rails.  Or not, depending on your project layout.

Mini (middle left):  In this case, there are no power-rails "rows"; only "columns" of five interconnected pins.  You will have to use one column for a positive rail and one for the negative.  Which brings one big no-no:  Never, EVER wire positive and negative into the same column.  Even for the simplest project.

Micro (bottom left, shown top and bottom):  For grins, I'm throwing this one in.  And, no, I have no idea what's going on with those "Lego-bumps" on the underside except to guess that they allow the breadboard to be glued/screwed into place from the underside of some project???  Again, I have no idea.

Now.  All of the above assumes that you have some basic understanding of how circuits work.  If you're still new to the concepts and/or hesitant to play with live electricity, you can "practice" your wiring skills virtually. 

Most electronics prototyping/visualisation software is geared for PCBs -- printed circuit boards.  That's both an intermediate/advanced move as well as one more or less alien to this feature's "Boarduino" focus.  If you're serious about electronics design, you will need to learn how to "think" in PCB.  For now, don't worry about it.  In practice, that leaves two non-trivial options:

TinkerCad is "free" in the sense that you can give AutoDesk your email address -- be sure to use the "spam" one -- and play around in the "Electronics" section to see what I mean.  

  • Pros:  It's "free" in the sense that you're giving a large company your email address and the user interface is quite intuitive.  Also, it's online, so no PC-vs.-Mac-vs.-Linux issues to worry about
  • Cons:  AutoDesk offers shockingly small range of "widgets" to plug into the breadboard.   

Fritzing is payware.  (Normally, I'm more than happy to trade money-for-value...until that money is processed by [spits] Paypal.)

  • Pros:  A much, much broader variety of widgets.  Some vendors (wisely) contribute to the Fritzing project; others don't.  But you can normally find something "close enough."
  • Cons:  A slightly steeper -- if unsurprising -- learning-curve because there are more features.  (Pro tip:  Save yourself a bunch of grief and learn how to "lock" main widgets like the breadboard in place.  Otherwise, it's far, far too reminiscent of the mayhem of resizing and image in Microsoft Word.)

Of the two, I personally prefer the features-vs.-complexity balance of Fritzing.  If you're not sure that you're going to stick with this hobby (or don't have access to a payment method that [spits] Paypal will accept), TinkerCad should be more than enough to get a feel for breadboard circuitry.

That' about all I have for this installment.  An excellent deep-dive into the construction of breadboards can be found here: https://protosupplies.com/guide-to-solderless-breadboards.

Next time, I'm planning on going through the often-overlooked mechanics of creating circuits, with, of course, a particular emphasis on breadboards.

Until then, Tchein ton siault d'beluets!

- - - - -

Credit where it's due:  Dennis Freeberg, for the square-on photo of the half-size breadboard.