[Ken Shirriff] Demystifies BeagleBone I/O

If you have ever spent a while delving into the bare metal of talking to the I/O pins on a contemporary microprocessor or microcontroller you will know that it is not always an exercise for the faint-hearted. A host of different functions can be multiplexed behind a physical pin, and once you are looking at the hardware through the cloak of an operating system your careful timing can be derailed in an instant. For these reasons most of us will take advantage of other people’s work and use the abstraction provided by a library or a virtual filesystem path.

If you have ever been curious enough to peer under the hood of your board’s I/O then you may find [Ken Shirriff]’s latest blog post in which he explores the software stack behind the pins on a BeagleBone Black to be of interest. Though its specifics are those of one device, the points it makes have relevance to many other similar boards.

He first takes a look at the simplest way to access a Beagle Bone’s I/O lines, through virtual filesystem paths. He then explains why relying so heavily on the operating system in this way causes significant timing issues, and goes on to explore the physical registers that lie behind the pins. He then discusses the multiplexing of different pin functions before explaining the role of the Linux device tree in keeping operating system in touch with hardware.

For some Hackaday readers this will all be old news, but it’s safe to say that many users of boards like the BeagleBone Black will never have taken a look beyond the safely abstracted ways to use the I/O pins. This piece should therefore provide an interesting education to the chip-hardware novice, and should probably still contain a few nuggets for more advanced users.

We’ve seen a lot of [Ken]’s work here at Hackaday over the years, mostly in the field of reverse engineering. A few picks are his explanation of the TL431 voltage reference, a complete examination of the 741 op-amp, and his reverse engineering of the 1970s Sinclair Scientific calculator.

We appreciate [Fustini]’s tip on this story.

BeagleBone Black image: BeagleBoard.org Foundation [CC BY-SA 3.0], via Wikimedia Commons.

Books You Should Read: Basic Electronics

I learned some basic electronics in high school physics class: resistors, capacitors, Kirchhoff’s law and such, and added only what was required for projects as I did them. Then around 15 years ago I decided to read some books to flesh out what I knew and add to my body of knowledge. It turned out to be hard to find good ones.

The electronics section of my bookcase has a number of what I’d consider duds, but also some gems. Here are the gems. They may not be the electronics-Rosetta-Stone for every hacker, but they are the rock on which I built my church and well worth a spot in your own reading list.

Grob’s Basic Electronics

Grob's Basic Electronics 12th Edition
Grob’s Basic Electronics 12th Edition

Grob’s Basic Electronics by Mitchel E Schultz and Bernard Grob is a textbook, one that is easy to read yet very thorough. I bought mine from a used books store. The 1st Edition was published in 1959 and it’s currently on the 12th edition, published in 2015. Clearly this one has staying power.

I refer back to it frequently, most often to the chapters on resonance, induction and capacitance when working on LC circuits, like the ones in my crystal radios. There are also things in here that I couldn’t find anywhere else, including thoroughly exhaustive online searches. One such example is the correct definitions and formulas for the various magnetic units: ampere turns, field intensity, flux density…

I’d recommend it to a high school student or any adult who’s serious about knowing electronics well. I’d also recommend it to anyone who wants to reduce frustration when designing or debugging circuits.

You can find the table of contents here but briefly it has all the necessary introductory material on Ohm’s and Kirchhoff’s laws, parallel and series circuits, and so on but to give you an idea of how deep it goes it also has chapters on network theorems and complex numbers for AC circuits. Interestingly my 1977 4th edition has a chapter on vacuum tubes that’s gone in the current version and in its place is a plethora of new ones devoted to diodes, BJTs, FETs, thyristors and op-amps.

You can also do the practice problems and self-examination, just to make sure you understood it correctly. (I sometimes do them!) But also, being a textbook, the newest edition is expensive. However, a search for older but still recent editions on Amazon turns up some affordable used copies. Most of basic electronics hasn’t changed and my ancient edition is one of my more frequent go-to books. But it’s not the only gem I’ve found. Below are a few more.

