 Hi guys, so glad to be back here again I think I'm back here like once a year for like over the last three years that's why I think this is my fourth talk also I can't remember but around there Yeah, every time I'm here I try to like talk about something different something you know sometimes it's like circuit boards custom circuit boards, quick hacks Today what I'm going to talk about is like something I did in back when my company has a hackathon right and I was new at the company so I can't really like do much software related changes so what I basically did was I built some kind of like a hardware device right and it basically runs off an old Droid XU4 some of you may have heard of it before yeah it's basically a very powerful ARM based yeah SBC yeah so why did I do that right I was basically at the hackathon and I work at Roblox right it's a 3D games platform and they basically run on iOS and Android and I really want to play the games using the Nintendo Switch controllers right and of course the Switch controllers only work on a Switch which my company's game does not run on so yeah I just yolo and decided to hack it together I didn't know if I can do it in like about eight days or so but I just went ahead anyway have most of the parts on hand and you know like moving forward is like I was hoping that in future I could actually build my own phone but that's a lot more work and learning to do so yeah for those who don't know me before yeah I basically eat, sleep, code, build stuff in China manufacturing up to small volume runs of less than 1,000 units I advise a couple of startups in Singapore like experts, tripe car, etc I currently work at Roblox and you can look at my portfolio on my website oops yeah so pre-workers is that you know I have to build this thing really quickly in slightly less than a week we need powerful 3D rendering capabilities and we cannot use NVIDIA tag right everyone thinks like oh 3D game you must run it on NVIDIA platforms right but no many most 3D games like Roblox, Fortnite, PUBG anyone pays like PUBG or Fortnite over here no okay that's surprising yeah but you know these games can actually run on a phone right but they were not really made to run on like the Tegra platform so I basically decided to take a look at this it definitely cannot run on Raspberry Pi 3 it's cheaper but it's not really that powerful and I really want to use like the Nintendo controllers on it so the ideal architecture looks something like this right the important point is that the Joyicons actually communicate over two channels Bluetooth and SPI when you dock them into the switch it communicates over SPI because it's faster, it's a wired connection operating at 1 megabit per second but you know like this is a quick hack so essentially I simply just use the Bluetooth module and connect them to the Joyicons directly and also use many off-the-shelf components over here the key components are really the Odroid XU4 which is the top right hand corner the LCD that's from the same manufacturer because we want to have like good compatibility with it and I don't really have time I really want everything to work out of the box right the the Flex HDMI USB cables are really important you can see that they usually come with like D4 HDMI cables but they are too fat right so I had to get like special Flex connectors and off-the-shelf DC voltage regulators and lithium-ion battery pack yeah so I basically did a integration test firstly I put all the components on table just wired them together install stock Android and see that it plays YouTube so that's great I also installed my company's game right to do some performance testing I have no idea this was the first run and I'm glad that the 3D performance is great it runs at like 30 FPS at least on a 128 zero by 700 pixels yeah so that's good this is just like on the table testing and so the next thing you have to do because like 3D printing the casing is really time consuming it takes like 48 hours at least right so I really had to put all the measure all the components care out what I really want what I have in mind right I care it out the front the back so it's basically two pieces like clamshell design simple four screws to screw the entire design together right and there are many other cutouts internally I actually measure every single component to ensure that theoretically it fits in theory in theory it should fit there's some vents because the cpu is really hot so and this is actually a fan so I have to have some like vents on the top yeah so after like 36 hours the print was successful I got these back they were okay I mean the print quality isn't great nobody's great for like a hack right and I tested that the LCD fit in it yeah the LCD has touchscreen so it's really great that the how would I say everything like came together really nicely and also I added speakers the sound comes through the HDMI which comes out through the LCD panel there are some connectors for speakers so I just hot glued them together you know this is quite messy but yeah it's not done at night 3 a.m couldn't sleep fortunately the large components like the power brick they they fit that's not a problem the main issue is that the some things cannot fit right did I miss some slides sorry I have to roll back a bit oh never mind yeah there were some issues like the flex HDMI cables were actually like slightly taller than expected so they were kind of tight is a tight fit and I had to reroute it slightly the case couldn't properly close you know in theory you simulate that it's fine but in practice yeah you miss out some things the LCD even though I located quite a fair bit of current to it but it resets itself like whenever the speakers are if I turn them on too loud yeah yeah so like the flex HDMI connector is at the top it's a bit hard to see yeah but they stick out like on the left side the I had I had to actually insulate the rear of the old droid because no it could possibly potentially touch the LCD and the other cables and stuff that was running behind it yeah um this shows how tightly packed you know the projector is very dark but it's really tight you know I'm going to open in like 15 degrees before the cables are like limiting its angle of opening yeah um yeah so I also got the Joy-Con connectors from eBay they're like spares so it's like this little piece of metal which allows you to slide the Joy-Con in I basically got them I did not use the the contacts but I screwed them onto a case so I could just slide the Joy-Con onto it yeah um software so I was simply using Lineage OS 15.1 it's a Oreo only this version supports size 3D acceleration for the particular GPU on a board I had to upgrade to Alpha 0.7 or else Bluetooth wouldn't work EMMC was fast about the problem was that I don't know why but Lineage OS when I tried to upgrade it basically failed to boot so whatever right I don't have time I just swap over to the SD card and move move forward it's very good that Lineage OS came with all these no old droid the old droid fork of Lineage Lineage OS came with all these simple switches right on the in software so I could switch various things like GPS, Bluetooth yeah without having to like go into command the console yeah and the final product looks like this yeah so everything came together pretty nicely at least from visually yeah I took some videos of you know my other teammate playing with it so basically the whole idea is that it's very similar to a switch but it's not a switch because you know we don't want to bother with like going like actually like porting it over to a switch at least not it wasn't my intention yeah so I was very happy with the 3D performance yeah so you could actually take the same platform you could play Fortnite you could play PUBG on it as well yep and you also could take out the controllers and play similar to a switch but that was the original intention yeah and I think yeah for future work I'll obviously there were some deficiencies though we did not implement the SPI communication so it was purely over Bluetooth it was slightly slower you can actually feel the latency compared to actually using a keyboard and mouse the off-the-shelf lipo pack is like kind of big right so what we really want is to actually have a a integrated battery power management system which you know like handles the charging feeds back the power to the android you know ensure the power bar right and obviously string the case it was kind of large yeah and that's all over here any questions yeah I mean in terms of part most of the thing were off the shelf it probably the electricals are less than 500 yeah the screen the screen I would call is like 75 the board itself was like 65 USD yeah but most of it I mean it's it's just modules if you really go into customizing like custom circuit boards and things like this then obviously the price will increase but I didn't have time yeah you have to have custom code so basically joycons are recognized as hid devices so online there are a couple of tutorials that say oh you can use it as hid device but the problem is that android natively only supports one at a time right but in software if you write your own software you can recognize two bluetooth controllers you could grab the mappings of all the buttons yeah so custom code is involved if you're going to communicate over SPI there's even more custom code yeah I don't think any a kernel driver but low level stuff yeah and yeah that concludes my segment