Pocket Computer Project
This project is suspended at the moment, as I discovered that I might be able to get an Aspire One D270 netbook down to 7 W power consumption, thus being able to power it by solar panel.
Hint: boot Xubuntu live with a large-ish permanent-storage virtual disk from a fast USB Flash memory, auto spin-down internal HDD (hdparm -s command in /etc/rc.local) and use HDD sparingly if at all, reduce screen brightness as much as possible, have a triple-capacity battery.
Ever since my life changed to a more spiritual path, I was more or less living as a vagabound, spending some months here and there, without a real home (sigh) – living with no more than I can carry on my back. This leaves little space, so that the necessity of carrying is constantly re-evaluated with every piece. During the past couple of years, I spent half of my time literally in a cave in the desert (no joke!). Those who may think now that such a hermit's life is necessarily a meager one, may hear and see differently: Although I spend a lot of time away from power outlets and other comforts of industrialized civilization, I still use some pieces of technology, for work and communication. Just because I'm enlightened does not mean that I suddenly don't remember how to use a computer (paraphrasing, I think, Terence McKenna, please correct me if you know the quotation). So, I was sitting there in my little cave, with my now-obsolete Nokia smartphones (good old E7 and C7 from 2010 with "Delight Belle" Symbian OS), a bluetooth keyboard and a solar charger, writing lenghty texts, recording and transcribing shamanic channeling sessions, e-mailing, and doing the occasional webserver maintenance per SSH. All is possible, although with the handy little C7 which is just a little less reduced in functionality than Android devices, such tasks can be a copious endeavour.▹ here comes a rant, click to see more
Now, I feel I want to have a more capable pocket computer, but neither I want to have those Microsoft's nor the Google's or the Apple's toys. To have my netbook solar powered, the combined weight would approach 2kg, and it would account for quite some bulkiness. A tablet running open software on open, affordable, fair-trade hardware would best suit my cause, yet no such things are currently available. Therefore, I will have some tech fun in building my own. Sure, it's not going to be a super-flat, do-it-all, foolproof pocket gadget. But those wires-in-a-box will only add to its awesomeness!
What Features I Think It Requires
- low power consumption suitable for battery operation
Target is > 5 hours run-time on battery.
power management: CPU on-demand frequency/voltage scaling, suspend modes (suspend-to-RAM, suspend-to-disk)
- processor: dual-core at least
- RAM: > 1GB
- fast storage (onboard flash or SSD on a real SATA port)
For power and financial savings I would prefer onboard EMMC, combined with a fast SD unit (>= 64GB).
- LAN port
- bluetooth (connecting keyboard/mouse/touchpad)
- 2 USB host ports (separate hosts if possible)
- 7-inch screen, >= 1024x600 pixels
- stereo analogue audio output (3.5mm headphone receptacle)
- 2-channel analogue audio inputs (microphone/line-in)
Yes, I'd really like to be able to do stereo or ambient/close-up recordings. I can make myself a good mic amplifier if necessary.
- A fully capable, menu-driven, multi-window linux desktop environment, though still memory-efficient. XFCE does it, for example, and it comes with a bit of touch support. GNOME Shell is another touch option, never tried it yet.
- Price range: all together should stay below €150.
- As compact as I can make it. Weight target is << 1kg (my Aspire One D270 netbook with 6-cell battery is about 1.4kg). This is a challenge: such a 7-inch display alone weighs 300g, an 18650 Li-ion cell about 50g, makes > 500g already. Add a makeshift casing and cabling and perhaps an SSD, and there we are at above 1kg.
- Support from the developer and from the community.
Initially, I did not think that support by a recent Linux kernel version would be a great issue. Only after looking at a lot of hardware details I discovered that many boards are being shipped with outdated kernels, and will unlikely get updates, as the manufacturers of the SOCs don't usually provide open-source software support. Instead, support for many devices is done by volunteer community efforts, so many thanks to those people.
- onboard battery charger and battery monitoring
Not strictly required as I can also have it powered by an external "power bank" type battery pack, and I will want to charge the batteries directly from various sources (solar panel etc.) anyway, using a DC converter with current limitation or a dedicated charger module. I might also stuff in an off-state USB charger, in order to have that phone charging functionality integrated.
- deactivate-able peripherals for power saving
I will likely not use a finger-friendly interface, instead I prefer more screen real-estate.
- screen resolution > 1024x600
It's cumbersome sometimes on my netbook when dialogue boxes exceed the maximum screen height. I'd have to rotate the screen in such cases just to reach the "OK" button.
- keyboard illumination
Well, I'd want to type also in the night.
- Not too much tinkering required to make things work. I do have quite some technical knowledge/comprehension and I'm still also an engineer, yet I don't see the meaning in my life in debugging stuff that should have worked in the first place.
- high-resulution video decoding
- 3-D gaming graphics
If possible, I would even turn such a feature off for power saving.
I'm to this time not using video phoning, and my smartphone does have a cufficient camera.
- digital video output (HDMI)
- GPS receiver
- cellphone function
- integrated cell modem
I can still use my USB-attached phone as a modem, that consumes less power (no, it's not "tethering" or bridging but the phone reports as a real USB modem – what, your Android can not do that? *g*)
- Making coffee. – Although, those batteries should make an integrated vaporizer possible …
For some years now, kickstarted by the famous Raspberry Pi, there developed a whole ecosystem of cheaply produced, more-or-less open source, compact single board computers (SBCs) that are good for computing projects which require more than a microcontroller could do. They all employ SOCs (system-on-a-chip) that integrate a processor with a lot of peripherals and ports found in modern PCs into a single IC package, while being extremely energy efficient. Many of the SOCs used in SBCs are otherwise put to work in embedded systems and portables. Many currently manufactured SBCs are well capable of running current Linux, including full desktop environments.
For my purpose, it became clear very quickly that using a Raspberry Pi (3) would put me to many limits (low on RAM and clock rate, missing RTC, USB-connected SATA, lack of power management, etc), although it would probably have the best community support available. Therefore, I spent some days researching viable alternatives. Following is a list of what came up. By the details given, one can already see which devices got my most interest. I list only those features which are of interest for this project. This list is by no means complete, I can not guarantee that there are no devices which would be more suitable.
Now, there is a plethora of (cheap) boards available for the task. Some of them, it seems, have been made to quickly cash in on the SBC hype. Products are shipped in beta stage, often lacking driver support for all functions, designers violating the license by keeping sources under their cape, while relying on the "community" to help get the software running (and being uncooperative in that).
"Banana Pi" products▹ Click to see more
NanoPi S2 (FriendlyARM)
Dropped from consideration due to lack of kernel support.
Odroid C0 (Hardkernel)▹ Click to see more
CubieBoard3 / CubieTruck (CubieTech)
A warehouse full of features, full open-sourced, with plenty of community support – but also at about €100 outside of my intended price range. Until I found out that I could probably get a CB3 from a second-hand source for half that money, SSD included. So this is currently my favourite.
- board dimensions: 112 x 82 x 18 mm3
The slightly larger dimensions of the board, compared to the competition, could be seen as an advantage, as it will be more easily hackable this way.
- SOC: AllWinner A20，dual-core @1GHz
- RAM: 2GB DDR3 (underclocked by factory default because of stability issues with some of the A20 SOCs – a drawback of cheap production)
- HDMI&VGA 1080P@60Hz display output
- 100M/1000M Ethernet RJ45
- WiFi+BT4.0 wireless connection with antenna on-board
There's no plug receptacle for an external antenna on the board but I doubt that WiFi will work well with the tiny on-board SMD antenna. So one could try to solder an antenna cable directly to the SMD, which is mounted on the front (upper right corner in this picture, the element with "Unictron" printed on it, a Ground pad is conveniently placed next to it). The wiring of the antenna is shown on page 6 in the schematic.
- SATA 2.0 interface with dedicated 5V power output and an optional 12V board power input, should one use a 12V powered HDD.
- storage: NAND Flash 8GB + MicroSD card slot is the most abundant vatiant
- 2x USB HOST，1x USB-OTG，1x Toslink (SPDIF Optical)，1x IR，4x LEDs，1x Headphone
- Power：DC5V @ 2.5A with HDD through barrel connector，supports Li-battery with charging while running
- Real Time Clock battery on-board
- 2x Low Resolution A/D converter inputs on extension pins
- 2x Line-in on extension pins
The board description is not correct in stating that it has Line-in and Mic-in connections. Although, the A20 does have 2x Line-in and 2x Mic-in (schematic, page 2: LINEINR, LINEINL, MICIN1, MICIN2) at 48kHz sample rate, and all of them are wired on the board (schematic, page 11), so the CB3 actually should be capable of 4(!) analogue audio inputs. Only the Line-ins are actually connected by factory default, through (through 0Ω resistors R171, R173, don't ask me what these are for), while the MIC inputs (R170, R173) are not populated. The solder pads for these resistors are there, though (back side, upper right corner in this image, next to pin headers 24 and 26, respectively. So, it's "only" a matter of software support to make these work.
- No direct LVDS output to connect a raw screen. An additional converter board has to be used with the screen, which of course adds overhead in power consumption and space requirement. On the other hand, if I have to use a bulky HDMI cable then the screen could also function as an external monitor for other machines.
- Battery charging is said to work only when the board is running. This may apply to all the SBCs, as the PMIC has to be initialised by the CPU with power-on. So, a battery charger module will be necessary anyway.
- Unfortunately, no component labels are printed on the board, so translating from the schematic to the board layout can be tedious.
Issues with the CB3
Bug: There is a design flaw in battery operated mode that can be seen when closely studying the schematic: The USB ports stay powered in off-state, even if the device is solely on battery. This means that any USB attached device may drain the battery to death by deep-discharging. In this project, this could for example be a (soldered to USB) touch panel or a (permanently connected) receiver for a wireless input device.
▹ show more detail
This could be seen as a feature, too, for it enables charging output in off-state. Also, in standby state, this enables USB connected devices to act as wake-up sources (keyboard for example). But it's still a quirk.
I'll investigate remedies.
- SATA (5V) is being powered directly by the 5V power connector. By design, no SATA power is available in battery operation. This can be changed, though, and it looks like a safety measure, because the bridge (R48, 0Ω) connecting to the 5V boost converter is not populated, while the bridge (R66, 0Ω) is. It seems to be meant to be alternatives, so as to prevent blow-out of the converter if it would suddenly be connected to main power input, thus powering all the board. Therefore, if I want to alternate SATA power between 5V input and battery, I'd try to replace R66 by a schottky diode and bridge R48 by 0Ω. I doubt, though, that the tiny converter IC (2x2 mm2 QFN) could handle the necessary current. Unfortunately, the part is unnamed, so we would have to ask the developers. In face of all the issues around battery powering, I'd likely opt for an external boost converter for 5V, anyway.