Hackberry-Pi_Zero – A handheld Linux terminal using Raspberry Pi Zero 2W

1 year ago (github.com)

This looks like a pretty cool device!

However, I was immediately curious about how the "dual battery" feature works. The IP5306 power-management IC seems to be designed only for a single battery, and as far as I can tell from the schematic[1], the two battery connectors are just directly connected to each other in parallel (across VBAT and GND).

This seems really sketchy. If you plug in two batteries that are not at the same state-of-charge, then you're going to get a very large current flowing from the higher-voltage battery to the lower-voltage one, probably significantly exceeding the batteries' rated current limits. At best this wastes a lot of power and generates a lot of heat, and at worst it could be a fire hazard.

[1]: https://github.com/ZitaoTech/Hackberry-Pi_Zero/blob/main/Sch...

  • I was going to launch into a lecture about how battery isolation is a Thing, very simple, etc and the author couldn't possibly be dumb enough to not isolate them with diodes, but then I looked at the schematic and yiiiiiiiikes, they're both just tied together, I think. There's a charge management IC and a MOSFET as part of the USB power input...and that's it.

    I was sketched out by BSI not being connected to anything, but it seems it's a fixed resistance battery size/chemistry ID function, not a temperature sensor. That said, I don't see any over/under temperature protection except for some sort of vague temperature limit in the charge IC (which is not thermally coupled to the battery in any way, so only a general "the device is way too hot"), so hopefully that's in the battery - don't go buying any cheapo clones.

    I also don't see any fusing, which is a huge no-no. A polyfuse is a twenty cent (ish) part. Again, an official battery would have an internal BMS circuit and prevent overcurrent events, but people are probably going to go for the almost-cheapest battery on Amazon/Ebay. Not to mention counterfeit problems even if you do try to get an OEM battery.

  • I agree, this is a pretty bad idea. I've used batteries in parallel many times, but it's always in the context of treating it as a single "bank" that is always charged at the same level, not as individual batteries which can be swapped separately. Swapping a full battery in when the other one is low is going to result in a rapid rebalance of power until they get to the same level!

    You can think of it like having two big swimming pools side by side, slowly draining out into a little stream. If the two pools are at the same level and the wall between them disappeared, they're largely going to be fine and keep on going.

    Now imagine one pool is nearly empty and the other is full. As soon as you disappear that wall in the middle, there's gonna be a very powerful wave as the water from the high pool rushes in to fill the empty pool.

  • At best this wastes a lot of power and generates a lot of heat, and at worst it could be a fire hazard. - you just described my high spec HP laptop.

  • It looks like two BL-5Cs, which normally come with their own overcurrent protection (AFAIK even the no-name generic clone cells do), so what's more likely to happen is you trip the protection on one of the cells being swapped. Fortunately these are not very high capacity nor current cells, being ~1000mAh at most. They seem to be pretty robust in general, as a series of hugely popular MP3/MP4 players that used them had nothing more than a diode from USB5V for charging.

    On the other hand, I'll gripe about that "schematic" being not actually a schematic but just loose parts with labeled pins.

  • It has no solar panels , runs shorter than my cell phone on a single charge. It is thick. No ethernet socket Any small UMPC is better than this thing. I don't mercifully mention the blobs encapsulated in the raspberry pi itself.

  • I understood it as it'll use only one of the batteries, but you can swap between which is used. So initially, you have two charged batteries, while using only one. Once you run out of power in the first one, you'll switch to the second, and now the first one could be swapped to a fully charged one. Blue/green deployments, but for batteries basically.

    • It would be convenient if it worked that way, but since the batteries are connected across each other in parallel, they will both be discharged simultaneously. And as soon as you hot-swap one of the nearly-discharged batteries for a charged one, it'll be more-or-less short circuited across its discharged counterpart.

      To do what you describe, you would need additional components to "switch" one battery at a time into the power path. (This can be done with a single transistor if you're only worried about current flowing in one direction, but I believe it's trickier if you want to support both charging and discharging in the same circuit.)

      5 replies →

  • I read this part:

    > Replace your battery in 10 seconds without killing the power!

    as a suggestion that you'd have four batteries total, and you'd have two that're fully charged, and you'd replace one battery, and within seconds you'd replace the other. Or at least that's how I'd do it.

    I've recently read up about power management and battery charging, and want to make a charge controller than can connect two separate banks. I wonder how hard it'd be to change the IP5306 in the Hackberry Pi Zero to handle the two batteries separately.

    • And if you screw up which battery is which?

      "Do things exactly right, quickly, or the device bursts into flames*" is not acceptable electronics design, even for something you intend to use yourself.

      * do you really want to trust a generic battery's built-in protection IC?

      3 replies →

    • If there's a capacitor... what about adding a switch to allow you to select which battery you are using? Then you can replace whatever you are not using without issue.

    • A mid-stream capacitor is holding enough charge for 10 seconds to allow indivdual swapping out -- and also this is meant? to mean that you can swap TWO NEW batteries in without having to shutdown/sleep/power interrupt - thus the 10 seconds.... that dope

  • People often do this on their boat, but with 100Ah batteries and those rotary switches that select between "1, 2, BOTH".

    They don't realize how much current can flow if they slam it to "BOTH" when two batteries with very different voltages are connected.

  • I'm not understanding the appeal here. Why use this instead of a regular smartphone?

  • If you ran it with one battery would you not have the problem ?

    • There's no problem if you use one battery, and there should also be no problem if you use two batteries and charge/discharge them both simultaneously (because then the voltages are matched).

      The problem shows up when you try to "hot-swap" just one of the batteries and replace it with one at a different state of charge, as the README claims you can do.

      4 replies →