Continue reading “Books You Should Read: Basic Electronics”

Retrofitting A Vintage Intercom To Run Amazon Alexa

The Amazon Echo is a pretty cool piece of tech: it lets you ask questions, queue up music, find out the weather, and more, without having to do anything but talk. But, the device itself is a bit pricey, and looks a little boring. What if you could have all the features of the Echo, but in a cool retro case and at a cheaper price?

Well, you can, and that’s exactly what [nick.r.brewer] did, using a ’50s intercom and a Raspberry Pi. He picked the vintage intercom up at an antique store for $20, and the Raspberry Pi Zero is less than $10. So, for about $30 (and some parts most of us have lying around) he was able to build a cool looking device with all of the capabilities of the Amazon Echo.

The hardware portion of the build was pretty straightforward, with the Raspberry Pi, a sound card, WiFi dongle, USB hub, and microphone all fitting nicely inside the case of the intercom. The software side of things is a little more tricky, but with a device like this it runs well with Amazon’s Alexa SDK. Of course, if you want to add more hardware features, that’s possible too.

Continue reading “Retrofitting A Vintage Intercom To Run Amazon Alexa”

From Project To Kit: Bringing It All Together

This is the fourth article in a series examining the process of turning an electronic project into a marketable kit.We’ve looked at learning about the environment in which your kit will compete, how to turn a one-off project into a costed and repeatable unit, and how to write instructions for your kits that will make your customers come back for more. In this article we will draw all the threads together as we think about packing kits for sale before bringing them to market.

If you had made it this far in your journey from project to kit, you would now have a box of electronic components, a pile of printed instructions, and a box of plastic bags, thin card boxes, or whatever other retail packaging you have chosen for your kit. You are ready to start stuffing kits.

It’s All In The Presentation

Label all your hard-to-identify components, your customers will appreciate it.
Label all your hard-to-identify components, your customers will appreciate it.

Your priorities when stuffing a kit are to ensure that your customer receives all the components they should, they can easily identify each component, and that the whole kit is attractively presented such that it invites them to buy or build it when they first see it. This starts before you have packed any components, you must carefully prepare each component into units of the required number and label them if they are otherwise not easy to identify. Pre-cut any components supplied on tape, and write the part number or value on the tape if it is not easily readable. You may even have to package up some difficult-to-identify components in individual labeled bags if they can not have their values written on them, though this incurs an extra expense of little bags and stickers. Some manufacturers will insist on using black tape on which an indelible pen doesn’t show up!

Take care cutting tapes of components, it is sometimes easy to damage their pins. Always cut the tape from the bottom rather than the side with the peelable film, and if necessary carefully bend the tape slightly to open up the gap between components for your scissors.

If you start by deciding how many kits you want to stuff in a sitting, list all the kit components and prepare that number of each of them in the way we’ve described. Then take the required number of packages or bags, and work through each component on the list, stuffing all the bags with one component before starting again moving onto the next. In time you will have a pile of stuffed kits ready to receive their instructions and labeling.

The next step will be to fold your instruction leaflet and pack it in the kit. Take a moment to consider how it can be most attractively presented. For example with a kit packaged in a click-seal plastic bag it makes sense to fold the leaflet such that the colour photo of a completed kit is visible from the front. And when you place it in the bag make sure that the PCB is visible top-outwards in front of it. A customer looking at your kit wants to immediately see what they are likely to create with it.

LED-flasher-kit-labelYou can now seal the bag or box, the kit is packed. It only remains to give it a label that has all the pertinent information and is attractive to the customer. You will probably want to put your logo or web address on the label as well as any small print required, alongside the most important feature — the kit description. We’ve put a warning about small parts and curious children, you may also want to put any reglatory or compliance information here. For example in Europe you might have a CE mark and a WEEE logo. Once you have your design sorted you can run it up in your favourite label designing software – we used gLabels – and print as many as you like on sheets of sticky labels. We strongly suggest buying good quality branded labels, the extra money is well worth it when you consider that they will have much more reliable glue, and the extra cost per individual kit will be marginal. Pick a label size which fills a decent space and is easy to read on your packaging without being too big, we used 70mm x 37mm laser labels of which 24 can be had on a single sheet.

