Simple Hardware Prototyping

Eventually, while wandering down the crooked path of Single Board Computing or audio, you will probably want to make your own board or simply wire some things together.  While a seemingly simple task, you’ll soon find out some of your choices for hardware are not always so friendly.  What if you don’t know what configuration you want in the end?  What if you’re on a budget?  Well, take a chair.

First things first, never embark on this journey without a bread board.  If you have the budget, get a big one.  If you’re starting completely from scratch, take a look at this one.  If you can’t really spare much, I use one like this nearly daily for simple things.

Alright, next up.  The kits I linked above have some power supply options included, quite clever and I’m a fan.  I think I’ll build a similar thing, with a higher current rating and some thought involved (putting an amp through a single breadboard pin is… not the greatest idea, so probably 3).  Point-point wiring is part of breadboarding, so solid-core wire is a plus.  You can also grab a set of jumper wires with male and female ends.

Moving on, a lot of SBC’s from FriendlyELEC have USB headers on board, you can snag those as well on Amazon.  I use Amazon a lot, but these things can be had from all of the various large global online retailers.

A lot of these little things have either flimsy pins like the USB connectors, or wide terminals like some rotary encoders I purchased, or are not even “through-hole” devices at all.  For the standard pitch items I use Prototype PCB boards with header pins to provide some robustness against the prototype process, because no one wants to be constantly breaking things and buying new parts.  Examples of using these boards:

The rotary encoder has wide flat terminals that barely fit into the prototype board, and would not fit into the breadboard.

Notice the skinny boards are perfect for the USB connectors because the hole spacing aligns for the shroud tie-down and the board.

Shown in a breadboard, however obviously without any connecting wires.  A word of caution concerning USB I’ve given in other posts:  It is a differential signal, the D+/D- wires have to be the exact same length, or the signal gets destroyed by being out of phase.

As a last note, I almost forgot an extremely useful little gadget:  the surface mount to through-hole adapter.


And probably a soldering iron.

General Updates

General updates, I have not been active enough.

Firstly, the default 4.4 kernel for Tinker board now supports the Raspberry Pi 7″ display out of the box.

I have purchased a NanoPi Duo, a board I am interested in because I personally enjoy embedded applications, to the point where I prefer not to have the built-in connectors, it’s harder working around them than it is to add them later on.  I’ll have a review of that after bit.

Le Potato:  Armbian Next images (4.13) available, I am looking into using the mainline u-boot being worked on by Bay Libre (current Amlogic official U-boot is 2015.1)

Tinker Board Update Armbian Kernel 4.12

I’ve kept working on the Tinker Board, and with a nudge from Myy , have gotten the WiFi driver to work on Armbian under kernel 4.12.  In 4.12 the RTL8723bs driver was added to Staging, so it can be enabled without any patching to the kernel itself short of the device tree for the Tinker Board.  Now for that pesky reboot bug and Bluetooth…

As always, give me a yell over at the Armbian forums,

Armbian on the Asus Tinker Board update

It’s been an eventful few weeks, as one of the few early adopters of the tinker board and someone willing to try anything, I’ve spent quite a bit of time learning about device trees, kernel drivers, and build scripts.  Not to say I’ve gotten particularly good at them, however.

[UPDATE May 5, 2017]

Debugging on the current progress has begun to accelerate, more developers jumping in to help, and ASUS finally posting a git repo with the kernel source.  Updates:

Kernel 4.11 now boots.  No 4k, no WiFi/BT.  Seems very stable all in all otherwise, beginning of Mali support added

For Kernel 4.4, the reboot bug that was present in Armbian (hang on reboot) was fixed via a pretty hackish method of simply re-enabling the SD card power supply right before shutdown and kicking the logic supply back to low-speed 3.3V for reboot.

On both kernels, audio debugging is underway, it appears to be a pulseaudio and ALSA configuration issue more than anything.

As of today the Asus Tinker Board Armbian image using the legacy 4.4 kernel has support for 4k video output, wifi, the beginnings of bluetooth (debugging why the adapter isn’t coming up, looking into the drivers).  The device tree has been updated to what was state of the art 2 weeks ago, again, bleeding edge and most likely still not 100%

I’m nearly burnt out on it, so you’ll see me spending some time with my less maddening hobbies for the next week or so.  It didn’t help that going in I knew exactly zero about device trees, build scripts, kconfigs, or patching the linux kernel.

Give me a yell on the forums with the feedbacks, or register here and share.

ASUS Tinker Board and Armbian

I was poking around the Armbian forum to see if they’d made any progress with the Tinker Board, and learned that they didn’t have one, and they’re pretty busy anyway with the small mountain of other devices they support.  They do, however, support the MiQi, another RK3288 Raspberry Pi look-alike.  So I tried the image, with no luck.  The Tinker Board, it would seem, is a lot more inflexible when it comes to booting.  After changing U-Boot sources, getting advice from an apparent SoC engineer at, and changing a filename or two, I was able to boot Armbian on the Tinker Board with a full Ubuntu Xenial desktop.

Considering the level of polish on the ASUS images, this version is a breath of fresh air, supporting some hardware acceleration/etc.

I’m waiting to see what the good folks at Armbian have to say, any luck they’ll roll out an official image.

New Tinker Board Debian Image Today (Tinker OS 1.4)