Oh great! Another awesome looking cyberdeck that I want to own and will find absolutely no practical use for.

I've added myself to the waitlist already.

  • See I do have a use for this kind of thing, but not exactly. I have a few desktop towers and Raspberry Pi devices that sometimes due to upgrades or random acts of Zeus absolutely fail to boot up. I want some ability to connect a keyboard and a screen to these so I can see the actual boot screen. Normally for me this involves lugging the device to my office and connecting it to my office monitor and keyboard which is highly inconvenient given that some are in the attic. Instead I want a small screen and keyboard in one device I can hook up to an HDMI or VGA or mini HDMI or just a serial port + USB for keyboard. Something lightweight I can carry anywhere.

    And no that doesn’t need its own computer but it might be nice to have one to be able to hook it up to the network and download and transfer files to the broken machine or be able to download and quickly boot off a rescue image or some such.

    These are rare enough problems that I don’t actually bother building a device like that but every time they do happen I wish I did.

    • iPad + HDMI input dongle can be an HDMI monitor. iPad + GetConsole app + Redpark [1] USB-serial cable = serial console. The missing piece is USB keyboard emulation, but serial->arduino [2] might work.

      iPad + $40 RISC-V piKVM-alike [3] is another option.

        [1] https://redpark.com/usb-c-serial-cable
        [2] https://www.sjoerdlangkemper.nl/2022/11/16/running-etherkey-on-arduino-leonardo/
        [3] https://sipeed.com/nanokvm

    • They make USB KVM devices. Run an application on your computer to send input / receive output. Then you can use whatever laptop you want. That said, I've only used them on Windows, so drivers might be an issue.

      2 replies →

    • Probably just intel chips slowly frying themselves like everyone else. Don’t bring Zeus into this.

    • I picked up a used 7 inch “dslr monitor” with hdmi input for about $99 I keep it in a cheap harbor freight pelican style case.

    • take a look at the gpd pocket 3, with kvm module. sounds exactly like what you're looking for

  • What You thing about linux handheld like Sony Clie UX 50 ? Good keyboard, nice screen and camera, long time working.

    Yes, I'm dreaming too.

My pet peeve with RasPi for these types of handheld projects is that they don't support suspend, and don't have a true poweroff state. Even in poweroff, they sit there consuming a bunch of current.