Your First Finished Product

if Hackaday made electronic kits, they might look a little like this.
If Hackaday made electronic kits, they might look a little like this.

It’s an exciting moment when you apply a label to your first fully packed kit and see for the first time what your customers will see: a finished product. You aren’t quite done though, because there is still the small matter of quality control. Take a kit or two from your batch at random, and count all their contents off against your list of what they should contain. This should help you ensure you are packing the kits correctly. Finally, give a completed kit to a friend who has never seen it before, and tell them to build it as a final piece of quality control. They are simulating your customer in every way, if they have no problems then neither should anyone who buys the kit.

Once you’ve built your batch of kits, you will now have the stock you will send out to your customers. Imagine yourself as a customer, if you order a kit you will expect it to arrive in pristine condition. You should therefore now take care of this stock of kits to ensure that it does not come to any harm, its packaging is as crisp and new when you send it out as when you packed it, and it has not attracted any dust while in storage. We would suggest having a separate plastic box for the stock of each kit in your range, and protecting the kits from dust with a lid, or by storing them inside a larger plastic bag.

As we’ve worked through this series of articles, we’ve tried to give you a flavour of the process of bringing an electronic kit from a personal project to the masses. We’ve looked at learning about the market for your kit, we’ve discussed turning a project into a product before writing the best instructions possible and now stuffing your first kits ready for sale. In the next article in the series we’ll talk about how you might sell your products, the different choices open to you for online shops, marketplaces, and crowdfunding.

Swedish Senior Rolls In Style With Hybrid Hoverboard Walker

You don’t have to know a word Swedish to understand that 86-year old [Lasse Thörn] is the coolaste modernaste pensionären in Gränna. All you have to do is see him rolling on his walker-assisted hoverboard and you’ve got the whole story.

Still, not knowing any Swedish and the spotty nature of Google translations makes it hard to discern the details of this build. Did [Lasse] build the folding aluminum bracket that connects the battery-powered hoverboard to his walker himself? We guess that he did, since another story says that he built a pedal boat back in the 1950s because he thought it sounded cool. He also says that he gets a lot of attention when he’s out on his contraption, and that other seniors have asked him to build one. [Lasse] says he’s too old to start a business; we don’t think he’s giving himself enough credit, but if he’s willing to leave the field of affordable personal mobility open to the rest of us, we say go for it.

We’ve seen lots of hoverboard builds lately, and lots of hate in the comments about the use of that term. Seems like the false advertising vibe grates on folks, but face it: “rolling wheelie board” is kind of awkward, and until technology catches up with the laws of physics, it’s the best we’re going to do.

Continue reading “Swedish Senior Rolls In Style With Hybrid Hoverboard Walker”

Coil Gun For Newbies: Learning Electromagnetic Propulsion

There’s something attractive about coil guns, especially big ones. It’s probably the danger; between the charge stored in banks of capacitors and the flying projectiles, big coil guns can be lethal to experiment with. But there is a lot to be learned from how coil guns work, especially if you build this 3D-printed entry-level coil gun.

For the coil gun newbie, [Great Scott] does a fantastic job of explaining the basics. Pulsing the coil at just the right time will suck a ferromagnetic projectile into the coil core and let momentum fling it out, and multiple coils used correclty improve performance.

His gun is a simple pistol design with two coils, optical sensors to tell when the projectile is centered in each coil, and an Arduino to coordinate everything. The results are not spectacular — he uses only a modest amount of current — but the gun still works. [Great Scott] points out how a capacitor bank could be used to increase the current, but for the sake of keeping it simple he leaves that as an exercise for the builder.

Many coil gun and rail gun builds have made it to our pages over the years, including his ridiculously powerful gun that uses a capacitor bank so large it needs its own car. We like this build for its simplicity, its approachability, and the excellent explanation of its function.