Just downloaded and am flashing the newest Tinker Board Debian image. Hopefully, unlike the last one, this will be a bit more stable with improved hardware support.  I will update this post upon completing some tests.


Image is in the support section:

Info for anyone not getting sound, the audio codec appears to be a USB audio device.  The miniarm-codec device is the I2S output to the GPIO.

“headset-output” is the one you need to select.



Faster.  Quite a lot faster actually.  Needs a large update as soon as you power it on (either apt-get it or use synaptic package manager).

Tons of screen tearing and high CPU usage on video playback, so decoding is most likely not HW accelerated yet.  GUI and video rendering does appear to be.  Kodi properly installs, video modes don’t get all messed up, and web browing is actually pleasant instead of a test of patience.


Raspberry Pi Zero W released

The Raspberry Pi Foundation announced/released the Raspberry Pi Zero W, it’s a Pi Zero with built-in wifi and bluetooth.  It costs $10, and sports the same specification as the Pi Zero, adding in the Wireless from the Pi 3.  It’s unlikely you’ll see a writup on any details concerning this board, considering I barely got my hands on a Pi zero to build the portable player.  Also, there will undoubtedly be approximately 10,000 reviews and how-to’s in about a week.

NanoPi NEO Air Tips, Tricks, Info

My NanoPi NEO Air arrived a few days ago, I waited until I also received a wireless antenna to go with it (Not included with the board)  I was immediately excited to try out the 8 GB eMMC built onto the board, however that proved to be a challenge to research.  Using the images provided by FriendlyElec, and their instructions, a flash could be done, but I wanted to use my preferred distro at this point, Armbian.  After some forum surfing, I determined the work had been done for me.

Step 1:  Download a copy of the Armbian image and burn it to an SD card.  Stick it in the NEO Air.

Self explanatory I think.

Step 2:  Using a USB3 port (preferably), power your NEO Air.

There is a reason for this.  The good folks at FriendlyElec made the microUSB you associate with powering the device an active USB port.  The better folks over at Armbian made that default to a USB/Serial endpoint at 115.2 kbps.

***Caution***  If you’re getting a blue heartbeat, the device needs restarted, the serial port won’t be there.

Once you have a solid green, you should see a new serial port in your device list.  Talk to it, and you’ll be able to log into your NEO Air’s command line.

Step 3:  Create Users/Housekeeping

Step 4:  as su:    “/usr/lib/nand-sata-install/”

That will stuff the image onto the eMMC.  After a few questions, like what sort of filesystem to use, it will let you know when it can be shut down.  Pull out the SD, reboot.


The eMMC is *A Lot* faster than the SD card, so that is a plus.


One last note:  The analog audio is still available, although I’m not a skilled enough soldering master to attempt it.



See the 4 small round pads up next to the camera connector?  Yep, Line Out and Microphone In live there.  This was pointed out to me by the folks over at the Armbian forums, unfortunately their webpage is having some issues at the moment, so I can’t provide the link to the info.

NanoPi NEO Music Player – The Ultra Cheap

Extra lack of options on this one, I’m going to be using the onboard DAC.  The question came up from one of my friends that wants a small music player for sleeping purposes and doesn’t need the extra bulk.

This is essentially a much easier route, very little fooling around has to happen.

This entry assumes you looked through the more elaborate one to get the I2S DAC working.  If something seems poorly explained, look there to verify.

OS Installation

Same OS, Debian-based Armbian.  Easy setup and install, no issues there.  I am assuming the reader can handle SSH.  I then installed MPD and Samba

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mpd
sudo apt-get install samba

There Is No Hard Part

Seriously.  Type in “aplay -l”, the first device will be the one you want to add to /etc/mpd.conf

MPD Configuration

Configuring MPD is quite simple, assuming you know your way around a linux command line and nano.  (I assume, if you got this far, you’re good)

The MPD config file lives in /etc/mpd.conf

As before, this is a minimalist “how to get it working” writeup.  For more details about cool stuff you can do:  MPD User Manual.

sudo nano /etc/mpd.conf

Open mpd.conf for editing.  Look around, there are a lot of things that live in there.  The only 2 we’re going to look at today are music_directory and audio_output.

The music_directory entry is straightforward, put in the path to your music on the device.  In my case, I use a central file and media server, which MPD can handle without a mount point.  In the case of a windows network drive (samba), you simply type in

music_directory "smb://ServerName/path/to/music/"

The audio_output entry is the really important one, and has some tricks.

audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:0,0"        
        mixer_type      "software"      
        format          "*:32:2"

Your settings should look like this, we’re using the default output device.  

Hardware mixer didn’t work, so I went to software.  Again, you could use no mixer, but you lose the ability to control it from clients.

So, I had trouble with the “format” line.  The driver appears to have trouble scaling inputs, so  some songs were *very* quiet.  So, like before I made MPD change them all to 32-bit and threw that at the driver.  It seems to work, but be aware it may not be ideal.

Using The Thing

Well, that was simple enough.  Now you just need to hook a plug to the audio out port on your NanoPi NEO and send that to an amplifier.  See FriendlyElec diagram below, bottom left is the callout for the line out pins.

Diagram available from FriendlyArm

Something to note:  The audio header is *not* 0.1″ spaced like all the other headers.  I had to just solder wires to it.