Beepy is a similar project that uses a RasPi Zero, and their approach is to cut power to the RasPi entirely with a management MCU. On my Beepy, I switched to a Radxa Zero instead and ported over any relevant kernel modules and device tree overlays, because it has an Amlogic SoC that actually supports suspend.

  • Am I right in assuming it's fairly straightforward swap hardware wise? Do you have any measurements of the difference in battery drain between the two? Is it a fairly recent kernel?

    With that Sharp memory LCD and proper suspend that's potentially a gamechanger for the beepy. Any direction you can point me in appreciated.

Back in the day, the Nokia N770/N810/N900 line fit the bill for this perfectly. Its form factor was perfect for the "Linux terminal in your pocket" use case.

Might be something to look into for design inspiration.

  • I miss them so much. Even the N9, which lacked a physical keyboard, was so nice. A planned N9 variant with a sliding keyboard was never released once the series was discontinued.

    It was so refreshing to have a mobile that acted as a regular Linux machine. You could copy files from your other computers normally just using scp.

    Or tweak the GSM radio, as you would do with any other device, just using ifconfig.

    • To this day, I am disappointed that Maemo/Meego didn't prevail in the mobile OS market, same thing with Palm/HP's iteration of webOS.

      It was truly a great experience being able to use your standard Linux tools as first-class citizens on your mobile devices.

Very similar to the Beepberry. Exciting to see someone else building into that form factor. Also love to fun to see the Nokia BL-5C battery (originally introduced in the Nokia 3650 in 2003) still alive and kicking 20years later.

https://blog.beeper.com/2023/05/16/beeper-x-sqmfi-beepberry/

It looks cool, but I've found the Steam Deck is the only portable computer that's versatile enough for me to actually use for all sorts of different stuff.

  • Anyone know if steam deck can act as a USB OTG keyboard?

    I remember this being a cool feature of those GPD Pocket computers. It would be cool to hook something up to the USB and send keystrokes from the steam deck (not necessarily from the touchscreen keyboard, but by scripts).

  • >> Steam Deck is the only portable computer that's versatile...

    Would you clarify your categorization?

    I personally consider 'portable computer' to be any computer with an internal battery (including laptops etc). I don't find the Steam Deck especially versatile in that category.

    A separate/sub-category for me would be 'pocketable computers' (like this Hackberry-Pi_Zero, the GPD Win mini etc) for which the Steam Deck would be unusually versatile—albeit the Steam Deck does NOT fit in any of my pants or jacket pockets.

Has anyone built something like this in the hiptop/sidekick format?

If not, this might be a good second option for hacking together a chat device for LLMs with notes

I had been thinking about using https://www.lilygo.cc/products/t-deck as a base - but prefer using Linux to microcontrollers

  • I miss my Hiptop(s). Nothing has come close to that experience since. I could carry on 10 AIM conversations, IRC, and be doing browsing and email while typing at ~100 WPM.

Such computers are cool, but fat and inconvenient. I don't understand why decent companies like ibm, samsung or others won't make a Linux handheld seriously. With a good processor that will be power efficient and run for a long time on a single charge.

Terminal and ssh will suffice in many cases. People a lot of time used only terminal and live.

  • 2023 Pixel tablet can run GrapheneOS and supports Android Virtualization Framework (pKVM) for real Linux VMs alongside Android.

Would love to see "real phone" version w gsm/lte module and at least a day lasting battery (optimization)

  • Isn't that what the PinePhone and Librem 5 are? They don't have an embedded physical keyboard and do have a touchscreen, so the physical features are slightly different, but otherwise they are still a mobile ARM linux computer.

    • The touchscreen is a big difference though. You need to run some kind of graphical environment to handle the touch input and then it's slow and you have a crappy keyboard. I love my pinephone, but even with sxmo I find it unresponsive and hard.to work on. The keyboard shell for the pinephone is good, but changes the form factor then.

      1 reply →

I want my Blackberry back badly, and this project is giving me hope.

The case it a bit too big, there are still battery issues, and of course a 5G card + microphone + loudspeaker need to be added.

But perhaps the day will come that I can roll that wheel to view my emails again, use that excellent small keyboard to reply without having to touch glass.

