In short
Podcast Episode Notes: Building an Open-Source Laptop with Byran Huang
Episode Overview Podcast Title: Software Engineering Daily Episode Title: Building an Open-Source Laptop with Byran Huang Episode Description: Byran Huang, a full-stack developer, discusses his groundbreaking project, the anyon_e laptop, an open-source laptop designed to showcase that anyone can build their own laptop with the right knowledge and resources.
Key Participants
- Byran Huang: Full-stack developer and creator of the anyon_e open-source laptop.
- Gregor Vand: Co-host, security-focused technologist.
Key Concepts and Discussions
Introduction to Byran Huang
- Byran is a high school student and full-stack developer who gained attention for his innovative open-source laptop project.
- He emphasizes the project aims to demonstrate that anyone can build a laptop themselves, countering the perception that technology must be either repairable and open or integrated and closed.
The Mission of the anyon_e Laptop
- The name "anyon_e" derives from a quantum particle, symbolizing the project’s ethos that "anyone" can create their own devices.
- Byran's goal was to create a usable laptop from scratch, focusing on high performance while maintaining openness and repairability.
- He asserts that the project targets everyday usage rather than gaming or AI applications.
Disproving Common Technology Myths
- Byran challenges the notion that modern laptops, especially from companies like Apple, must be soldered and non-repairable to achieve thinness and performance.
- He argues that with sufficient effort, it's possible to create an integrated, high-performance laptop that remains open and repairable.
Design and Engineering Decisions
- Custom Build: Byran designed the laptop’s chassis and circuit board, aiming for a modern, thin profile similar to high-end laptops.
- Components: Every part, including the CPU and RAM, is replaceable, facilitating repairability and customization.
- System on Chip (SoC): Opted for the RK3588 SoC, which integrates CPU, GPU, and memory to streamline the build process.
Challenges and Debugging
- Discusses the difficulties faced during the development, especially with signal integrity related to high-frequency signals for the display.
- Implemented a custom battery management system using an ESP32 microcontroller but acknowledges missed opportunities for using existing solutions like the Chromium EC.
Community Response and Impact
- The project gained significant traction on Hacker News, becoming one of the most popular posts.
- Byran received numerous job offers and collaboration opportunities, including an internship at Neuralink.
- He highlights the importance of sharing knowledge and fostering a community around open-source hardware.
Future Plans
- Byran expresses interest in further developing the anyon_e laptop and possibly transitioning to a more manufacturable model.
- He emphasizes the importance of creating products that serve the community and help educate others.
Inspirations
- Byran draws inspiration from influential figures in technology, such as Steve Jobs and various YouTube creators who have helped him learn and grow in the tech field.
Key Takeaways
- Innovation in Education: Byran's journey underscores the potential for students to engage deeply with technology and engineering without formal training.
- Open Source Movement: The anyon_e project exemplifies the benefits of open-source hardware, promoting transparency, repairability, and user empowerment.
- Community and Connection: Engaging with the tech community can lead to unexpected opportunities and collaborations, emphasizing the importance of networking and sharing knowledge.
Conclusion Byran Huang’s experience in creating the anyon_e laptop serves as an inspiration to budding engineers and makers, highlighting the potential for innovation through determination and community engagement in the open-source realm. The episode showcases a unique perspective on modern technology's accessibility and the importance of supporting youth in engineering endeavors.
Written by AI. May contain mistakes. Listen to the episode to check what was said.
Transcript
Automatic transcript. May contain errors.0:00Byron Huang is a full-stack developer who recently made headlines in the hackerspace when he created the Ennionee, which is a highly integrated open source laptop. The effort was a massive undertaking and showcased great design, hardware, and software. In this episode, Byron joins the show with Gregor Vand to talk about his work on the Eniani laptop. Gregor Vand is a security-focused technologist, having previously been a CTO across cybersecurity, cyber insurance, and general software engineering companies. He is based in Singapore and can be found via his profile at van.hk or on LinkedIn.
0:52welcome byron thank you for having me gregor it's an honor to be here yeah so very excited to have you here basically you put out a hacker news post a few weeks ago that kind of blew up big time about the project we're going to be speaking about today. And you also put out an amazing video about it, which we'll maybe get on to. I think what struck me the most was the fact that I looked you up on LinkedIn kind of after that post, and I thought you were a teacher at high school. And it turns out you're a student at high school. Is that right? Yeah, which was just kind of blew my mind. So let's get into it.
1:29Could you describe what is NE on E? Yeah, that's a great question, Gregor. And I'd like to first describe the mission of it. It's a project that tries to show that anyone, and hence the name, any on underscore E, if you combine it all, it spells anyone, that anyone can build a laptop themselves. And it doesn't have to be something that you have to go out and buy. Of course, feel free to go out and buy one and you're going to get higher quality, higher performance, and something that you probably use on a daily basis. But I wanted to show that people, a maker, enthusiast, if you put in the effort and you put in the energy and the research, in a few months, you can create something that you can hand off to a family member or someone who's not very familiar with technology.
2:13And they'd be like, yeah, this is a laptop, something that they can use on a day-to-day basis. I'm not really targeting gaming or AI or anything like that. I'm just targeting like a nice solid laptop that people can use while not really having any quirks or anything like that. And just having this machine that everything is built from scratch. There's no secrets behind the hood. And that was the mission where I try and make everything from scratch as much as possible while achieving as high performance and resembling as close to a modern thin and light laptop as I could. Amazing. Yeah, you mentioned both in post you've put up and the video, you were trying to disprove the idea that technology is either repairable and open or integrated and closed.
2:54Like, how would you kind of describe? Because I guess, especially in software people would think well open is open right so what is the difference here when it comes to especially a laptop and i think also there's something interesting i was thinking about it this morning which was you know when i was growing up people would build i'm going to put massive air quotes here because the way that you do it is just so much more impressive but they would build their own computer right so maybe could we also look at that distinction where people are thinking oh yeah i built my own computer 20 years ago this is quite different and maybe you could sort of just set the scene for why that's quite different.
3:26Yeah, I'd love to. So, anion is this quantum particle. I'll start with that. It's sort of something that's neither fermionic or bosonic. So, I took quantum mechanics in my junior year, my junior spring term. So, our school goes by trimesters. And I was looking at these quantum particles. I was trying to think of a name for this laptop. And my mission the entire time was, what you said previously, to disprove that technology is either open or closed and integrated or sort of sprawled out and not very tightly packed together. And I'm mainly discussing the hardware aspect of it, where when you buy an Apple product, you expect everything to work out of the hood.
4:02You open it up and everything just works. You've got the Apple ecosystem. The computer is nice and solid. It feels like a polished product. But then if you go, and of course, it's not really repairable. It's everything soldered in and it's super hard to get into. There's adhesives. it's just not very easy to repair. And that's something that iFixit and Louis Rossman have been trying to fight for in the community for a very long time now. And I wanted to play my part in it because I also hate not being able to repair my own devices. And, you know, looking at them from the inside, they're nothing different than what you can make as a creator, as a maker yourself.
4:36So my mission was to be able to create something that's really integrated in the sense that it comes in at this, My laptop's 17.5 millimeters thick. If I remember correctly, it's been a while, but it's almost as thin as a MacBook Pro. And you can't really tell the difference from the outside that it is something that you made in the back of a classroom, in my case. And so when I'm looking at that, I was really targeting this idea that people say these computer manufacturers like Apple, like Dell, like Lenovo, when they start closing in on their ecosystem, they often quote the idea that we need to solder in the RAM, we need to solder in the CPU, we need to do XYZ because we need to get it smaller.
5:18We need to get it more integrated. And I really disagree with that. I think it's just a lack of trying, a lack of engineering effort, might I say. And so that was my mission the entire time, to aim at this idea where if you aim your goal at one specific point, where building a laptop that resembles and performs and feels like a modern Thinolite, you can achieve at least 80 of it of course you're not going to get to 100 of it and i never claimed to but just trying to get to some place where it feels right it feels right and nothing is a secret where you know you can open up everything is replaceable in there you can straight up replace the cpu if you want place the ram replace every single part of it and since all the circuit boards all the software's open and all the hardware's open as well you can take any part of it and build your own spin to it so everyone can have their truly unique laptop and that brings me to the second point where because i built everything from scratch including like designing the chassis in cad i made every single route on the circuit boards by hand so there's over a few thousand in total and by creating everything from as ground up as possible people can open them up in free open source software like key cad vs code obviously it's just everything's just linux and key cad pcbs as well as a less open source but still free ptc entree for the cad i couldn't do free CAD because I was just not really familiar with it and as a school project I needed to get it done as fast as I can and I just used what I was familiar with and Onshape seemed like the best choice because of my time limit.
6:45I was already familiar with it and you can distribute it really quickly through the cloud. People can just open up a link and take a look on it because PTC Onshape is a cloud-based CAD software so it's really nice to be able to distribute things even though it's not as open source. And so combining all of that it's sort of a way where I can say anyone can come in, and hence the name, make modifications or learn from it in the same way that I was learning from other open source projects like keyboards on the ZMK firmware community, other systems like, I don't know if I'm pronouncing it correctly, but Olamex, this is open source hardware community.
7:17And a bunch of these companies that release their hardware openly, I want to sort of achieve the same, but accomplish it for laptops, because that's something that isn't really well represented in the open source hardware community. so that's a great way to kind of frame it which is that why has this not really been done in the laptop space because well at the end of the day laptops have always been just like how much thinner lighter can we get this thing gaming laptops used to be always so much bigger and chunkier at least again when i was growing up and so it was this trade-off you always had to make which was like do you want a kind of slightly ugly chunky power laptop or do you want some thin thing and way back in the day i had like the asus eepc which was like this little kind of first netbook thing which i thought was awesome but couldn't do anything basically just ran linux and i mean i still remember back when i've had apple laptops for decades unfortunately at this point shows my age a little bit but i just still remember how much i loved being able to take the chassis off it and being able to replace the memory and replace the battery and replace things and as you call out that's kind of just not possible when it comes to a high performance laptop up.
8:26That's right. And building off of that, Gregor, it's this idea that I don't just pick the parts. I pick a motherboard. I pick a chip. I make everything, every single capacitor I picked as well. And every single resistor, every single trace, every calculation I did in my head to make sure that when you get that board in the end, like there's no secrets at all. Like I can explain every single minute engineering decision I made in designing the laptop all the way from, you know, the metal being milled it's aluminum 6061 cnc from jlc pcb all the way up to the display i picked which is a 4k amoled display and it looks beautiful it looks if you put it next to like a macbook pro i'm i have a macbook pro right now put it right next to it actually looks just as good if not better because it has a higher pixel density and deeper contrast it's something that by picking everything from as scratch as possible with limits i couldn't make the display from scratch obviously I can't place every single pixel in with a tweezer or something like that.
9:24But by picking things and doing it from as scratch as possible, when you get this laptop, you don't just have to pick the chip like the main CPU. You can pick every single chip like your USB-C negotiation chip. You can pick your internal USB expansion hub chip. You can pretty much do every little thing possible. You can switch out your DC-DC converters that take your battery voltage and plugs it into the actual chip. You can pretty much change everything that you want on the system and perhaps moreover when people come and sort of people like me when I was even smaller I was wondering how does a laptop work and if something like this had existed I think it would really help me get a grasp of you know how modern technology moves in a way that isn't really possible from just taking something apart because you can take open a laptop MacBook or Lenovo or Dell laptop apart but you can't really look into the exact circuits and you can't look at the exact software they're using the BIOS you You can't look at the layout of the circuit board.
10:18And by doing something like this, anyone can go on to my GitHub and download it or use the web viewer that I have. And then just look at how the circuit board was made and see all the engineering decisions. And that's something that I also really wanted to do. Sort of inspire the next generation of makers, enthusiasts, and people that follow the same path as me. I've never learned engineering formally. There's a lot of people in the YouTube comments and in the Hacker News said that, you know, I must have really, really well-off engineering parents, or I've had very educated teachers that helped me along.
10:46But my teacher has never been educated in engineering. He was just there for emotional support. And my parents do not do anything related to engineering. So, you know, I've had a lot of support, I must say, along the way. My school has been very supportive. But everything that I came to in the end was purely engineering decisions on my part through my experience having done engineering for quite a long time. Actually, not that quite a long time, But really putting my foot forward and saying, I want to pursue engineering and open source hardware. Amazing. I'd love to get into some of those decisions.
11:18So I think one that's kind of interesting is what's termed system on a chip. Yes. Could you maybe walk through which one did you choose? Why did you choose it? And maybe you step back from that as well. What is the system on a chip? What parts of the system does that even encompass? Yep. So there's two levels to my CPU in LA. And most people will call it a CPU rather than an SoC, which is a system-on-a-chip. A system-on-a-chip is essentially a chip that integrates your CPU, your GPU, and usually RAM. In the case of the modern MacBook, you do integrate RAM into the system, where your RAM is physically on the same quote-unquote die as the rest of the chip, your CPU and your GPU and everything in between.
12:02on my end, I chose the RK3588 SoC, where it has the CPU and the GPU and pretty much everything you need, the memory controller, all the essential parts of a modern computer is in that one consolidated chip. And by doing that, it allows me to save a lot of work integrating other parts. So one limitation that I had throughout this project was time. As a senior project, I only had one term to accomplish it. So I started over the summer, so I had summer break to work on it. And then I had the fall term. I had one class replaced with this quote-unquote laptop senior project to work on it. So I only had a few hours a day and only three months, excluding summer.
12:39So I really had six months to work on this project. And throughout the time, I had to do college applications, homework. I had an internship over this past summer as well. So just getting all my free time in, I couldn't trace everything out the CPU myself. That would take hundreds, if not tens of thousands, if not hundreds of thousands of traces and definitely thousands of hours of engineering effort to pull off if I was implementing the CPU or the SoC directly on the circuit board. So what I chose was called an SOM, system on a module, where it's on this much bigger circuit board. And this also came with many, many limitations, including signal integrity and thermals.
13:16But that allowed me to just plop this little kind of like Raspberry Pi compute module, if you may. it's sort of like slotting a GPU or RAM into a modern computer. It has every single connection you need, HDMI, USB, power, pretty much every connection that you have on a regular modern laptop but you just slot it right in with that CPU on the circuit board. And what that meant was that I know at least some part of my system works out of the box. If I had implemented everything, the DDR4 memory and the chip and everything on this one single monolithic circuit board and I plugged it in and it doesn't work.
13:49I don't have the engineering effort and the team and the millions of dollars of equipment needed to debug high-speed signals and all those power-on timings. So buying that system on a module meant that, okay, at least it's not as open as I wished in promoting the chip from scratch. That's something I certainly aim to do in my next revision. I'm discussing with some open source efforts that will help me in designing everything and putting it directly onto the chip. And I'm super excited for that. And it should be higher performance than this round. and throughout all of that it's this effort to make as many things from scratch as possible while making it reasonable like you know me as a single person i'm not going to claim to have carved out the metal cnc'd it by hand myself or anodized it myself or made the display from scratch there's no limitations to what i can do in those six months so that was another corner if you may say cut to know that okay when i power on this laptop at least one part of it works and another Another good benefit to it is that the system auto module, the CM3588 system auto module, allows me to pull the device tree and the Linux drivers directly from FriendlyELEC, who developed this system auto module, and test it readily on one of their development boards that is made and known working with the SOM.
15:03And that was really nice because at least some part of it, again, I knew it was going to work. And I did this, in particular, this proved so pivotal to the laptop when I was trying to drive the 4K AMOLED display. And in the embedded DisplayPort connections, it's a super high bit rate protocol and in hardware development. If your signals go fast enough, your physics sort of get distorted and you can't just run a single line and expect it to work like if you plug in a battery. You sort of have these quantum mechanical limitations, literally, where your electrons are moving so fast they start oscillating.
15:35And if you don't do your calculations and you don't do your considerations correctly, your electrons will sort of move backwards in a way. And so that's called signal loss. And that's something that I was really fighting for and making sure your electrons move through your trace as expected at such high frequencies. And my embedded display port connections were, I think, somewhere in the 3 to 5 gigahertz range, which is Wi-Fi slash Bluetooth. But you're trying to run it from one connection to the other, and you're not emitting it through air. So you have a whole different set of considerations called transmission line theory.
16:08And so doing all of that, I had to make sure that before I made my first circuit board, my display would work. Because if I put in all the work to make my first main board, and I couldn't debug what I expected to be the hardest, and thankfully I was right in the end, the embedded display port signals, there was no way I could pull it off in the correct time. If I got my circuit board and the display doesn't power on, well, shoot, you know, I don't have any way to know whether it's the chip that's wrong, my code that's wrong, or anything in between or the display or the hardware. So what I did was I took one of the development boards that the system on a module was being sold with and I desoldered the HDMI port peripherals.
16:44And I basically modified it so that the chip multiplexes between HDMI and an embedded display port. And you can change that in the internal embedded software for the chip. So when you load in your bootloader, you can tell the chip to either multiplex embedded display port or HDMI out of it. And so what I did was, it's still through a physical HDMI connector but what's actually sending is embedded display port signals because when I booted it up I hijacked the device tree binary and I switched the multiplexer to output embedded display port and then I made a custom little circuit board that took the signals and routed it to what is the internal embedded display port connection that's typically used on laptops and for sure my 4k AMOLED display and you know I did not expect it to work And it didn't.
17:27I spent around two months trying to figure out what was going on. And the difficulty that came with that is because embedded display port is basically an undocumented protocol. The only time it's really used is in laptops. And so all these companies, Lenovo, Apple, Dell, and so on and so forth, they keep this sort of under the hood. Because there's really no need for other people to develop with it anyways. It's a horrible protocol. And it's basically the same thing as DisplayPort, but everything's much weaker. The actual signal strength is much lower. and I'm still to this day confused on why.
17:58Of course I see the reasons but I feel like you can definitely heavily improve on this protocol. You might as well just send it over to DisplayPort directly and of course there's limitations to that but in the end it's a super difficult protocol to work with and Linus of LTT talks about it a little bit on his podcast of what's barely considered a standard because it's so weird and goofy and vague in all these different ways. Every single nice little caveat that I didn't expect was that LCD displays or IPS displays actually have a different pinout than OLED displays. So the only few articles and resources I had on embedded DisplayPort were on LCDs and their power on timings and their bit rates and their specific driver protocols were different than OLEDs.
18:39So I was pretty much on my own. I had nothing to go off of except for this Asus boot log that was dumped from the same display that I had to go off of. So that just had like snippets of little metadata coming off the display when you first initialize the connection so I had to reverse engineer from that to drive the display and in the end I figured out the signal loss it was really just because going from the HDMI connector to the actual embedded display port connector through my little driver board I shortened the distance from v1 or r1 to v2 I literally shortened the distance by a few millimeters and I switched out a connector so instead of going from female to male to male to female.
19:18I went directly from female to male. So I skipped that female to male adapter part. Just from those two changes, the display just magically worked. So I was super glad. And that allowed me to basically use this development board as a jumping off point and allowed me to create the rest of the system around knowing that the display will work. And so that was a huge, huge bet that I made. If that didn't work, I really don't know where I'd today so i'm super glad that my bet paid off and it was two months of just black box debugging where i had to make sure that all the software as far as i knew worked i didn't have a scope to prove 500 signals those cost hundreds of thousands of dollars so i sort of had to make sure that as much as i knew the software worked because when i first got my board and the display didn't work and the chip didn't work the chip couldn't drive the display i had no idea whether it was my software that was broken or my hardware.
20:12So I spent about two months figuring out every single little piece of the software and ensuring that my software was correct. And when I did that, I was like, okay, well, I guess it's the hardware that's broken. So I made a second revision with the few theories that I had, signal loss, signal integrity, and in the end it did work. So I'm happy that my gamble paid off. Amazing. Tired of babysitting autoscalers and overspending on cloud costs? Meet Thoris, the platform that makes engineers heroes to their finance and business leaders. Thoris intelligently manages Kubernetes clusters, automatically right-sizing and scaling workloads while preventing downtime from traffic spikes.
20:50It anticipates usage and capacity needs, so systems stay fast, reliable, and efficient, without constant tuning. Teams using Thoris cut cloud spend by 40-60%. Thoris predicts compute and GPU demand before it happens, keeping performance smooth and costs in check. Stop wasting compute and guessing your resource needs. Let Thoris handle your auto-scaling so your teams can focus on building. Find out how much you can save with Thoris. Visit thoris.ai and try our cloud savings calculator. Was the, I guess like system on a chip and the display piece here, is that where you, I'm trying to remember from the video, is that kind of where you started and you were like, if this doesn't work, then there's no point in this project?
21:35or where did that fit in? Yeah, so when I first started this project, there were a few things that I want to keep in my mind. And I oversimplified in the video, so I'm going to go into a little more depth. I wanted the RK3588 already. Like I had decided on that chip when I started this project because it's such a good chip and it's still the fastest on the market. I think the Rockchip is coming out with the RK3688 in a few months or in a few years. I don't know how their timeline works. And my second revision of the laptop will also use a much higher end chip. But I knew that I couldn't use Intel or AMD because the amount of NDAs and the amount of effort needed to just get my hands on one of those chips and be able to implement it from an open source standpoint is basically impossible.
22:17Like even if I got that chip, there's pretty much zero chance that I'd be able to release the schematics openly online just from the inherent business model of Intel and AMD. But in terms of ROC chip and in terms of these smaller companies, they don't really care and they release their schematics openly online already. So it doesn't conflict with their business model of selling chips to literally just developers and consumers already. And that was one thing. And the RK3588 is much higher performance, about twice the performance of the Raspberry Pi 4, and about one and a half times the performance of a Raspberry Pi 5.
22:49So a lot of people were also asked, you know, why don't I just put a Raspberry Pi 5 compute module in there? And the answer is it's just not as performant. I don't get the same I.O., the same performance as if I had the RK3588. So that's one thing that I wanted to do. The second thing I wanted to do was a wireless removable keyboard. And it's a bit hard to describe, but essentially the keyboard is only, I remember, 7 millimeters thin. And correct me if I'm wrong there. I don't really remember. It's been a while. But when you hold it, it's literally like holding a piece of cardboard. And it feels super light.
23:21It feels super thin. But it feels sturdy because it's aluminum. And it's a fully mechanical keyboard, and it's wireless. So the actual battery inside is only a millimeter thin. and it fits directly underneath a ultra-thin circuit board. And on top of it are these Cherry MX mechanical switches that are only otherwise found in highest-end alien computers. They're the Cherry MX ultra-low-profile switches. And I was able to get them from Taobao, which is a Chinese AliExpress, and chip them over, and I soldered them on by hand. And combining all of that and the one-millimeter-thin battery, I was able to get the keyboard, because I was also running super-high-efficiency firmware, the ZMK keyboard firmware, This keyboard lasts a couple months on a single charge.
24:02I haven't really charged it since I built it. And sort of adding all that together, my second goal again, so the first goal was RK3588. The second goal was accomplishing this wireless keyboard that slots into the centerpiece of your computer. And another addition to that is because you can just take it off magnetically, that's how I designed it to be, the computer is more repairable than any other computer because you can literally pop off the keyboard and every single piece of the electronics is exposed directly to you. Of course, that brings the dumb danger. Like if you spill water into it, you know, you're screwed.
24:30But outside of that, you know, just from a purely engineering slash repairability standpoint, no screws needed. You literally pop it off and it's just there in front of you. Every single component that you want access to. And so those are two main things that I wanted to implement on my computer. And then the third one came, which is the 4K AMOLED display. When I was looking through display options and I was like, wow, I didn't know they sold 4K 13.3 inch displays to consumers. And the reason I wanted that so much was because one of the first laptops I got was back in middle school for me. And I was lucky enough to get the Razer Blade Stealth 13, and I tried it out.
25:07And I had this really gorgeous Ola 13.3-inch 4K display. And people say a 4K display on a 13.3-inch laptop, that's a huge waste of pixel density. But I really love how beautiful it looked because you literally can't see the pixels. and it's sort of like a strong divide between people that say it's a waste and people that say it's an amazing choice and it looks beautiful and on my end i love the way it looks especially on an oval display so i was like okay i see this choice it's on taobao it's ready for me to use i'm using it i'm buying it you know there's no turning back i'd hate myself if i couldn't get the 4k display to work otherwise it just looked like a crappy laptop and another aspect of that was because i knew that my laptop wouldn't be able to perform nearly as well as a macbook i mean this chip is about a third of the performance as an apple m1 like a base m1 chip in terms of raw arm 64 performance i couldn't beat any computer and like have a highlight saying that i outperformed xyz but i can say that i have a higher display resolution i have a better feeling keyboard i have this wireless keyboard and have a bunch of these little oddball quirks to it that are also very useful like i use this keyboard as a debugging keyboard on other computers as well like i can just pop it off and connect it to another computer however I want because it's just over Bluetooth.
26:22So combining all of that, it's just a really amazing option that, and these three choices are the ones that really influence my decision going forward. And of course, there's like other ones that are like CNC aluminum chassis, you know, a nice trackpad, battery that's roughly the same size and capacity as a modern battery pack, and circuit boards that are cheap and accessible and easy to view and so on and so forth. But combining all of that, that's sort of the goal set of my laptop and that really influenced every single decision that i made going forward from there on amazing i hadn't maybe fully appreciated the wire and the wireless keyboard being i mean it sounds like part of the reason being that you can pop it off and then just kind of get in there sounds to me that's like i'm quite into kind of like car mechanics for example and it just sounds like being able to pop the hood on a car and being able to go in i think that's just incredible can we talk a little bit about so again maybe just taking on if we want to like again slightly air quote this, but software, because this is sort of software that just I think none of us in the software world really think to touch ever, but battery management.
27:22And I believe you implemented custom battery management. Is that right? That's correct. Yeah. Could you talk to that? Yeah, for sure. That is correct. And that part is really complicated. And I made a huge mistake when I was making it. It's still a mistake that I regret to this day. And it's not implementing a proper embedded controller software. And I'll go from the top. Pretty much every computer nowadays. There's the CPU or the GPU or the SOC. You have your main processing chips. And that's what you as an end user access every day. That's what you see when you open Task Manager on Windows or you run HTOP.
27:57That's what you see the performance of. But there's another chip that's working just as hard. And people don't talk about it at all. It's the embedded controller on the laptop. And it's the same as if it's an Arduino on the main board, along with the big chips. And this one is like a little little worker that's making sure every part of your system is working properly so there's a huge number of gpi opens general purpose input output and it takes input from your buck converters to see if your power is good it takes input from your wireless controllers it takes input from of course your battery management and a bunch as any peripherals that you don't think of to access on a day-to-day basis that your little ec or your embedded controller is the one that manages all the firmware and the controls associated with this there's insane number of GPI opens that connect to every power system, every peripheral system that is managed from the EC.
Read the full transcript
28:47And when I designed it, I didn't know this thing called Chromium EC existed, and I should have done my research better. But it's an open source embedded controller software that's used on every single Chromebook, as well as on the framework laptops. And, you know, Gregor, I'm sure you've heard of the framework laptops. I met with Nirav Patel just last week, because I'm here in San Francisco. Amazing. Took a look, and he also popped open the keyboard. Speaking of, As you said, Gregor, it's a really cool experience to pop off a keyboard on a laptop. And then coming to that, it's, I guess in a way, I learned more from doing it from scratch.
29:20So the battery firmware management, the system comes down to an ESP32 S3 microcontroller. And the reason I chose this one, people say it's beefy, people say it's less power-hungry, is because one I kind of wanted, it was just a cool thing, I wanted to do wireless power management. so like from your phone you can open a bluetooth low energy app and like see all of your battery statistics and charge them and perhaps even like remotely shut down your laptop like fully shut down like cut power directly and i didn't get time to implement that but what i was able to see was i implemented the entire charging circuit from scratch so i wrote all the c firmware in arduino code and the reason i did that was to have as many people be able to read the code as possible There's this really cool guy already on GitHub that was writing some fixes on my EC firmware.
30:05And it's basically just a state machine that runs repeatedly every few seconds. And it scans, okay, is the battery charged? Is USB-C plugged in? Because the laptop charges over USB-C PD. So the same way that you plug in a MacBook or like a modern Dell, you just plug in USB-C and it charges. And, you know, it loops this thing back and forth. You know, how much is the battery charged? How far until it's charged? You know, it sends data over USB, over UR to the actual main chip and so on and so forth. It loops this back and forth. Is the battery temperature too high? What's the charging current? What's the V bus, which is like, you know, the power being fed in and so on and so forth.
30:39Like it takes in all the symmetry and it calculates how you want to charge this battery. Is it reaching this charge level that I want it to reach? And it reports this battery percentage, state of charge percentage to the actual main chip. And that's also super hard to keep track of because what's interesting is that if you shut down the entire laptop you lose your state of charge so it's like okay well what are you supposed to do and so writing the firmware i made a lot of fixes and i learned a lot from this because when you write firmware like this you always have to be careful because if you short your batteries or if you if you write some wrong code your batteries will literally blow up and you know this like and these were experimental cells from batteryspace.com and so these were like hundreds of dollars of battery cells because i needed this high power density and they were super high power batteries.
31:23I think you can discharge, if I remember correctly, like 32 watts off of a single battery cell and had four of them. So you can pretty much like discharge 150, 120, 130 watts off the batteries. And so writing this firmware in Arduino, I had to keep track of every single state of the batteries we're in. And the funniest part was I chose these chips, the charger chip and the battery management chip. So when you have more than one battery cell, you have to make sure that the cells have roughly the same voltage. Otherwise, one cell would try and charge another cell because of the potential difference.
31:57And so you don't want that happening because you don't really know what's going to happen to the batteries if one starts charging another and, you know, it sort of creates this really bad feedback loop. And so there's a battery management chip, a BMS, as well as the actual charger chip. And the terminology is different for drone users and people that work with these batteries on a larger scale. People usually call the charger and the battery like balance her chip, the BMS altogether. But in my case, the BMS is really just that chip I talk about that balances the cells. It like slowly trickle charges each cell individually to make sure the voltage is the same.
32:28And then I have the big beefy full charger that literally charges every single battery at the same time. It shoots 16.8 volts, which is 4.2, the nominal, sorry, the peak charging voltage of each cell times four because I had four of them in the series. So 16.8 volts a couple amps and i take that power from the h usb 238 which is the usb pd negotiation chip and all these three chips were connected to the esp32 where i communicate with the h usb 238 over icc so when i plug in the usb c it'll detect okay is usb c plugged in how high can i negotiate the power to achieve and then it'll tell the charger chip say okay here's how much how many volts it gets and so on here's the telemetry from i got from the usbc and if it's correct i'll tell the charger chip to charge xyz current and so far it's just a hard set limit of around an amp or two and then the battery management chip will sort of run by itself there's a few like status gpios that go into the esp32 but it really runs like statically in the background always making sure that the batteries are equal in voltage and i'm not going to like huge depth about the firmware if you're curious about that i'd love to as well i just kind of want to go from like a state machine standpoint where I analyzed like the things that are required.
33:40I drew this out on a whiteboard and I analyzed the different states that the machine would be in when charging and so on and so forth. And I wrote the code from that. The code is actually really, really simple. It's just a bunch of misstatements and you run it over and over again. And yeah, that's pretty much it. Feeling the AI anxiety? From questions to job security to cybersecurity and everything in between, it's easy to feel overwhelmed with the rate of AI innovation. Enter ARIA, the enterprise AI orchestration and security platform built to boost your confidence. With ARIA, you don't have to compromise between speed in innovation or security in governance.
34:18Quickly deploy AI without cutting corners on compliance. Give your teams the confidence to adopt AI with ARIA. Ready to eliminate your AI anxiety? Visit area.com to get started for free today. That's A-I-R-I-A.com. Capital One's tech team isn't just talking about multi-agentic AI. They already deployed one. It's called Chat Concierge and is simplifying car shopping using self-reflection and layered reasoning with live API checks. It doesn't just help buyers find a car they love. It helps schedule a test drive, get pre-approved for financing, and estimate trade-in value. Advanced, intuitive, and deployed.
34:54That's how they stack. That's technology at Capital One. And what does your, if you want to call it almost like debug stack look like? I mean, you've already touched on when you're talking about that massive two months worth of frequency debugging. And you said, oh, I obviously don't have access to these amazing pieces of equipment that all the big guys do. So what does your debug stack look like? I mean, there's photos of you had just basically like a workbench in your high school and it was like Byron's workbench, don't touch. So what did you use? Yeah. Yeah. Yeah. That's literally most of everything that I had at my disposal.
35:27It's sort of like whatever was at my school and a lot of debugging, in my opinion, when it comes to hardware, software integration, debugging, and this might be a hot take. I'm not really sure. I haven't talked to many other, these sort of full stack engineers, but my take is that it's really by feel. Like if something doesn't go right, the first call you have to make when you're doing this full system, is it a hardware problem or is it a software problem? And that is something that you can you have to pretty much go off initially by gut feel you know what's broken is sometimes it's really obvious like you know if something's blowing up on your board you know that's you know something's definitely wrong with the hardware but there could be a software reason for it if my software like sent like a hundred watts through the system at once and it blew everything up that might be a software issue but it looks to be a hardware issue and trying to find the root of the problem and so you know going back to the display like i spent two months trying to figure out and it wasn't like two months straight but you know like two months on and off that's pretty much the only thing that was focused on on in terms of the laptop to figure out whether it's the hardware or the software issue because i you know making a circuit board is a really tedious process mainly because it takes seven to ten days to ship from china i use jlc pcb and so it's not like you can just recompile the software in 20 minutes or just 20 seconds and try it again if your circuit board your hardware doesn't work you you spend you know two weeks debugging or you know if you're lucky, you might be able to find the problems faster, but you still need to wait a week and a week and a half to get your next revision to be able to test it.
36:55So hardware iteration is a much slower process than software. So I utilized that idea to first analyze what the software is broken and then backtrack to see what was wrong with the hardware. And that was, that's my debug stack initially. And when it comes to other aspects, I sort of apply the same logic by gut feel and sort of by knowing the system as well as I do, because, you know, I designed it all myself if it's another system that's a whole different story but having designed the system myself what do i think is the most likely problem and i always keep this mental track of where my biggest failure points are for example in this one the charge states are always wrong and you know it's a super like it runs out of battery super easily when it's fully shut down because the esp32 s3 constantly sucks like a few milliamps constantly so the battery is just fully shut down you need to charge it you need to hijack the power a little bit a bunch of these things and these massive failure points i know that i should have used chromium ec in hindsight over writing my own ec software so that that would have done all the battery management all the software for me i just have to plug it in and write the device redefinitions and in terms of the hardware you know some chips i chose weren't the best best documented best performing i maybe didn't understand this part of the system as well like pcie i didn't understand pcie as well as i should have but thankfully it just worked but there's other parts for the edp i didn't understand quite as well usbc when you get to that super high frequency as things fall apart and your documentation also starts falling apart because you can't just apply like regular intuition to routing the traces and so getting to those points my debugging really comes down to first feel and i had these a few little chips to work with that were debugging like i had a arduino a tnc a small oscilloscope and so on.
38:35Stelie sent me their new oscilloscope to try out afterwards. And if I had that, you know, I might have used that to help me debug quite a lot faster. But a lot of it is really just by repeatedly trying and targeting it from a software standpoint first, because that's the easiest to modify and change. And if that doesn't work, then I have to really take a look at the hardware and see, okay, what's truly at fault? And what's the root fundamental cause of the problem? Yeah. Throughout the video that you produced, you did keep just talking about how much times you wanted to give up and obviously you didn't i just found that super inspirational any software engineer or indeed hardware engineer can take huge inspiration from not giving up and like actually shipping this product like you actually finished a version of this product and i think that leads me to what then was okay hacker news it was almost made for hacker news if you want to call it that because everyone there was just i have one of the most popular posts i think i've seen in a long time what's been the reception you've had a lot of people following the github now but can follow GitHub, but there must have been a ton of communications now you've had with like the community and what's the future state of this project and how do you see that?
39:41That's a great question. I haven't really had the time and the place to really talk about it and I'd love to talk about it. So I guess we'll talk about the reason I did this project. The presentation that I made at school was wildly different than what I proposed in the video and what I wrote up because people in my school, they don't really care about PCIe, USB. I talked from more of a story standpoint. So I'll talk about that a little bit. And, you know, the reason I started this project was me and a really close friend of mine, we both play squash, which is a sport that is with a somewhat hard rubber ball.
40:13And there's four walls and you play much like racquetball or racquetball or, you know, any other. My dad used to coach squash. Strangely, I didn't get into it, but it's an incredibly, you've got to be very fast on your feet. It's very difficult on the body because you're running around and this ball is like shooting all over the place. Okay. So there's some inspiration from that it sounds like yes okay so me and him are real close friends we both play squash we're on this six-hour bus ride to play interscholastically with another school and we were super bored we're just talking about random things and he said you know are you going to do senior project next year because it's like kind of a common thing here but no one really it's usually just you know a nice like relaxing project that's like less than a course difficulty but he also you should build a laptop that runs off solar power or you know runs off like bio fuel or something like that and i was like okay well the the solar panel part and the biofuel part doesn't strike me as interesting but building a laptop that part really does and building open source and distributing it in the same way that you know i've always loved open source because i love being able to share these innovations with everyone you know free for free for anyone to look at and analyze and see so i was like okay i'm gonna make this laptop and and i basically settled on that on that bus ride i was like okay next year i'm gonna be making a laptop from scratch And so when I first started it, I really didn't expect much at all.
41:32I knew it was going to be a huge undertaking and I knew that if it succeeded, I'll get some publicity maybe. I'll get my 15 minutes of fame or something like that. I didn't expect it to blow up nearly as much as it did. On Hacker News, I think I got the second highest voted Show HN post of all time. And it's really the highest voted one in Show HN because the first highest voted one is showing off the self-voting glitch from 13 years ago. where the guy literally like wrote a script to self-vote like himself the entire time and so unfortunately i'm not number one but excluding the number one post which is like showing off that he can like glitch the system i am the highest one which is insane like it was overnight and i posted it thinking it was like okay well i didn't like gear it to be posted at hacker news but i i did i did want to have some reception because i i've always loved reading hacker news and i love the community that comes with it and so i wanted to give my piece back to it well one of the other few first posts that i made was the world's smallest and cheapest networking switch which is like a background that most people aren't familiar with me with so i used to do underwater robotics and my post got like 600 points and i was like that's super cool i love this being able to discuss with these like-minded people and so i wanted like this basically second attempt at making open source hardware and posting hacker news so that was my laptop and i also wanted to make a video increase the spread of the laptop because it's my video is in a way less technical than my write-up, more humor.
42:56And of course, if you want the technical bits, the nuts and bolts of it, I still provide that. But I wanted to more provide it like a viewing experience for the person watching for the audience, more so than like a technical rundown and like going into the depth of everything. I want it to be like an engaging video where people can watch. And I think it's going to hit a million views pretty much by the end of the week. It's at like 995 ,000 views. And so a lot of people have reached out to me because of these two places. And that's how I scored my internship at Neuralink. Like one of the, I basically got headhunted here by one of the lead software engineers.
43:28I had around a dozen like job offers, which is insane from like all across the world. People emailing me and, you know, the GitHub stars and all of that. And so it's super inspirational. I thought, you know, I might get a few emails saying, you know, this is really cool. I love your work or something like that. But I never thought that so much would happen. And through the YouTube comments, like iFixit commented, Louis Rossman, Linus, I'll be making a video with Linus in the coming month. Linus Tech Tips, Jeff Geerling, and Sean Hodgins, and so many of these like really inspirational people in the YouTube open source hardware community.
44:03And I'm super happy to be able to connect with them and sort of like, you know, sit on the shoulders of these giants. And I'm super excited to present myself with Linus and show even more people the ability to create and innovate sort of by yourself. You don't need a whole company. You don't need funding really. Of course, there's a certain amount of money that has to be dedicated to create these things. But my laptop only costs around$1 ,500 if you make it, order everything, parts and all. Building it costs a lot more. The R &D cost a total of$5 ,000. But even then, that's so much less than the$5 billion or whatever the R &D cost of Apple is.
44:41This is something that, of course, I'm not going to say it's reasonable to spend this much on a passion hardware project. but it's not an exorbitant amount to the point where you can buy a car for that amount. This is something that you'd reasonably spend on a literal laptop. If you're buying a top-end gaming laptop, you'd also spend$4 ,000 to$5 ,000, but you can learn knowledge and a bunch of super cool things from building it yourself. And of course, you're going to get a worse laptop than a$5 ,000 commercial laptop, but I think the knowledge part is what's truly priceless coming from it. And so, as I mentioned before, I've met with a framework, Mr.
45:15Narav Patel, and he's super cool and he showed me their new products and so on and so forth. And I've reached out to super, super cool and influential people in the tech world. And so it's really amazing to have these connections and being able to build on what's in the future. And another super cool thing is Aaron Wolf of Fudo, along with Louis Rossman, they're based in Austin. They offered to fund my second revision of a laptop. And I haven't committed to it yet because I want to be responsible and say, when I get the time to work on my second revision, then I'll take the money. and so I'll have a lot of funding and I have sponsorships now for my future circuit boards from NextPCB so I really have this full width to be able to develop as much as I want and have a much lower barrier of entry it's not really so much the cost but more of like the connections where I'm able to source hardware I'm able to source advice opinions and and software development skills much better than I was before where I had to sort of like cram myself into the back of the classroom figured it all by myself now it's like the future trip that i'm using which i'm not sure i haven't decided exactly on it yet but i'm looking at the 6p1 cix p1 cd like 18080 and it's this really new chip that just came out and it's pretty much unsourceable from anywhere but when i asked next pcb they were like yeah let me get you this chip and they got it the next day and they were like yeah here's the price here's the implementation so on so forth so i was like having access to more resources now allows me to innovate better.
46:40And for, you know, for as long as I, you know, I'm doing open source hardware engineering, I plan on having as much of it done from scratch and released openly for free as I can. And, you know, just try to have people being able to learn and access the things I make. So that's sort of my reception and my future. Yeah. Could you see a world where it's obviously still open source, but you are ultimately a laptop company that just says, look, if you want to buy it off the shelf, we'll sell it to you. But obviously, you can pop the hood. And, you know, so is there any kind of world that you can see where that interests you?
47:15For sure. And that's something that I've definitely considered selling this laptop. A lot of people have reached out and asked, like, how much does it cost and how much, and etc, etc. And I can't really give a good answer because I designed this to be, you know, a one and done. Like, this is not something that can mass produce, like the screws, the tolerances, I have tape holding the wires down. It's not something that is ready to be mass-produced. And that is something that I wouldn't say it's an oversight, but it's something that I didn't have the bandwidth to do to be able to pull off in this short time.
47:42And it's my first time doing a really full-stack integrated engineering project. And coming from that, I was like, okay, I sort of didn't care about the price because if I cared too much about the price, I wouldn't be able to get the laptop done. And so adding all of that up, I was like, okay, my second revision, that's where I'm more honing in on manufacturability. And that's something that And Lucas Henkel, this European really cool hardware and software engineer, he runs his firm in Europe doing engineering with Altium and so on. He's making an Open Source laptop too, but he's working on it for over a year now.
48:11And his work is a lot more detailed, a lot more manufacturability oriented than mine. Mine was sort of like getting it out the door as fast as I could. And so in the end, yes, I can definitely see a world where I'm working on Open Source hardware like this. But I think Framework's doing an amazing job already. And releasing the schematics and releasing the software targets such a small subset of people. I do think that it's much more viable to keep this as a small scale project where, you know, in the future, I'll have everything linked up and ready. Like if you want to buy it and you want to get everything up and running, like, you know, of course, there's no warranty.
48:41There's no support for it. But if you want to give it a shot and you want to build it yourself, even this one, you can definitely build it yourself. But in the future, I'm going to try and make it more easily makeable yourself. And that's something that I world that I see myself much more likely than like starting a company for this. That makes a lot of sense. And I mean, And also in that vein, maybe some of the listeners have already forgotten the fact that you're in high school. So what do you see the classic like next four years looking for you? Are you thinking about college? Are you thinking, no, just skip that?
49:07Because, I mean, I think you're just in this quite unique position where it could look quite different for you. So what are you thinking about that? Yeah, for sure. I've always taken the standpoint of like wherever like life leads me, I'll make the best of it. And right now I'm at this crossroad where I'm currently getting my college decisions in right now. And there's a few places that I'd love to go. very very prestigious super super great places that will lead a great future for me i've talked to friends two of my previous classmates from exeter my high school um they're currently in the bay area doing yc y combinator and and so on and so forth like why like the yc ceo gary tan actually like tweeted about me saying like yeah like high schooler's laptop is like fourth highest something something like that and i was like that's super super cool and and i'm having been in the bay for for spring break i'm working at neural link it's sort of this future is really undecided for me.
49:56I really don't know what I want to target in my future, but it's definitely going to be something where I'm making the best for people. There's a lot of people that go to these really great schools. They're super, super smart. And then they go into like quants, they go into finance, they go into business or something like that. And, you know, the money's there for sure, you know, a half million dollars a year is great and all. But I do want to build and make things for people. Like that's something I've always loved doing. It's something I don't really want to shy away from. Whether that is at Neuralink, building high bandwidth brain interfaces for people that are disabled, or maybe Framework or any other company that's building things for people and for a good cause.
50:39That's something that I want to do in the future. And going to college or not, that's something I haven't really made up my mind about. I'll make up my mind about that in a few months, and my future projects and so on and so forth. Right now, I'm balancing my work here at Neuralink as well as one, trying to build the world's lightest wireless mouse. I have quite a few ideas like inductively charging, no batteries, ultralight composite shell, basically this Japanese idea of shaving weight off every single part of your system as much as you can, like just individually analyzing. If you can shave like a milligram off a capacitor's size, do that.
51:15Something I want to implement, that will be a project coming up soon. I'll make it in collaboration with NextPCB. So that's super exciting. And then of course, the NextLaptop. That's something I want to do if time allows. And I don't know what the timeline of that might be, maybe in a few days, few weeks, few months, few years. I have no idea. But something for people. That's something that I will do for as long as I can stick to that. Yeah. That's a great guiding North Star. And I think many people who have had quite a journey themselves listening to this, and you know, they'll probably say something along the lines of just enjoy the journey.
51:44And I think you're going to make a lot of that. Just to round out, like you kind of mentioned a few people, but just generally speaking, like who inspires you dead or alive? Yeah, definitely Steve Jobs, one of the super inspirational. Like at my school presentation, it was a really packed room. It was super nice. Pretty much everyone that I was good friends with, all the teachers, even the principal came to watch my project presentation. I played this video of this Instagram reel edit of Steve Jobs saying, you know, building a good product is keeping 5 ,000 things in your head. At the same time, building something good is super, super hard.
52:14And he's definitely one of my huge inspirations. But I think in this modern day, technology and information is so widely spread that all information you can just find online, Googling and reading data sheets and PDFs and watching YouTube videos. And I want to like, I think in particular, in the very end of my video, I thank quite a few YouTube creators, Linus, Jeff Geerling, Stuff Made Here, Veritasium, and so on, because they taught me so much knowledge, you know, about tech and about these these things and they are what inspired me to pursue tech like linus i've watched him pretty much every single video he's made since since i started watching tech which is like in sixth grade so i've been an avid viewer for six years at this point and pretty much every other channel veritasium jeff geerling stuff made here lewis rossman you know framework and not framework doesn't make videos but just like all these modern tech companies that have reached out or i've reach out to them.
53:10These amazing companies are what inspired me and these people, they are the inspiration behind this and they will continue to drive my inspiration going forward. Amazing. Byron, it has been an absolute privilege for me to get to come and speak to you. You've clearly got a lot of people knocking on your door and so very lucky to have you on SE Daily. Thank you so much for coming on. I hope we get to catch up maybe in a couple of years and we'll get to see what you're up to in that time. Super excited. Well, it's amazing to talk to you later and and thank you for listening I guess yeah thank you
From the publisher
Byran Huang is a full stack developer who recently made headlines in the hacker space when he created the anyon_e, which is a highly integrated, open source laptop. The effort was a massive undertaking and showcased great design, hardware, and software. In this episode, Byran joins the show with Gregor Vand to talk about his
The post Building an Open-Source Laptop with Byran Huang appeared first on Software Engineering Daily.
