SuperHouse Home Automation Hangout 2020-05-03

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and good morning I think we're live it says we've got 22 concurrent viewers and YouTube is currently showing that the stream is active so hey everybody maybe having a nice Sunday morning or Saturday evening or whatever time it happens to be hey thanks a Cognito it's so sounds like audio is working I'm wired up everything is black at the moment so you can't see it but there's a microphone attached to me on the front hopefully that will give reasonable quality audio uh-huh WV MBA said 2:00 a.m. so that would put you where somewhere in Europe Saturday night here in Quebec cool Oh Belgium yes nice mmm cool well we'll give it a couple of moments while people join but I had a couple of ideas about things that we could do today last week was a bit of craziness with walking around the room a lot and running the pick-and-place machine and that was really cool experiment but one thing that I really need to do is have a better way of taking a camera and moving it around what I did last week was used my mobile phone running as an IP camera and then had that connected over Wi-Fi OBS was taking that in and then streaming it but there were a couple of problems one is that it was really laggy so the video from that was a fair way behind what was going on and also something that I didn't know at the time that I was doing this dream and I noticed when I went back and looked at it later was that the video was also stuttering quite a bit so at the moment where I crashed at pick-and-place machine the the camera started just as the head was about to move so you see the moment of the first crash before it went back and then crashed a second time which is very sad we didn't get to see all the damage so what I need is a camera that will let me do proper streaming and also let me walk around the room with it without lag and without that stuttering I'm wondering if - something like a webcam one along the USB cable would do the job I might give that a try and if anyone has suggestions on techniques for doing that that would be cool so topics for conversation one of the main reasons for doing this as I've said in previous weeks is to hear from all of you about how you are going are you going nuts in isolation filling in ok so if anybody wants to chat about what they're doing go for it drop it in the chat a couple of ideas one is that just before going live on the live stream a couple of us in discord we're talking about things that have gone wrong like disasters that have happened and zaga the-- was just showing a one watt resistor that they were using in class they connected it up to a very AK and another student wasn't careful and turned it up to high and blow up the resistor and he's posted a photo of a one watt resistor with its side blown off so with some yeah though there was a chat about things that have gotten badly wrong and I've screwed up many many things so it could be fun to tell those sorts of stories as well and another interesting thing so we might get back to that there's okay so Aaron just asked what's the difference between your ether ten and mega now that actually ties into the topic that I was just about to get to in a slightly a different way which is what is the difference between a raspberry hi and an Arduino and this came about because I got an email last night from a free tronics customer who who just sent me some information about some projects that he's been working on and how he'd started off using Arduino boards in a couple of things and then it switched over to using Raspberry Pi and so he was talking about the advantage of using a PI in terms of having a full a fuel computer stack essentially so you've got the operating system and the advantages that I was talking about were being able to connect to a remotely program in Python update the code wireless system was running all of that sort of thing and the difficulty of doing updates and devices once they've been deployed if they're running on an Arduino board or other microcontroller board and so Aaron's question kind of ties into that as well and so this is something that I've I've talked about in the past in different contexts but it's probably worth mentioning so the the major difference okay this largely comes down to the difference between and in a microcontroller or an embedded system and a full computer and one of the questions that comes up quite a lot is people will say hey I can get a Raspberry Pi for you know somewhere in the same ballpark cost as a board like an Arduino or one of the equivalent microcontroller board so why would I use an Arduino like an 8-bit microcontroller running at 16 megahertz with a couple of K of flash not much storage that sort of thing compared to say a Raspberry Pi 4 in the ballpark the same price when you can put gigs of storage on with a micro SD card it runs at I think it's in the or I can't even remember it's like a 1 gigahertz 1.2 gigahertz processor with the current models like quad-core it's got video on it runs Linux so you've got a full multitasking operating system why would you use an Arduino when you could use a Raspberry Pi so my response to that basically is that even though they're conceptually sort of similar in terms of similar size similar price they are very different from an architectural point of view which means they have different strengths and if anybody wants to drop stuff in there into comments on this please go for it I'll just give my thoughts on it so the advantage of a Raspberry Pi some of the things that I mentioned earlier you can run a full operating system on it which means that you can do things like run a service like SSH and then you can log in to the PI and it code on it directly you don't need to run an IDE connect a programmer to your target device and then flash in your version onto it you can use it as a remote access computer and it's good in terms of mass storage because it's got the SD card so if you're doing something like acquiring sensor data you can write that to the SD card store it locally you've got gigabytes of storage that's not really a problem and that SD card though is also one of the downsides of a PI compared to something like an Arduino with a PI you're dealing with an operating system running on on mass storage which can be damaged because underneath the operating system you've got the filesystem layer which is managing reads and writes to the storage device on something like an Arduino you don't have a file well you can have a filesystem depending on what you're doing you can put an SD card in with an SPI interface onto an Arduino for storage if you want to but the code that you're running is not generally stored on an SD card it's going to be stored in non-volatile memory and if you lose power you don't have problems like an inconsistent state on the file system one of the problems with something like a full multitasking operating system is that it's going to be constantly reading and writing from the disk there will be things like log files that are open and are being written to so the operating system will have file pointers to the different files that are being used and if you simply pull the power on this you can end up with the corrupt file system if you have a microcontroller and you pull power on it nothing bad is going to happen except in very unusual circumstances so one of the major advantages of something like a microcontroller is that you can pull power off from it put power back in and a second later it's going to be up and running well depending on how the bootloader is set up it could be back up and running your code again within milliseconds whereas if you pull power on this you could corrupt the disk and then when you put power back on it won't be back and running in milliseconds they'll be back and running in maybe 30 seconds give or take depends on what you've got running on it and so in terms of building something that you want to do one simple job install it somewhere and then not think about it for years a microcontroller is a much more robust way of doing it this is really a full computer which is which is ideal for other purposes like if you wanted to generate charts of data you wanted to run a web server then something like this is better than an Arduino even though you can run a web server on Arduino it's very limited and also I should point out that I'm using the term Arduino here in a very inclusive way what I'm using it to represent is microcontroller modules or boards that could include something like ESP 86 six which can have more storage on it it's got Wi-Fi the SP 32 has dual cos no yes it's got dual cos so there are there are certainly very powerful microcontrollers as well and I kind of fall into the lazy habit of just saying Arduino when I mean a board that's not necessarily programmed using the Arduino IDE it could be programmed with other things as well another major difference two more major differences and then I'll stop on this theme one more major difference is power requirement for this to run it takes typically mmm in the order of a few hundred milliamps could be up to five hundred milliamps if you don't really have many peripherals plugged in whereas a microcontroller could take a few milliamps so there could be this could be pulling a hundred times more power than a microcontroller and that's just because it's trying to do a whole lot more stuff so four cores running at a gigahertz takes a whole lot of power compared to a single microcontroller running at 16 megahertz so the other the final thing I'll say about this is that the the i/o on something like a Raspberry Pi is fairly limited and that's because it's just some general digital i/o pins there's I squared C and that sort of thing which is interesting but it's not really intended for building into something else and relying directly on the i/o of the board what you would do typically is rely on some other peripheral to do the i/o for you and the i/o is going to be very dependent on what you're connecting it to whereas a microcontroller and this is kind of a one-size-fits-all thing whereas with microcontrollers most microcontroller ranges will have a common core like the 80 mega core for example in the simple Atmel line and microcontrollers like on the uno and Leonardo and those sorts of things and the call will be the same so it will run the same code but there will be variations in peripherals and you see this this is really obvious and things like the pic line and microcontrollers as well you can there can be a very wide range of options in the microcontroller family so you can have a single type of microcontroller and you can say I want a version that's got for you arts and a whole lot of digital i/o or I want a version that only has one UART but it has built-in USB host support or I want one that's got a whole bunch of analog inputs so what you can do is pick the specific processor that you want depending on the peripherals you need and then design that into your project so the comment from the email that I got last night we're saying that I seem to favor Arduino boards a lot and I said I think my answer to that really is I my preference is to use whatever is appropriate for the problem that I'm trying to solve and many times a Raspberry Pi or something similar to it is the correct solution when you want to for computer stack but many times it's not so you really have to look at what you're trying to achieve for example with my light switches if I wanted to have a light switch that would do things like drive the drive RGB LEDs in the switch and detect button presses and send events back it doesn't make sense to build a Raspberry Pi into every light switch but you can put a two dollar microcontroller in there and it'll be much more robust the code generally doesn't need to change once it's been deployed and it'll just run for years if you pull power from it load power back in it's just going to come back and keep working so I love embedded I love them little single board computers like this I think the Raspberry Pi is amazing both as a device in itself but also in terms of what it kicked off because there have been so many other boards that have come out I mean they're they're obvious they're obvious like the orange pie and those sorts of things but then they're also there's the BeagleBone series which I think predate the pie and have continued to be updated since they're it's not just one solution if you're looking at little and a little complete computer stacks like this you've got many options so for many purposes it's fantastic and I use many of these around my house many different projects but as I said the idea is to try to be to pick the solution that is appropriate to the problem you're trying to solve that's what it comes down to so let's have a quick look at some of the comments and catch up so Oh an arrant original question was what's the difference between the a 13 and Omega so I assume Aaron that you meant that a 13 and they're a thumb mega the difference is the i/o they both have Ethernet they're both support Power over Ethernet the difference is that the ether 10 is like an Arduino Uno so it's got a 18 mega 3 to wait on it with ethernet but if Omega is like an Arduino mega so it's got an 18 mega 2560 on it plus a Ethernet so the ether maker is basically just the same thing a bit more memory and far more i/o for projects where you need that oh one other difference this is actually an important one the power supply on the ether mega is a switch mode power supply which means that if you put in and I say 18 volts or 20 volts into it the switch mode power supply is quite efficient and it doesn't get very hot so it it works quite well with with some power supplies that are up towards upper end of the voltage range of what it can accept the power supply on the ether 10 is the same as on the uno it's just a linear regulator which means that it cuts a power by dissipating all the excess as heat and that results in running hotter if the voltage is well above the the operating voltage so if it's way above 5 volts that difference is going to be dissipated as heat okay so a few ticks said we no can handle power arts high is not so much yes exactly and the attack also said overclocked my PI 4 from 1.5 gigahertz to 2.1 gigahertz in an iced check or yes I I have I think just about every PI model from the very early model a that first came out and the first one that came out I think was a single core and not particularly fast I think from memory it might have been around 800 megahertz and I did try running that as a desktop just to experiment with it and it felt really laggy but the amazing thing is that was the current model pi is like the the for series they are so fast is crazy you can very legitimately use them as a desktop machine and not feel like you're missing out on very much oh well I didn't said I just watched the video from 2017 when I showed the new reflow oven and says it's 1:00 a.m. in the UK well thanks for staying up late or getting up early yeah three years so it's been three years since I've had that reflow oven doesn't seem that long time flies so Richard had a couple of comments he said the microcontroller versus micro computer while a microcontroller can be adapted to many different tasks it's closer to the actual tasks than a microcomputer usually one maybe two at a time yeah that's right so the you're not abstracted away by the layers of the operating system and everything else the code that you're running yeah this is getting to a very important point which I I should have brought up earlier and then Richard said even when the user dedicated to a specific task this is a microcomputer it's usually actually doing many different tasks there's an entire OS underneath yes exactly and with a multitasking operating system like Linux what it's doing is switching its attention very rapidly between a whole series of things which means that at any one moment in time it's not necessarily paying attention to a particular process so if you need to be able to do things like react extremely rapidly to IO like to decode a bit stream for example and do the timing for that in the processor many times a microcontroller will do a far better job of that than a larger and supposedly more powerful computer because the more powerful computer is running its operating system it's switching tasks it's doing lots and lots of different things all at the same time whereas the microcontroller is doing absolutely nothing but sitting there and watching that IO pin and it can measure the timing down to whatever the resolution is it's very small you know microseconds so on a even on a slow 8-bit microcontroller like an 18 we go three to eight you can do micro second level timing on IO pins and then do analysis of the waveform so it's better from that sort of thing hmm so WV MBA said if you would put a touchscreen on a PI how much distance can they be apart I noticed that if you had a PI in a wall that can become very hot especially the PI 4 exactly so apply will typically be pulling a few watts now in terms of a touchscreen there are a couple of different ways they can be done and some of them I'm just thinking about the different ones I've seen I've got a couple myself fact if I move my head right there that is a Raspberry Pi with a five inch touchscreen on it and I use that with octo screen for controlling that that 3d printer which is really cool because I can just walk up to the printer and use the touchscreen and select items and print them out of octo print and touch screens can be based on a couple of different technologies and they can also interface with the host computer in a couple of different ways so the simplest form of touchscreen is a resistive touchscreen which has a couple of layers of a membrane in front of the screen and they have four electrodes they'll have one electrode basically one at each side of the screen so top pair inside pairs and they've got four wires coming out of them and by measuring the resistance across the two across the pairs of electrodes when you press something on against the screen it will form a peg it'll conduct basically between the electrodes but the amount of resistance between the various pairs of electrodes will allow you to calculate the x and y-coordinates so you can figure out the position so those really cheap things like the Nintendo DS touchscreen that's how they work and it means that you need to physically deflect the surface of the screen a little bit the screens that feel like they're kind of plasticky like soft those are typically resistive touchscreens and what you need is something like a micro controller connected to those four pins to be able to detect changes in the resistance between those electrodes and then figure out the coordinates no it's something like that you can put the touchscreen at a bit of a distance from the device and what I'm talking about here is not really the screen it's the touch layer over the top because you really have to think about it as two different things if you're building a touchscreen there is the display portion of the screen which is what you think of as the screen and then there is the touch sensitive system which can be sandwiched on the front of the screen and you're just looking through it when you see the screen or it can be built into the assembly but conceptually they're two different things and the connection between that particular touch screen wherever it is is there is a microcontroller on the back of the screen which is doing the job of reading the sensor and then the touch screen assembly which includes both the display part and the contact detection part is connected back to the Raspberry Pi and there are two connections because it's two subsystems one is the HDMI connection there is a little dogleg that's like a u-shaped HDMI connector so you plug it into when the PI is mounted directly on the back of the screen there is an HDMI connector here and there's another one right beside it on the screen you plug the connector in and then HDMI drives the display and the display will work with no knowledge whatsoever of the touch portion of it but the touch portion communicates through the header the i/o header on the PI and I believe that screen works by SPI I think I just plugged it in and loaded the examples and it worked so I didn't pay all that much attention to it and the controller that is picking up the touch sensitive region on the front of it is then communicating by SPI to the PI so if you wanted to take that particular touchscreen and mount the PI somewhere else what you would do is you would need a longer HD my cable for the video portion of the connection and you would also need to extend the connection to the microcontroller that is attached to the back now with SPI it's not really designed to go long distances it's intended to be a fairly fast peripheral interface but in the context of peripherals that are directly on the board like an SD card for example so what a lot of people don't realize is that an SD card is just an SPI device it's basically like a memory chip with an SPI interface in a little removable package and the pins that are exposed in the microSD slot are an SPI interface so that is the that's the sort of application that SPI is designed for it's for rapidly transferring data between things that are in very close proximity it's not equivalent to something like USB where you have a peripheral there might be a mouse on the end of a wire with SPI you're talking about much shorter distances and much higher speeds in terms of data throughput so how you would do that in terms of putting something like a Raspberry Pi more remote from the touchscreen you might have to use some other method to connect it rather than rely on SPI or if you so I've top of my head I don't really have a solution to that problem just thinking about how to do that but what I would probably do is go back and re-examine what it is that you're trying to achieve and whether the architecture of what you're putting together is the is the right solution and now I don't know quite what it is that you're that you're working on so if you're talking about something like a home automation system where you're wanting to build a control panel on the wall with a touchscreen and a Raspberry Pi behind it that does give you a lot of flexibility but in I haven't done that in the past what I've done is used things like Android tablets attached to the wall and in my house I've actually got a couple of windows surface tablets really old ones there's one attached to the wall in my kitchen and that basically that means that you don't have the problem because all you need to do is get power to it it's got Wi-Fi already and you can run Ethernet if you want to but things like tablets are already designed to be very thin so you can surface mount them quite easily and they don't look too bad whereas something like a Raspberry Pi with a screen attached to it you're going to have to cut into the wall and have this mounted behind it nd expanding said there are a lot of touchscreens with control via USB yes that's true yeah and I didn't even get into capacitive touchscreens I was just talking about resistive touchscreens the systems that are like that one up there that's a capacitive touch brain not resistive so it's a different thing entirely hmm so don't know if that's answered your question I kind of went on a tangent there cool so Darrell made the point once again about the difference between a micro controller and a little computer separation of concerns esp8266 3208 a single jobs so easy for like whereas reply central computer easy to change what it does but more flexibility yeah that's a great way of putting it it's dared different components of a system that work together and they solve different parts of the problem so l40 says is the rfid in your arm still working and do you use it a lot is it worth it yes it's still there I've got to go and look up the date of when I put it in I think it's been about 13 years maybe you might be heading towards 14 years since I've put it in and yeah it still works just fine because it's a passive transponder it doesn't have any kind of internal power source it leaches power off the off the field of the reader and then just returns it how much do I get into this now probably not much it causes modulation of the field that has been generated by the reader and then the reader can detect the modulation and that's how it gets the communications happening summary is it still works and it should work for the rest of my life the difficulty is that it's very old technology there's no encryption on it if you think about what mobile phones look like 13 or 14 years ago or what computers were like 13 or 14 years ago that's the sort of technology that is implanted in my arm and even when I implanted it wasn't new it was a type of chip that's been a it had been around for many years at a time and so it's probably 20 or 25 year old technology so the result is that it still works just fine and it should work as long as I do but it's extremely limited compared to a lot of the stuff that is being done now like some of the the implants that are done by being done by I'm all over a dangerous product dangerous thing are really cool they use much newer technology and you can do things like make contactless payments with them there are some things that he and a friend of his were doing a couple of years ago now with taking data from biometric passport and loading it onto an implant so that at passport control you could scan but let's not get into that right now guru and the Guru says I've got some blue pills and have yet to find a project for them pretty dependent on the ESP boards yeah I haven't used a blue pill I've seen like I know people that have and they seem like pretty decent little boards but I've never actually used one myself and yeah your comment about being pretty dependent on ESP boards the one of the traps that I fall into and I think a lot of people fall into is once you is that old thing of when you have a hammer everything looks like a nail when you first get into Arduino you learn about a particular type of board and then you want to solve everything with that board and so I tend to use a VRS in lots of places where other types of microcontrollers might be more appropriate if you're being totally objective about it and it's largely because it's what I'm most familiar with I used to use pics a bit a long long time ago like 20 years ago I used pics like the pic I'm trying to think back to part numbers pic16f877a Tarr built-in pics tend to have really good options in terms of things like saying I want a combination of this this and this and they'll have a microcontroller that has exactly that whereas the AVR range in the past has tended to be much more limited and rely on external peripherals but because I've done so much work with AVR starting with the the very early Arduino boards then that is the hammer that I used to solve lots of problems but and in recent times it's the esp8266 that I used to solve lots of problems whenever I'm starting a new project I I think for about five minutes about what my peripheral requirements are going to be and then I slept on esp8266 on an or an SP 32 or an AVR like I used the 18 mega 32 you for quite a bit just for its USB interface and I have a feeling that in future the the a SP 32 s2 is likely going to be one of my favorite chips because it seems to have that run that good balance of having the the USB host functionality built in it's got the architecture of the asp 32 but with only one core not two and many of the other advantages over things like the esp8266 that i haven't actually got my hands on a SP 32 s 2 yet I know that C on the unexpected maker has already designed a board at least one board maybe several boards with it and he's got some of the silicon from expressive and it looks really cool so I think that'll be a good one for the future ooh Adrian said I bought your free Tronics watchdog circuit for my autonomous bi project aha that sounds cool I really like I really like maritime projects so Adrian you want to tell us more about that you can hear but probably a better place is to jump into the good and have a look in the share projects channel on there so while I'm [Music] talking about that I keep hitting the discord because it's turned out to be such a cool place to to talk about things and see what people are up to and in fact while this livestream is on a couple of people including guru are posting pictures and who else is in there oh there's a render of a other laser cutter being built there are some pictures of fun things so if you want to continue chat outside of these live streams check out that discord server and yeah so I used to sail a lot I am my dad was has been into boats pretty much his whole life and back when I was up to the age of I think about seven years old he built a little sailing dinghy in our living room and so that was a mirror sailing dinghy and that kind of been too good for family harmony but basically he tree he used the living room as his workshop and built a dinghy and then took it out sailing so he's owned many different boats over the years and I've been sailing with him since I was since I was very little and then in my life sort of in my mid to late teens I sailed a lot with my old school friend Brad we used to race tornado catamarans down at Sorento sailing club and went around and competed at a few different places sailing 28 oohs so I really like being out on the water that I haven't for a very long time which is quite sad but anyway back to this autonomous boat I would like to know more about that so please jump in the discord and let us all know a bit more about how that's going I'm curious to know what the autonomous side of it is all about why are you using a G pilot or RG boat - I do well technically I think I do rover is what's mostly used on boats but I yeah I'd like to know more about that okay so back to the touchscreen thing earlier wvm be said I want to touch screen for controlling H a which I assume is home assistant could be home automation but probably home assistant so yeah I don't know the you can get some really cheap tablets now I've you look at this is one of the things that's kind of weird is you look at dedicated home automation touchscreens like if you want to get a clip salsa bus touchscreen for example those things cost a fortune and you can go down to your local supermarket and buy an android like a seven inch or a nine inch or whatever is android tablet for 50 bucks 80 bucks and it'll be a quad-core processor it's got Wi-Fi in it it's got a battery in it which means it's got battery backup so all you have to do is run power into the back of it to keep it charged and if you have a blackout still keep trying on working those things are incredible because they're produced in such large quantities for a mass market things like little Android tablets are a great solution to many problems and if you think about the idea of buying a $50 Android tablet that is maybe seven or eight millimeters thick it's sticking it on the wall you give yourself a big touchscreen interface to whatever you want to pull up on that screen it solves an awful lot of problems I mean in the early days of doing my own house doing DIY touchscreens were something that I was really interested in as well and I ended up just getting actually got I went down to the local office works and they have a recycling a couple of recycling things out the front so people put in their old mobile phones and that sort of thing and I went dumpster diving a little bit and found an old Android phone and brought that home and it worked so I actually had an Android phone stuck on my wall in fact it was right there for a long time there was a little black Android phone where that light switches and that was my touch interface so what I did was I ran a full screen web browser in android and that loaded an interface that was being served of a computer that was running their home automation system it was just running Apache and PHP and MySQL you know the whole typical lamp stack and that was serving up an interface that was then displayed as a full screen browser window on the phone and when you tap something it would send it was using asynchronous JavaScript to send events back to the controller back to the Linux box which would then do whatever it needed to do like mqtt messages or whatever so yeah I've turned into quite a fan of little Android touch screens in different places mmm if he said tangents are good I use them all the time yes I do too I use the tangent tool in fusion 360 and I use them in real life as well so Aaron said what's your personal preference on programming languages to use oh this is an interesting one what I tend to use that's a very broad question as well folds into a couple of different classes and that is the language to use on embedded devices and the language to use on prop on like a full-stack computer which are typically not the same thing I tend to go more for interpreted languages on computers most oh I can't I quite like Python but I don't I'm not very good at it I haven't spent much time using it my my kind of confession is that I spent 20 more than 20 years or something like 23 years working in the PHP world and in fact I started using PHP before it was even called PHP I started using it when would it have been it was in the mid 90s and it was when it was called PHP / fie so as an F I for forms interface and it was when so what Rasmus originally created PHP Phi as a way of doing server-side processing for his personal website and he wrote it as a series of little utilities that he could call and it had a couple of different components and doing things like handling the form was different to the back-end processing which is why originally when he did his first release which was technically 2.0 I think so the very first time he released the code it was PHP 5/2 a PHP / by 2.0 because the 1.0 version was what we had been using on his personal site and I started using it I think within about a month of him releasing it I was running it on a Sun Challenger s server I think at the time and running up with mini DB so this was before MySQL and those lots of things existed and I kind of got into that whole ecosystem so from from the time PHP 52.0 came out I was pretty much stuck using that and so I've done decades of PHP development and the result is that my brain just automatically goes to solving problems with that particular hammer because that's what I'm most familiar with but I do use a variety of things on the server side yeah tiny bit of pill in the past as well in fact quite a long time ago I was the maintainer for a moderate sized modern science program written in pill because I used to be a Debian developer and I maintained the Debian packages for actually for a few pill programs and I wrote a couple of Perl programs mostly related to network administration and packaged them for Debian and also the in fact I think though no that was written in C I was thinking of the LCD proc driver that was a maintainer of that for a while but that was written in C so on the on a proper computer I tend to use either PHP if it's going to be something with a web interface or Python if it's something that's going to be run locally I haven't used pill for anything new for many years now a bit of stuff in bash a bit of stuff in C and there are other things as well like way back when I was at uni for example we used to use Pascal I haven't used Pascal for a long time although fairly recently a contracting customer came to me and said we've got this system that needs to be updated and the person that wrote it died many years ago and it's written in in dollfie so those lots of skills can still be useful from time to time okay for embedded systems basically C is the simple answer I keep having people saying use rust use micro Python you know all these sorts of things and there are many other options but once again I'm in that situation where the hammer that I'm most familiar with using is C so that's what I use and micro Python is very interesting I have kind of hacked a ran on a few projects written in micro Python and in fact the originator of micro Python is from here in Melbourne and goes when he's involving he lived in the UK for a while as a member of the same hacker space it's me and also see on who is a micro Python expert so if you're interested in that sort of thing make sure you go and check the unexpected maker YouTube channel he talks about well he's got a series of tutorials on micro Python which is really cool other things like rust seem really interesting I'm I would really like to sit down at some point and try building something using rust because it looks like so my outsider's view not having actually use it for anything it looks to me like someone who knows all of the problems with Si sat down and tried to design a language that avoided those problems and I just like to see what that's like I think one of the big problems is is it optioned and how widespread something is one of the things I really like about the Arduino ecosystem is the number of examples and drivers and things that you can get for just about any hardware so if you're bringing up a board and you have a combination of a couple of senses and maybe you've got I'd like addressable RGB LEDs and you want to do some mqtt there are libraries for all of those things and you can just pull them in and call them at the right time and you can very quickly build systems by taking those modules or subsystems and using them as you need to and with something like rust because it doesn't have the level of adoption then there might be issues with things like drivers but I still really want to give it a go it seems kind of cool okay so Adams said it's working on that right now I'm using an Android tablet with the Wi-Fi enabled set a browser window to point to your HOA session and make a custom card that fits your tablet's needs yeah that is basically what I did except that I wasn't using home assistant I was using my own dodgy homebrew system at the time so I wrote the the web UI using PHP to generate the page and then JavaScript on the client side with asynchronous JavaScript updates to using WebSockets to update the display when the status changed on different elements so you can have a button for example for a light and have the state of the element change when the server updated the state and if you press it it would send an event down and change the state as well and wvm be said don't like Wi-Fi for home automation probably use my IT background yes a rent that I have been on many times I'm with you on that so for for many tablets if you want to connect via cable dthe in it they they often have a USB interface on them that you can plug in a USB to Ethernet adapter and you can cable the tablet so the trick is doing that in a net weight because typically the connectors on tablets come out of the bottom or the side or somewhere really ugly and ideally what you want is for that to come straight the back of the tablet so you can drill a hole in the wall stick the tablet on and have the cable go in through the back and then nothing is visible so you can do some mechanical hacking to make that work but yeah okay so hmm I pull stuff apart made the comment I did a Raspberry Pi with a large ace a 23 inch cap touchscreen it was a nightmare didn't work out at the box but eventually got it working better off with an Intel compute stick interesting okay yeah um the discord last week I was telling the story of of a very big home automation project that I was very peripherally involved with and a particular demo day that we did now in that that home automation project the way that was done so this project was begun it must be must have been 25 years ago and things like raspberry PI's didn't exist it wasn't even that easy to get touchscreens like the idea of a touchscreen was a really exotic thing it almost didn't exist and typically what the way it was done was and there weren't LCDs so typically what would be done is you would get CRT so you get a flat screen CRT and then put a I think over the top of it which was usually a light grid so there would be light sensors on the edges and you put your finger in it and it would detect the position of your finger by which of the beams was occluded so really primitive by today's technology but that was all that was available in this particular home automation system because the guy who owned the house had certain connections and had made some people lots and lots of money he had a whole lot of Sun so running his house so down in his basement he had I think originally two full-size racks so 42 units high bid over six feet high and they were full of sun microsystems servers and that was what was running his house so he had some servers and then embedded in the walls he had these touch screens but of course because the touch screens were so physically big it's not like it was a seven millimeter thick Android tablet the walls were modified they had a big hole cut in them with a box built into the wall there was a monitor stuck inside it and the touch screen overlay fitting on front of it with a bezel so that it looked like it was all flush to the wall and the interesting thing was that it was all open from inside the ceiling so this is the place where I was telling the story on the discord last week where I went inside the ceiling I was given a tour of the ceiling the first time I went to this house and the walkways in the ceiling space all had chipboard laid in them so you just walk down it like a hallway and there was a coffee machine in there so you could sit up inside the ceiling and have a cup of tea or coffee in a biscuit because people have been had spent years working in this house and they customized the hidden spaces to make it comfortable for themselves and what you could do is from inside the ceiling space look down it was like a vertical channel that would go down to the back of the touchscreens and then there was a PC I think from memory yeah there was a PC sitting inside the ceiling space just like on a piece of wood with a VGA cable going down and I think it was probably a serial cable going down to the touch screen so it just went down this hole through the wall and into the back of the box where the touch frame was mounted and so he had these in every room of the house oh that was really doing it the hard way eh ah but it was long before common vices existed and by the time I had anything to do with that house they didn't have two racks full of Sun servers anymore over time of course things get faster and cheaper and smaller and they had shrunk their two racks of Sun servers down to I think it was like a couple of rocky units of fairly standard sort of hardware that was doing everything that all the Sun servers have been doing previously if you were in the discord I posted a private video showing they're showing helicopters landing at that house for a demo day anyway that would just be rehashing a story from last time so I am getting behind on chats we're behind on jets let's just see why I'm kind of just skipping through so if I I know that in previous live streams I've missed questions people have asked things and then later I scrolled back through the chat and seen a question I thought I wish I'd seen that so if I miss anything you say I'm sorry I'll do my best but I'm kind of just scanning through the comments here so I may miss some so dodgy made the comment only problem with touchscreens everywhere is you are back to distributed computing hmm kind of in a way it depends what you use the touch screens for if they are just like a window onto the system and there's no logic within the touch screen then I think that's okay I see it as being a bit like pulling up a UI as an ephemeral thing and just making it permanent and if it goes away then you haven't lost any functionality other than that Giller touch surface that can be replaced so yeah it's more to update Wow oh and this also comes down to one of the differences between a micro controller or embedded system and a full stack computer is updates with something like a Raspberry Pi because you're running a whole lot of services there it's it's big it's complicated there are lots of attack surfaces and so you need to make sure that you keep it secured and updated otherwise you're going to be leaving yourself open to all sorts of problems with a micro controller typically the possible attack surface is very very small and this is one of the things that I think is actually a problem with a lot of IOT devices now is they are sacrificing development time for speed to market and going for in for using systems that are more than they need which then opens it up to all sorts of problems now a classic example is something like an IP camera and we've all heard of the problems of IP cameras being open to the world and the people loading malware onto them and those sorts of things and that's because things like embedded Linux systems now are so cheap that from a manufacturing point of view you can think I can build a complete custom system from the ground up like write all the code and it'll take me X you know person years of development to get to market or I can buy an off-the-shelf Linux module I can run Linux on it and it's already got all the video processing stuff it's got support for networking I can do config on it by putting a GUI on it and like a web interface for example so you'll be running a web server on it and all of this so that this stuff kind of comes free with the and it cuts your time to market because you can take a heavyweight solution and glue it into your product and then you've got something that does the job if most of the problems have been solved for you the problem is it exposes you to future problems because all of these services that are running need to be kept updated if there are any flaws that are discovered in them you need to apply security updates and how many people update the firmware in their IP cameras or whatever devices that you install around the place and then it should just work forever and you should never have to care about it you see this with things like routers as well I mean a typical domestic if you go into most people's houses they'll have Wi-Fi and it will be something like a d-link Wi-Fi access point router sitting in the corner somewhere that they bought down at office works and they've plugged it in and it's never had an update since so even if the manufacturers are diligent about supplying updates the typical end-user is not going to be staying on top of that and applying updates so you end up exposed to knowing security vulnerabilities whereas with a system like a microcontroller which typically doesn't have writable storage it's which in itself removes a whole lot of potential attacks the fact that it can't be updated remotely is often an advantage in that case you can generally rely on them to keep working without being compromised for longer okay Fortran huh yeah Alsop 69 said so Fortran and COBOL it is then yes I've actually done coding in both Fortran and COBOL but that was back when I was probably 12 or 13 years old I think I got out some so this was back in like early 80s I got out some I went into the library actually in borrowed books about Fortran and COBOL because I was interested in it and every now and then you get this whole thing and coming back up about COBOL and we have a lack of COBOL programmers because the systems that were written 30 years ago 40 years ago everybody that wrote it is now dead and now we need to change our business logic and nobody understands it so that topic seems to come up again about every five years or so and every now and then I think mm-hmm wonder if it's worth brushing off some COBOL no fear Tech said bash for service eyes yes I have written some crazy stuff in bash and I think most people that work in IT have done that yeah I won't go into that oh doji says be basics all the way yeah and you don't mean Victoria bit of Visual Basic 6 yeah Seabreeze no in the COBOL rubbish turbo Pascal all away yep so I did some turbo if I school back at uni okay oh here's an interesting question Peter Kirk I said please explain the benefits of an artist versus Arduino flavor of C that is a really cool question and I would like to I probably want to do something about this as a video or multiple videos because it's a really important question and so what this means for those of you that don't know the acronym artists are TOS stands for real-time operating system and what it means is trying to think of a simple way to explain this all right in a typical Arduino program or any like simple C program the the general program Flo is that you initialize some structures so you do some initial setup and if you think about this from the point of view of an Arduino sketch you have the set up and the loop the set up is where you put your code that you want to run once like setting pin modes and opening the serial port and that sort of thing the loop is where you put code that you'll want to run over and over again and if you look if you watched my most recent super house episode which was the code walkthrough for the air quality sensor you will see that I have kind of hit a middle ground between just a basic C program and what you would want with something like a real-time operating system or a scheduler and I've heard on the lightweight side which is closer to being just a basic C program so with the normal C program what you will do is have the loop which which iterates as fast as possible so inside your loop you put a series of logic structures that do the different things you want it might be reading from a sensor reading from a io pin like from a button or something could be writing out to something like writing to a display and you just want that loop to go as quickly as you can now the the issue comes where you want certain things to happen at certain intervals and this is where you have something like a scheduler so you might want to read from so you're not using interrupts imagine that you're wanting to read from a button or a sensor say you're making a door open sensor so you want to detect it as soon as it happens and you just keep reading it over and over again as quickly as possible but something else you want to do you only want to do occasionally like send a status update published to MQTT so in your loop what you can do is have a call to check the sensor that you're reading and then you have a call to publish to mqtt but if you simply do that what happens is that it'll run through as quickly as possible and it'll just be publishing the mqtt repeatedly now the the simple non solution to that and this is where beginners often get tripped up is they use delays in places they shouldn't so you might have reading from a sensor as fast as you can Publishing the MQTT every two minutes so you get to the point in the code where you're publishing to MQTT you publish and then you're put in a delay for two minutes and it just the code just sits there and does nothing and then it goes around and it reads from the sensor again the result is that you are now only publishing every two minutes but you're also only reading your sensor every two minutes because the loop has this long delay in ER so the way I got around that in the air quality sensor code is I put timestamps on the last time certain events have been happen certain events it happened so as it's going through the loop it can read the idea is to never impede the loop you want to keep it running as quickly as you can so in the case of an event that you want to have happen every two minutes what you can do is store a global variable that says the timestamp of the last time that thing happened and then each time you go through the loop you check the time and you say has it been two minutes no okay don't do anything just move straight on so the loop just keeps going as quickly as it can and then when you get to a point where it says yes two minutes has passed you do the thing like report to MQTT you up get update the timestamp and then you can move on and keep going through the loop again the result is that you can have multiple operations that have been called in the loop some of them will be called every time you go through the loop some of them will be called at certain time intervals and they don't need to necessarily be related to each other and the loop is still running unimpeded there are no big delays in it so that is the kind of the minimalist approach to having a scheduler and but it's not a real-time operating system what this does is allow you to to defer a certain things for a period of time the next step beyond that is to have something like a proper schedule where you say I want to execute these particular tasks and they need to be done at a certain interval and this is where you start getting into real-time operating systems like free artists and there are the heap of them but free artists it's probably the most well known where you and also free artists is the basis of the ESP IDF so when you set up tasks inside ESP IDF and you are specifying that you want certain things to be executed at certain intervals that is setting up tasks within free artists and then free artists is like a supervisor that that run it's like a loop that's running for you so instead of having to have your own loop where you say I want to do this and then this and then this and then writing your own logic within the each of those tasks to say how often it should happen which is what I did in the air quality sensor you simply say this is a task and I want it to happen every 200 milliseconds or you know whatever the interval happens to be and the scheduler in the operating system has a list of these tasks and it knows how frequently they have to be executed now there are complications that come in because what we're talking about here is starting to border on a multitasking operating system like Linux the big problem with that is what happens if you have two events that are meant to occur at the same time so you need some kind of a prioritization system and you might have you might say I want to read from this sensor every 10 milliseconds and I want to publish to mqtt every two minutes so they're operating on very different cycles but if the scheduler gets to the point where it says okay this one is due to be run and this one is due to be run there needs to be some kind of an arbitration process where it decides which one to run and this is really the task that something like a real-time operating system is solving because there are times where you will have tasks that are extremely time critical and other times you'll have tasks that are not time critical for example if you are if you're running a system that is analyzing an incoming data stream things like the timing of the pulses can be critical so you might have a task which is watching for a bit stream and it will have rising edges and falling edges and there'll be the duration of the pulses this could be something like reading an infrared signal from a transmitter so you have an IR receiver on your device and you have a transmitter like a an appliance remote control your TV remote control you press the button and there will be a series of pulses that are sent as an infrared signal which are picked up by the receiver and the timing of the pulses is obviously critical if you are measuring the duration of a pulse and you are not paying attention at the right moment you might misread the message so the timing on that sort of thing is critical whereas the timing on and if you are wrong by a few milliseconds that could cause the whole thing to fail whereas something like reporting to MQTT if that gets delayed by a couple of seconds most of the time who cares there are times that it does matter but most of the time it's not so timing critical so the job of the artists is to prioritize these different things and to run them as independently of each other as possible and prioritize the things that need to be done quickly and it's um one of the differences between an arthouse and a full multitasking operating system like Linux or Windows or Mac OS is that the objective with an artists is to guarantee as much as possible that things will be executed when they need to be executed now the way Linux work is that there is a thing called a tick timer in the kernel and it ellic AIT's a certain amount of processor time to a task and this is a pre-emptive multitasking model so it says I am going to be like in the case of Mac OS for example on my machine here it'll be saying I'm going to allocate a certain amount of CPU time to fusion 360 and then fusion 360 does what it needs to do and then the CPU says oh that's it not doing you anymore I'm now going to allocate some time to OBS and then time goes by and it's like that's it stop I'm gonna allocate time to something else and it loops through those based on the ticker timer which I think by default in the Linux kernel this is years since I've looked at it but I think it was 100 Hertz so it would context switch 100 times per second between all of different things that you're running please someone correct me if I'm wrong about that I remember a long time ago compiling a custom Linux kernel and changing the tick timer because I wanted the response of the kernel to be faster so I didn't want it to have to wait potentially you know a hundredth of a second for something to complete in order to get on to a different task so I think I can't remember this is a long long time ago but I think I turned the frequency up to like one kilohertz or something instead of 100 Hertz on the thing which means you incur a penalty because you got a context switch more frequently which takes time so the overall efficiency goes down systems generally are more efficient if they can focus on doing one thing uninterrupted and then change text and save the state of all the registers and everything and then do something else uninterrupted for a period of time and then context switch and it's like humans every time we change a task we've got to change our brains into a different mode of thinking and change what we're doing you lose time in changing what you're doing the computer is the same so by running the tick timer in the kernel at a higher frequency it means that it's switching between tasks more frequently which means that each task doesn't have to wait as long until it gets processed but you take an overall efficiency penalty because it is spending proportionately more of its time doing those context switches I get the feeling I'm so far off on a tangent now the question was just what's the difference between an artists and Rossi and now I'm talking about Linux kernel scheduling hopefully this isn't too boring all right let's get back to this so oh Aaron asked another good question which is what's your thoughts on web-based programming language is coming to embedded devices like JavaScript hmm what are my thoughts on it I'm I think okay the very brief summary is I approve and that's not necessarily because I'm going to use it myself but I approve because it opens up the way of solving problems in more ways and making things and opening them up to people who come from different backgrounds now I know there are people who actually argue the exact opposite for the exact same reason one argument that I've heard is that it's a way of dumbing things down as if you know JavaScript is somehow a language for people that are not as smart or something which is silly and and I've heard people worry well if you can write microcontroller code using JavaScript then it opens up it up to people doing all sorts of silly things and will see all sorts of broken projects and lots of security problems and instability and you don't understand what's going on under the hood because everything is so extracted away by the JavaScript interpreter compared to writing C and I understand what people are saying when they make that argument but I always err on the side of inclusiveness I would much rather see people able to achieve things with the knowledge they have and the tools they have then to have people blocked out like in a gatekeeping sort of fashion like saying you must learn C if you're going to use microcontrollers I mean if you're going to get heavily into microcontrollers then learning C is almost a given it's some it's like the standard way of dealing with things but it doesn't mean it's the only way and it also should not be the barrier or the brick wall that you have to get through before you can do anything at all so if you have an experienced a developer and an experienced JavaScript developer and they both sit down to solve the same problem on a microcontroller one using C and one using javascript there will probably be differences there'll be differences in a number of metrics in terms of how efficient the end result will be in terms of how quickly the result is achieved there may be circumstances where developing in JavaScript is faster it's more efficient in terms of the developer time but not necessarily as efficient in of the execution time on the device so I I love it when I say people doing new things and learning new things and taking knowledge that they have and being able to achieve things that they didn't think was possible so the idea of someone coming from say a web development background and they might know JavaScript fairly well and want to blink an LED or get into some kind of an embedded project if they can use JavaScript to solve that problem that's fantastic go for it I I really think that's a good thing so well here I'm I'm thinking back to the backlash that Arduino got in the early days and in fact still gets so I mean if you go on to if you went on to aviatrix for example 10 years ago and anytime that like basically I'd when I was a dirty word and the whole thing was all these newcomers that are using Arduino boards they don't have a clue what's going on they don't understand the low-level registers they're just setting pinmode and it does everything for them they're idiots because they don't understand that what this is doing is actually setting the flags in these particular data Direction registers inside the AVR and that is then affecting the particular IO you know those sorts of rants were just everywhere and someone who wrote code in the arduino ide using the arduino software environment so the arduino libraries and everything and used calls like pin mode and digital write and digital read were really looked down on and now to some extent what we're seeing is the next level of that where people who develop using arduino see people coming along and using javascript and they're saying now you've got to learn Arduino because like they don't understand that when they use this particular call in JavaScript it's actually so it's it's all just repeating and it's kind it's kind of gatekeeping and I don't like it so my summary is use whatever tool you like whatever makes most sense to you there are some tools that will be better at some things and there are certainly there's certainly knowledge that if you learn how to do things using it at all you're not familiar with you may be able to achieve a better end result but it's better to to do something than to not do it at all anyway Oh Harry you say do you think it would make sense to look life I see logic to home automation ok I assume that by fuzzy logic what you're referring to you there are things like machine learning and adaptive systems that do not necessarily have very specific black and white rules or they may have rules that develop in a semi-automated way so you haven't necessarily set them up and I think it has its place but it can lead to some difficulties so this is something that it's such a big topic that my head is buzzing about where to even start talking about this I've got so many different angles on it so for people that have been working in machine learning for a while once again you end up with this situation of I have this hammer and I'm going to use it and machine learning is a fantastic tool to use in the right place but not everything is the right place so there are certain aspects of home automation that I should I think machine learning could be really really useful there are at like at different levels of complexity for example machine learning could be used to tune the responsiveness of an HVAC system to be able to adapt to things like different climate conditions versus people in the house and different things that are running and like all these different inputs that go into it and you could conceptually have a system that learns over time so that it maintains the environment in the house at the most appropriate level in the most efficient way possible I mean I'm just kind of making stuff up here and of course there are things like the application of machine learning to face recognition you could use face recognition to have a system that adapts to who is in a particular room and they can be really useful for that so machine learning can be used as a component of a system that provides information to other things for example if you had say home assistant or openhab or whatever high level system you want that's running your house one of the things that would be very useful for it to know is who is in the house and where they are so that it can do things like set environmental controls and set music playlists and turn on lights and all of those sorts of things but it doesn't necessarily need to know how that information is obtained if you can build a system excuse me that uses machine learning to be able to recognize based on some inputs which could be video it could be whatever that this person is in this room of the house and then sends that as a result to the home automation system what you're doing is using machine learning to solve a particular subset of the problem and generate an answer which is then sent to the system that can act on it so I think things like machine learning definitely have their place in solving problems that are very hard to solve in other ways and something that I've noticed over time on an idea that I've become more and more accustomed to is the idea that a lot of the sensing problems that we try to solve can be solved by pointing a camera at something and things like things like motion detection you know if you've got a passive infrared or a radar motion detector in a room you can solve that camera by pointing a camera at the room and then processing the image and you can detect motion now obviously there are big privacy issues anytime that you introduce cameras you've got to think about privacy but okay but lots of things like letterbox detection so detecting when a letter isn't sold into a letterbox the detection system that I had many many years ago so 20 years years ago on my letterbox used a reed switch and a magnet attached to the flap on the letterbox so when someone put a letter in it would move the reeds which would be deactivated because a magnet would move away and then the letter would go in and you could send a notification so used to send me an SMS when I got a 11 delivered but that same sensor that problem could be solved by having a camera in the letterbox pointing down looking at it and you could have some machine learning to be processing it now that is a super heavyweight solution when a switch will probably do the job but the and you probably wouldn't necessarily do it that way because it's just it's using a sledgehammer to you know to crack a nut but the point I'm making is that there are an awful lot of problems where you can scratch your head thinking about how am I going to detect this certain thing or how am I going to put a sensor here to determine this that can be solved by just pointing a camera at it and using some machine learning and then giving an output where that condition is detected which could be whatever like I'll let something sitting in the letterbox or a person in the room or a door is open for example you could also detect that from the camera rather than having a sensor on the door so machine learning has its place okay now coming back to this though you know I'll wrap this point up in a second the major Pro this big house the one that I keep talking about had a very interesting thing happened to it where there was some strange it's it's what you would call emergent behavior I suppose where a number of subsystems within the house started fighting with each other and my friend Andy who is the one that was working on this house for a long time before I got involved with it told me this story and he would be able to tell the details correctly I'm relaying information from many years ago secondhand in this particular house it's got three swimming pools one of the swimming pools becomes half way into the living room so the living room was huge and it was kind of a u-shape with a swimming pool in one part of it and then there was a big door that you can think of kind of being like a garage door like a candle like a two-part garage door a multi-part garage door it was much much bigger it was like a small aircraft sort of size like hanging out suicide door which was glass and there was an outdoor pool as well just on the other side of it and when this door was open the lounge room the entire lounge room wall was open with the swimming pool in the lounge room and then it was joined to the swimming pool on the outside so the talk of the open or it could be closed and then you'd have an indoor pool in the lounge room and then there was the the pool outside was separated off now this raised a few issues from a climate control point of view because the indoor pool obviously would cause huge humidity inside the living room and the home automation system had control over the main door whether it could open or close and there was a sensor across it because there was a for a while at least there was a cat living at the house and they didn't want the the big door to close while the cat was underneath it so it needed to be able to detect obstructions and there so the home automation system had data coming from the environmental sensors so it knew about the humidity and the temperature in the room near whether the door was open or closed it knew the desired temperature of the pool and of the room and it had control over the heating and the cooling and the I'd have to ask Andy to remind me of the details of this but the but what happened was that they started seeing some really weird things happening like they I think it was that they when the door was closed the heating on the pool would be activated and the cooling on the room would be activated so it'd be running the air-conditioning flat out because the room air-conditioning was fighting against the humidity that was being generated by the pool that was being heated and it was cooling down the room which was cooling down the water which meant that the pool was trying to be heated as quickly as possible and so different parts of the system were fighting against each other and they started I think what was happening was that the door was being opened or some or being closed unexpectedly because the system was thinking either there's too much humidity in here I've got to open the door so the huge door on the side of the land room were just open anyway I'm not really telling this story very well so I will shut up now all right back to the comments so yeah anyway that was all the reason for that was there is not mention that was that that's an example of an emergent behavior in a system it wasn't using machine learning in that case it was just taking different inputs and it was having and it had multiple objectives that were in conflict with each other so it was then doing things unexpectedly and with machine learning systems you can have that as well all right that's quite it and let's all get back to proper programming if you can't translate op codes to binary in your head go home yeah I haven't done that for so long I don't think I've ever translated op codes to binary in my head but it's um I haven't done anything down at the machine code or opcode level for quite a long time I used to do a little bit of machine code programming on as 880 and way back in fact I still have my first ever real computer oh maybe I should go and grab it because it is just over in the corner of the room I'm going to take this microphone off for a second go and grab my first real computer and have a drink before I put the microphone back on am I gonna do this without getting myself tied up I think this will work right so this was the first proper computer that I owned if you can call it a proper computer so that is a tick onesie she's a talking electronics computer and hopefully things won't fall off it's a Zed ad based system you can see there's a hexadecimal keypad on well kind of in the middle of the screen it's on the right-hand side of the PCB and you can see six seven segment displays down the bottom there are four for the address and two for the data and the processor is up in the middle and if I had another hand I could point at things but I can't there's an expansion board at the top which has got an LCD on it there's a bus kind of in the middle which was a super dodgy thing that I did to extend the address and data lines so I could play in different peripherals up the top is a relay board it's only got one relay in it but it can take a relays and you can see you can actually see right through the PCB it's a single sided phenolic PCB and I would have done that using a a resistor pin and then there is an expansion port over on the side that I also did so I aged that and when did I do this I must have been about 1415 years old when I made that and then expanded it a little bit over time and it had been sitting at my mum's house for years in the basement in storage and I pulled it out a couple of years ago because I thought it would be cool to try to resurrect it that you problem has probably lost all its memory by now so I'd need to load a new a new monitor into it but that was my first proper computer so that was all programmed by entering as a tidy machine code in hexadecimal using that keypad so what you do is well what I used to do was I had a sheet of paper and I would write out my program in machine code just writing the hexadecimal on the paper and then so the address and then the code that you wanted into it the commands and then what you would do is use the the increment button to go to a certain memory address and then you type in the hexadecimal machine code and then you'd store it and then move on to the next address etc and then you could execute it get it to run through okay scrolling back scrolling back oh I've missed so many comments I'm trying to keep up and I'm just getting further and further behind alright so I'm seeing a few interesting ones which I'll get to all right I see Brady said when I took my degree in EE we got forced into Pasco and Fortran and worst of all was programming 6800 micros and hex fire a keypad very close to what I was just showing but what I was doing when I was an early teenager so except that that is a z ID instead of a 6800 but I did 6800 at uni as well yeah uh-huh Frank said late 80s I did z80 course programming in hexaco in hex code great fun yes Frank you know exactly what I'm talking about oh and also 69 says I'll hit up some some pics of the PLC's and systems I worked with and posted on discord that would be awesome one thing I really loved seeing on discord Oh in fact there's already some up there I can see Alsop has posted a pic of a PRC cabinet looks like there's a din rail mount thing on it I will look at that later but one of the things that I really like about the discord is that it's um it allows everybody to participate equally it's not just me here talking and showing stuff but everybody else can post pictures and do stuff as well so I really like seeing other people's projects and there are some really cool ones that have been posted so if you want to look at what other people are doing make sure you go to the discord hmm okay l asked what 3d printer I use I have few 3d printers but the one that I use on a day-to-day basis and in fact I think it's been it's been sitting idle for more than 24 hours now which is very unusual is a Prusa i3 mach3 yes that's the one that you can see there inside a an enclosure and so it's it's inside a lek table enclosure these particular legs on the it's 2 stacked so you can see if there's a one there which is a normal height lack table and then I made new legs for this one so that it would be a little bit higher and it's got 3d printed mounts and things to join it all together and those clear sides that you can see through our acrylic so it is fully enclosed even though it looks like it's open it's actually in an enclosure there and then I've got hangers up the top for the the reels a filament and there are reels a filament down underneath here as well and then there is corrugated tube like electrical tube that comes from there and it goes up the back loops around and allows me to feed filament from this area down here which is also enclosed up and feed it into the printer so I don't have to have all the reels at the top some of the reels down the bottom that printer has been incredible the presses are expensive as printers go well as domestic 3d printers go anyway but it's a sort of thing where most of the time I can slice something and then just hit print and it comes out and it works really well so I also have a very modified mendelmax v3 which is through that door if you watch the live stream last week it would have been sitting on the table right here because I was messing around with it but where it normally lives is it sits on top of the fridge there is a bar fridge in the corner directly behind this wall where all of these parts drawers are in that corner on the other side is a little bar fridge and sitting on top of that is my mendelmax that is connected up to octo print and the power for that is on a sawn-off so normally it's turned off but I can turn it on by remote control and then connect to octo print and send a job to it the mendelmax is a lot faster than the Prusa but it's got a few problems it's also got a much bigger print bed so I can print larger objects on it but the the bed leveling is pretty crappy and the surface is not very good I've got at the moment I've got a piece of borosilicate glass on it and then I've got some like no-name brand build tech surface stuck on it and the surface has got quite damaged I was printing ptg on it and the ptg bonded to the bill tech so much that I just couldn't get it off I had to use a blade to kind of cut it off and it's damaged the bill TAC what I really want to do is get a surface like the Prusa surface with the magnetic flex steel bed but larger huh need a bigger one to go on the mendelmax the other one that you can't really see hang on I'll move this monitor if you look up a bit so I'm moving my iMac to try to get the camera to move right there that silver thing that is a MakerBot cupcake that I think it was about number 152 so from one of the early batches of the MakerBot cupcakes so that's super early one of the very early DIY 3d printers that one I don't have in use at the moment but it's it's sitting up there because it looks cool it's a bit of a historical piece it uses the old star older style three millimeter filament and the build area is like that big what about that high and it's yeah it's a bit of a mess but I've been thinking I really want to get it running again just for the fun of it I think it would be cool to be able to send print jobs to that have them come out of the old MakerBot cupcake and apart from the fact that it the wood has been spray-painted silver it is a totally unmodified original cupcake which it's probably almost a museum piece now you can also see a couple of drones and things beside it there's an autonomous car in the middle that's a dingo car which is like a donkey car self-driving car uses machine learning to process video and then drive around a track oh and the other thing last week we were talking about Geiger counters and detecting high-energy particles that thing just there you can see that there is an orb it's a white orb sitting on top of a box it's behind another thing but just at the back there inside the box there three Geiger counters and a Raspberry Pi and what it's doing is detecting hi and the three Geiger counters are inside metal tubes and the reason for that is to both is to kind of act as a filter so that only high-energy particles will get through and also to make it directional so the three tubes are sort of in a triangle shape and by detecting pulses coming out of the three tubes it can react differently depending on the angle of you know of the high-energy particle coming in and then inside that orb at the top it's got RGB LEDs and there is also an audio amplifier in it and so what happens is that when a high-energy particle is detected it makes a chime like a bomb sound and it lights up in different colors so if you leave it in it's not turned on right now how it would be going off like every few seconds but that is a thing that can visualize when there are high-energy particles travel coming through which happens all the time that was designed by a friend of mine named Paul in Adelaide and it was used in an art installation a couple of years ago what they did was down on the side of the Torrens River there is a I think there's a casino or something I'm not sure what the building is anyway there's some big building with a big lawn area down on the side of the Torrens River and they built a whole bunch of those little sensors and spread them out across this lawn area so they were I don't know a few meters apart you know big grid and you could span back and watch it and watch the different lights turning on and you hear the bomb sound and the idea was that it was a way of visualizing the fact that there are these high-energy particles that are traveling through us and through everything all and you could stand there and watch this this big field of illumination and sound as the particles zipped through them pretty cool and I was lucky enough to get hold of one of his senses after the display ended from one of his complete units and I've had it sitting up there for a while I've turned I turn it on occasionally and what I really wish is that it would ignore most things and just come on occasionally because it's a bit too much to have it making noise and flashing lights a couple of times a minute yeah it's fun for a little while but you can't leave it turned on all the time because it just drives you nuts sorry summary is I have three 3d printers one of them I use constantly one of them I never use and one of them I use occasionally and I would use it more if I could get a better heat bed on it okay Oh cheater Judy kid said I didn't have computers in school my first computer in 1982 was Sinclair zx81 yes the classic 81 and there's EDX 80 that came before it the zx81 was fancy because it was in a black case the zx80 I think was like the beige colored one and that was one does NX 80 would have been I think the first computer that I ever actually touched and used and I haven't seen one of those for so long but the first computer I actually ironed it could control myself was this one the the tech one and the the really cool thing is that back when I was playing around with the tech one there were a couple of guys that the two main guys who designed that who like I saw their names in talking electronics magazine and their name is on the PCB I think and you know that sort of thing where you see people mentioned and their names and they take on mythical status in your own mind so the the two guys who designed that it was Ken stone and John Hardy I think I can't remember the other name when I was a little kid it was like these were the gurus because they were so smart they could design something like that board and the really cool thing is that now all these years later I'm in a Facebook group with both of them and talking about classic computer design and one of them is now working on an updated version of that board so there is a new version coming out a new tech computer designed by the guy who designed the original board all those decades ago but updated just as a party has a bit of a nostalgia thing I think ok let's get back to the comments Oh guru say diagram I had sorry I had grand dreams for the vault project as far as accessibility goes but realized pretty quickly the general user updating was going to be super problematic scaled that back big time yeah so it's that is such a challenge trying to make projects that are easy for end users both to from a development point of view and from a user point of view and being able to configure things even with the simplest of systems just looking around now because I was facing this problem just on Friday ok well once again getting into a tangent ok so the problem that I was trying to solve on Friday and I've been sort of thinking about it for the last couple of weeks is the the load cell button project that I've been working on with my friend Chris the problem is how to configure it what we've got is a device so the 30 second background for people that haven't seen this chris has Duchenne muscular dystrophy and he's just turned 42 so he is living way beyond any normal life expectancy for someone with this particular disease and it's progressed to the point where his he has almost no strength in his muscles he has about 10 millimeters of movement in his fingertips on his right hand and he can only apply a very small amount of force so one of the things he relies on is a nurse call button so that when he's in bed if he needs assistance with breathing or coughing or whatever you can press the button and his carer will be notified and they can respond to him the problem is that the nurse call button that he's been using so it's a little button that he puts a GoPro loop on it so the velcro loop holds it attached to his finger and it just sits there and when he needs assistance he just squeezes it the mechanical switch in it which is just like a it's kind of like a micro switch it's like a little tact switch basically if you push a tax switch there is a fair bit of resistance before it clicks and when you press it it goes click it's got a very distinct action but it takes a not insignificant amount of force to activate it and it's getting to the point where he has trouble activating the nurse call system so we've been working on the system that uses a load cell and it measures how much force is applying which means that it can be incredibly sensitive and it can be tuned so that it will trigger at a set point that is adjustable in software now this gets me back to my response to to the Guru of nothing's comment which is that when need in ways to configure three options and if we're going to have other people that are using this we don't want them to have to install the Arduino IDE and change config options and recompile it and then flash the code just to change settings in it and that's totally unacceptable so we need some way of having a user interface on this incredibly simple system well an incredibly simple user interface it's so it's not actually a simple system so that a couple of things can be changed the obvious one is changing the trigger threshold so whether you want to so on the the device and this would be so much easier if I just showed it to you but the where is it I've got a couple of prototypes up there I won't bother getting it out now I'll rush through this story the the actual devices in use at Christmas place now so I don't have it here you know we need to be able to adjust the threshold so we have a display on it and a knob and it's a rotary encoder with a button so you press the button to put it into into alteration mode and you turn the knob and you can change to the threshold at which it is activated and you press the button again and it saves the value to non-volatile memory and locks the button so the idea is that if you come along and bump the knob it is not going to change the setting you can turn the knob it won't do anything because the worst thing would be if the knob was bumped accidentally and the threshold was increased and then the person who is using it is trying to activate it to call for help and it's not activating because they can't reach the threshold so we've got it so that in order to change the setting you don't just turn the knob you have to press the button once to click it and it puts it into a set mode and then you can adjust the threshold and then you press it again and it saves the step mode and if you put it into programming mode and then you just walk away from it after 30 seconds and times out and it defaults back to whatever it was before so the idea is to minimize possible false entry so someone wants to change the the threshold on the nurse call system they have to very consciously press the button to put it into adjustment mode turn the knob and then press the button again to save it and only then will it be changed but there are also a couple of other options one is pulse stretching in Chris's case he has a fair degree of control over the timing and he wants to he often uses the nurse call button as a way of communicating intent like if something is a real problem he's just going to grab it and squeeze it and he's going to keep that buzzer going and not let go but if he just wants to for example get someone's attention when he's in bed he can just tap it and make it go peep and not you know cause big problems so the duration of the the buzz and can be important so in his case what he wants is instant response from the nurse call system so and when he lets go it stops immediately but some people don't necessarily want that and an example of this is a multimeter if you have continuity mode on a multimeter and you tap it together if you'd tap on something some multimeters will keep the beep going for a minimum period of time and it could be quite short in fact your multimeter may be doing this and you don't even realize it if you take the multimeter probes in continuity mode and you just tap them together the the duration of the pulse if it's been detected will probably be some minimal period and it might be only a tenth of a second or something quite short but what it means is that it's not going to be just the like hundredth of a second of tapping the probes if it's detected continuity it will stretch the pulse long enough that you can hear it and so with a nurse call system you may want the same thing so what we did in the software has put an option in where if you activate pulse stretching it will turn on the buzzer for a minimum period which might be like one second or two seconds so if you just squeeze it briefly and if that's all you can manage it won't just go and turn it off and then the carer might think it was wasn't anything serious it was just like accidentally being bumped what it does is it turns on the output and it keeps the output on for a minimum period of time and then turns it off that defeats Chris's requirement because he wants to be able to control it and just do very brief beeps with it and so we want that to be an option we want the pulse stretching output to be something that can be turned on or off once again it's no good to have someone install the arduino ide change a config option recompile the code flash it onto the device just to change one option so how do we make that as easy as possible and what I was just thinking about on Friday was putting a physical switch on the device so you just turn pulse switching on and off and have the switch going to a digital input in the microcontroller so it can detect the position of the switch that way if someone wants to change it they can like I think I will grab the prototype back here somewhere here I've got a prototype I think no that one doesn't have it on the are you here we go what I've got on here this is the control board for one of them and it's a little bit hard to see but down here there is a little slide switch it's a tiny little thing and it's set back from the edge of the PCB it doesn't protrude past it this particular switch is actually it changed the output from normally open normally closed mode because the output of the which comes out through this socket would then be connected into a nurse call system and nurse call system some of them have a normally closed input and what that means is that if anything goes wrong say a cable gets pulled out that will cause the alarm to go off because the connection has been broken but some nurse call systems are normally open input so you have to close the circuit in order to trigger it so what this little slide switch does is switch between normally open and normally closed modes on the output and that is something that you would only ever change once when you're setting it up depending on what you're connecting it to and on the 3d printed enclosure we've got a little slot on the bottom so that you can use something like a pen or a paper clip and flick that switch across into the mode that you want so this is getting back to the user interface point what I was just thinking about on Friday was adding a second switch on here which could then control the pulse stretch feature and that way you don't need to change any code it's just you might want the past retching you might not but you can flick a little switch underneath it and when it's actually mounted like on the head of the bed this switch is invisible it's just in a slot that's under the the bottom of the case but you can change it if you need to it's something that you don't change every day you typically change it just during setup and then never touch it so you can flick the tiny little switch whichever way you want okay this is a great comment ich ogni dos Reis is a full-stack programmer is someone who can write JavaScript for the front end and the back end yes javascript the universal solution from the top to the bottom of the stack okay so I gotta wrap it up it's we're way fast well past two hours now there are some really good questions in here lots of comments that I want to get to so one and say what strategy do you recommend for testing IOT solutions how do you validate your own devices that is such a good topic in fact I'm gonna write that on my whiteboard I've got a little list err everything's backwards it's confusing I've got a little list on my whiteboard just here of things to talk about in future live streams so I'm gonna put a IOT device and testing and things onto that list and come back to that because that will it's not something I can answer in 30 seconds mm-hmm I'm just gonna scroll through here very quickly see if there's anything else I want to add to the let's come back to that topic list Oh James asked how Lavinia lights which boy it's going pretty well not right here I did have them on the bench but I did a context switch so I move them back into the container so what I want to do is get a bit more of the air quality sensor project wrapped up and then I'm gonna do a mini series about Lights which is one thing I do have right here is my is one of my Smart Switch prototypes from when was this must be 2 years ago yeah 2018 so this is a an RGB illuminated light switch and on the back of it it's in two parts I'll take this board off there is a board that connects to the buttons and it's got ws 28 11 RGB LED drivers on it and the idea is that this particular board is specific to the number of buttons on the front so this is a four-way board I can also do a three-way two-way one way and it just has like a different layout but the the interface is the same there's a little header just here and then the control board goes on top of it and this board can be the same for for all the different switch variations it's got this one's got a SP 12 module on it so it's got on esp8266 in it and on the other side there is a 45 socket and there's a little switch mode regulator so it can do power over ethernet and what else is there but yeah there's a so it's a 5 volt switch mode regulator feeding into a 3.3 volt linear regulator so we can feed up to 28 volts into this and it will be happy and then this board mounts on here and then I'm just sticking it on the connector but there should be mechanicals and things like you can see there are mounting holes there so these two boards are attached together like in the sandwich configuration and then it goes into the wall you plug the cable in here and what it does is take power off the cable using the same pin out as power over ethernet but it's not even it and the idea with this is that it's a drop-in replacement for my existing light switches uses the same connections on here and it can when you press these buttons it shorts out the correct wire the same way as my current light switch is but the difference is that it's got an onboard esp8266 which is controlling the RGB LEDs and that means you now have the option of not just like a dumb switch that sends commands but you can also do things like change the color of the LEDs excuse me to show you the status of whatever the load is so if you turn on a light you can have it change color on the matching button on here so yeah I did these 2018 I still haven't even shown those in a video I've got so many projects okay I'm going to have I'm so far behind in the chat okay but the other part of that so I was talking about that the other part of that is the light switch controller I think that was what the original question from James was about and I've assembled board so last week on the live stream we ran the pick-and-place machine and we populated a board since then that board has had the big rj45 sockets on at that eight-way sockets and everything else has been installed on it and I've installed I've also sold it up there there back in the box as well I've also sold it up the new version of the vault had which has got the header on it to connect to it and I've assembled a new version of the I squared C control panel with the Big O layer on it so now it's a bit of testing and coding but what I'm going to do is I think to a miniseries about light switches after the air quality sensor series is finished I've got two more videos and to come out for that the next one is going to be how to record and visualize the data that comes from the air quality sensors so I'm probably going to cover you know graph honor and those sorts of things and then the final one will be the pro version which is the versions well there are some blank PCBs here this is the version with the ASP 32 on it and PMA 680 and the pms 7 double 0 3 sensor all in a little 3d printed case but I've got to get those out of the way I've got such a backlog of videos all right I'm gonna sign off for now thank you so much for coming along to this live stream it's really cool to have so many people coming along every Sunday every week I think how am I gonna get through two hours of doing a live stream what am I going to talk about when we get past two hours and I think I've got to just stop it but it means there's more for next week so thank you so much for coming along I am going to mute myself in a second and sign off thank you bye
Info
Channel: SuperHouseTV
Views: 7,199
Rating: 4.9349594 out of 5
Keywords:
Id: MAglNe_c7uM
Channel Id: undefined
Length: 135min 47sec (8147 seconds)
Published: Sat May 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.