I bought the Bluetooth keyboard from this maker, ZitaoTech. The fit and finish was excellent. Highly recommended.

I'd love one of these!

I just built a portable enclosure with a charge controller, USB hub, ethernet and four 18650 batteries. While The Hackberry Pi Zero would've been a lot easier (assuming I'd've just bought one instead of making it myself), the only downside is the battery life. My application is for having a server that travels with me and is on 100% of the time, sometimes running on battery for hours at a time.

This, though, is so much smaller... It's definitely something to consider when they're shipping.

Edit: just read, "Main Processor: Only compaticable with Raspberry pi zero 2w." I wonder why it's not compatible with the original Zero. Is it just that the drivers and preinstalled OS are 64 bit? Even though the 2W is more performant per watt, it still takes more absolute power. Hmmm.

This is one of the very few Cyberdeck kinda things that looks like it could be actually useful. I love it!

  • I have a vague idea of what my ideal Cyberdeck would be, no idea if there's anything like this already:

    One of those super-wide small screens, 1920x720 or thereabouts, with the screen split into 2 terminals. Since I'm wishing, I'd also like that screen to have a 300 to 600ppi e-ink screen built in to a layer, so that when the colour screen is off, the e-ink is visible.

    A PC, x86_64 or arm64, built into the screen, with lots of ports, IO, compatible with Pi hats/shields. For extra coolness, a pluggable system like Framework so if someone wants a real RS232 port, they can get one. With USB-C power so I can use any powerbank or other compatible power supply.

    A Keychron lightweight Alice-style keyboard, folding a bonus, QMK mandatory, standard bluetooth and/or USB.

I've been wanting to build my own handheld ever since I picked up a 3d printer so the last few months I've been checking these builds out. The blackberry keyboard is my favorite part of the build, definitely going to do the same for mine. Looks great with the casing.

  • I am working on the same kind of thing. For me the ideal keybaord/screen combination was the Keyboard Featherwing from Adafruit https://www.adafruit.com/product/4818 . Unfortunately, it is a discontinued product. I managed to snag one of the last ones, but I am reluctant to use something that I cannot get any more of.

FYI, there was a board named Hackberry over 10 years ago not related to the Raspberries. It employed the Allwinner A10 CPU and had WiFi on board, which was not common back in the day. It however lacked any exposed GPIO which made it unsuitable for hardware hacking, but had good audio (much much better than the RPis available back then) and decent overall performance. I still have one somewhere and recall using it both as webradio receiver for music and with SDR dongles using rtl_tcp. Later, smaller and better boards such as the NanoPi M1 turned out more useful for remote SDR applications.

https://linux-sunxi.org/Miniand_Hackberry

Wow this is amazing it’s the best cyber deck I have ever seen or would consider using. I wonder if you could get rid of one battery and shove in a 4g LTE modem connected to a usb port.

If that thing had VGA-in on top of the keyboard and mouse out via USB, it would be a great tool to carry in a data center when you have to physically interact with a machine.

> There is a red switch on the left side to decide if the keyboard controller communicates with the HackberryPi or with other device through the USBC-Port underneath.

OK, having it be able to function as an emergency USB keyboard is pretty cool, though I think I'd prefer emulation of a USB device so I could run a sequence of commands, inject usernames and passwords for logins, etc.