Continue reading “Coil Gun For Newbies: Learning Electromagnetic Propulsion”

Beer And Hacks In London And Beyond

We’ve been all over the UK this month, our most recent Hackaday gathering just two nights past. With much hardware and hacker show and tell (recounted below) I wanted to make sure nobody missed the chance to join in as we’ll be in Bletchley on Saturday and in Cambridge on Wednesday. Whether you need more convincing to walk out the door and join in the fun, or just want to the see the excellent hardware so far displayed, keep reading to share in the fun from Wednesday night.

London pubs have an unfavourable image among provincial folk, one of being strange neon-lit places populated by vast crowds of very loud people in suits drinking cheap wine at expensive prices. The truth is though that the capital’s pubs are as diverse as those anywhere else in the country, from shabby quiet backstreet boozers with their aged customers nursing pints of Fullers to achingly hipster faux-Victorian gin-palaces in which young men sporting preposterous beards they’ll regret in five years time drink microbrewery ales you won’t have heard of served in glass tankards. On a hot August evening the patrons spill out onto the pavement and provide a handy reference to the would-be drinker as to the nature of the establishment.

This warm-evening exodus served our community well night before last, for when a group of Hackaday readers and Tindie sellers converged upon a pub in Fitzrovia there was enough room to reach the bar and though it was hardly quiet we could at least discuss the things we’d brought along. My colleague [Jasmine] had organised the event and was on hand with a pile of stickers and other swag.

A select group of hackers and makers made the journey. Some of them, such as my friend [David], I had encountered frequently online but never met in person so it was good to put a face to a name, while others I knew only by the reputation they had garnered through the projects they’d put on Hackaday.io or Tindie. I will undoubtedly fail to mention a few names in this quick round-up of a few of the projects, so before I start I would like to thank everyone for coming along and making it such a good evening.

[Jasmine] as seen by [Mike]'s LED screen.
[Jasmine] as seen by [Mike]’s LED screen.

Electric Stuff from Mike’s Workshop

Most visible because of an extensive range of very bright LED projects was [Mike], of [Mike’s Electric Stuff] fame. His PCB density was impressive, though he did admit to having a pick-and-place machine. Especially useful for those large LED matrices. Of note was a pentagonal LED screen with integrated camera, originally part of an LED screen polyhedron. This board offered a rare glimpse of a Raspberry Pi Compute Module in the wild.

Scope Probe Sans Pound Sink

Opposite me for most of the evening was [Leonerd], with his oscilloscope current probe adapter. This board as you might expect contains a very low value shunt resistor and an amplifier, allowing the accurate measurement of low current transients without laying down the GDP of a small country to buy one from a high-end test equipment manufacturer. I was party to a very interesting conversation between him and [Mike] on the subject of instrumentation amplifiers, something of personal interest from my experience with RF test equipment.

The RC2014 in mid-render
The RC2014 in mid-render

A Wild Z80 Appeared

Also present was [Spencer] with his RC2014 Z80-based computer. He’d brought along the fully tricked-out version with keyboard and screen, and had it running a fractal graphic generator written in BASIC. It’s a project that touches a spot in the heart of people of a certain age, if your first computer came from Sir Clive Sinclair then maybe you’ll understand.

The value of the evening was not solely in the kits and projects on display though. Whenever you get a group from our wider community together in a convivial environment the creative discourse flows in unexpected direction, knowledge is shared, and new ideas are formed. Part of the global Hackaday and Tindie community got to know each other yesterday evening, and from that will come fresh projects. They may not necessarily change the world, but everything has to start somewhere.

This event was one of a short series following our successful bring-a-hack at EMF Camp. We were very pleased to see the projects people brought along, they comprehensively eclipsed the little radio board that was my offering. The run of UK events isn’t over, we have ones coming up at Bletchley and Cambridge, and as always keep an eye on the Hackaday.io events page for global events within our community.