MicroPython used in industrial applications - C. Spindler - PyLondinium18

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so yes thank you very much for having us I'm with the micro Pisan team and there has been some talks about micro pilant already in this event which is really great all circuit Python so mostly of them are in the well maker sector or maybe in educational in the education so I would like to talk a little bit about how my group item is already used in industrial applications where we are involved directly or we know that it's used so first of all I give it an overview so is there someone who has never heard of micro patent before yeah so perfect I introduced a little bit how what we did and where we are now and then I go and show you a real product that works with micro prize and with a general asleep was allowed to bring here and I want to share a little bit how we think mica Pythian games generate well an advantage for companies if they use it in the product development and I'm happy to answer some question afterwards about to talk about micro patent in general if you're interested so let's just go into it what is micro Python it aims to be a lean and efficient rewrite of Python so it's rewritten completely from scratch it has a lot of it has a compiler virtual machine a runtime system a garbage collector so you can compiled to bytecode a native machine code it supports an inline assembler and all the or compilation happens on the chip which means you don't have to install anything on your PC everything is interpreted on the controller so you can you're all Python programmers so you're very familiar with the wrapper so you can use this like if you're doing your normal Python micro pie that is not completely comparable with Python but we aim to be as much the same as possible so this seems all alike a lot of work which it was the creator of micro python damian george had had the idea in 2013 because you wanted to he wanted an inter language to easy control his hardware devices and he would really like to have it done with Python so he thought maybe there would be other people interested in this so I run a Kickstarter and I always wanted to run a Kickstarter because everybody is doing it so he collected about hundred thousand pounds for this initial idea so the community was very into it Michael Python was kind of wanted so with these first initial a hundred thousand pounds the first batch of Michael Pythian Pi BOTS was created which you see dancing to the left so that the first 3,000 pieces of these and since then we have really come a long way that has happened a lot MegaPath is open-source project on github so everybody is more than welcome to contribute we have about six thousand five hundred stars and ranking in the top 100 of the C C++ projects so yeah it's kind of famous and so in the UK there was the BBC micro bid project where in 2016 all the 11 to 12 year olds got a BBC micro bit to where micro Python can run for teaching there are already other companies using micro PI's and to ship their development parts you might have heard about circa Python from Adafruit and there are more companies like Pi calm or open and vo do machine vision then very exciting for us like a really big milestone is that there's the first micro Python O'Reilly book coming I program like it's already out also last year programming with micro Python and we are ready to launch the second generation of Pi boards which I will go into more detail later in the talk so when I talk to people about so Christine what do you do for a living and these are embedded programmers they say oh yes Python for microcontrollers last time when I checked Python was an interpreted language so this is slow it eats up a lot of resources and it's not very energy-efficient yeah well they are right but let me just say micro Python is fast enough for most tasks and if you look at the development time when you do or do a redesign of a product I have the first idea of a product it's really really fast so the benefits of scripting languages you all know them it's easy to learn them with micro Pisan on your first initial bot you get an easy working prototype very quick so even if you just have to show it off to a customer to get the first proof-of-concept you can have this ready in a couple of weeks it's in accept then maybe you do it with C so the time to market might get reduced through this but all these development boats and IOT things are about is that it's easy extensible like by a user so you really want to tweak it your way so it's easy to do this with a scripting language instead of maybe with plain C what's traditional in the embedded market so luckily there are some some people who use micro PI than the product development so there's one company that came across micro pathum when they were searching for a lightweight Python implementation but they didn't want to have a full Linux system on the device so they were firstly going with embedded leaner with an embedded Linux system but they wanted to get rid of all the blown shell scripts that they have to use on it on the device and this company so they made a bold decision at the time because micro Python was very young and two years later they actually are now 500 an amp ere's with an active rebel so this is quite impressive because they can they're able to do real-time image processing now yeah so this is one story and I'm going to tell you a little bit more about the different projects I'm aware of so there is one project this is still working project they are approaching us and they're looking into it and they're very excited and we are very excited - then there are prototypes of free designs from existing products when the actual products reached end of and people looking into it maybe we can do this in a more efficient way and we using micro Python and there are really new products like we have a new idea and we are approaching us so and the device I brought here has a successful certification and it's already in production so these devices are running in the field 24/7 like with high real reliability so I wouldn't really want to say that there are real products out there working in the field yeah so when we talk about my new pricing it's definitely worth like he is the creator of micro poison so it's Jorge robotics and he is a background in theoretical physics and he approached a design by a more academic and research orientated point of view instead of just simply I want to fix this problem and we think that this is the reason why micro Pythian is so successful so the first company I want to talk about is aqua power technologies it's a UK company they are based in the Lake District and they create innovative machines to generate power for marine environments so if you have a look they have really really cool you child wear which they put into the sea it's really amazing and they are looking into their product the called the aqua boy and currently it's collected it's logging and collecting data from from an excellent major how the waves are flowing and actually now it's using MATLAB but they wanted to have it on the device on the embedded hardware so they were approaching us so micro Python team would this be able to do and we were saying yes and we are very excited about implementing this in the next couple of weeks so this is still working progress while it's coming up then there is a US company called travesty consulting he's used mic Python for his product development to make them even more rapid because he's a he's a mechanical electrical and software design engineer and what he said it's like the constant battle of finding components and tools which are easy to use I still have a professional level there's kind of a gap some micro PI's and kind of filled this for me yes so he says as you can see on the left side this is a an adapter board which has the same microcontroller is our PI would reference pot and he designs his own little BOTS and plucks it or solders it on his expansion boards unfortunately I'm not allowed to say what final product this will be but this bill is also used in in a real product in the end yeah and he said it's so easy to that he don't really need it needs a debugger because he already has two running microcontroller and you don't have to care about this so you can really focus on his how can i connect this sense or how can I get the you are working or something like this and then there's a company which the pro driver brought here they are all they are doing manufacturing of monitoring the traffic on highways mainly on highways yeah so this is this is this is a German company based in Hamburg and Tristan in the market they are quite small but they're quite aggressive and they have the only working solution that has a real certification like like the high end certification in the my sorry yeah so on the left side you see a traffic monitoring and classification system because there are two problems you have a lot of vehicles and they are all need to be categorized in some way because if you want to have new roads you need to bring reliable data on is there really so much traffic well I sometimes just have to go to the Autobahn which is near to me and I can see it the test too much traffic but yes you have to have the reliable data and then there's another problem there are a lot of overloaded vehicles and you not always see them as easily as like in the picture here so they have this assume that's called weigh-in-motion so it's basically you have the road and there are three lines of sensors which can measure the weight of the truck so when you have your race over load the truck coming from the left to the right it gets categorized in how much does it actually allow it to weigh and it's connected to a charge amplifier and they collect the data in the traffic monitoring system so this wim T is p32 I brought with me one of these and actually I couldn't bring the street and the sensors implemented under the need so but this would be really fun like driving with a with the truck here so I brought this here with the simulators they use in the lab because of course it has to be tested in the first place before before you actually go to the trick and spend a lot of money you will further drivers and yeah so let's see if I can show you so the device is all already running and it's probably at 2:00 so there's an implemented OLED display which is only for like visually visualization because most of the time this is switched off because no one is actually there and looks at it but it's really convenient to see that so there are two lines connected and you get somewhere you get the number of the line the way of the truck and the categorized week like they categorize different kind of vehicles in numbers and so the probe this is all running so very nice but if we stop this you can see actually that there's a PI bond some people have used with the PI board it is actually a PI bond running on this device like literally not a PI bond it's the microcontroller ship but it's running microfiber so I hope this gets a little bit like this is a real-world project [Music] sorry so how micro pride made the difference obviously it was very obvious because the controller that has to be used was in the beginning wasn't actually an f4 which is running on the private as well and then they improved it to an f7 because they have to do the tag that 232 a to 2d channels all in like in real time in a lot in line so they need to realize the fast real time response and what was really easy to implement for example when you have these displays or other things like the peripherals of the the things that that's on the device which is not really like a car implement but to get them connected and put put this this all together was was really easy with micro Python so so it's the amazing software isn't it like this super great implementation of Damien George yes it is but let's just say it's also combination of hardware and software and how easy it is to plug something in so this what you can see over here is our new board new board which is like half the size of the normal high board and the idea was to have you probably know this is P 32 chips which you can buy everywhere but you still have to solo them so we we want to really want to have something that you can with a micro USB connector already plug into your laptop and program it and which you can really really easy put on an adapter board and get ready to start programming so you can really focus on what's your actual actual problem to solve and not to program first get the micro controller running so that you can test it separately which means you don't have to worry about if the actual micro controllers working so yeah the new Pi body it's called it has more functionality than our PI about one point it's only two point four grams it's more power so it's with a better efficiency it has it runs an m7 with 2260 megahertz and 256 K K RAM so it really it's really low power consumption and it's ready to use models but still in the size of these ESP 30 models you might know so there's Wi-Fi and a Bluetooth chip enabled which already ready to use and I wanted to show off a little bit of the data compared so the pilot 1.1 which is the original PI watt runs at 168 megahertz which is comparable to 120 megahertz on the new prymaat so when you have them idle it consumes about 80 milliamps and if they run they are at 55 million so this is quite comparable but the new board can have up to two hundred sixty minutes which is about one point seven five times faster than than the normal pipe like the old like the first pebble and there you have a power consumption from 34 milliamps and it runs at 112 millions light sleepers 500 microamps and deep sleep with real-time clock enabled it's 10 milliamps and what are quite good numbers is the downloading data to to the buy private which is 100 milli ampair milliamps around 800 kilobyte for seconds and the upload is 1 megabyte per second at about 150 40 milliamps so and then of course there are things micro Payton is not so good at or cannot do it also if you have really small microcontrollers it's best you use just traditional see it's still a dynamic type language so you really really have to get your memory fragment like your memory in order with the garbage collections if you generate too many object objects so you have to keep that in mind and if you are going with really really large projects you might prefer an embedded Linux system so to sum up what are the pros and cons about this well productivity went up the traceability because you have a huge community looking standing behind that in the open source which they really dig out the problems and this is great because you rely on that the testability went fast because you might have already the running board which you just have to plug in through your adapter board it's really easy to part to controller that has more power for example and the licen licensing was an advantage basically because MIT license allows you to use the code but you can really close what might be your generator like which generates your profit in the end yeah and there's quite good support from the team well not so good might be that they're increased hardware resources but all the upcoming microcontrollers show that we shouldn't be really have a problem with that but sometimes might be too expensive and there might be some lack of develop skills regarding the scripting languages because today you usually have secret programmers in the embedded world so this might be something which needs to be more approached because they do what they're used to but then might not see the advantage right away so I hope you enjoyed the talk you can find more information on micro python.org in our forum or if you want to support micro pilot project you can buy something pick something up from the store obviously you can write me an email if you have some feedback so I hope you enjoyed the talk and I'm happy to have some questions Thank You Chrissy that was really informative does anyone have any questions all right quite a few the examples you gave were mostly around development trial small-scale applications can you see micro Python being used for larger scale higher budget more critical uses what sort of thing well I think there we have the problem might applies I'm still quite young with the five years so there's no so what happens in ten years because this is might be the problem why the bigger companies are still holding a little bit back maybe so these are all bold small companies who see an advantage in this but yeah I to be honest well the work with the ISA if some of you have made heard of this I see them in satellites obviously at some point yeah absolutely um thank you very much and I want you to know for someone who's been dabbling with Arduino and now needs something a little bit more beefy and something a little bit bigger to work what sort of platform you suggest to go I've seen that there is this SP 32 that is promising but I wonder well saying that there are lots of those around so which is that it would suggest for someone wants to explore bits of the embedded words with those newer platform well yes you might have seen the official micro Python has parts for the esp8266 and ESP 32 so they are cool chips but they are not well if you want to explore and don't want to spend a lot of money go with them but if you really wouldn't put this one in a real application I would not recommend it right now I'm not saying that they won't be there at some point but they still have too many Hardware bugs but if you want to explore sure there might good start with them cheap stone but obviously you should buy a pie but promoting can you describe the different sleep modes and what kind of uses they have a different sleep mode yeah so yeah when you look into the IOT section you might have devices which are 99.9% are in deep sleep and you just send data to somewhere in the 0.5 / 0.1% so with the light sleep you can wake up your microcontroller with an interrupt and with the deep sleep you have the real-time clock which needs to be very accurate to wake it up again so these are just very first measurements so be patient I had more we should be having more very soon but yeah like also like when you have the Wi-Fi enabled and disabled and yeah hi can you tell me whether micro Python is sort of true real-time or can it does it run on a real-time operating system does it come with an operating which which operating system do you recommend using it with and can it be deterministic real-time in terms of the interrupts if you're trying to build a controller deterministic real time in the sense that it could respond quick you know within it within a guaranteed time period in the way that micro colas micro controllers traditionally do yes so I didn't quite get the question with the operating system well how how does micro Python work with which operating system do you use or is it is it an operating system it's well it's an kind of operating system for your micro controller all right but you don't really need an address or anything in between on your micro controller - so you just need to flash the firmware on the micro controller do you mean the PC where you interact with your device like how I plugged it in and showed you just the microcut I just wondered whether so it's so micro Pythian is all you need on the mic on the micro controller yes so there's no eros or other layer in between so you can flesh it right on it and that's great and and it works with interrupts and would you say that it was what we used to call deterministic real-time which any evident response kachunk to an in to an interrupt within it oh great fantastic thank you you mentioned that you could use some micro Python with BBC micro Bert can you use it with Arduino or Raspberry Pi there is a Raspberry Pi bare-metal port with other you know I'm not sure to be honest I don't think so but it runs on the BBC micros everything are you a teacher are you using the BBC my friend no I think we can do one last question on that side maybe anyone I just asking because we've seen some examples of of it being used like with all the data sound data science tools how easy is it for someone like me which I'm mostly in the data science and a small little bit in the development side for me to just start using it in in a real-time use for example like all connecting it to a sensor array for any of that use well I would say it's really easy so if you want to try this there's some documentation on our website you just need to have a board you can buy one that is already micro pride and flashed on it or you can flash it yourself just see what they are available so connecting a sensor like an i2c you or something it's really easy to set up if you were just like dipping your feet into something like for the very first time so no worries about that should be very easy straightforward okay lovely that concludes our session we have a coffee break from 11 to 11 20 and then we continue from there Thank You Christine [Applause]
Info
Channel: PyLondinium
Views: 7,970
Rating: undefined out of 5
Keywords: Python, Conference, PSF, 2018, Bloomberg, PyLondinium
Id: xDPdvjNxyWs
Channel Id: undefined
Length: 27min 16sec (1636 seconds)
Published: Thu Jul 12 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.