This form factor is so tempting. I’ve gotten close to pulling the trigger on the minimal phone like 5 times but just don’t know if I can actually reasonably switch from my iPhone and not end up annoyed with the change (https://www.minimalcompany.com/).

But a calm, keyboard oriented device just seems great.

  • The N900 (or N810) form factor is also great, especially for CLI commands/coding.

    There was a team trying to bring it back to life (neo900)

I wish someone would make a 5" to 7" clamshell "laptop" that runs a Linux command line and lasts forever on an internal lithium (or replaceable AA) battery.

I want the retro feel of mini laptops back when GUIs were only on $20k UNIX workstations.

  • I have a MNT Pocket Reform on order just for this reason. I recently sold a Sony PGH (~2009 model) that still ran modern Debian just fine as I'm expecting to get my order soon. Edit: I also bought a broken HP 95LX so I could replace its innards with a RPi Zero 2w and a screen but I haven't made progress on that yet.

Looks super awesome. I've been slowly working towards building pretty much the same thing, but haven't had enough time to finish. I added myself to the wait list. Intend to purchase 3 if I'm able to. Getting everything into such a nice packet is very cool.

Amazing! How hard will it be to replace the screen to an eInk one similar to the beepberry/beepy? I love everything except the screen, and I assume eInk will be the perfect match considering the terminal and power consumption.

It looks neat.

It is a shame, though, to use an RPi and not exploit the GPIO pins a little more. Maybe add a slot on the side to fit some probes or something?

I guess the Pi is all digital anyway so maybe the pins are not as interesting…

  • Pins are still pretty handy though. Tangential to the OPs use case, but I use my Zero 2 as a debug probe (with openocd) for few MCUs (mostly Pi Pico), and it comes out $$$ cheaper than JLink’s official one and analogs

I wonder why the two switch system was necessary. Would an auto switch when an external keyboard is plugged in require something that would drain resources like a hardware listener?

Are there any compact 4G/5G boards which can be plugged into this for outside connectivity? Last I looked, these breakout boards were far too cumbersome.

  • I think connectivity would be a key challenge for this device. RPI zero2W only has WiFi4 == 802.11b/g/n. In a modern crowded building, 2.4GHz is often super crammed and busy, and I find wifi4 barely works. Lots of dropped packets, sometimes full seconds of latency.

It's nice, but I would use something with a bit more memory. An Orange Pi Zero 2W with 4GB maybe.

512MB nowadays is only practical if you don't use a GUI.

This is super neat! Well done. Very well done. I love the dual battery, hard power switch, good keyboard.

I know how hard it is to do these right and I’m impressed.

I wonder if selling this as a kit with parts to solder and assemble would make it easier to sell more of these.

I wonder if simply adding one of these ESP with GSM builtin would turn this into a practical linux phone.

  • Unfortunately advertised battery life isn't practical. Though maybe with software enchantments it could get there.

  • The GPIO port is accessible under the back cover so I could easily see add-on modules that could piggyback on. Design a small backpack to use the existing latch, add some tiny pogo pins and the module could be easily swapped out. A lorawan transceiver and a GPS receiver would be an excellent pair.

  • You'd need an additionnal micro and speaker, or at least some usb-c headset but yeah this give some ideas.

    Also battery life would probably sink.

I wasn't expecting to see buy now links, so I wasn't too disappointed when I did see them but found they both say out of stock - was completely ready to impulse buy the BB Q20 keyboard version (or either, really!) and hope that having registered to hear it more being sold I'll be able to get one.

I'd almost be tempted to try to put one together myself, but it's not something I'd find particularly easy and there's other stuff I'd rather spend time on. But might be tempted...

  • Stock ETA is 1 or 2 weeks, depending on model.

    • Yep thanks, I'm indeed hoping to take advantage of that!

      But I have a sneaking suspicion it won't be a big enough quantity to satisfy even the people who've seen this HN submission so may well come down to what time of day / how quickly I see the email

      2 replies →

Looks like it could be a great pocket device for pico-8 development.

  • That’s my thoughts as well. I ordered a uConsole from clockworkPI, long waitlist there. This is tempting me again. I feel this may have even better ergonomic qualitty for my personal taste and appeara more portable.

I'm quite enamoured by the uConsole [0] .. I've had it for a few weeks and find myself reaching for it more and more, having set it up with the close family/friends Discord channels .. its nice having a machine just for the task, kind of thing. It would be so nice for a few more of my friends/family to have such little things, and leave the world of third-party-based social communication well and truly behind ..

Surely, somewhere out there, someone has a small fleet of these cyberdecks, connected with tunnels, doing nicely secure communication ..

[0] - https://www.clockworkpi.com

The keyboard is the weak link.

We need a better voice to text. One that tunes into its user's voice perfectly without getting distracted. And that you can subvocalize at.

An optimized spoken language for talking to phones too. Something harsh, insectile and dystopian.