Now Reading
Constructing a handheld PC

Constructing a handheld PC

2023-05-21 04:25:34

I’d prefer to share with you my newest venture: Decktility!

For a number of years, I’ve been searching for a venture the place I might dump a bunch of creativity in,
A venture of my very own, that will be difficult and rewarding. Preferrably a venture that mixes
electronics and software program.
Handheld PCs at all times had a particular place in my coronary heart. Palm III was my first one, and a bit later I received my palms on a Sharp HC-4500.
I used to be intrigued by the tasks and early this yr I thought-about shopping for
a uConsole. The uConsole was presupposed to be shipped in
March, however presently it’s nonetheless pending. So with a bunch of concepts and motivation, I began my very own handheld PC venture: Decktility.

I wished to problem myself and push the boundaries of homebrew options.
The Micro 2’s design was too crude for my style. It was clearly restricted by the {hardware} availability
on the time of growth. The documentation gave me a superb understanding of what I used to be about to embark on.
I got down to make machine that seemed extra refined. I wished the top outcome to be sufficiently gentle, and the battery life needed to
be not less than a few hours.

At this level, I used to be already contemplating the BigTreeTech Pad 5 as a basis, as this was the thinnest
touchscreen and Pi mixture that I might discover. It appeared logical that I wasn’t going to make a foldable machine.
Making a foldable machine would pose a number of issues:

  • The Pad 5 would introduce about 15 mm thickness on one aspect, whereas the aspect with the keyboard can be
    not less than about 20 mm thick contemplating an 18 mm 18650 battery cell and a case. 35 mm wouldn’t be
    acceptable. I thought-about an everyday flat lipo, however I didn’t like that they get spicy after they short-circuit.
  • Hinges are troublesome to implement properly. The display screen half can be heavy, and also you don’t need it to open/shut whereas typing.

So the choice was made: it was going to be a package deal dimension just like Mini 2 and uConsole.

Earlier than beginning the 3D design, I purchased some fundamental elements on-line. This allowed me to measure them,
so I might get an concept of how a lot area every part would take up.
It additionally enabled me to begin build up a prototype:

prototyping bms

Similar to the wiring within the meeting information, I began by build up the facility supply:
A USB battery administration system (BMS) that may cost two 18650 lithium cells, paired with a
5 V step down converter because the Pi, keyboard and fan would require 5 V.
I used a USB-C PD tester to confirm the facility whereas charging.

As soon as that was working, I added some breadboard wires and linked the Pi:

prototyping bms with pi

I discovered that that the BMS was getting fairly scorching whereas charging. It was stepping up the 5 V from USB
to about 8.4 V that the batteries require. Rising the voltage is far much less environment friendly than lowering it,
so there’s extra warmth concerned. This implied that I would want to accomodate cooling for this state of affairs.
45 C shouldn’t be too unhealthy in open air, however it wouldn’t be nice in an enclosure, the place the Pi would generate warmth too.

prototyping bms flir heat signature

In concept, having a battery, a swap and a Pi goes to end in a working product,
however what if the battery was working low? If the facility swap would stay on, it will drain and harm the battery.
To unravel this drawback, I launched an Arduino Nano. The Arduino would find yourself doing many issues, however it began
with studying the voltage from the battery. To do that, I added two resistors with a excessive resistance worth,
as a result of they might at all times be linked to the battery and thus leak energy. By choosing 2.2M R and 3.9 MR,
they might leak solely 0.82 μA (5 / (2200000 + 3900000)). That’s about 4.1 μW, or in different phrases: it will take
203252 days to empty a 20 Wh battery. It’s not going to be problematic this fashion.

prototyping with arduino to read voltage

Now that we all know when it’s secure to activate the {hardware}, I had so as to add the power to really achieve this.
I used a particular sort of transistor – an influence MOSFET (or “energy FET”).
The inexperienced PCB behind the cable mess holds the FET circuit:

prototyping with arduino and fet

Round this time, I began designing the CAD prototypes in OnShape. Many hours have been spent measuring and drawing
numerous elements that will go into Decktility. I wanted their 3D illustration so I might do an integration
check of kinds as I used to be creating the case:

cad  prototypes

Within the early phases, I needed to clear up the dilemma of battery placement. Firstly, the battery needed to be a counter-weight
to the display screen. It’s vital that the machine feels balanced in your palms. The display screen and the battery are each fairly heavy,
so that they can’t be on one aspect of the machine.

I considered 2 choices for the battery: Both on the perimeters, as to create handles to seize the machine,
or I close to the underside heart of the case.
Having them on the perimeters would require two separate battery holders, and it will create a minimal peak of about 7.5 cm
for the underside half of the machine. I actually favored the concept of the handles, however the downsides resulted in chosing the choice setup.

After understanding the fundamental case design, it was time to print the primary one. The primary of many…

first case 3D-printed

The large FET board shortly catches the attention. The board within the image is simply to showcase how out-of-place it truly is.
I swapped it with a smaller one earlier than continueing.

