Home Automation Hangout 2021-03-14: ESPFlash

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] yes [Music] good morning my super friends thank you for coming along i think i sound far more animated than i actually feel but that's usually the way i just i try to sound animated um so just before we get into other things my um my aboriginal owen shout out for today is the aboriginal advancement league which was founded in the 1960s originally by a group of white people but it fairly quickly transitioned into being run by uh aboriginal australians so it now runs a whole lot of different programs uh for uh for maintaining uh preserving aboriginal culture so that is a cool thing to check out how excited are you yeah um so good morning everybody who have we got here so mr x mr y someone is into coordinates i'll get back to your question in just a second uh g'day andy sion um oh johnny's here peter ah some call it fun some call it fun i don't know i don't know if that is someone that i know by another name um thanks for coming along alex is here yes happy pi day so uh all right i do have a few things to talk about today there is one thing that's potentially really important and i don't know if i'm going to get to it it might justify a an entire squirrel chasing session of its own oh aaron good day thanks for coming along and raspberry all right so i'm just briefly going to get back to mr x mr wise question right at the start so the question was i just watched super house number 41 again so for reference that was the most the second most recent one which was about data logging with influx db mqtt all that sort of thing grafana and i have some questions can sensors publish to multiple brokers and what does influx db do when the disk gets full okay question part the first can censors publish to multiple brokers yes that is totally up to the uh the client what you can do is make connections to multiple brokers depending on the client library you may not be able to have multiple instances of the mqtt object in your code so this is going to depend on how the library is implemented sorry how the client side is implemented in your device like in your sensor or whatever it is so what you could do is two options if you are using a library that creates an object for the client that allows you to connect to the broker you may be able to instantiate multiple objects and have them connected to different brokers simultaneously and maintain those connections and then you can publish to them independently or you could publish the same message to both them the alternative if your code or your library does not support that is to make a connection to a broker publish to it disconnect connect to a different broker publish to it and disconnect which is a bit of a pain but you could certainly do it the the fundamental question below this you know i thought i was going to be answering this question in 30 seconds and now i'm chasing squirrels already so the fundamental question below this is what you're trying to achieve why you would have a device or a client that publishes to multiple mqtt brokers now i can certainly imagine circumstances where that would be happening for example uh in the specific case of something like an air quality sensor there might be a situation where you're running your own local mqtt broker you're using influx db and grafana you're doing all your local charting like i showed in episode 41 but you also want to send your data to some other centralized service like the um the open air quality i can't remember what it's called the air quality service that is running out of germany where they collect data from sensors all over the world and then provide aggregated reporting so you can see air quality across your area and i think they provide an mqtt interface not just a regular http api so in that situation you might want your device to publish to your local broker and also publish to some other broker and that is certainly a legitimate thing to want to do another way to do that would be to if your client can't be modified it can only publish to one broker it's relatively easy to write a script that acts as a bridge and it republishes so what you would do in that situation is have your maybe i should draw diagrams i should get a bit of paper and use the overhead camera so what you would do is have your client published to your local mqtt broker and that's all it needs to do doesn't need to understand anything else then what you can do is have a client that is just a script it could be a piece of python or something like that which is subscribed to the same topic and it sees the message and then it republishes it to a different broker and that is also a perfectly legitimate way of doing it and that way what you can do is have your bridge script or your republishing script you could do things like change the formats like it could the way you are taking the data onto your broker might be different to the way the other service requires it to be reported so you could do uh format conversions and whatever you need to do so there are some options there so mr x mr y hopefully that is the start of that partly answers your first question and the second part of that was what does influx db do when the disk gets full to flip an answer that is it breaks but what you really want to know is how to avoid that happening uh so influx db has a well the danger with storing lots of sensor data is that you acquire lots of data points over a period of time all right so typically with something like a temperature sensor or an air quality sensor or whatever it'll be publishing perhaps every minute maybe every five minutes you know it could be more or less frequent whatever you're going to have this continuous stream of data and what you typically care about is if you're looking at data in recent history you might need detail you want it to be fairly fine-grained but if you go back for okay so here's a good example let's just look at weather if we wanted to look at the temperature of um of today or yesterday we might want to look at a curve over the course of the day of you know what time it reached a certain temperature etc so you want that plot of that data but if you look back at a day 50 years ago do you want that detailed curve or do you just want to know the minimum temperature and the maximum temperature two data points that's it you don't care about all of the intermediate data points or maybe you just want the average temperature for that day so then the amount of data that you want for historical information is typically much less than the data that you want for recent or current data and the way you can handle that is with data roll up like there are a number of different terms for it there's data roller there's consolidation and data thinning or whatever and the way influx db handles this is with two mechanisms one is called continuous query and one is called the retention policy and i'm not going to go into those in great detail right now partly because i can't because i don't know enough about it i know enough to kind of explain it but not enough to you know do a detailed tutorial or anything like that so continuous queries are a mechanism that is built into the database engine because influx db is specifically for storing a whole series of data points like it's storing data over a period of time and it faces exactly this problem of the data store growing linearly with time which you don't necessarily want so continuous queries are a way of rolling up many data points into a smaller number of data points and looking back for example at you might look at yesterday's temperature data you don't want to see excuse me every um every one minute data point across the course of the day you might want to see a chart that shows you the temperature at each hour of the day so with a continuous query what it does is roll up data within certain time periods and give you you can get information about it so you can say i've got 60 data set like 60 samples across this one hour period but i only want to know what the average was across that one hour period and give me one number and so yeah you can do all sorts of useful things like that and retention policy is about how long it keeps the data so you can set a a duration so you can say i don't want to keep data older than a certain thing and have it cleared out of the database you can also do it manually and this is i this is what i originally did on my influx db system when i was running it on a raspberry pi so when i first started running influx db it was on a raspberry pi on an 8 uh sd card and i filled that sd card up pretty fast because i was logging lots of stuff i was recording data from all sorts of things like um if you look at my so typically what i do is pull data in using node red and then shove that into influx db and i was recording things like the battery voltage on every single one of my zigbee devices every minute you know just ridiculous stuff like that and those batteries are going to last a year you don't need minute data for that but what happened was that my influx db directory the data directory just kept growing and growing got out of control so instead of doing it the proper way which was using things like retention policy what i did was write a an influx db query and then stick it in a script so i was running it i think i was running it out of a python script i can't remember now it's actually on i'm not even running that raspberry pi anymore i've now migrated everything over to using docker on my synology nes and so what i would do is run this script just off a cron job i mean this is you know classic sysadmin um fix it with bailing wire sort of thing cron job that runs a script that ran an influx db query that found records older than a certain thing i think it was like older than a month and it would just delete them so it was can it was repeatedly pruning off the end of the database so that it wouldn't grow and fill up my disk which really really sucked so if this is a subject that is um i was actually thinking of getting into this in that influx db video but it ended up quite long already and i figured that this is a deep enough topic that it needs more focus so i was thinking of maybe doing a video specifically about continuous queries and retention policies in influx db but before i do that i need to learn more about them myself as i said i can tell you right now what they are but in order to actually use them i'd be googling like crazy and trying to figure things out as i go so trying to explain them and not be telling you the wrong thing i'd have to be more careful about that alrighty so where are we up to okay um uh let's see so i'm expecting some comments from oh bridges okay so this is getting back to the mqtt thing i saw a couple of comments so i'm just going to bring these up i'm going to mention them sorry moving stuff around on my screen so aaron said you can set up an mqtt broker bridge it's supported with mosquito too yeah cool so a broker bridge is what it sounds like it's a link between brokers and andrew gordon also said use bridges i have a central broker one of my devices has its own broker for local control but the broker also bridges to the central what is going on oh hang on i just activated no i do not want to use uh voice activation on my on the tablet how do i get out of that get out of there that's better uh some cooler fun 3.14 us dollars thank you i wonder if i can buy a pie for that probably uh what's it a pie don't really feel like a meat pie today what i feel like is maybe like a an apple and blueberry pie you know some combination sweet pie like that would be nice yeah so um yes so both aaron and andrew say use bridges um so andrew said central broker also bridges to ttn which is the things network to get data from those sensors yeah okay uh so [Music] um oh okay so dodgy this is regarding black data aggregation doji said that suggests that it would have to delete the other 59 points during that hour uh yes it can so what you can do is take the average of um say you've in your database that's an australian 3.14 that's a 3.1 for aussie bucks or kangabox that's peter what you can do is take say you've got 60 data points across a one hour period so one minute data what you can do is calculate the average of those and delete all the data points and replace them with a single data point which is the average for that hour and that way essentially you are thinning your data or compressing your data you're losing resolution it's like you know jpeg image compression it's a lossy compression algorithm you can't undo it to get all the data back again but that's the price you pay for not having to store every single piece of data along the way uh yeah so um oh aaron also suggested proactively archive and or push to cold storage for older data yeah that's a good thing as well so um and related to that erin also said also maybe only store data if a value changes from the last saved value that can save a lot of space too that is absolutely true yes only save changes now that depending on how you are charting it that can cause problems most of the time it's fine but i just raised this as a thing to be aware of so you can implement this either on the client side or you could do it on the broker um like if you had some kind of an intermediary script or you could do it in the database so in the database well in any of those the general concept is you took a reading and it was 22.3 degrees and then one minute later you take another reading and it's 22.3 degrees so you just don't bother sending the data whatever the last data point was is still correct it hasn't been invalidated so don't send it there are issues with that potentially with things like um averaging algorithms depending on how they work if you if you're assuming that and a value applies to a certain time slice like a 60 second interval and then you've got no data for the next 60 second interval then that can screw up some averaging potentially but most of the time it's okay oh bob p more pi it's it is a very pi day today so but yes aaron's point is very important also maybe store data if value changes from the last um i'm i'm trying to think of a way that i've implemented a place i've implemented that i don't think i did some anything like that in the air quality sense of firmware oh no i don't think i did but i've definitely used that technique in some other projects where you have the uh you store i'm talking about on the client side so you have a variable so just said a global variable for the last reported value and then when you read your sensor again you compare it to the last reported value and only report if it's different and that can save a lot of data but the other point that aaron made about proactively archiving is also a good one and there are this is something that's often done okay so i'm going to be getting deep into database concepts here there is um there's a kind of related but not the same concept called sharding which is used in large databases where you have a large data set and it is slow to work with or you've got storage or script restrictions so you slice the data essentially you slice it depends which way you look at the table but you store some data in one location and some in another now sharding is typically used for performance reasons when you might want to be able to do things like have half of your data stored in on one server one on another and you run the same query on both servers simultaneously and you get the results back and aggregate them and effectively you get the you've doubled your performance because each one is only having to query half the data set now it's actually much more complicated than that because there are issues with indexing and the way you handle sharding is usually by splitting on some kind of an index so you have an index range on one server and an index range on another server anyway this is actually the sort of thing that i spent many many years of my life working on so i could chase this squirrel all day but i'm not going to i'm going to try that's that's the life i've been trying to put behind me um so aaron's point was archive cold data which is data that you're not necessarily going to be querying and that's that's different to sharding in terms of what i was just describing so sharding is when you have live data and you split it to be able to query it more quickly by segmenting the data set putting data into cold storage is when you have data that you want to be able to query and get immediate results from it and essentially have like an archive where it might be a second database with the same structure but you don't typically use it so what you do is you have a query that will occasionally pull the oldest data out of your live database and shove it into your archive database so your archive database will grow over time your live database won't it'll grow to a certain size and then just stay there because the number of data points won't increase over time oh so ben said i've missed some of the intro and context delta v has concepts of exception and compression to minimize data volume yeah um yes and oh aaron may made a point a comment this is what i was getting at earlier our client charts expect a data point at certain intervals if the db has missing interval values it automatically fills in the data points with the previous data value we have this for averaging two yep cool so that's where i was saying that if you have if your your reporting system expects data for known specific intervals for averaging purposes or charting or whatever and you don't send data because it hasn't changed then things get screwed up but you can compensate for that in the reporting system and have it just assume the value hasn't changed so that is certainly a very valid way of doing it and as long as the different parts of the system so the part that is acquiring the data and reporting it sorry acquiring the data and then it's being stored and then the part that's reporting it knows that you can't rely on there being a data point at every regular interval and it can account for that then fantastic it all works very nice um uh [Laughter] no i did not say shouting i said sharding i should make it with a hard d dd shard as in to split it into pieces yes all right oh in the old world mr x mr y said it may be pi day down under but not here in the old world not yet anyway oldie worldy are you where are you if you're old world maybe england but that would be so we're at gmt plus 11 it would be heading towards midnight in gmt i think at the moment okay um so ben elaborated on his comment earlier which was an exception means the sensor only transmitting when values change enough or a certain amount of time passes yeah that's the other important point if you have code that says my value hasn't changed so i'm not going to report as a safety thing what you should do is have a um sorry something just fell off my monitor while i was talking what you should also do is have it a in your code know when the last time you reported was and then after a certain cycles number of cycles or period of time or whatever has passed you report anyway even if the value hasn't changed that can be useful for a heartbeat sort of thing like a the fact that you know the sensor is still alive now if the value hasn't changed for a long period of time and the sensor hasn't reported because of that then you might start thinking my sense is dead and your monitoring system like your your service health monitoring system might say you've got a problem with this sensor it hasn't checked in for 17 minutes and it's meant to check in every minute and raise an alert when in fact it was just that the value hadn't changed so it didn't bother reporting so having some kind of a timeout where it's going to report uh every minute um unless the value hasn't changed so if the value hasn't changed it doesn't report but then if it hasn't reported for 10 minutes then report anyway you know some logic like that anyway you're all smart you can figure it out ah right okay [Music] yes uh yeah oh brian i'm brian hey thanks for coming along brian um so brian said i imagine a problem with not recording changes is it then becomes difficult to distinguish if there are no new readings because there was no change or no new readings because the sensor went offline exactly yes in fact i think you i think you typed that comment before i just said what i just said okay uh yeah so oh ben sounds like ben has some good experience with this stuff uh ben said hot and cold storage can also be hot warm cold if you also use ram query in memory values for displays and alert monitoring near data for recent trends and spinning rust for archive yep i think ben's done this before you've uh you what is what's the term uh you've seen this movie before yes and um yes ah peter hey good morning peter thanks for coming along uh all right so uh ooh aaron said um logic handles this as if cross reference to log to determine if sensor was offline before back filled before backfill data values are unchanged from previous we have 12 million data points a month to handle aaron sounds like you're dealing with some kind of serious scale there but then there are other people that are here that'll say 12 million data points poof i do that before breakfast there are all sorts of scales uh so you know when i started reading the comments i thought i'll just quickly answer this first one because it's easy it'll take a minute and here we are it's 10 30 and i'm still talking about it okay so um there are two other topics to that i had in mind and of course there are an infinite number of squirrels given that as andy pointed out we could chase one squirrel for every digit in pi and we might discover new digits of pi i think we might have exceeded the um the number of digits of pi already so um ah cool so this explained some of ben's experience with this ben said worked in biopharma was interested in scatter controls then went to a tech company so hot warm cold is cost latency trade-offs all subjects that are super interesting yeah they are um they are which is why i keep talking about them i actually really love playing with databases it but as i said i've spent many many years of my life doing that i even which many of you would know already because that's that's primarily what ivt did it was a um it was dealing with lots of data and databases and i even worked for maria db foundation for a little while um which i haven't really i've mentioned that once or twice i think on live streams but after ivt i contracted and um i've talked about going to finland a couple of times so and ending up in um in telon in estonia after hanging out at monty's place in in helsinki or just outside helsinki so monty is the original creator one of the two original creators of mysql and then maria db the fork of it so while i was working for mariadb i got to go and hang out at his house in finland which was really cool anyway that's another squirrel i won't chase right now so uh there was another squirrel just dangled in front of my nose a minute ago which was austin's creations so the house is a robot arm coming along all right let's chase this squirrel for a moment the robot arm and my so what austin would be talking about is the infos gluon robot arm that naomi wu sent over for me to work on with chris and we've got that connected did i show i think on twitter i showed a video with the um moving so what we've got is the robot arm set up in fact let's see if i'm going to see if i can find the video for it i'm going to be i find it hard to multitask my brain just does not multitask very well so while i'm doing one thing like searching for something i can't really talk about a totally different subject but what i'm just going to do is try to find the video that i posted on where did i post it i think i posted it on twitter somewhere uh there's the um [Music] where did it go ah i think i know i think i moved the video i did because i keep i have different directories for different projects uh something that is definitely a squirrel that i would like to chase sometime but not now is how to organize in fact i think i've talked about this a little bit in the past but it warrants an update how to organize data and design files and all those sorts of things for projects that you work on how do you store it how do you where do you keep your hardware cad versus firmware versus documentation and images and all of those sorts of things how do you version control them that which parts do you keep private and which parts you include in your repos that you make public it's a an interesting subject and it's um it's not as easy as it might first sound i've gone through here i am talking about this squirrel damn it i've got to get back to uh in in where are we on blue on c which is the project i was looking for images glue on move and now uh i've got no i don't know if audio is going to work on this hang on i'm just going to change over here to desktop desktop how do i get to desktop there it is okay so i'm going to run this little video so this by way of background for those of you who haven't seen it this is a demonstrator robot arm it's made by a company called influx well i i say it's made by it was made by it's actually not available anymore what happens is what happened is infos is a company that makes actuators for robots that's their business they don't make robots they make the actuators for the robots and then those actuators are designed into other people's robots but what they wanted to do was have a number of different demonstration platforms kind of like a dev kit so that if you're working on a robotic system you can get their dev kit and use it with their examples and learn how the actuators work and then you can design them into your own things so this is their demonstrator robot arm and what you can see here these little things are their actuators they basically look like a big cylindrical motor they all have can bus and on-board drivers with position sensing so what you do is just daisy chain them together so this black cable that you well let's look over here you can't quite see it you can just see the corner here of a piece of um of laser cut plastic and it's got a power supply and controller and things on it and this black cable that comes in loops around the back and well actually no it plugs into the top of this actuator this vertically mounted one that is the panning actuator for the first axis and then it there is a cable coming out of that that loops around goes into the second actuator and then there's one that goes from the second actuator comes up here and plugs into the third and then from the third into the fourth and so on so you only need to connect to the first actuator in the chain and then you can address them all and this particular system uses can bus so what you do is you address the particular node on the bus and you send it a command or a query so you can say what is your position or what is your temperature or what are your current limit settings and each of the actuators has its own onboard controller with non-volatile memory so you can send it configuration information like rate of acceleration maximum speed maximum torque uh travel limits so you can set limits in software and it saves in non-volatile memory so this is this little demonstrator is a six axis robot arm and i'll just hit play on this now i'm not sure if audio is going to come through on this it may or may not but the thing is really spookily quiet you can even if it's not coming through directly from the video you might be able to pick it up from the microphone when the first time i got this running so yeah you can see it moving around there and it's very smooth it is so quiet that when i first got this running what you see here is in chris's bedroom he's got which is also like his home office set up the monitors that you see behind the arm there that is chris's computer and you know just see if i can move this a little bit get it to a position where the arm is out of the way so there are two monitors stacked vertically and then there is just back behind it there is his pc um with some of nick's geckos 3d printed on there and you can see in the background there's a button box so that's the thing that hangs off that front edge of his wheelchair and allows him to run keyboard macros like custom input into his computer and uh yeah anyway i'm just giving you a context for this thing so um chris's twin um twin brother nick um passed away two and a bit years ago i think it was and so they were in the same bedroom and it was set up symmetrically so it's got the two beds and the desk at the end with two computers and so the right-hand computer is chris's the left-hand computer was nick's um but that is now where i sit when i'm there working with him so this video was filmed basically from me sitting in my chair at my computer just looking sideways at where he sits and the what we did was move a table in between us so we'd have somewhere to put the robot arm and uh when i was first using it i was sitting i was actually sitting looking straight ahead at my computer like hands on the keyboard running the um the script that talks to the robot the robot was sitting to my right shoulder and i ran this script to make it move and for a couple of seconds i was looking at the terminal while i was doing this and the robot was moving and i didn't even realize it was so quiet so i i was looking ahead at my computer and i looked to my right and the robot was moving right beside me and i just about jumped like what excuse me i need to give up smoking um so yeah it is a really surprisingly quiet robot and i know that was a pretty crap joke but i've never been a smoker so uh anyway i really like this this is a very very cool little device so what we're wanting to do with this is set it up connected to chris's wheelchair and we'll need to put some kind of an actuator on the end of it at the moment there is no actuator what you can see here so when it comes back up to the top this little red structure here is the output shaft of the final stage so of the final axis so we can rotate that into different positions but what we could do is put some kind of a manipulator onto it like a um a clasp or something there are lots of different options there and we could also simplify it so one of the options is that we can just remove the last couple of stages we could reduce this if we took off these last two for example it would probably make this whole thing much easier for us to manage so reduce it from a six axis robot to maybe four axis basically just start removing the end of the chain and if you look at this area here right where i'm highlighting if these first two these last two actuators were removed what would be exposed on the end here is this red fitting right here um and we could put an actuator onto that so we would then lose a little bit of just a little bit of reach and we'd lose the ability to move through those final two axes but it might make it simpler from a software point of view to get it set up and control so what we're going to do is link through to the controller oh and the controller sorry i should explain that a little bit what you can't see here is the controller and the silver thing down here is the corner of the power supply mounted on this board so when naomi got this she was sent the robot plus the power supply the controller and you know those sorts of odds and ends and it was all just sort of loose and messy so she laser cut a base plate and then attached the uh the power supply and the robot controller to it and um then so it makes it a single module which is what you can see there so this is the base plate that she made for it and uh so um yeah when she sent it to me it was the whole lot that she'd already put together and then um so the controller for this is really just a bridge it's an ethernet to can bus bridge and so you connect ethernet into it on one side and it exposes a network socket and on the other side it's got the can bus interface that goes through to the robot and so what you can do is there's a there's a really cool youtube channel actually this is definitely worth checking out there's a great youtube channel called scientific i am going to pull it up i'll just find it and drop the link here we go so [Music] this one here and i will put the link in the chat so the scientific youtube channel is really cool if you're interested in robotics it's um okay i don't even know what his name is that's terrible i should know um so i'll just call him mr sky and typic i've got this in my head i don't know why i've got this idea that his name is robert but i think i might be wrong uh so no i don't think it's robert i'll call him mr scientific uh yeah so he's got this ongoing project to build his own robot arm and so he shows all the design processes and how different actuators work and things it's really really interesting so if you're interested in robots definitely worth checking out scientific and what mr scientific did was write a a python library for controlling the actuators that are in the infos gluon so i should clarify infos is the name of the company that makes the actuators gluon is the model of this robot arm and they are now working on a new version so there's going to be a replacement for this arm which is going to be significantly more expensive but also much more capable and i think they were unrealistic with their pricing on this so there was there was some controversy i should say um the this the infos glue on was put on kickstarter i might be getting some of my facts wrong so i'm not going to go into it because i don't want to tell you the wrong thing but from what i understand what happened was that infos the company had investors they um infos put up this kickstarter campaign for the gluon arm it was ridiculously pop popular i don't know how much coverage they like what they got in terms of in of people backing it but i think it was like it was a seven figure uh sort of thing it was crazy popular because it's this really quiet really smooth very advanced robot arm that i think they had listed for like 700 crazy price these things are normally many many thousands of dollars for something capable of what this arm can do and it was really super popular and before the kickstarter finished there was some something happened in the company where the investors i think took over from the people who were running the business and there was like some big internal thing that happened and infos basically like went silent for a while and it looked like the company had problems and kickstarter pulled the campaign um so if you actually go and look for infos glue on now you will find it on kickstarter and it will say something like campaign suspended and it's been like that for you know a year or whatever and so uh they have ended up shipping arms it's in this really frustrating state where they have shipped some to some people but you can't just buy them like if you want to buy this arm now you can't there is no way that you can buy it for any price and so i don't know all of the behind the scenes of what went on there and how uh yeah it would be interesting to know i would really love to know but what they've got now is so the business is still in business their website is live but it's not like a place where you can just go and buy things what they're selling to are serious companies that are building serious robots and who come along and it's really that b2b sort of thing where you might be a company that's building a robot and you needed some actuators so you talk to infos and it's more of a direct one-to-one negotiation it's not like going to an online store and adding three of these actuators to your cart and clicking buy now you know that's not their business model but from what i've heard from naomi is that they are now working on a new robot arm which will be a replacement well not really a replacement kind of a successor to the glue on which will be more capable like it'll be much stronger and able to do more than the glue on but it's going to be more like two or three thousand dollars which is the sort of more in the range of the sort of pricing you would expect for a device that is this capable uh yeah so um i'd be very interested just interested to see that backing up what we want to do with this is attach it to chris's wheelchair and use and then link into it to allow him to control it and um and ideally we want him to be able to pick things up and move stuff around so his total range of motion right now is limited to i think it's approximately 10 millimeters range of motion at his fingertips on his right hand and with very very low force and somewhat but excellent dexterity his ability his fine motor control is amazing so the way he uses a computer and if we um we look at this video again and you can see in the background behind here so there's the button box which goes on his left hand which detects um you know switch activation and then sends keyboard macros and what he does is his right hand rests on a mouse and you can see the mouse is just sitting here on the there's a like a little foam support there's the mouse pad and all so what happens is that this is all lifted up onto the tray on the front of his wheelchair so the wheelchair moves into this space and then his right hand rests so that his fingers are over the mouse and he only moves the mouse a couple of millimeters it you can barely see that it's moving but it's a gaming mouse with 24 000 dpi resolution and the he uses it with everything turned up to maximum so like you know maximum acceleration on it basically you touch it like you tap the mouse and the cursor goes from one side of the screen to the other but his fine motor control is so good that with those tiny movements he can use on-screen keyboards and drive fusion 360 and do all of those sorts of things so what we're going to try to do is link a control system into this arm so that he can then use a like a custom input device to send commands to the arm to move it and it can reach out on his behalf and do things so that's where that's what we're aiming for and on tuesday so this video that i just played here um this was recorded on tuesday and uh this was running off a little python script and there's a um so there's an example python script that mr scientific has provided with his library so i looked at that and figured out how he was sending the commands basically he's got one script that initializes the connection it does the handshake to the robot and then another one that sends commands to move to different positions so i munged the two together and made a single script that initiates the connection and then goes through a series of of locations and so we're we're thinking about how we can link into that so there are two options we can either i mean in terms of the control side of it not the sorry the output side of it we can either keep working with the current ethernet to can bus bridge which means that we would just make socket connections like network socket connections to the controller which is what we're currently doing or we could just talk directly on the can bus so that's what we may end up doing because the thing is that our custom wheelchair interface already has can bus on it so it's just some software changes basically we just need to make up an adapter cable essentially we've got we we use the little eight millimeter um circular what are they called i've gone blank on them uh all right i'm gonna look this up where is my wheelchair interface uh directory i've gotta find that images come on open up all right so this is part of my wheelchair interface project which many of you will have seen already and the the early versions were just simple breakouts so it started off and here's a an example these were our first couple of versions it's basically got an arduino and a carrier board and it acts as a breakout for the existing wheelchair controls and it could take two joystick inputs there was one pass-through output and then we could send to other things we didn't have can bus on it then the um the current version is much more sophisticated than that let's find an example oh this is uh i don't know what okay so this is two of the um the chair breakout minis connected together uh are they connected no they're not they're just plugged in and running why am i even what was i doing in that photo i don't know anyway this has can bus on it and so what we can do is so one of the reasons for that is if you look back at the original version so this one see how we've got two inputs into here this is so we could have two joysticks and the idea with this was to be able to replicate the control that you require for flying a drone and be able to do that from wheelchair controls so what you do is have say the regular joystick the regular wheelchair joystick on the right hand side and then mount a second wheelchair joystick on the left side which gives you the control for the axes the four axes you need for a drone and so that's why it's got two inputs and then it would take that information and combine it and then send the connection off to like a fly sky controller for flying a drone but what we managed to do is we didn't need the two inputs the two different axes inputs with the new version uh this is this is what got me started on this so these are the connectors the little um eight millimeter circular connectors that we use for can bus so these two connectors here are can connectors and that's the pass-through connector that goes to the chair when you put this in series with its normal control system so oh here's a better example all right so what we've got here are two of the chair breakout minis linked by a can bus so what we can do is have a joystick plugged into each of these and then you treat one as um pitch and your and the other one is you know roll and throttle or you know whatever combination you want but because they are on uh can bus we can just daisy chain them and we can have as many axes as we want so we only need to connect one let's see if this is a better example oh mini joystick um what's going on with that yeah this is showing passing the can bus through but anyway i'm off talking about random things here where is an example just trying to find her oh this is a sort of photo yeah that's just a photo not the video there's a video somewhere here of nick uh playing a car racing game using this i don't know where it is now anyway the point of all of this is on our existing controller which is this one no that's version 2.0 there's now a version 2.1 but it's basically the same thing so with this what we can do is take the input from the wheelchair controls and then send that out via can bus so with a link between the infos glue on m8 yes ben said m8 exactly metric eight millimeter uh they are m8 connectors made so what we can do is make a cable that goes from um you know one of these can bus connectors and goes to the goes to this basically like plugs into the can bus interface on the first actuator of the infos glue on and then it's just a matter of some code so we send the correctly formatted can bus the frames to make it do what we want and that way we could eliminate the existing interface entirely and just talk straight to the controllers the actuators rather so uh okay so looks like there are some interesting questions here so all of this came from austin's creation saying how's the robot arm coming along okay oh uh ferring said hey guys you just saw the new esp32s the s3 the c3 the short answer is yes and if you are a um a very special person uh then like see on then you might have actually had one physically in your hands and been able to do stuff with it so [Music] yeah they look like really really nice microcontrollers and i think it's the newest i think it was the s3 is probably going to become my new favorite mcu once it's available it looks like a a really good balance of of things and um anyway okay i will avoid that score right now but yes frank they look really really good i haven't seen this one so ben said i imagine lots of people have already seen it but the channel dave's garage has lots of war stories from working at microsoft during the nt xp sort of time span that is interesting um oh chris chris his cox is here managed to get in before the end so yes um uh oh yeah so ben said sp32 has an interface too apparently would have to add an external transceiver though yes that's what we did um so all of our um assistive tech projects have got can bus on them so if we look at the where is it the hand heater uh is it in this directory even yeah our um our wheelchair hand heater uses an esp32 with can bus and we've used an external transceiver but the built-in controller you don't need an external controller with the esp32 and where is that i think that might be in my projects that have not been sorted projects unsorted uh i'm revealing all sorts of things today so where is this h hand heater there it is all right handy uh [Music] where why are there no oh it's because the capitalization is screwed up let's um let's see what we've got in here we've got any pictures of the controller well there's the original one i think this is the earlier one which had an at tiny on it the 1.0 this was the controller board out of that hand heater where's the current one okay this one so this is the current version of the hand heater it's got a vroom 32 on it and that little chip just there that you can see that is the can transceiver this jumper is for the can termination you put a jumper on there and then just back there you can see the little 120 ohm resistor so that's the can header on here and the so we're using the the internal can controller and if you look at the back of the um so this is the back of the enclosure for it you can see the can bus headers on here so we can link the hand heater into our little wheelchair can bus as well and control it and have it report stuff so [Music] yeah you can see a few of them there so you can see the internals with the uh there's the little sub board on the back that's got the breakout for the can connectors because they are designed to have flying leads soldered onto them which are terrible so what i've got is this little pcb inside the back that has pin headers in it and the pinhead is solder onto the back of the sockets and then from there we use a a header and then a flying cable that goes down to the can bus header on the main control board and you can see the vertical pcb here which holds the blower and the heating element uh hmm yes so where oh uh peter cool so you've found mr scientific's name um gennady uh please chef please kev please chef hmm uh yes so oh i've already said mqtt to can a whole different mindset yeah i've done that too [Laughter] um any idea of a white okay so getting back to this robot uh the where are we oh dodgy said i cough a bit like that lately think it's early asthma hmm i hope you don't have early asthma dodgy stay healthy feed a lawless and easiest way to give up smoking is to stop setting yourself on fire never i will always set myself on fire so chris asked any idea of the weight of the arms and there was a related comment about specs i think [Music] um yeah so the weight in terms of what this overall arm weighs it's actually really quite heavy surprisingly heavy a fair bit of the weight is in the base what they've done is tried to minimize weight of the arms so the can i oh right what did i do i maximize the screen can i maximize yes so what they've tried to do is minimize weight they've used carbon fiber tubes in here the bodies of the actuators are carbon fiber as well which often is done more for cosmetic reasons than for practical reasons but okay in fact i'm not even sure if these bodies really are carbon fiber the um the tubes i'm pretty sure really are they're that sort of matte finish they're not you know like carbon fiber sticker and these brackets are really nicely made they are that they're a work of art when you actually see these up close they are amazing someone put some real effort into the design of this and the so the arm has it can lift the specs are it can lift 500 grams at 500 millimeters distance i think i'm sure of the 500 grams that's what it says but i'm not sure of the 500 millimeters distance so 500 grams is enough to actually be useful if you look at a lot of little robot arms like hobby robot arms or you know toy robot arms they often have trouble just lifting their own mass and at full extension in particular when you've got the most mechanical loading on it so doing anything useful with them is really hard something like you know a can of drink that's 370 grams or you know whatever the the weight is so round it up say close to 400 grams so if you want to be able to pick up a can you need to be able to lift 400 grams at the full extension of the arm so this one can do 500 grams at full extension which puts it in the region of doing useful things like being able to pick up a load like a book or you know small objects that you might have around the place it's uh it's not in the multi-kilo region but it is certainly enough that it's a worthwhile project and if we could johnny's trying to get me back on track yes let's do that um okay so it's it's enough to be useful yeah they're all right now uh pharynx said can is good for wide home automation too the line drivers are cheap yeah i don't want to [Music] do [Music] i do want to talk about esp flash um [Music] yes peter is wondering where that squirrel went uh oh fairing said maybe roz can be used for complicated things yeah this robot arm that i could talk about this for the rest of the live stream so roz robot operating system the big issue with this i'm going to get on to esp flash in just a second i promise the big issue with this is a topic or a problem called inverse kinematics and inverse kinematics is a way of back calculating um when uh sorry no phone calls broke my concentration if you want to control a robot the human or logical way of thinking about it is i've got a series of joints and i want to control the joint and move it to a certain angle and then you will get some result at the end and that's like that's forward kinematics it is when you are taking a move like an angle or a movement and you are causing some effect the thing is that most of the time that's not what you care about in reality what you care about is is the end result so if we're looking at this arm for example and we want to move if we had a gripper on here a gripper getting back into the roman emperors no i will not get into roman history tempting is a squirrel that is so if we had a gripper on the end of this robot arm and we wanted to reach out and grab a can what you care about is the position of the gripper relative to your target you don't care about the position of all of the joints or the articulations that are required to move the gripper to that location so you can think about it as kind of one level of abstraction from your control point of view you want to control the location of the gripper you don't want to have to care about all of the segments that go back behind it that's where inverse kinematics comes in what it does is perform those reverse calculations to figure out okay you have instructed me to move the gripper to this location now what angle do all the joints have to be in in order to achieve that result and then send the commands to the joints individually to make that happen and that is a complicated problem it requires an understanding of the geometry of the robot that you're moving the possible ranges of motion uh all sorts of things and that's where roz can come into this so part of this whole project is going to be figuring out how we bring inverse kinematics into this so that chris can control the and basically all he has to think about is the position of the gripper so move the gripper in space and grasp something and the rest of the robot arm just does what it needs to do to make that happen big subject all right let's try to get into esp flash um okay so andy uh andy's ad ros ii for robot arm geometry model inverse kinematics and slam when things become mobile ml for machine vision and machine sorry ml for vision perception and potentially grad slam yes so that's a good summary of all of the things all right so johnny also said are we going to talk about esp flash today maybe maybe all right uh yes um okay ah long flare oh chip my old friend thanks for coming along roaming is much of the point of this exercise yes we are chasing squirrels all day every day now um all right so i wasn't even really sure if esp flash would be an interesting topic for uh for all of this stuff let's um but let's talk about it i'm sure i can chase that squirrel for a while so firstly let me off camera find a couple of things now where am i going to find relative relevant images oh yes i know i've got a project called esp flash which i think has the all right this will do okay close enough so i've generated so many visuals for this and then not even use them uh okay for those who weren't aware this is related to the video that i uploaded a couple of days ago which is about programming headers for expressive chips and my quest to standardize on something the the backstory is that i wanted to be able to in fact the backstory it largely comes down to this i think it was the hand heater was where i first hit this problem let's have a look this one yes there it is right there the whole genesis of this issue was in the hand heater so with the hand heater we wanted an esp32 so this has got a room 32 ship on it and yes i know this has got terrible design in terms of its radiation patterns and it's going to have terrible wi-fi performance we didn't actually even put this chip on here for the purposes of wi-fi that's kind of a side effect so the hand heater can be linked into chris's openhab thing for home automation control so you can control the heater on his wheelchair from his home automation system so [Music] that's another squirrel i'm chasing okay this header right here this little four pin thing this header that i put on it was actually the same format as on a sonoff basic and i did this because i needed to be able to reflash the controller for the hand heater but i didn't want to put a full usb interface on here there was no point and frankly no room unless i did radical changes uh no room for the connector quite apart from anything else and this thing is jammed across the back maybe i could have removed this voltage regulator but there are mechanical restrictions around here you can see the mounting points here and it was it's just a yeah there's not a whole lot of space there so i needed to be able to plug in for loading new firmware onto it but i didn't want to put a full uh es a full usb interface on it and ben said we weren't off track after all then no i even had the directory with the images open right there and i kind of defaulted to putting the same header on as a um as a song off basic because i didn't know what else to use and i looked around and so some of you will have already seen this little thing [Music] this is the it's actually two things combined this part of it is a usb to serial converter and it's all covered in heat shrink so you can't see it this part of it is a an adapter so there's a six pin header in the middle here converts it to a four pin header and this header is designed to plug into a sonoff basic so you can re-flash it just plug it in put it into bootloader mode and then you can use uh you know tesmatizer or whatever it was no room so um i ended up putting the four pin header on it so i could do this and then you can see down the bottom i gotta switch back to the desktop you can see down the bottom there is a reset pin and a flash pin button rather so you would hold down flash and then press reset while continuing to hold flash and then you let go flash and then it's in boot loader mode and then you can use this and load new firmware onto it so that kind of annoyed me and um what i wanted to do oh look here we've got i'll just find um switch back to front camera there we've got one of the little um what did i even call these things so i'm a programming adapter so an s prog so it's got the ftdi connection across the back it's got the four pin header for this on off on the front and there is a button this is actually a really funky little button it looks like a regular tactile button but that is actually a normally closed button when you press it it goes open circuit had to order those especially they're quite cool so they normally close it's normally closed button in series with the power line so what you can do is when you've got this plugged into your sonoff all you have to do is press this and like all of it to power cycle this on off it kills the 3.3 volt input and then brings it back again when you let go so normally close tactile buttons the only time i've ever used those on a project and i don't know if i ever will again so this was the genesis for all of this so what i wanted to do was incorporate control of gpio0 and reset into the header and that got me going off down the track of trying to figure out what pin header to use and as i showed in that video there are many many options let's see if i can find i don't even know if this is the right directory that i'm looking in oh yes it is um this one this one here's another image okay so this was the little summary that i did when i was looking at what was around at the time so this was a while ago i think i made this table about a year and a half ago i did it originally in google docs it wasn't quite this pretty or ugly depending on your point of view this is the version that i did just recently for the video so i started off with the sonoff one by four and then i was just looking at other options like what could we use to add the reset pin and i o zero so we can force boot loader mode and one that i did not put on here is the i really should have included the ftdi header in here as an option because in some circumstances you can use an ftdi header this is something i didn't really there are a couple of things i kind of glossed over in that video i didn't get in i didn't explain myself very well two things i didn't explain very well in particular one was the ftdi thing because some people do put ftdi headers on their projects and use them quite effectively because you can use the dtr pin to do the control of i o zero but only in some circumstances it depends on the particular adapter and how it's been set up so there are different options for the way the dtr pin can behave and most simple usb stereo converters do not implement it in a way that's useful or don't implement it at all uep has just um posted the xkcd 927 so um so one other option would be the f the six pin ftdi header and use dtr to control i o zero but i kind of discounted that because of the two reasons one was the um the vagueness around the behavior of dtr and most adapters that i've seen just not implementing it or not implementing it correctly and uh so yes i actually did think about for a moment i contemplated naming this standard something like esp flash 927 as a homage to xkcd 927. so uh where am i going with this okay two reasons as i said one is the lack of dtr behavior for putting into boot loader mode on i o zero the other was the order of the pins and this really does this is the killer uh the sonoff one by four i want i t to implement this like i want them to extend their header and add uh reset and io zero uh so in my mind at least when i was looking at the options these four pins right here were fixed i i decided quite early on that whatever else i did those four were going to be the same now one thing that i did not explain properly in the video and i should have done a better job of this this is is the whole thing about the west 32 header now i really like what patrick has done with this but i didn't use it one of the reasons i said that i didn't use it is that i wanted the pins to be in the same order as the sonoff header now you can see here the sonoff goes ground tx rx 3.3 volts now look at the west 32 heaven header ground tx rx and power now apart from the five volt issue let's just ignore that for now imagine this was 3.3 volts those pins are in the same order as this it is actually the same so what i could have done was add io0 i'm going to close this and go to another image because i want one with the other headers included okay the esp flash one by six so you can see here that i've got the first four being the same as the sonoff which is also the same as the west 32 headers here but there the extra pins are added at the other end on patrick's he's got io0 and reset or enable there is a subtle difference i won't go into that now i'm just calling it reset so he's got them at the other end coming off near the ground pin i've got those same two pins coming off near the 3.3 volt pin i could have used the same order as patrick made everything the same except 3.3 volts and uh instead of 5 volts and in some ways that would have made sense now one thing was i by making it distinctly different it means that there is less confusion of someone mistakenly looking at that and then looking at this other one and plugging it in when it's got 5 volts exposed and we're only expecting 3.3 volts so it's obviously different and so it avoids that sort of oh they could be interchangeable confusion and someone plugs it in and damages their board or destroys their board but that's not the real reason the the main reason is if you look at a sonoff basic sort of pin outs where is it i'm just gonna find a um is this the basic no that's the zbr somewhere i've got a picture of sonic basic but anyway the um the point i'm trying to make is that if it are going to extend the header they unless they move things around they can't do it by adding it by adding the new pins adjacent to the ground pin it has to be extended adjacent to the 3.3 volt pin and that is just because of the physical layout i'm just poking around here and trying to find uh a photo hmm it's 55 i wonder what the deal is with this like with this example okay so the the s55 this is the uh the board inside a sonoff s55 you can see that they've got ground tx rx vcc so i'll move this across here so you can see that and the other thing at the same time and in this case vcc is 3.3 volts so it's adding the extra pins on the end from vcc up here not from ground down here now the reason is on the sonoff basic which is still their most popular model ships in huge numbers crazy crazy numbers there is a button right here and unless they move the header which would then upset their their pogo pin programming jigs they can't move they can't add two more pins down the bottom here there just isn't the space for it because uh you know right this area where i've highlighted right here approximately there is a button in that location there's the the tactile switch that comes through the enclosure and allows you to control it locally so the only way to extend the header in a sonoff basic is to put the extra two pins right there and extend it so it goes ground tx rx vcc and if you look at our table over here ground tx rx vcc and then add reset and io zero on the end it can't be done by extending it down this way which is what would be necessary to oops wrong image which is what would be necessary for the west 32 format unfortunately so when it all comes down to it if patrick had put he put these pins on the other end even with the voltage difference i think i would have just adopted his header format so anyway that's i didn't so the end result is that i ended up adopting this format so also one thing i wanted to say is how good it is to use an idc cable for the programming header uh so i really really like this programming header surprisingly um where's a right here yes prog no esp no esp hyphen prog this is so do we have overhead camera uh overhead there you can see a little two-year conversion that i've got going on there a tesla thing so this is the esp prog which is espressif's official programmer and you can see the jtag headers here so standard 0.1 inch pitch and 0.05 inch pitch these this pair of headers has the exact same pin out and likewise up here you can see these two headers have the exact same pin out it's two by three it's just in the two different sizes and what i've found is super useful is using these little 0.05 inch pitch idc cables here's a an example of one plugged in because you can just have the adapter sitting on the bench so if i put the 1x6 header onto a target board this is what i need to have plugged into my target so just grabbing this imagine this was my target this is a large well it's not that large but it's a relatively large heavy thing on a usb cable which is not that flexible so what happens is you end up plugging it in and then it becomes a bit of an unwieldy thing on the bench it gets in the way but this little thing here if you've got a 2x3 0.05 inch box header on the target board and you do this so plug that into the little adapter and then you plug this into your target board that is really nice because this can just sit on your bench somewhere and this is small it's very flexible and it's much more convenient like when you're picking this up to move it and you're sticking it under the microscope or you know whatever it is that you're doing um getting probes in there to like for a multimeter or scope or whatever having this as a programming header i have found is super convenient i ended up putting one on a board in fact the um the air quality sensor pro where is that it's probably around here somewhere here it is air quality sensor uh let's see if i can get this back up without dropping it let's see when i find where is one in here that has got the header on it yes here's one here's a butchered one well two different versions uh there's one there's another one these are both happy prototypes as you can tell by things hanging off them a couple of different versions i've tried uh there's no screen plugged in on this but you know that that's green just plugs in so it's got the pms-7003 particulate matter sensor so the laser scattering sensor there is a 240 by 240 color lcd on the front and you can see this version has uh two ws28 12b leds and this one has four two on each side this was an earlier design i think this one had a cp2102n usb to serial converter on it and then for some stupid brain fart reason my mind went i don't know i some neurons misfired and i put a ch340g on there i think it was basically because i was just annoyed at soldering these things on so i thought yeah ch340g it's got a nice big package much easier too to solder on so i switched to that and that was a mistake anyway the point of all of this is see on the right hand side here there is the little programming header now neither of these ones have got the programming header populated because it does have a usb on it and i can just flash off usb it's got the auto reset circuit does everything so with this in fact let's just plug this in and see what happens i don't even know what software is on these if they're running if they do anything [Music] the power led has come on but apart from that nothing i've got no idea what this is doing or what state i left it in let's try the other one plug the display into there power it up oh we've got red that's a start and then it goes green and then i think it goes blue once it connects to mqtt which it's probably not going to do so what i've done in this case is use the rgb leds in a way so this is something that andy who is here in the chat has done for years on his projects is he uses colored leds or rgb leds to show the status of things like the network connection so when it first starts up it can be red and then when it connects to wi-fi successfully it goes oh hang on no green means it's good okay so it goes blue to show that it has connected to wi-fi and then when it connects to mqtt it goes green so what you can see just by watching it you can see the boot up process and you know that your device has has finished like you know how far along it's got so if for example it has managed to connect to wi-fi but it's failed to connect to your broker for whatever reason it'll just stay stuck on blue and then you know that's the problem you've got to diagnose so that's the the method i've been using as well copied blatantly from andy so this is the the point of showing you this was the programming header and it's not even salted on on that one do i have one here with the header soldered on no anyway i i put it onto this project oh and just for the fun of it here are some 3d printed enclosures that just goes in oh here's some more enclosures so the point of this project no not the point of this project point of what i'm talking about here screw that on yep so you can see the mode button comes through the back screen is visible on the front sensor is exposed underneath and it's also got a bme 680 on here so it can do particular matter but also temperature humidity barometric pressure um and or volatile organic compounds or you could see the um the color glowing through the enclosure there you can see it a little bit better in real life than you can on the camera it doesn't really pick it up very well so the idea is that that is the pro version of the air quality sensor so they could sit on a metal piece or something and display air quality information on the screen and um yeah sensor exposed on the bottom and the idea is that if you want to toggle through different screens of display you can you know the mode switch is on the back but it's positioned so that you basically just reach you grab the right hand side and squeeze so while i was working on this what i found was that this little header the little box header was super convenient and i really liked using it so i've ended up designing i've ended up using this .05 inch pitch 2x3 header as the programming header on many many different esp projects over the last year and a half or so in fact if you look behind me the water cannon er it's not the yellow one that's been here previously it's the gray one is the controller for that uses well actually no the pro a previous version of the controller for that had an esp32 on it and i ended up switching to um a different mcu but the so i don't have the header on it anymore the um the previous version of the controller for that had the uh the little 0.05 inch pitch header and uh in fact the joystick which is a can bus controller that talks to it uh does have an esp32 in it and that does have that same programming header in it anyway my point being i like this header and i'm surprised to say that but i think that um that espressif were actually on the right track when they made their esp prog reference design and it worked out really well so comments what am i missing oh there is oh there's been a lot of discussion i don't know if i can get into this whole lot of stuff about uh risk v yes yes there is um uh there are squirrels there that's um okay idf is a firmware there's been some very active conversation about um um and risk v and ten celica you know different cores on different microcontrollers all right i'm there are people in the chat who know more than me about that sort of stuff so i'm going to defer to them greg said coincidentally i've made an esp flasher with the same pin out as this esp flash so that's good news awesome out of pure luck mind you craig says uh greg um is that something that you have released like is it available for people to buy i would love to know about that so if you've got a link maybe drop the link into the chat like if you've done um if you've done a blog post about it or anything like that because the the point of me doing this is not for me to sell a billion esp flashes and retire to the bahamas it's to have something that people can okay so this gets back to my original thing about when i was working on that hand heater and i started looking at all of the different pin outs that people were using and the more i looked the more obvious it became that there was just no consensus around any of this there were there people were coming up with their own their own header formats because there was no obvious choice and that's what i was trying to solve was just saying okay i've looked at all of the options and this is what i've decided on and i'm going to document it so other people can choose to use it or not use it but at least there is something that you can point to and say that is a documented thing and we can we can have some consensus on it so if you are producing your programmers and they have this header that is fantastic i hope you do sell a billion of them and retire to the bahamas and uh so if there is information about it so ben said got to sell at least 2 billion for a fancy retirement yeah please drop a link in the chat it may not um if you do put a link in the chat it may say that it's been held or blocked or whatever if you because you're not a moderator but then it can be approved so if you have a blog post or a github repo for a project that uses this header or whatever please share i'd love to see it uh all right so okay so there's a a little squirrel here this won't take long i promise matt asked why was the ch340g a mistake and stephen said because the cp2102 is better um uh didn't say why that was a mistake i'm not quite sure i understand dodgy's comment here sorry you meant the current project didn't say why that was a mistake okay the ch340g has it has a painful history in terms of compatibility with mac os in particular and so it's cheap and there are clones of it so the um the csj40g is used on a lot of the d1 mini clones in particular like the wemos d1 mini and it's really hit and miss you can get you can get it's one of those situations where you can get a ch340g in one batch and it will work fine you get a different batch and all of a sudden you are colonel panicking people's max and that is really really bad and i know the os should not under any circumstances allow itself to be kernel panicked by just plugging in a usb device and that is a failing of mac os but still if you produce a device and someone plugs into their computer and it spontaneously reboots that is really really bad so i've um i've gone away from the ch340g the cp2102n has some disadvantages for example you need to set it up just out of the box it doesn't there are a couple of things that it doesn't enable so things like the activity leds it has a number of gpios on it which you can configure using simplicity studio but i think out of the box the activity leds are not enabled so what you have to do is for each device that you make that you put a cp2102 on it you have to run simplicity studio to load a configuration onto the target and that turns on the gpios and sets it into the right mode and also does you can do things like set how much current the current rating that it will request from the host so in my case i just always turn it to maximum 500 milliamps ask for everything give me the world uh yeah so ben suggested if you can spare a bit more space for alignment holes tag connect uses the same 0.05 inch 2x3 footprint yeah so tag connect is something that i've seen many many times over the years and i've never personally used it it's do i chase this squirrel it's kind of on topic but before i do there was a quick question um where where where sorry i'm i know the question i'm just looking it up because i want to refer to the right person oh right it was fairing said the wheelchair is using can bus exclusively or lin bus is also included no it's using can bus exclusively and that's really two different things that we're talking about there's um the original wheelchair control system uses can bus and our new devices that we've made also use can bus but we don't link those two buses together we have our own can bus that we use for all the peripherals that we've added to the chair all right yeah also matt said excuse me two hours of continuous talking is just a little bit too much for me uh all right so matt said that the ch340g has always been reliable for him and uh that he's been on windows so yeah on windows i believe that it pretty much always works it's not a problem um but for oh cool sorry i'm also doing a search aha nice um this i'll just bring this up and refer to it again in just a moment so um uh so yeah cs340g on some platforms it's just a horrible horrible nightmare of incompatible driver versions and things and you can have two ch340g chips that are supposedly the same and one of them will kernel panic a mac with one driver and the other one will colonel panic and mac with a different driver and yeah it's just frustrating so that that sort of uncertainty and frustration just made me think nope throwing out all the cs340gs and uh the cp2102n is totally reliable um all the time dodgy said if it only affects max i see no problem uh yes and uh oh and matt said and for more i'll get my code i shall leave this here ftdi for the win yeah ftdi kind of burned me when they did that whole driver brickier device thing a few years ago yes i know it's a yeah um all right yeah so tag connect um take connect is one of those uh peter k i said drink some grease or wd-40 yes well this is pepsi mac so it's like um grease remover maybe that's my problem tag connect is okay before i um i get onto that e flashy 32 thing which is cool tag connect i'm going to pull this up for the benefit of people who haven't seen this before no not tag heller tag connect is it one word take connect this thing all right it's a programming header the idea is to put all of the expense into the programmer and remove it from the target board which is very important obviously in terms of cost saving something's creaking in the room i think it might be my chair um so instead of having to put a header of like a pin header or a socket or anything like that onto your target board what you do is simply put a footprint on the pcb design and it's just got pads and alignment holes and that's it uh let's i mean this is cycling through you can see there it's got a um it's got the contact pads and then three alignment holes and then you use this header disconnector which has pogo pins and alignment pins and you can get them so that they either clip into place and will be retained or they just push on only depending on what so you can see this one clips in and then you'd have to squeeze it to remove it and so what that means is that all you need is a bit of space on your pcb and then your programmer can clip into it so that in itself is very cool and if you want to use tag connect that's fine the only thing is that these connectors are they are expensive which is not necessarily a big problem i think from memory though like in they're in the order of 20 or something for a cable with the connector on the end of it and if you're only buying one or two of them then that's fine but the one of the things that i have a problem with is that i understand from a business point of view why they've done it what they've done is been very aggressive about preventing anyone else from producing compatible connectors so if you implement tag connect on your board you can only ever buy connectors from that one place and uh yeah that makes me uneasy so yeah you can see here no don't use this big nasty box header with an idc cable instead use a tag connect and then you don't need to put anything else on your pcb so yeah i first saw tag connect quite a few years ago now when i first saw this my initial reaction was that's awesome i've got to implement that on my boards and i just haven't uh for those reasons it is actually physically if you do the version of the footprint that has the clips to be retained it's physically quite large it takes up a fair bit of space on your target board so this this comparison here where they're doing the box header versus the tag connect header that's a not really a direct comparison because if you do the version that has the retention holes in it the holes are large and they're out on either side of the connector and it takes up a lot more space and it becomes much much bigger so that's a 10-way idc header versus a six-way tag connect header as well so they they've stacked the comparison there i wonder if i can make this little thing stop scrolling um can i do no i just want to stop it on this image so yeah you can see this is a 10 way idc header taking up this large bit of space versus a six way tag connect header take up a small amount of space but the six-way header here doesn't have the retention pins in it and uh so a a um a 0.05 inch pitch a six-way box header like idc header is actually similar size to this it's a lot smaller than what you see here so it's um it doesn't the tag connect doesn't have the big size advantage that it looks like it has when you compare it just here the way they've done it uh yeah oh greg pointed said take connect is an awesome idea but for open source hardware i don't think you should assume people will have that kind of bling exactly yeah so if you design something onto your board that requires a 20 connector to go on to your programmer that's uh not ideal oh ben harper said 40 to 50 us um oh and that said looks like you could make your own tag connect with 3d print and pogo pins yeah many people have done that it's uh that's the the work around but it ends up being kind of cruddy to be honest because the 3d printing to make this really work you need the the alignment of the pins to be pretty good it needs to be strong it is fairly small so the way i've seen it done is you get a use a pcb with pogo pins soldered flat against the pcb sticking off the edge from both sides so the pcb if you look at this picture here imagine a piece of pcb that is vertically coming up from this board at right angles uh and it's aligned with the pins and then pogo pins so three pins on each side of the pcb soldered flat against it sticking down and then that pcb can go to an idc cable or whatever you like so yeah you could you can do this but getting making it nice mechanically to do it properly you really need like if you look at their um their connectors they are beautifully made and i've got it i gotta say they have done a um they've done a good job with designing this thing let's see this let's see if we can find a better picture of the connector oh and look at the prices on these yeah so the footprint oh yeah this gives you a better idea of the footprint i've listed it on their online store is zero dollars and that is really the killer for this you don't need to do anything on the target board all it is is a bit of some pads and some holes drilled in it which is just part of your pcb design but you can see here the big holes that go on the side if you want to use the retention clips and then you've got to route your signals through around through here it's um it's actually kind of tight and then if we look at a six-speed and cable only this one will do it doesn't matter which one we're looking at can we look at a zoomed in version so this is the tag connect connector with the pogo pins in the middle it's got the guide pins and it's got the retention clips being able to 3d print this is actually quite tricky making it strong enough that those clips will work and retain it not snap off every five minutes so yeah i've seen a few people 3d print their own equivalent to this and it just doesn't work out that well it's um it's just kind of disappointing but putting the 2x3 esp flash header uh where is it that one putting this one on a tag connect header yeah go for it if you want to do that you certainly could just use their cable so okay i'm kind of running out of time but let's just have a quick look at yeah yeah okay i agree to your cookies mr tindy so let's have a quick look at um e-flashy32 so this comes back to where was it back in the chat back in the chat someone else said that they had implemented the um a header which would here we go um oh johnny bergdahl has um has put the link in as well so uh github.com gcormier eflashy32 and this is greg's tindy store and this is the flasher which is cool so it looks like you've implemented two different sizes is that correct so it's got um you can either do let me read this so what have we got you've implemented the same pin out and the same pictures that is awesome i'm so pleased to see this i'm going to add a link to this from the esp flash page so this is basically another implementation uh let's see not that i want to go esp flash so this one that i was just showing you on the overhead camera earlier this is my implementation of it and sorry about the horrible out of focus photo couldn't get enough depth of field there i need to work on that so this header that you see there the 1x6 header this is usbc going through to the usbc going through to the one by six header in point one inch pitch format and what greg has implemented here looks like the exact same header this is so cool i'm so glad he did this um now does that have switchable output voltage is that what that switch is for let's can we see it a bit more clearly oh power okay so you can just uh isolate power from the target that's cool so it's got activity leds and then you can put the pin header on the end if you put it on one side you've got the um the 0.1 inch pitch and on the other side it's got the 0.05 inch pitch that's really clever i like that maybe i should change mine to do that sort of thing at the moment i've got these right angle headers uh going through but what i could do is put exposed pads and have a 0.1 inch pitch on one side and 0.05 on the other yeah nice so greg good work all right i'm going to add a link to that from the esp flash page and if any of you implement other programmers or you come across them it'll be nice to have some more implementations of that same header let please let me know and i will um i will add a link to that page i will do that right after yeah i'll do it this afternoon so scott suggested put the sockets in a dupont connector shell and bend the pins over hmm yes that would do the job i think yeah there are there are some interesting um interesting ways that you could achieve that structurally uh peter said midday that means it must be time to go to lunch hey yes uh yeah alrighty um can't chase squirrels on an empty stomach no um oh ben said jeff gelling did a video on stacking multiple images to fake better depth of field yes image stacking um my camera does that so this is referring to where are we uh this one which has a shallow depth of field because the thing is focused here in fact i have since taken better photos i need to update this page my my panasonic camera can do post focus and it can do image stacking so what it does in the camera is you focus on your target and if you have it in the post focus mode or the image stacking mode what it does is it then backs the focus off so it brings the focus a bit closer takes a photo moves it takes a photo moves it takes a photo and i think by default it takes 10 photos so it's bracketed on the focal length that of your object so you then end up and then it saves it as what is it i think it might be a motion jpeg or something i can't remember but basically it saves it like a mini movie a 10 frame movie which has the focus going through all of those distances and then in the camera you can specify i want to be focused across this part of the image and it then merges the photos together and gives you depth of field which is really cool so yes all right i am going to go to lunch as peter reminded me it is lunch time and now that peter has told my stomach that it should be hungry it is telling me that it should be hungry so peter it's your fault that i'm hungry uh mp4 on the panasonic's yes joseph said mp4 motion picture association uh format version four ah post focus black magic yeah post focus is really cool so there are two different things you can by taking multiple images and bracketing the focal length you can do two different things you can either do image stacking or you can do post focus and post focus is really cool as well that's when you can do things like take a photo of a person and there might be a background like a some building behind them and you can tap on the person and they are in focus and the background goes out of focus or you can tap on the you can select the background and that goes into focus and then the person is out of focus because the the image is consisting of multiple frames and you can move the focus around within the image and so you can play around with it and decide what you want your final result to be so that's post focus focus stacking is when you have an image where part of it is further back than the other and you want all of it to be in focus so the software collapses those images together and it you it blends them and uses the part of the image that is in focus for each area and then you end up with a greater depth of field very very cool stuff and kind of confusing um but fun all right oh joseph said i've used ffmpeg to extract all the frames then used focus merge in affinity studio yeah cool so you can do that depending on your camera system you can either do the focusing like you can do the processing in the camera so on my camera what i can do is open the image directly on the camera and then on the touch screen i can select the areas that i want to be in focus and hit save and it then does all of the merging it's got some built-in image processing chip in the camera and it produces a single jpeg that comes out which is the merged result of those frames so or you can take the mp4 out and then do it on your computer if that's what you prefer to do so there was another subject that i was thinking of getting into today i'm gonna tease you with it because this is something that i think warrants some homework maybe before next week when i might talk about it which is coming legislation in australia well legislation's already been passed the implementation is coming it's coming into effect on july 1st which will make it illegal to work as an engineer unless you have certain qualifications and have paid for a license so it might be that i'm going to be out of business on july 1st um and that might sound like fear-mongering but if you read it like if you look at what it actually says it's uh it's a pretty serious thing so um i'm not gonna get into that anymore because i would really get in that's a squirrel that i would chase so um oh ceon said what camera do i have is it a lumix g7 no it's a lumix g85 so like the um what's the terminology i think the g7 is like a semi-pro camera and the g85 is like a prosumer camera so it's lower in the um oh ceon said what type of engineer any type of engineer civil engineering mechanical engineering electrical engineering fire there are a certain number of categories there is fire suppression something engineering um it is illegal it is going to be illegal to provide um engineering advice or services so um our url let's see if i can find this [Music] in victoria registration scheme yes well it was passed in 2019 and it is going to come into effect on july 1st this year so it's called the professional engineers registration act 2019 so it comes into operation in only yeah a couple of months and if you provide engineer professional engineering services so in the areas of structural civil electrical mechanical and fire safety engineering you will need to register so you've got to be a registered engineer and to become a registered professional engineer you need a minimum of a four-year degree plus four years working directly under the supervision of a registered engineer so that's eight years in order to become in order to satisfy the requirements to be registered yourself and if you don't meet that criteria it is going to be illegal to provide engineering services in victoria anyway that's unsaid you and i are going to have a lot of free time on our hands yeah time to maybe it's um time for a career change might have to move overseas if i want to keep doing stuff and charging money for it anyway i don't want to get into that right now that is a whole big thing i'm probably going to talk about that soon so in the meantime have a great weekend thank you for coming along and please let me know if you do see any implementations of the esp flash header because the more the more i see of it the happier i will be and i will see you all soon thanks bye you
Info
Channel: SuperHouseTV
Views: 2,919
Rating: 4.8933334 out of 5
Keywords:
Id: mkF0rLz70Bg
Channel Id: undefined
Length: 135min 0sec (8100 seconds)
Published: Sat Mar 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.