#697 – LEDs Everywhere with Tim from Mitxela

Download episode · 103 MB
Also on Apple · Spotify · YouTube · RSS
Show Notes
Welcome Tim from Mitxela!
- Introduced by Mike Harrison, past guest of the show
- Fluid pendant
- Volumetric display
- London hackspace
- https://matthias-research.github.io/pages/tenMinutePhysics/index.html
- FLIP in Blender
- CHNT36ta Pick and place doing 0201
- Precision Clock
- Sewing machine (check out that GIF!)
- Secret life of machines - Tim Hunkin
- Isaac Singer
- Tim has many Lathe projects on the hardware projects page
- Flag Steam Engine
- Learn how to machine from MrPete222's YouTube channel
- Schlock Mercenary (Comic)
- Sprite tm on The Amp Hour
- Gameboy advance link cable
- Writing a gameboy emulator
- Emulators got him into electronics
- No$ ("nocash") emulator
- AVR instruction set
- MIDI
- CNLohr on The Amp Hour
- https://mitxela.com/projects/slide2
- Forcing
- brainfuck (language)
- quop
- movfuscator
- Puzzles
- Spacechem (Game)
- Zach Barth of Zachtronics on The Amp Hour
- babaisu
- LED errings
- watchdog timer allows ridiculously low power
- 1 way loader
- autobauding
- Find all of Tim's projects on mitxela.com
- Watch the latest videos on the mitxela youtube
Transcript
Chris Gammell: This is The Amp Hour Podcast. Released July 8th, 2025. Episode 697. LEDs Everywhere with Tim from MitZella. Welcome to the Amp Hour. I'm Chris Camel of Contextual Electronics. And I'm Tim, also known as MitZella. Hey, Tim from MitZella. How are you doing? Not too bad. How are you? Good. I'm really glad to talk to you. I'm really excited to talk about all your projects. People probably, let's see, people probably seeing you on the internet of places, maybe Hackaday, maybe other similar kind of aggregators of interesting things, but your projects often are combinations of awesome hardware, firmware, mechanical. I just really like how it kind of all comes together, the way you do that. And you show a bunch of it, too, which is great.
Dave Jones: Yeah. Anything from metalworking to electronics to software things, interesting emulators.
Chris Gammell: Yeah. Yeah. Yeah. Definitely want to talk about those. We were introduced by a former multi-time guest of the show, Mike Harrison. So thanks to Mike for that. And yeah, I would love to just talk about the first one that I think about, one of your recent projects where it really was a lot of that stuff with your fluid pendant. That one, especially the mechanical. I was surprised at just like how much mechanical stuff you had in there. So could you maybe first describe what the project is? And then I'd love to ask you some piercing questions about how to get better at machining.
Dave Jones: Yeah. I mean, this was just, well, it started off as an idea to build, it started with the previous project, the volumetric display, where just to demonstrate that display, I rendered some fluid simulations in Blender. And then obviously once you see this little LED display running a fluid simulation, you think, oh, wouldn't it be great if that fluid simulation was in real time? And as you tip it around, the fluid would dribble around. And yeah, that was the original pursuit was, can we make something where you've got a fluid simulation in real time? And it just so happened that the way I ended up presenting that was in this kind of pendant form, where it's something like a bit of jewelry. I don't really consider myself at the moment a jeweler. I'm worried people will think I'm, you know, I'm very much a hobbyist at the...
Chris Gammell: Tim, could you make me a custom engagement ring for my fiance? Yeah, watch out.
Dave Jones: Yeah. Well, I mean, who knows? Who knows?
Chris Gammell: I mean, who knows what I'll do next? Give me enough time and enough money for prototypes and maybe.
Dave Jones: Yeah. And indeed access to the right equipment. Because that is one of the things I was very lucky to get as part of that project is, you know, a lot of my metalworking is done or was done at the hack space in London, the London hack space, which, well, has now reopened in a new place. But for a while it was out of action. It was, they got evicted from the building. So asking around, I managed to get, I mean, I'm not sure if it's entirely because of my kind of YouTube status. I've got more success with this lately, which is, you know, if you ask around, say, hey, could I make use of your workshop? Can I go on that big lathe of yours? Yeah.
Chris Gammell: People are very... It'll show up in the corner of a YouTube video soon. Who knows?
Dave Jones: Yeah. So either way, you know, my friend Martin gave me access to his lathe, which, I mean, it's not quite the same as having your own big lathe or big milling machine because he has these machines as part of his company, which, you know, it's a commercial operation.
Chris Gammell: That's a make-a-weekend kind of thing, huh? Yeah.
Dave Jones: I can only use them when they're not in otherwise use for other stuff. But, yeah, he coincidentally is very interested in watchmaking, watch repair kind of thing. So he had all of these, like, little collets and stuff, which are perfect for what I wanted to do, which was make a little pendant and ultimately put a watch glass on the front and make it look really, really quite swish, at least compared to, you know, a little 3D printed thing or something, which just wouldn't have had the same kind of shine to it. Right. And, yeah, of course, I gold-plated them as well. Yeah, those last steps really, I mean, they really do make it. Yeah, polishing and the plating. The plating is horrendous. It's got to use potassium gold cyanide, which is… Sounds healthy. Yeah, it's got cyanide in the name. So I think, yeah, right. How much PPE should I use? I mean, is a mask okay? Gloves, I guess? Right. Do I need a fume hood? I have no idea. Right.
Chris Gammell: Do you need, like, a bomb disposal robot to really use it or something?
Dave Jones: Yeah, I'm… It's hard to find out, you know, if I'm being cautious enough or not. Either way, it's… I've once tried filming it while I was doing it. I thought, you know, this is… I'm going to somehow, like, smear cyanide all over the camera, aren't I? And I'll just lick it later.
Chris Gammell: Yeah, of course. Of course. Yeah. So, you know, smudging it, getting a smudge up a lens.
Dave Jones: Yeah. It's fun to do once or twice, I'd say. I don't recommend people do… I mean, there are presumably services where you can just send things off to get gold-plated. So, that's probably what I'd choose to do if I was doing it again.
Chris Gammell: Well, in terms of, like, relative size, so it's using a 2450 battery, which is 50… Is it 50 millimeter?
Dave Jones: It's 5 millimeter thick, 24 millimeters diameter.
Chris Gammell: There you go.
Dave Jones: I always get those backwards. Yeah. And, yeah, there's a few different similar size ones, but it's a coin cell, but it's rechargeable lithium-ion. Right.
Chris Gammell: And a little beefier, too, right? I mean, like, it's bigger charge output, that sort of thing.
Dave Jones: Well, there's a couple of different models in that size, but the biggest one is 120 milliamp hours, which is pretty great for, I mean, the LED display and the simulation. Because it's using that STM32L432, which is a super low-power one. That's drawing, like, 10 milliamps, so it's almost nothing. Yeah. And, I mean, there's… Microamps at sleep? Or milliamps?
Chris Gammell: Yeah. 10 milliamps in use. Oh, during processing. Yeah. Right, because it's got this huge… Yeah. Right, because it's processing fluid simulation. Yeah. Okay. I'm with you. But, I mean, that's really low, considering it's running a fluid simulation. Right, so that's like when you're using that spec of the, what, like, current per megahertz kind of thing versus, like, the…
Dave Jones: Oh, yeah, yeah. I mean, so there's the processing power of it. But I'm pretty sure, actually, most of the power consumption is just the LEDs on that. I didn't actually split one or the other. There's no shift registers or anything on that. I mean, the way I drove the display, I was really pleased with. That was kind of eye-opening. I was using the… Charlie plexing it, but wiring it as a diagonal crisscross, which halves the number of wires needed. Like, it was like this eureka moment. It was very satisfying. And it has led to a couple of other projects, which I haven't put… They're not on my website yet, but they will be eventually. I just need to write them up. Yeah, there's a few other projects where I've used the same technique to very good results. Because basically putting all of the LEDs end-to-end means… It doesn't just mean that if there's a solar bridge between them, it doesn't cause a problem. It also means that you could put a via directly in between the two pads. And it will, you know, make electrical sense. So that really changes what you can do in a given tolerance on a board, especially for the very small LEDs. So I've… Again, I haven't published this yet. I've managed to make a LED panel of 0201 LEDs at a one-millimeter pitch on a two-layer board. Oh, wow. Like, I didn't think it was possible. I mean, I know that. So I think Mike Harrison was showing off this one-millimeter pitch LED matrix, which was on a four-layer board with blind vias. Because that's… It's so dense. Like, how do you get the connections together if… And, yeah, by doing this technique of putting the tracks diagonally and all of the LEDs end-to-end, I managed to do it on a two-layer board. I was like, what?
Chris Gammell: And you still have to have the… You still have the micro on the back for that? Yeah.
Dave Jones: So I've got… What I'm doing for those panels is I've got CH32 V003. And each group of 240 LEDs has one CH32 chip driving them in a Charlie-Planet way. And, yeah, I've done… I won't tell you too much. I'll publish it at some point in the future.
Chris Gammell: Something to look forward to. Okay. Yeah, I think the 0201 is probably the other piece. Again, if people haven't seen this yet, we'll have links. But, yeah, not very large LEDs. So they're very packed in there. Yeah. But that also adds to the… Basically, it looks like a display. I mean, like, far enough away, it looks like a contiguous. Yeah, and they're really bright.
Dave Jones: Like, of course, you're using the same amount of current as you would a larger display, but you've made it denser. So the brightness goes up, which is kind of interesting. And, like, the first time I did, I was like, wow, that's a lot brighter than I expected.
Chris Gammell: Yeah.
Dave Jones: Yeah. I mean, like, 5 milliamps doesn't sound much to an LED, but if it's 5 minutes for every LED in a 1-millimeter grid, that's… Right. Yeah. Suddenly adds up. It's like a torch in your face.
Chris Gammell: Yeah. So, I mean, on this… So the new one is the two-layer. This one was four-layer on this? On the matrix earrings? On the…
Dave Jones: The pendant was four-layer. Yeah. And that was only 0.402 LEDs. Got it. So, yeah, I mean, they're huge in comparison.
Speaker ?: Yeah.
Dave Jones: I mean, they're so tiny. It's a pitch of 1.5 millimeters on the pendant.
Chris Gammell: In terms of the firmware that you have to have on the STM32L432, so, like, that's all, like, just bare metal C?
Dave Jones: Yeah. Yeah.
Chris Gammell: Like, just rocking an algorithm that you wrote kind of thing?
Dave Jones: So, yeah, the algorithm was prototyped in JavaScript, but based on the work of Matthias Mueller, who is some kind of god of simulation, apparently, works for NVIDIA and has a YouTube channel, showing off how to… Yeah, how to write a flip fluid simulation and many other things, which are kind of fascinating. So, yeah. What is flip? Flip is the Fluid Implicit Particle Algorithm, which was published in the 80s. And it's… I looked that… I specifically went after that because it's what I've used in Blender. If you just run… I think it's called… Is it MantaFlow? I don't know. The plug-in that comes with Blender for fluid simulations is doing a flip simulation. And, yeah, it's just… It's one I'm familiar with. There's a bunch of other ways of simulating fluids. Specifically, it's for if you've got a mixture of air and liquid or vacuum and liquid. I mean, it's not actually… It's not modeling the air, but, yeah, it's this hybrid approach between using the kind of grid-based, the Eulerian simulation, and particles.
Chris Gammell: I don't know a bunch of these words you're saying, but they sound very… So, yeah, I've never done… Yeah, I mean, like, we had a Blender person. We had Sam on Alder here talking about Blender. That was kind of my first Blender stuff other than, like, seeing people do animations on there. So, it's interesting to hear you talk about the simulation on there, too. It's fantastic. It's the best piece of software ever.
Dave Jones: I love it. Really? Yeah. Blender's my favorite thing. How else do you use it? I mean, what else do you use it for? Not a huge amount. I mean, I used to use it to edit videos, but that was… It's not really what it's… It can edit videos, but it's not the most convenient tool for that. But it's mostly… So, yeah, I did… I've done a few animations. I've done various things. What I really love about… I don't claim to be an expert at it. I'm definitely not… I'm definitely not very good. I use it. I think, oh, God. There's so much it can do, but the learning curve is so high. However, it's completely free, and there's so many… There are so many resources out there. There's so many tutorials. Like, it's just… It's fantastic. I wish it was this good when I was younger. I mean, maybe 15 years ago…
Chris Gammell: You see, like, a different career path almost at that point?
Dave Jones: Oh, it's more about when you're a teenager, it's very easy to learn new software. I think you've got all the time and enthusiasm to just try it and figure it out and see what works. And as an adult, if something's got a steep learning curve, it's just… Just everything takes so long. Maybe it doesn't take that much longer, but it feels like it's so much harder. I mean, the example I might… Don't have much time left. Example I'll give is… I think this is okay to say. When I was, like, a young teenager, I was in the playground. I acquired a compact disc, which had a copy of a piece of software called Photoshop. And… No! No! I would never! Yeah. And, you know… You mean you found it? Yeah, I found it. I found it. Right, right. It's interesting looking back because, like, my parents and teachers at school were like, oh, my God, you know, piracy is wrong, you know? Oh, you absolutely… It's a moral issue. It's a moral issue. And, yeah, like, all it did was turn me into a future customer, right?
Chris Gammell: That's right. I mean… You couldn't see it, right? I mean, I feel like just the model wasn't there. Yeah. There was no way that that was going to possibly work. I mean, yeah.
Dave Jones: So, I spent many hours, many happy hours as a child playing around in Photoshop. And it's like, yeah, I didn't do anything commercial with it, but I learned how to use it. And that was really valuable.
Chris Gammell: So, yeah. And now you're not going to change to GIMP or some other one, right? Well… Yeah, now it's a lock-in, right?
Dave Jones: The story has changed since they switched to a subscription model. Oh, the cloud model. Yeah. So, I don't fully approve of that. So, it's a mixed bag. But, yeah, I mean, things like Fusion 360 or Fusion offering a free tier, even if it's a hobbled tier, I do approve of that. I mean, that's what they should have always done, right? Because, you know, kids playing around with it aren't costing them anything, right? They're just… Yeah. They're content creators and they're, yeah, they're future users, like you said. Well, I mean, with Blender, it's completely free and it's open source. So, it's not even an issue. It's just… It's free for everyone. And, yeah, it's…
Chris Gammell: It's just so powerful. Here's my thing on Fusion. Fusion, they never made a Linux port. I get it. Yeah, that really bothers me. It's not their thing. But that was the only thing holding me back from moving to Linux. And, like, that is probably… That is the reason I switched to FreeCAD and, you know, for my own detriment, it's… It's so… It's not like I'm doing it.
Dave Jones: FreeCAD is so… It's almost there. It's just got a lot of glitches and little things to fix and features to add. And it's just… I really want it to succeed. I do use it. I try and use it. Five more years. Yeah. Because I remember I started using KiCAD or KiCAD. And it was just when they released version 5, I think. And it was like, it's just a… It's usable now kind of thing. Because I was using Eagle before that. Yep. And, yeah, it's only gotten better. So, I just… I… FreeCAD is… It is just about usable, but not for… Not for assemblies and things. It's just… I don't know. It's on the cusp. It's on… Yeah. I really want it to succeed, though. And I think one of the bad things about Blender is it set an unrealistic standard for open source software. Because they move so fast and they're doing so much so well. I think people have this expectation if they see, oh, Blender's able to, you know, implement this feature. It only took them that long. And you look at, like, KiCAD, who's… You know, their user base is a lot smaller. And they're still, like, they're doing great. But, yeah, it's not… It's nowhere near the same ballpark. But then, I don't know, Blender gets tens of thousands in donations every month or something. You know, they've reached that critical mass where they're just… Everyone's… People are using it commercially. And now it's… It's… It's very viable. And they've got a full team of employees making it better. And it's fantastic. And I really wish there was a Blender equivalent for… Well, basically, FreeCAD. Yeah. And pretty much other things.
Chris Gammell: I don't know. Yeah. Totally. Totally. Yeah. Yeah. Yeah, I think, you know, Blender has the benefit, too, of, like, just broader support, broader general interest in the space, right? That totally raises users, raises the number of donators. Yeah, that sort of thing.
Dave Jones: I mean, I was kind of amazed recently. Last year, I did some work for a special effects company. And they called in an outside consultant for one bit of work, which is NDA. So, I shouldn't talk about it. But I was just amazed that the consultant was using Blender. Yeah. It's in the industry now. They're using it. It's one. It's done it. Yeah. Right. Yeah. Yeah. Right. People are paying for that. Yeah. Yeah. So, I couldn't be happier about Blender. I think it's one of the best things to have happened in the world. Yeah. I just wish there was an equivalent for, I mean, even just, I mean, Photoshop and GIMP, GIMP is just, I don't know. As far as I'm concerned, like, Photoshop CS6 was feature complete. It didn't really need anything more. So, yeah. Yeah. What about AI tools? Come on, man.
Chris Gammell: Yeah. Yeah. Well, just to tie it back to the Blender stuff, too. So, you started with simulations on this to get the fluid simulator working and stuff like that, right? But then you tied it to hardware, but then did you have, like, a kind of back and forth once the hardware is up and going? Like, how did that end up working?
Dave Jones: Well, if we go back in time to the volumetric display, whereas I was rendering them in Blender, I mean, that in itself is kind of a testament to how useful Blender is. Because I was like, how do I generate a volumetric video of, it was meant to be a candle. So, I mean, fire simulation is part of the same fluid simulation package, really. But I just happened to do a liquid to begin with and thought, oh, that's fun. But, yeah. So, I rendered the fire. But then I was like, oh, what can I use to turn that into some, you know, a blob of binary data that I can play back on the device? And, yeah, there's a Python scripting interface. And I made a big old rectangle, like a thin plane, and did a Boolean modifier with the fire simulation. And then rotated the plane and, yeah, just linked the camera to that and then imaged that. And, yeah, it was, I couldn't think of a faster way to do it.
Chris Gammell: You spin the camera around it.
Dave Jones: You spin the camera around it and have a plane that is kind of slicing through the 3D model. Got it. Yeah.
Chris Gammell: We should probably explain what the time you have volumetric displays as well.
Dave Jones: Yeah. Because that's probably pretty important to the context. I didn't invent volumetric displays. There's other people who've done it. But it's basically like a persistence of vision display where you're spinning a thing around, except you're spinning a whole 2D panel so that you can generate a 3D video, basically. Yeah. And, yeah, it's very low resolution. The fun thing with that one was how, again, it was a conversation with Mike Harrison and Moritz Voldemeyer, who has made some electronic candles. Oh, cool. Okay. It was a conversation about, you know, how could you make it look like fire from every angle? I was like, well, why not just spin the LED matrix, right? Like, oh, that would be too complex. You'd need, you couldn't make mass produce. You'd need brushes. You know, it's, it's.
Chris Gammell: Sounded like you got nerd sniped. Yeah.
Dave Jones: I did. I was just like, oh.
Chris Gammell: You couldn't possibly.
Dave Jones: You couldn't possibly do that. And then I was like, but wait, what if you spam the whole thing and put the battery on board and put the motor on? And then it's just a spinning top with a candle on top, basically. And it was one of those things where, you know, didn't expect it to work. Wasn't sure. I was like, oh, I'll just try. I'll just, you know, so cheap to get a PCB made. And yeah. Incidentally, you know, the, I didn't mention that I borrowed this pick and place machine. I've still, I'm still borrowing it. I have it on semi-permanent borrow. That's called, that's called stealing. Yeah. I mean, it's basically because I keep doing interesting things with it. I keep justifying. It's like, oh no, I still need it. But who did you, who did you quote unquote borrow it from? So essentially it is the, it was donated to the hack space. I see. And when the hack space closed because it was evicted from the building and everything had to go into storage, I was like, well, you know, storage costs money, you know, why not store it at my house? Yeah.
Chris Gammell: So that was. Be careful. That's how you start another hacker space right there. You know, you get enough tools and then someone says, hey, can I come borrow the tools? You're like, yeah, come on in. I guess I should charge you for entrance and we should all have the governing board. And then, you know, no, no. I mean, if anyone at hack space still wants to use it, I'm very, very willing to hand it
Dave Jones: back. I've definitely had my, my fun with it. And we'll continue to have fun as long as I'm allowed. Are you using it for the 0201s or what? Yeah. So I did. I mean, it's not, it's not supposed to be able to go that small, but yeah, it works. That's kind of astonishing. Which model is it? So it's, I'm going to have to look it up. It's a charm high machine. I put it on. Oh, charm high. Wow. Okay.
Chris Gammell: Is it the one open PMP compatible one?
Dave Jones: I don't know. So where would I have written it down? One of these. Probably on the volumetric display, isn't it? Yeah. CHM T36 VA. I'll have to look that up because I don't know. That doesn't mean it. No, I mean, it's one that was available. That's what I'm saying. And it's, it's, it's okay. So it doesn't have automatic tool changing. And it doesn't have an ability to quickly change reels. So you, you, all of the feeders are one piece. You can't, you can't just. So you strip. Yeah. Yeah. It's a real pain. If you want to change what part is loaded. So that the project I got it for project. I borrowed it for the justification for getting it was the, the precision clock, which I now finally released. But that was like, you know, more than a day of just unpeeling bits of tape, sliding them through and then using the tiny little stickers to join the, the, the, the film to the take up spool and then typing into a spreadsheet, you know, what parts were loaded, what the spacing is, what the, you know, what the width and the, and the ticker tape, uh, you know, the, the sprocket hole spacing and all that. So yeah, a lot of tedious work to set up. Uh, that kind of put me off using it for most things, except in the case of an LED matrix where there's only one part and suddenly it's really efficient. It's like, oh yeah, I want to place, I don't know, 2000 LEDs. Well, yeah, I just load the real once and then away we go. Um, yeah.
Chris Gammell: So I haven't, again, I haven't published these. It's like, Tim, can, Tim, can you make a multicolor display? No, I can't. No, I couldn't possibly. I can't stand it. Sorry.
Dave Jones: I mean, yeah, I, I, I, I've made a few displays which I haven't published. Uh, but again, we'll do eventually. Uh, there's one I was carrying around at EMF, which, uh, it was just over 2000 LEDs on the thing. And, um, yeah, it took about 50 minutes to place on the machine. And I mean, it was quicker than by hand. Yeah, right. Exactly.
Chris Gammell: Yeah. I, yeah, there is some crossover point, like where it makes sense to get it all set up. And even though it's annoying, right? Yeah.
Dave Jones: Yeah. No, it's, um, I mean, I have, you know, I've, I've ordered, uh, assembled from China a few times and it's, you know, it's, it's, it's amazing how cheap it is. Uh, but it's not quite as instant gratification as, uh, as assembling the boards yourself, especially if you only want one, you know? Um, yeah.
Chris Gammell: Well, yeah, right. Yes. How often are you building just one? Is it often?
Dave Jones: In the case of things like the volumetric display? Yeah. It was one. Just made one. Oh.
Chris Gammell: Because it was just a prototype. And then how many did you end up making eventually? Just the one. I only made one. That's it. That's me. I made four. Oh, sorry. Volumetric. Oh, the volumetric display. Yeah. Sorry. Yeah. Yeah. I'm sorry. I'm confusing about the pendants. I was thinking, like, I remember you saying in the video that you made like a bunch. Yeah. A small handful of varying quality.
Dave Jones: And yeah, I did. I don't know. Since then I said, you know, if I'd known that they were going to sell that well so quickly or that people would want to buy them, even, you know, with the caveat that it's a handmade item and, you know, it's going to have blemishes. And yeah, if I'd realized that people would absolutely want to buy it, even for what I think is crazy money, I'm very, very grateful to them. But yeah, of course, yeah, I'm kicking myself. I didn't make, you know, like 50 or 100 of them before putting the video up. It's like, oh, I'd have been laughing. But no, it was just a small handful of those pendants, which, yeah, I'm delighted. Compared to other projects I've put on YouTube, that's definitely my most financially successful one now, you know, instantly made quite a bit of money, which is fantastic. I'm very, very grateful to those people. I mean, the person who bought the very first prototype, because I sold what I considered the good one, like, it wasn't meant to be a production one. It was me trying to build it slightly better. But then after those sold, I was like, well, I've still got people ask me, do you have another? Well, I've still got the prototype, you know, the very first one. And the person who bought it said, I'm so glad to have received serial number one. I was like, well, that's the one with the most blemishes. I'm like, yes, but it's the first one. Collectors, man.
Chris Gammell: You got to watch out for collectors, you know. So I'm delighted by all of that. Although it is interesting that it has come to you, I mean, I guess the electronic space as well. I don't know. Like, you know, like the sneaker crowd, I feel like that's like its own subculture, right? But like, you know, electronics and I guess because it's also jewelry. Yeah. There's also that. People are. It's like you just touch on these different subcultures almost, you know.
Dave Jones: Yeah, I didn't, it didn't even occur to me that if it's, if it's billed as jewelry, then people will pay thousands for jewelry, right? You know, you, you know, you, you, you, you, you, you know, so yeah, that puts it into a different category of what I was thinking. Like, certainly in my mind, I was like, oh, this is a nice fidget toy, which is, you know,
Chris Gammell: maybe, maybe, maybe your, your firmware in there is the new, you know, De Beers, you know, constrained market kind of thing. Oh, I mean, that's how you control the market, right?
Dave Jones: If only, if, if not for the fact that the algorithm is almost identical to the, the one that Matthias Mueller put up. Yeah, but you've got special something, you know, special something. Efficient in a couple of ways, a couple of little, little tweaks that made it work better on embedded. I don't know. I mean, I do, I don't know what to do with that. It's like, it probably is a viable product, but I don't, I don't know how to do a hardware business really. Yeah.
Chris Gammell: It's not, that's not my expertise. Well, we were talking, we talked about it before the show too. I think it would, it would get, it would become a job, right? I mean, it becomes its own thing. Right. So that's, where did you learn to machine like that? I mean, like, I don't really know anything about it. That's an easy one to answer.
Dave Jones: Okay. Yeah. I watched YouTube tutorials. Huh. Okay. Prior to that, so I watched, I really wanted, I started off trying to, let's go back in time. Um, I was taking apart printers when I was a teenager. Like most people do, you know, there was a time when, you know, the, the business model for inkjet printers was, you know, the printers are basically free, uh, and the ink, and then they'd stop working. And there's a website called free cycle, which I like very much. And, and, oh yeah, I know that. I remember that one. Basically in, in, if you're in a reasonably dense city, then people will give away stuff that's not working for free. And I found, I mostly wanted all the stepper motors. I was like, oh yeah, I need, I need stepper motors. Oh, there's, you know, there's 23 printers on, on free cycle. Uh, so I was like pulling the stepper motors out and then I was like, ah, you know, all these, these mechanical bits. I was something, I can't remember quite what it was that triggered me, but something made me want to try and build a sewing machine. Um, I, I, this, this seems like a weird story. I'm definitely missing something. This is great. It was, I find sewing machines fascinating. It's not about the process of sewing. It's just, it's this mechanical thing ties a knot with the thread and it's like, ah.
Chris Gammell: Yeah. Right. Like the slow motion of like seeing the, the needle go down. Yeah. That's an amazing like gif that you could see online. It's like how it works. It's, it's wild.
Dave Jones: Even looking at the animations of how it works. I wasn't clear. I was like, I still don't, like the more you think about it, it's like, but how does it turn the thing if the thread's going around it? Like, so I, I was, I was somewhat maybe again, nerd sniped by that in, uh, thinking about how they work. And I was trying to look it up and I found, of course, Tim Hunkin's, the secret life of machines. This is, this is my introduction to the secret life of machines. Fantastic program. Tim Hunkin is a legend. Um, and the episode about sewing machines was like, ah, so good. And yet I still wasn't satisfied.
Chris Gammell: This is your origin story, huh?
Dave Jones: Okay.
Chris Gammell: Well, it's, it's one of the origin stories. I don't know. Yeah. Right. Right. Right. There's an awesome. I'm just, I'm waiting for the, so you said stepper motors, but then you said sewing machine and I do not think stepper motors for sewing machines. Oh no. I mean, I wasn't originally trying to get them for the sewing machine.
Dave Jones: I got it. I wanted the stepper motors for like electronics fun stuff. Got it. You know, got it. Yeah. Um, fiddly bits. I, I, yeah, I'm definitely, I can't remember the link somewhere that put me onto sewing machines, but, uh, whatever the reason I, I tried to build a sewing machine and I was, I was, I was somewhat nerd sniped by the fact that Isaac Singer, according to the secret life of machines, he built his first prototype in 11 days. So I was like, could I build a sewing machine? And I don't know anything about metal work. Uh, I tried and I made something that almost where I was so close. I almost, I didn't, I didn't get the feed mechanism to work. I managed to get a few stitches, but it was, it's this monstrosity of broken printer bits stuck together. Nice. Nice. I, I, I thought it was great. Uh, but also it was really, really clear that I did not have the right tools and skills to do metal work. Like it's shaping bits of metal with files and a drill. It was like, how do you do this? And, and the, the consensus was you need to learn to use a lathe, right? That's, that's the mother of all machine tools.
Chris Gammell: And that's right. Yeah. So I started, that's where we, so we started talking about that on. So Dave, my cohost, he's like, he went to a mechanical show and he's like, I think I need a lathe. And I'm like, dude, you do not need a lathe. Everyone needs a lathe. No, I still, I still hold that. Most people don't need a lathe unless they're looking to learn how to use a lathe. Right. But like, he didn't have any knowledge of what he would want to build with it. And like, I just, as like a starter tool, you think that's the first tool you should learn with? Oh, was that the first tool you?
Dave Jones: I mean, so I don't know if this was different for previous generations, but certainly when I was growing up, I didn't ever touch any metal work in school or anything like that. Um, uh, and you know, in the old days, I guess it was, it was a course, but no, they, they don't, it's of no use to us these days, is it? And also there's that attitude that like, it's, um, it's kind of like, it's not intellectual. Yeah. It's like, oh yeah, that's for, you know, it's for dum-dums. You, if you, if you're not clever enough to do maths or something, then you, you're, uh, right.
Chris Gammell: I don't know. Actually. Yeah. Destin just talked about that on Smarter Every Day with his, like trying to build a grill brush in the U S and like, I know nobody makes molds anymore. There's no mold makers in the U S anymore. Very limited number, I suppose. But like my grandfather was a tool and dye maker. Like that's what he did his whole career, you know? Yeah.
Dave Jones: I mean, it was a, it was a big deal once upon a time. Yeah. Right.
Chris Gammell: Yeah. I used to build tanks and stuff, I suppose. Yeah. A lot of, a lot of metal work, a lot of metal on those things.
Dave Jones: I, um, I, I, I tried to find somewhere to use a lathe. Um, this, for some reason, I don't know. I basically, I just said, you know, I'm just gonna, I'm just gonna go for it. I, I ordered a mini lathe. It's like a Chinese brand mini lathe. I'm just gonna, it was a, you know, it was a fairly big expense for me considering it was just like a hobby impulse. It wasn't an impulse. I thought about it for a long time. I was like, I need it. I need it. And I, uh, it's, it's fantastic. I, I, I'm, I just feel sorry for anyone who doesn't use it, doesn't know what it's like to make things on a lathe. Cause even if you make a mistake, it's still beautiful. It's rotationally symmetric mistakes. It's so good.
Chris Gammell: That's a good one. I like that. Yeah. I like that. It's great. And you do have a bunch of stuff. I mean, you have like LTE, I'm just looking through your, your hardware page and like you have stuff that's earrings, knurling, time wasters, stuff like that. Like that is all, that is all. It's just having fun on a lathe. Things, right? Yeah. Yeah. Okay. It's all brass. Is that right? I mean, is that what you use?
Dave Jones: Some brass, some steel. Originally it was, I was just for maybe the first year, all I was doing was taking the bits of old printers, like all of the nice, nice looking bits of metal. Like those, those rods, which I think they're plated. Anyway, I just. Like the sliders? Yeah. It looks like a chrome rod, but it's just like a chrome plated bit of steel, I think. I was just chucking those in the lathe and then just making stuff, you know, I made a little tiny little steam engine. And I was, I, I learned pretty much all of the skills to use it from YouTube. It was at the time it was Mr. Pete 222 was the channel who just, he was an ex machine shop teacher. Um, and he just put up a bunch of, this is what we used to do in class. And now America is, you know, falling apart and all that, but we need to get kids interested in, uh, in these skills. Uh, which I mean, I, I was already, I was, I was already enthusiastic, but, uh, yeah. Um, it's, it's great that, uh, I could just go on YouTube and learn how to do this stuff. Um, yeah, yeah, that's great. Yeah.
Chris Gammell: I mean, like, so I, I had a, I had a mill pro a mill thing myself and I, I set it aside. Uh, but, uh, yeah, I, so I, I know the similar, I have the similar, uh, instincts, but way, way, way less follow through. So that's where we diverge.
Dave Jones: I mean, that's, that is a huge part of it with the hobby projects is, um, yeah. Yeah.
Chris Gammell: Keep going, man. Yeah.
Dave Jones: Motivation is, uh, it's something, because obviously what I've tended to do, especially in the last decade or so is I finish a project and then I put it on my website.
Chris Gammell: What I don't tend to do is. Is that the goal? Is that the, that's like the done and dusted kind of thing?
Dave Jones: Well, it used to be originally. It was like post it on the website. Then it was like post it on the website and make a YouTube video. And then now it's like, oh, do I post it on the website, make a YouTube video, put it on GitHub and also sell it. Promote it. Yeah. Right. Right. So where do you draw the line? But, uh, something I don't post on, on my website is, you know, the, the failed projects, the ones that I just don't see through. Uh, so it's. Oh, that's not true. You have some that you've, you have tags, you have stuff that says, uh, abandoned. I do.
Chris Gammell: You're saying there's more.
Dave Jones: There's certainly in the last few years, I pretty much only post the complete ones. Um, it's just, it's somewhat, it's somewhat like filtered because I've gotten very good at completing projects, but you know, there's, there's a ratio of projects. You start and projects you complete, um, you know, and, and pushing that ratio to have more complete ones. I mean, it's the more things you complete, the better you get at completing projects. It's, it's, it's that kind of unstable equilibrium. Yeah. And if you, if you get into the habit of just, you know, half finishing things, then, then it, it, uh, it cascades, uh, and it's a constant struggle.
Chris Gammell: But, well, I mean. That's interesting. That's interesting though, because it also. So again, from an outsider perspective, I like the, so like you have, you know, like you talked about the, um, sewing machine and it's on there. And it's abandoned. Yeah. But it's abandoned, but I can go see it and I could see where you stop. Like, yes, this might be me as a podcast host, like hoping to like, you know, talk to you at some point and be like, Oh, look at Tim's history back here. Like, that's super cool. But like, I think there's also value about the documenting. Absolutely. 100%. Stuff not doing, which is. Yeah. I don't know. Like, do you think then that it's problematic?
Dave Jones: If you only. I definitely don't want to be the kind of person who only posts their success. Like, that's not, that's not what I'm trying to do. It's I'm kind of doing that accidentally in recent years. Cause I'm, I think it's partly because the, the site and the YouTube channel have got a bit more popular and it's like, I'm almost afraid to post things, which are just like half finished. It's like people expect to, you know, a volumetric display or something. And it's a bit weird if I post like, Oh, I tried to do this thing. It didn't really work. Oh, sorry guys. I don't know. Um, but yeah, no, it's, it's something I really hate. If you look at like an artist, like a successful artist or creative person and you look at the things they've done and you can only see brilliant things. You can't see their early attempts, which were rubbish. Right. Oh, come on, man. Everyone has to start somewhere. And I really, really respect it. If people do keep online their early work, which is kind of cringe, but it shows, you know, here's the progress. And if you stick, I mean, the, the one that I'd like to tell people about is, um, web comics. There's a, there's a web comic, which is now finished called Schlock Mercenary. And I really liked it because the guy updated every single day for 20 years or more every single day. And when he's, you'd look at the beginning of the comic and he's like, wow, this is rubbish. It's like Emma's paint drawings. It's, it's, it's, it's not, I mean, it's okay. I mean, good on him for sticking at it. Um, yeah. And then like 10, 15 years later, he got nominated for a Hugo award because of how good his comic was. And it's like, is there any clearer proof that if you just do it every single day, you get better? Yeah. It's like, yeah. So I find that really kind of inspiring to see these, these stories. And again, some of, some of my favorite electronics projects are, I mean, there's, um, like, you know, Sprite TM, who's I think is. Oh yeah.
Chris Gammell: Of course. Jeroen.
Dave Jones: Jeroen. Jeroen.
Chris Gammell: I can't remember how to pronounce this. Jeroen. Jeroen. Yeah. Jeroen. Jeroen. Yeah. Yeah. Every time I say it, I always get it wrong every single time. So just saying Sprite. That's why he, I think, tells people to call Sprite TM.
Dave Jones: It's, um, his projects are amazing, but like his early projects are, I'm not going to say mundane. They start off like, oh yeah, I could do that. And then, then it's kind of progresses over the years. He gets, gets better. And, and until he's like doing magic and, and yeah, seeing the progression is, uh, is really, it's really cool. He's yeah. He did. I remember one of the projects that inspired me was his, um, he did a synthesizer on a Game Boy Advance. The Game Boy Advance allowed you via the link cable to send a payload so that if you wanted to do, uh, two player games or more using just one cartridge, you could send a payload across the link cable. And so using that mechanism, you could send a synthesizer down the link cable. What he did is he took an AT tiny chip and that like implemented the protocol to send the payload. And it had on its flash memory, it had his synthesizer game, which sent across the, the, the link cable. And then the AT tiny turned into, uh, a MIDI to link cable adapter. And so you put the whole thing inside a cable and it was just like, okay, you plug one end into the MIDI keyboard, one end into a Game Boy with no cartridge in it. And you have a synthesizer, which you can use the piano keyboard to play the, the, the chip tunes. And it's just like, it's so perfect. It's wrapped up in a neat little, so that, yeah, you may, if you look at some of my projects, you may see some, some, uh, influence on, on the things that I tried to do. So yeah. Yeah. Um, it's, uh, yeah.
Chris Gammell: That least of all, you also, uh, we were talking before the show about the, you know, your, you know, things to try and maybe fail at, but also just to try, you said, uh, writing, uh, Game Boy emulators, uh, that of, of joy.
Dave Jones: Oh yeah. Yeah. I thoroughly recommend anyone, anyone who thinks, uh, that it's, it's within their capability. Um, you know, obviously it's not a beginner project and it's not, it's not easy. That's the point. It's a challenge, right? It's a, it's a challenge to, to write an em, like, can you say you really understand how a computer works if you've never written an emulator? Cause like in order to write an emulator, you have to describe how that computer system works in, in every last detail. Uh, and if you make tiny mistakes, then, then it won't be a, won't be a good emulator, but you know, Game Boy emulator seems to be the perfect, perfect point in terms of how difficult it is. Cause it is difficult, but also it's achievable. Like one person can write an emulator in a couple of weeks, uh, or maybe less. It depends how good you want your emulator to be. I mean, I think within a week I had Tetris running and, uh, or just about running, you know, no sound, but, uh, Tetris doesn't make use of most of the hardware features. It's very simple. It's one of the first games that came out. And so, yeah, you can get to Tetris very quickly. Uh, and it's just, it's just really satisfying to play Tetris on an emulator that you wrote. Uh, and yeah, I, I went, I went the whole way through. I played all the way through Link, uh, Link's Awakening. Uh, and I found like weird glitches that just, you know, halfway through the game, it would suddenly crash because until that point, it never tried to address this particular bit of memory, which was invalid. And the way that the real hardware behaves is that it just drops the high bits and wraps around. Whereas in my JavaScript array, it was trying to access, uh, you know, it was just zero or whatever. Um, so yeah, finding those little glitches and actually playing it through to the end. Oh yeah. The, um, one of the weird things, which I thought was hilarious. Uh, there's an instrument, the Game Boy, uh, processor is, it's very similar to a Z80, uh, which, yeah, it is a, it's a custom, right?
Chris Gammell: It's a custom process.
Dave Jones: It's slightly different, but the instruction set is mostly the same. And there's an instruction on there called DAA, which is decimal adjust after something. I don't know. I can't even remember what it was when I wrote this in 2018. So it's not the freshest in my memory, but, um, yeah, uh, yeah, this, this instruction, I remember when I was writing the CPU, what I did is I, I tried not to look at any other resources, I thought, oh, uh, it's a challenge. I just got to look at what, what the instructions are and implement them. I'm not going to look at other people's emulators because the Game Boy is really well documented. So you've got that ready for you. Uh, so I can look at like the, what does the Game Boy do?
Chris Gammell: It's like the answer. It's like the answer key at the back of the book. Yeah. Yeah.
Dave Jones: So I didn't want to look at other emulators directly.
Chris Gammell: Yeah. Right.
Dave Jones: Uh, but I was like, what the hell does DAA even do? Right. I was like, okay. So it's after a binary decimal binary coded decimal, like packed BCD. Uh, arithmetic shorthand instruction. I was like, oh, I dunno what it does. I'll just do this. And I, I, I did what I think it was supposed to do from, uh, and you think, oh, does it, does anything even use this instruction? Uh, and it turns out the answer is yes. So in Link's Awakening, I was playing through. You should, Tim, we'll find out. Uh, yeah, I was playing through and I went to the shop and I bought the shovel for 200 rupees and it subtracted the wrong amount. I was like, what? Oh no, I, I implemented DAA wrong. And, uh, yeah, it is used.
Chris Gammell: DAA was subtracted. That was all it was or what?
Dave Jones: It does some kind of carry operation on packed BCD basically. And, uh, yeah, after that, I just, I, okay. I looked up what it's supposed to do and I found the formula. Yeah. That's okay. So apparently people do use BCD or did for at least for things like scores where it's, it's gotta be displayed. So I guess it's, it's helpful there.
Chris Gammell: Yeah. Um, yeah. That's really, yeah. That's some deep stuff though, too. I mean, like that is the, what made you decide? I mean, you, I mean, you said it's a joy to do it, but like, what was the motivating force for it? Like, what made you say like, oh, this is, this is the time.
Dave Jones: It was, um, I just left the job I was doing. Uh, I took some time off. I was like, I've always wanted to write an emulator. I think, I mean, it's, it's been in my, I don't know. I mean, one of the things that first got me into electronics was emulators. Uh, I think. Oh, really? Um, or at least. What about them? Okay. So I'm trying to think where did the story begin? I think it's with, uh, no cash because so when I, in like early two thousands, uh, I was, I was, um, we had the Game Boy Advance and the Game Boy Advance would, uh, allow you to send a payload to another Game Boy if you wanted to do little, uh, two player games or more. But there were some games where that didn't work because the game was too big for that payload. So you had Zelda four swords would only work if you all had a copy of the game. And so I never found four people to play it with because it was too hard to find enough people to play it. And we thought, oh, well, I found one person to play it with and it kind of worked, but we thought, oh, surely we could just emulate this. Surely. And the Game Boy Advance emulator at the time was called Visual Boy Advance. And, uh, it was fine. It worked. You loaded it up and you try, you load up another instance of it. There's actually, it's like a 50 megabyte executable. You load up another one and then you form a TCP connection between them and you could just about emulate two. It was rubbish. It did. And like the idea of doing four at once was just not going to happen. It was just, it was really choked on two. And I looked up, you know, how, how can you emulate four Game Boy Advance at once? And I found this emulator called NoCache. And the guy who created it, it was just one guy. Uh, I think his name was Martin Korth, um, NoCache Emulator. He, uh, I tried to download it. First of all, like his website was so weird, probably again, influential, like the hand drawn, weird, weird aspect. And the fact that he called it NoCache because he, you know, he, he was just broke. Like, and he was trying to market this. And he was like, if you're a gamer, don't download my emulator. Go away. I'm sick of the support issues. It's emulator is only for developers for Game Boy Advance games. No one else. And, uh, you download the emulator and it's like, where is it? Where, where, where is this emulator? Is this, the zip file was like a hundred kilobytes or something. You, you extract it and you've got like this XE file, less than 200 kilobytes. You think, where's my emulator? There's no other files in there. You double click it instantly opens and I loaded up four swords and I just clicked emulate four Game Boys and it worked. And it was like formula for Game Boys emulated at once. Uh, and the CPU load on that windows XP machine was like less than 5%. I was like, what? Having just like witnessed visual boy advance failing to do two at once. And this could do four at once at basically no cost. And the executable was smaller than anything I'd ever seen before. I was like, what's going on here? How, how is it possible? How are you doing this magic? And yeah, the answer funnily enough, the answer is no cache emulator was written in assembly. And it's like, oh, so this is, this is the wizardry. Uh, and I remember at the time thinking like, I want to learn this power. I want to be able to do really efficient pro like really fast, efficient programs. I want to be able to really control a computer.
Chris Gammell: Uh, and at the time I tried, you know, Tim though, the problem is if you start learning the assembly and getting these, these, uh, powers, you also get the grumpiness with it. That's the rule.
Chris Gammell: Yes. That's the only way it works is you have to have the two together. Yeah. There's probably something to that.
Dave Jones: Yeah. You know, with great power comes great responsibility. It's true. It's true. Yeah. Uh, no, I mean, I, I, I struggled like to try and learn assembly as a young teenager. So x86 assembly, like I, I didn't succeed. Um, there was, uh, there was like the tutorials basically all assumed that you were a very competent, uh, C plus plus or C programmer and you wanted to go deeper. Uh, none of them were for teenagers wanting to mess around.
Chris Gammell: Um, just, just call up your Intel rep and they'll be able to tell you more about the x86 assembly set. Exactly.
Dave Jones: Uh, okay. Yeah. And, and of course they, they all assume you are intimately familiar with the OS, like the Win32 API or whatever. Um, and so I think that that whole experience made me greatly respect people who broke in assembly, but also I had this yearning that was unfulfilled, uh, right up until I read one of the data sheets for an app mega chip, which gave code examples in assembly as well as C. And I was like, what they, they, they actually want you to program in assembly and you're encouraged. Uh, and, uh, yeah, that was suddenly I discovered like the AVR architecture. First of all, bare metal, no operating system to worry about. Uh, second of all, it's eight bit. Uh, and, and third of all, it's really simple. It's, it's only got like 130 instructions and you only need to know maybe 50. Uh, and yeah, I, I can hold them in your head. That sort of thing. Precisely. You can hold the whole thing in your head. You can, after like a month of fiddling around with, um, uh, it was AVR studio, which wasn't good. I mean, I, I just, I feel around with it and I just, I felt suddenly it was like, oh, it all makes sense. You know, uh, I understand how this processor works and I know it's always a black box and it's like a, you know, there's a pipeline you don't see and stuff, but basically it's like, I, I know every instruction has this many cycles. It does this to those registers and it sets these flags and that's it. Like that's, that's how the processor works. I mean, there's a first time I like, I guess, yeah, probably for like older people, it would, it would be like 6502 assembler kind of thing. Like people would, in those days, it was normal to learn how your computer worked. Whereas now it's like, oh, it's too complicated. Nobody possibly could learn how x86 works. So it's not unless they want to go really, really deep and commit their whole life to it. Um, so I don't know. I, I just went a bit mad when I, uh, discovered AVR assembly. Um, and so what did you start building? Like, what was the, what did that unlock then? Uh, well, what I ended up doing was that, uh, oscilloscope games console, which, uh, it was, it was just, I think it just been pent up inside of me, all these things I wanted to do. And they just, I just, um, yeah, I did the games console. I did all that MIDI stuff. Like suddenly it's like MIDI is, uh, is easy. It's just, um, it's you heart. It's like, it's, it's just three bytes and it's just, I don't know. What was MIDI is shockingly. It is simple. You don't realize until you actually start fiddling around with it at a protocol level. Cause if you're, if you, all you've done is like use it on a computer software, it, you know, you've got no idea.
Chris Gammell: Is it in fact, it's one of similar to, I think my first experience was actually buying like a broken asshole synth. And like, there was like all these things in there, like, oh, you know, like program this to your 3.5 inch floppy. And then, you know, then it does this and this, and I'm just like, I don't get it. You know, it was this higher level function on top of it, but yeah, it was on the back end. It's just like, it's just got that funky plug and it's just in serial.
Dave Jones: Yeah. Okay. So it's, it's remarkably accessible. Um, yeah. I really don't like it when, um, there's unnecessary abstraction. Well, I mean, I don't know.
Chris Gammell: Oh, this is a thematic thing here. I was going to say you, you and CN lore both, uh, CH32. I don't like abstraction. This is sounding, it rhymes. I gotta say.
Dave Jones: Yeah. Yeah. I, I, I, I, uh, I do like a lot of what CN lore has done. Um, yeah, uh, we, we have a common interests, I guess. Yeah.
Chris Gammell: I think so. Yeah. What does that mean then? Like for the higher level stuff? Like, so what about when you do see a project and you want to add something that, uh, OS, RTOS or an OS might help with you, you just kind of, you leave it aside, you simplify or, um, what do you do in those cases?
Dave Jones: Um, so if it's, if it's appropriate to be bare metal, then, uh, that's what I'd normally go with. And, um, yeah, yeah.
Chris Gammell: What if your army of robot slide whistles needs to be connected to the internet, Tim?
Dave Jones: Yeah. Well then, uh, yeah, I mean, in that case, that one was written in C, I'll be honest. Uh, okay. Uh, but that's, that's cause it was, it was, uh, very quick to, to produce. I was, I was in a rush, uh, and sometimes it is faster. Yeah. Yeah. That is, uh, abstraction is allowed if it gets you to what you need to do.
Chris Gammell: Wait, wait, are you saying that C is the abstraction? I mean, you're like, oh, I wouldn't go above C. Okay.
Speaker ?: Yeah.
Chris Gammell: Okay. I guess that is what I'm saying. But like, oh, okay. That's, that's a new one for me. I don't know. Uh, that's the most extreme thing we've had here on the show, but it, I'm sure a lot of people are listening and nodding their heads. They're like, yeah, C. Yes. Yeah. C is so high level. You did say JavaScript before. I'm just, I just want to point that out. No offense.
Dave Jones: I do. I do. I do have a very soft spot for JavaScript in my heart. Yeah.
Chris Gammell: Come on. It's all the, all the right tools for the job, right? This is what we always talk about.
Dave Jones: So I'm just thinking about like, Arduino has like digital write, which is an abstraction, but what it's abstracting to or from is one.
Chris Gammell: Extracting a bit into something.
Dave Jones: Yeah. It's just like, here's the output register. Yeah. Put a bit into it. And it's like, if you, if you write, you know, output register equals one, and then one appears on the GPIO, you know, GPIO one, then that's it. You know, the level you're working at. Whereas if you do digital write, a huge amount of stuff could happen or maybe not. I don't know. Like it's.
Chris Gammell: Yeah. But they're doing that for different reasons. They're not doing it just, just for. Yeah. It's right. They're doing it because they're supporting across hardware. Yes.
Dave Jones: Yes. They're trying to make it easy to get the job done, which is completely legitimate. And I'm not criticizing that. But if you're trying to learn. Yes. The abstraction is. I don't know.
Chris Gammell: That's an interesting kind of through line on your stuff is like the, I mean. Yeah. What are we actually trying to do here? Are we trying to learn? Are we trying to. Well, no, I mean like, you know, you, you've expressed like the, with the sewing machine, it was like a struggle, but also you learned from that. Right. I think, you know, hearing you talk about it, you've got some stick to it, to this, you know, like that is very important. And a lot of people. Me. I don't have that. And so like, I do think it would be interesting to have like a gauge or a test for people. Right. Like abstraction is like a way to kind of, you know, kind of way hand wave past it. Right. But like there, there are definitely benefits to, to not having the abstraction layers. And, and I think it's the knowing, knowing what's actually happening in your machine. That is a very critical piece. I feel like.
Dave Jones: Yeah. I mean, maybe it's not critical. Maybe it's enough to get the job done. You don't have to understand everything. It's not, it's not required. It's just, it's just interesting.
Chris Gammell: There's benefits though. And there's benefits. Yeah. You can do things with electronics that I can't do. Right. Because you understand parts of the machine. Right. C and Laura. How about this? Let's just remove it from me and you. C and Laura can send a Laura WAN pass using a GPIO. And I cannot do that because I don't understand how a bunch of that stuff works. Yeah. And that's fine. Yeah. These are the benefits. I need to do it. Yeah. Right. I buy a part. If I need to do Laura WAN, I buy a part. Maybe I load some, you know, things, network software on top of it. Like that is a choice I do if I need to. I haven't done that. Okay. Maybe I could. Maybe I could. But I, but I, but I feel like the big thing here and like a through line with you as well is like that you choose to, like, you know, you have a website that is just full of like these choices that you, you sit down and you do these interesting projects. Like that is often the most interesting thing to me is just like the motivation behind picking up that next thing, doing the next project, finding that next, you know, whistle, slide, slide whistle project. You know what I mean? Like I just, I don't have these impulses in my life. Not impulse sounds bad, but like impulse, like, like motivations to do it. And that's very impressive to me. I mean, just the creativity.
Dave Jones: It's, it's, it's a constant struggle. I'll say that it's not, it doesn't come naturally. I'm forcing myself to do these projects because at this point it's because I've done so many and it's like, ah, well, yeah, that's, that's the motivation in itself then. But certainly when I was starting out, yeah, it was really, really difficult. Just finding something that's, that clicks that, that you can kind of hyper-focus on. I don't know, maybe it might even be a mental condition. I don't know. That kind of like mania that happens when it's something really interesting to you and you're like, oh yeah, suddenly, suddenly, yes. This, I'm going to work on this all, all weekend. That's not it. Non-stop and see what happens.
Chris Gammell: Yeah. Like the thing to focus. Yeah. That's interesting. So it was never like, it was never, I want to learn X so I will do Y. It's more just, I'm looking for that next thing to build.
Dave Jones: No, no, it was, I mean, I, I guess one of the prime examples of this was fiddling around in, you're probably familiar with this, the, the slightly rude name of the language called brain fuck, which is, it's, it's.
Chris Gammell: I don't know that one.
Dave Jones: You don't know it. Oh, well, it's unfortunate that it's named that way. Um, but it is basically the simplest possible programming language. It's only got eight instructions. None of the instructions have arguments. It's very, very interesting. It's, it's a bit like that. I don't know if you ever saw that flash game called quop, where you have to make a person walk and each button on the keyboard controls an individual muscle group. And it's so hard. Cause they're like, so it's very much like that. It's like, you've got so little abstraction. Uh, you got, it's so, if you want to print hello world, you have to do all kinds of nonsense. You know, you add it. You can only increment by one. So you have to do plus, plus, plus, plus, plus, plus, plus, trying to get up to the value of H.
Chris Gammell: Yeah. Yeah. It's so. Did you ever listen to the Babaverse books? The religion we are Bob. Oh no. It's about a software engineer who like basically becomes a computer, but like when he's waking up as like this computer entity, he's got to do that same thing where he's got to like figure out every interface he has and like learn how to speak again. And like, you know, it's all from primitives and like, he didn't, don't spend a ton of time on it, but it's, it's kind of sounds like what you're saying here. That's like what my brain went to at least.
Dave Jones: Yeah.
Chris Gammell: I mean, great books too. Favorite books. Oh my God. So good.
Dave Jones: So what's it called again?
Chris Gammell: It's called the Babaverse series. There's like five of them now. I'll look it up. By Dennis Taylor. The first one's called We Are Legion. We Are Bob.
Dave Jones: Yeah. I mean, there's some amazing things people have done with, with BrainFuck, including like a lot of really excellent hacks. There's because basically if you can, if you can translate something into BrainFuck instructions, BrainFuck is true and complete. So if you can, there's, there's, there's a project called the Moffuscator, which it was basic. They were trying to obfuscate source binaries from reverse engineering. Okay. And he figured out a way to build a valid computer program using only the x86 MOV instruction. That is move data. And, and he, from that, he was able to build a Turing complete. Oh, it's so good. It's basically.
Chris Gammell: So you can. Pairing it all down and building it back up again. Huh? It's. Yeah. Yeah. So. Moffuscator. Yeah. That's a tough word to say. I found a lot of those. I'll. Yeah. There's a GitHub. Yeah.
Dave Jones: The, uh, so I dunno, I, I, I kind of got just, just a little bit obsessed with BrainFuck just briefly, just slightly, just for a, which was like, can I write a program in BrainFuck? There's only eight instructions. It's so hard to read. And, you know, there's a few little programs, like one that Princeton Mandelbrot set. And it's like, wow, that is impressive. Yeah. But can I do something that's like actually difficult to, to, you know, something you couldn't just wing it? Cause if you just want to make, oh, I want to add these two numbers together, you know, it takes an input, multiplies them or something. And you can just kind of like wing it because the program is so short that, uh, that it doesn't really, you know, you can, you can just get lucky. Whereas I wanted to make a program that was like long enough or difficult enough that I had to actually think of ways to get around the limitations. And, uh, that's, that's how I ended up writing this, um, tic-tac-toe, uh, computer opponent. It was going to be chess. And I was like, no, chess is too hard, but I managed to do tic-tac-toe. And, uh, it was basically just, I started on the Friday evening, I think of that, uh, this was back when I was working full time. And then by like Sunday evening, I had it working. I was like, yes, it was just one continuous session of just, uh, obsessively coding. This thing.
Chris Gammell: And, uh, I dunno, I feel like you should also state to people what this looks like when you look at it. I, I was very confused at first, but now I'm just, I'm, my mouth is hanging open actually. Yeah. Looking at the code.
Dave Jones: You've just got pluses and minuses to add or subtract from the, uh, current pointed variable. It's like, it's got one address space, one pointer, and you can add or subtract from the address space, or you can move the pointer left or right. And then you can input those arrows.
Chris Gammell: They're like carrot arrows or not carrots, but like the.
Dave Jones: You've got ASCII input and ASCII output, uh, of the current value in this that's being pointed to. And then you've got the loop instructions, which basically it will say, go back in the code. If the current value is not zero. And that's basically it. That's all of the logic you have and doing anything is almost impossible. It's, it's a great challenge. It's another great challenge.
Chris Gammell: Are you a, are you a puzzle person? Tim? It sounds like you may be a puzzle person.
Dave Jones: Uh, yes.
Chris Gammell: Um, in some cases we could make like a survey for like the types of, yeah, like this, the puzzle people. I am not a puzzle person myself. And this is, this looks like puzzle.
Dave Jones: Really, really depends. Cause sometimes it's like, oh yeah, this, this clicks and I'm hooked and I just can't stop. And other times it's like, oh no, not interested. I mean, the, the, one of the most, the best puzzle game I've played, get ready. The best puzzle game I've ever played would be space chem, which, uh, again, the, there's a guy, there's a, there's a guide for programming game boy advanced assembly called Tonk. I never got very good at that, but the author of Tonk had a blog and on, on his blog, he said space chem is the greatest game ever. Basically. Uh, I've put over 3000 hours into it or something. I'm like, what, what, what is this game? And, uh, it's, it's an early Zaktronics game. So they, they went on to produce like some more famous games, but space chem was like one of their early ones. And it was insanely hard, like far too difficult. Like it is mostly by mistake. They just accidentally made a few levels that weren't meant to be that hard. Uh, and so it's just, I, nothing's ever tickled the same itch. You've got two Waldo's as they're called these little grabber arms. And as they move around the grid, they follow the instructions in the grid and you've got to pick up, it's got a molecule theme, but it's not actually about chemistry, but you're building molecules by gluing atoms together. But that's just, that's, that's just the styling. The actual thing is that, is that logic and kind of programming. And I know I've tried the latest Zaktronics games and they just, they just don't, they don't scratch the same itch as space chem.
Chris Gammell: Well, episode three 32 of the amp hours with Zach Barth of Zaktronics. Oh, really? So, uh, yeah. Tell him space chem. We had him on a long time. Yeah. I mean, it was, it was when Shenzhen I.O. came out. I think that's when we were talking about it. So space chem. Yeah. Here's the, I don't actually play video games anymore because I have, I get addicted to them. I don't let myself. So I probably will not play this, but it does look very cool.
Dave Jones: It's, it's, it's a unique mindset you have to get into. If you're interested.
Chris Gammell: Yeah.
Dave Jones: Yeah. Okay.
Chris Gammell: But yeah.
Dave Jones: Buyer beware. Buyer beware. Yeah. I didn't spend thousands of hours. I spent about 40 hours on it. And, uh, that was, that was, it was, it was, it was a, that's right. Am I the time? Yeah. That was some, yeah. That was nice. It was, it was pleasing. Um, yeah. Uh, I mean, what other, there's some great other puzzle games. There's a Babba is you is pretty good. If you've ever played that. Um, what is it called? Sorry. Babba is you. And it's you, you build logic. You've got blocks that have written English words on them and you push them around. And if you make a sentence, then that changes the game logic. Uh, so it's, it's very weird, very surreal. Gets quite hard quite quickly. Uh, so yeah. Had fun completing that. Um, and I recently played the witness, which was okay. It was very interesting. I think the, uh, the author of that was very, uh, had some interesting ideas. Like there was some design decisions, which I was like, okay, you obviously did this on purpose. I'm not sure that's the best user experience. It's almost like it deliberately tries to, it's kind of open world. Like you, you, you start the game. It's like, okay, there's no instruction. You figure out how to do the first puzzle. You're like, oh, okay. And it kind of teaches you the first few puzzles. And then you escape the, the, the beginner area. And suddenly you find puzzles, which are just impossible. Cause you don't know the rules. And like, you have to just explore to find easier puzzles so you can learn the rules to do the harder puzzles. It's a weird decision. I mean, obviously it was on purpose. Um, it's interesting. Doesn't, doesn't, doesn't have a, does have, doesn't have anything on space chem.
Chris Gammell: Got it. So that's your, that's your choice drug of choice. Yeah. So you also write about a lot of your stuff kind of before the fact, I'm kind of going back through your concepts page. You kind of, you kind of talk about the things you're thinking about, but I'm curious if there's stuff that's not on there that you're thinking about, you know, one thing I I'm curious just generally what you're using CH32 V003 for other things you're interested in, because I feel like that might be a good, good way to end of things to watch Tim for in the future, uh, future EMFs, future, future YouTube videos, future publications of things that didn't work because of course you're going to do that too.
Dave Jones: Uh, yeah, maybe we'll see. Um, I, I definitely do have several completed projects, which will get written up. Uh, some involving fluid simulation, some involving O2O1 LEDs in matrices. Um, and yeah, I, I, I built a new version of the matrix earrings, which I need to publish,
Chris Gammell: which, uh, that one really talk about this. Yeah.
Dave Jones: The problem with the first prototype, I mean, the CH32 V003 is great. It's not actually the right choice for an earring because it's not very good in terms of power consumption. And also I don't think you can even turn off the brown ant detector. So if it gets to below three volts, it just stops. Uh, so I rebuilt it using like primary cells.
Chris Gammell: That's not super great. Yeah.
Dave Jones: It's just got like an alkaline cell. I mean, yeah. Yeah. Uh, so I, I made a new version of it using an 80 tiny and I was like, I wonder how low power I can get it. And I got it so low power. Oh yeah. I really, uh, I was really pleased with the results for that one. Um, basically by, uh, a combination of things, but mostly. Don't know if anyone else has noticed the 80 tiny has a watchdog timer, which, um, uh, you can add its max prescaler. It's 16 milliseconds. So you can wake up the processor in 16 milliseconds. What you, what we've got, if we've got a bunch of Charlie pex LEDs is, um, you turn one on, then you turn it off for the duty cycle. Then you turn the next one on, you turn it off for the duty cycle. And so on, you go through every led turning on how much it needs to be. And then turning off. If you condense all of those on times, like if you pre-calculate how much each one needs to be on at the beginning and you instantaneously flash all of them on at the start of the frame for 0201 LEDs, the duty cycle is so low that you can do all of that in like a few microseconds. So you just got a few microseconds of here's all of the LEDs at the right duty cycles for full bit depth, then go to sleep. And then the watchdog timer wakes you up 16 milliseconds later, which happens to be 60 times a second. So you get 60 frames per second, uh, video playback or whatever. And, uh, it's, it's the power consumption is just zero from the processor. Yeah. Um, yeah.
Chris Gammell: And that's the right brightness then too, as well, to get the, the output you're hoping for like in terms of the, because the duty cycle is low.
Dave Jones: In that case, I'm not using any kind of current limiting resistor or anything. So it's just, uh, Oh really?
Chris Gammell: It's just direct in on the GPIO.
Dave Jones: I mean, so long as you're using a small duty cycle, it's fine. Yeah. And of course they're Charlie plexed. So it's, uh, yeah, it's just, it's just more convenient. Uh, yeah. Really pleased with that one. Also I added a, added a bootloader to it. So, um, I mean, one of the nice things about the CH32 V003 is the one wire debug protocol. I'm like, I still, I want to explore it more. I want to, I was, I was really taken with what, uh, CN law said about just if you could have one with no flash memory and just use the debug protocol. Yep. Yeah. Uh, I, I want to explore that, but, um, 80 tiny doesn't have that, but you can just put a bootload on it that uses one wire. Right. So, uh, I was like, Oh, is there any one, uh, simple bootloader? I'm not above writing my own bootloader, but I found one, which was basically perfect. I ticked all the boxes. So I use that. It's called one way loader. And it's just a bunch of really, um, the guy who's done it has really thought about it a lot. So he's added like encryption and stuff, which I don't care about, but it's got auto boarding, which is surprisingly useful. Uh, so it starts with a preamble, which is like unambiguously determines the board rate. And then it, it doesn't have any acknowledgement, uh, messages. It's just pre-calculated the right times of the flash memory. Uh, and what you do is you just stuff a load of padding bits or padding bytes into your bit stream and you know, the board rate. So you can, uh, you can just add the right amount of padding so that by the time the next frame comes in, it's already finished the right. And then it's like, okay, so this is just a, a one way flash the whole thing. Uh, and yeah, I put that with an infrared photo transistor. And so I can just like infrared wireless updates on the thing. It's like, yeah.
Chris Gammell: Wow. That was easy. Yeah. Do you even hold a button down for that? Like to put it into bootloader mode?
Dave Jones: And then, uh, so what I've done is, um, in that case I have, when you first power it up, it waits a second and says, do you want to, it looks for a infrared signal.
Chris Gammell: If it doesn't get one header and heat preamble and stuff. Yeah.
Dave Jones: Um, and yeah, I'm like, I'm even there. It was that combination of being really lucky and thinking about it a lot. Cause in order to do the layout, I, I, I charlie plexed diagonally, these O2O1 LEDs, put the 80 tiny on the back. And because of the diagonal lines and, you know, I've not got blind wires, it's, Oh, how, how can I wire this through there? Oh, well, actually there's enough GPIO on this chip. I can just wire it through the pins of the microcontroller that I'm not using. Right. So I'd accidentally tied several GPIO lines together. And what I did is I turned on the internal pullup to use the photo transistor. And it was too slow. It was only able to do like less than a thousand bits per second. It was really slow, but because I'd wired several of them together, I could turn all of all of the pullups on in parallel and then increase the throughput. Like it's just, Oh, instead of being like a 50 K equivalent, it's now like a 10 K or something. And it's just like, Oh, that's, that's convenient. I didn't even plan for that. So yeah, lots of really cool things happened in that particular project, which I look forward to posting it.
Chris Gammell: Tim, where can people find your work and find you online?
Dave Jones: Uh, well, the most obvious space is mitzella.com, which is M I T X E L A. Uh, it's Alex, Tim backwards. Um, and of course the YouTube channel, uh, youtube.com slash mitzella. And those are the two places I, and the GitHub page, I guess. Uh, yeah, sure. Yeah. Uh, no, I don't really have much else in the way of social media or anything.
Chris Gammell: That's the way to do it. Actually, you're, you're doing that right. That is the correct answer, sir. Yeah.
Speaker ?: Okay.
Chris Gammell: Great. Well, thank you for being here. Uh, I, yeah, these projects are out of this world, man. Uh, so this is really great to watch this stuff. And I think the only thing is I'm just thinking like, how do I, YouTube is good. I see you on Hackaday. I'm sure. I have no doubt. I'll see your stuff on Hackaday. Uh, I think I gotta, I gotta put you in on like one of those RSS watchers that just kind of pings your site every once in a while to see what's new, you know? Yeah.
Dave Jones: I mean, there is a, there's an RSS feed, which should work. I don't know. Maybe, yeah, maybe I should announce projects at some point. I just, just have a, have a Twitter or something. I don't know. Ah, I can't be bothered. Yeah.
Chris Gammell: All right. Well, either way, I'll, I'll keep an eye out here and I'm sure we'll, uh, we'll be posting more of your, your, uh, projects as they come up. So thanks for sharing. Cheers.
Dave Jones: Well, thanks for having me. Bye.
ATtinyBlenderCH32V003EmulatorLEDPick and PlacesimulationVideo Game
Keep current
Every episode, plus the occasional job post, in your inbox.