Swapping the FET board was tougher than I believed. There are a lot of pre-built modules obtainable, however
most of them are constructed with N-FETs and never P-FETs. The N-FET boards are cheaper and simpler to construct,
and end in an digital swap that switches the GND wire. I’d later discover out that I would like
a P-FET, as a result of I would like a standard floor linked always for the Arduino logic and the Pi logic
to work collectively (for I2C communication).

In the long run, I couldn’t discover a sufficiently small FET board, so I began reverse-engineering the prevailing one in my very first KiCad venture:

reverse-engineering the FET board in kicad

after which rebuilding it on an experiment board:

comparing original FET with rebuilt one

I would make a customized PCB sooner or later. That approach, I can add some connectors for numerous elements, making the venture simpler
to assemble.

Earlier than the customized FET board, I used to be in a position to get a lot of the fundamental elements working earlier than including the Pi to the combo.
I’d shortly discover out that I didn’t have the proper wire thickness for the primary energy. I used to be utilizing 20 AWG, which I exploit
for drones that draw far more energy. I’d later change them with 24 AWG wires.

first time turning on the power

Once I was engaged on the Arduino firmware, I had an issue: each time I’d add a brand new firmware, the Arduino would restart.
This may make the digital swap go off, and thus restart the Pi. To beat this, I’d wire a second Arduino to I2C,
isntead of utilizing the one within the machine. At a later stage, I additionally added a JST-SH connector to have the ability to simply disconnect the
Arduino contained in the machine.

two arduinos during firmware development

Charging standing LEDs can be a pleasant contact. However including 1 or 2 LEDs to the case would require a comparatively appreciable effort.
After which it hit me: I might use fiber optics! Fishing wire (or versatile bracelet wire) can information the sunshine from the prevailing LEDs
on the BMS to the sting of the case.
All I must do is glue the wire in place. An in a single day delivery and a fast experiment later, the speculation was confirmed:

using transparent wire to guide light

After lots of iterations, the {hardware} was lastly completed:

See Also

decktility finished

At this level, a customized I2C machine implementation was allow the Pi and the Arduino to speak to eachother.
The Pi might ask the Arduino concerning the charging standing or the battery voltage, and the Arduino would report it again.
I began investigating tips on how to combine it right into a Linux desktop, so I examine dbus and upower.
At first, the intention was to put in writing a customized kernel driver, however then it hit me:
What if I alter my Arduino firmware in order that it acts like an already supported Linux machine?
I did some analysis and settled on the LTC294x “Battery Gasoline Gauges” implementation. It was one of many only a few
power-related Linux kernel drivers that have been avaible in Raspberry Pi OS.
The Arduino now acts like such a tool, so it’s absolutely supported in Linux.

I used to be stoked once I noticed the battery icon seem for the primary time:

decktility finished

On this chapter, I’ll do a fast summarization of my most notable learnings that aren’t lined above:

As talked about earlier than, airflow was vital. I needed to cool the BMS board and in addition the Pi. Some holes for airflow can be inadequate.
I ended up roughly aligning my elements within the direct airflow of the fan. This ended up additionally as a little bit of a constraint on the remainder of
the electronics design, as I wouldn’t be capable of simply transfer the BMS board anymore.

Much less fasteners(/components) is healthier: The very best fastener is the one you don’t want. If you happen to create a groove and latch mechanism to save lots of
your self some components, it may be price it! The price for me was added complexity within the design.

Designing for … 3D printers? Or CNC milling? The plan was to initially make a 3D printed case after which later try an aluminum
CNC-milled case. Designing for 3D printers could be very totally different. It will require huge modifications to make the circumstances millable.

Electronics placement is troublesome: Subsequent to the airflow concerns, you even have to contemplate the quantity of wiring wanted to
join all of the components. I additionally wished to make the construct as small as I might. Discovering the very best trade-off shouldn’t be a simple job.
Then there’s concept versus usability: Your SD card may match within the slot, however is it simple to drag it out? Are you able to grip it along with your nail?

Chamfer is life: I used chamfers on overhangs as to not require assist when 3D printing them. I additionally used chamfers on sure edges
close to case openings (e.g. ethernet and GPIO connectors), to slip objects into the case extra simply.

Guide painted-on helps: These are very useful when you have a lot of overhangs, however solely a few of them want assist. (used with SuperSlicer/PrusaSlicer)

3D printed supplies flex: If you happen to make a battery tray, the stress of the battery contained in the case may budge it outward.
This may end up in your battery tray not being placeable when batteries are in it. Extra importantly: it is best to measure the flex
and see if it’s bending outwards an excessive amount of, since you don’t desire a crucial failure with lithium cells.

Use SSH to the fullest: I elevated my dev cycle through the use of distant instructions. I might execute my native Python remotely with ssh me@cyberdeck 'python' <

Raspberry Pi 4 has greater than two I2C buses: Whenever you fry your CM4 I2C bus, you may use other GPIO pins to create extra I2C ports.

Naming your venture issues: Whereas “Decktility” might be not the very best title on the market, it’s a good title as a result of it’s simple to recollect,
and it’s a novel title so a web based search will simply flip up the proper outcomes. You should use ChatGPT that can assist you discover a good title.
(Decktility refers to ductility/utility, the place ductility is a wink in direction of the welder half in my on-line persona)

If you need extra particulars, try the Decktility GitHub repository.

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top