Back to basics: Using multiplexers with SimVimX/RealSimControl

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone once again welcome to the second video in my series back to basics this one we're going to be talking about multiplexer boards or as we shorten their name mu exports which can also be considered extensions and particularly we're going to be talking about them in reference to how to use them with um hixi which is a new name for the simvim cockpit plug-in so first of all i would like to put out a disclaimer here you know the way i explain these things this is my understanding of it and i've mentioned it before many times i'm only a beginner myself so i might make mistakes i might say some things that are not totally accurate but the majority of what i'm telling you is what i've experienced what i've got to work and you know i it seems to be working for me the way i understand it so that's what i'm passing along um now the version of the firmware that i'm using right now uh we were on 1.0.72 is the one that i'm using at this moment that i recorded this video and the configurator you know the date was uh march 15th of 2021 so everything you saw in the configurator was on this date but you know like always i always recommend that you guys visit the website for the latest information for anything that i have misspoke or maybe misrepresented so you guys can go ahead and read it for yourselves and hopefully between you know the the video presentation that i put out here and you guys reading the website maybe everything will make more sense also and you'll get the accurate information that they want you to to understand all right so let's go ahead and get started so these little boards here are basically what we can use to multiply the number of inputs and outputs that we can connect to our arduino mega so for every one of these little boards that we use we can connect 16 inputs or outputs with only using one pin on the arduino as i've talked about before i have here my little um panel here that i'm going to use you know on this series of videos that i'm going to be doing now just to basically simplify the connections and if you saw the the first video in this series i basically talked about how i do my um distribution hub which is you know pretty much this right here and this is where basically i just get all the data lines coming out of the arduino and take them over to this board uh little breadboard so then from there i can branch out to go too many more multiplexers uh but before we get into all that um i want to show you a little bit here on the sim bim webs say i did it again on the hixi website about multiplexers okay so if we go to the website you know you get to the landing page here and then you can go to the if you go to the extensions right here this is where it talks about the multiplexer boards so you know you pretty much um you have your wiring diagram right here which is basically the signal line or the z goes to the arduino mega controller pin s0 through s3 are the address lines for the data you know bus and then the en plane is going to be grounded you know just like the ground to the common ground and then the vcc of course is the voltage which is a 5 volts i read on a spec sheet that these can run from 2 to 6 volts but the the nominal voltage i guess is a 4.5 volts so it's probably just a better idea just to run it on five volts just to be on the safe side okay i do want to mention another thing here on that's also on the website you notice that they talk about this little um resistor that you can put on here to short between the the voltage and the signal line uh you can use a 2 to 10 kilo ohm resistor and the reason for that as a as they say on the website is because if you have like sometimes a very long wires which they recommend you need to keep them like between 30 and 100 centimeters which is one meter or three feet um you know that you can have noisy signals okay so if you notice here i have put the resistor between the signal pin and the voltage and i have also put the ground that goes between the ground and the en pin so basically the the en pin is uh jumpered over to ground and then from the voltage i have the resistor to the signal line which is the one that's going to go to the arduino and this is a 3.9 kilo ohm resistor so you could use between 2 and 10 kilo ohms according to what the website says okay now we're going to talk a little bit about how these multiplexer boards work so basically it's like if it was a multi-position switch kind of like this one which has you know a bunch of different positions and electronically it's switching through each one of them in sequence so basically it but it's doing that you know i don't know how many times a second it's just going through all the different contacts over and over and over and it's practically just asking it you know are you on are you on are you on are you on and then you know if you press a button or throw a switch or whatever then it'll tell it oh yeah that switch is on um you know so that's basically what it's doing it's just basically going through all 16 channels and checking if that contact is on and if it is then it sends a signal to the simulator to tell that hey that switch is on and it makes a simulator do whatever it is that you have you know selected for that particular switch so that's the thing about that now another thing i wanted to talk about was there are many ways that you cannot select you know to to wire your things and remember everything i'm doing here i'm doing it in a test environment none of this is you know to stay like this forever so that's why i use a lot of headers and um they recommend that you don't do that you know i mentioned it very many times before you know they recommend that you solder everything directly but if you're just experimenting and you want to see if it works before you actually make it final i find that this is a great way to go so you can you know maybe solder up a few multiplexers so that you can try things out and then once you see that your wiring and everything works then you can make it permanent but so i use you know um this kind of header sometimes and then there's been other times when i use this kind of headers right here and these are the ones that are going to go obviously to the data line and then you're going to have the power and the ground and the signal line and all that other good stuff so um this one's kind of cool because it's very easy to put in and out so you basically you know you just line up your wires and you you insert them and they're pretty good and it's it's pretty tight you know it's i would assume that if you wanted to do this and and just leave it like this maybe if you put a little bit of hot glue or something you know out here to make sure that they're not just gonna come loose after you connect all your wires i'm pretty sure that'll that'll work and i mentioned that before also that my setup that's the way i have my entire setup and it works good i mean i have i really haven't had too many problems so once again i'm just going to do a quick overview of the wiring for the input multiplexers right now we're only talking about the input multiplexers so obviously you're going to have your your ground and your power you know which is going to go to the common power rail which i have coming out of the arduino here and then you're gonna have the en as i showed you a little while ago is jumpered over to the ground underneath and then you're gonna have your four sig uh data bus uh address lines which is s0 through s3 and those are going to go to your your breakout board for the system bus and then you're going to have your signal wire which is your signal or z uh it's going to go directly to the pin on the arduino where you have said that you want to have a multiplexer there all right all right so we're going to go back to the website one time real quick but this this diagram right here gives you a very good um representation of how everything is going to go so just remember the four signal lines the address lines those are the s 0 through s 3 and those are going to be common so you're going to be branching off you know to each multiplexer you're going to be branching off branching off and that's exactly what i'm doing with my with my little breadboard there where i have all the all the colored wires going into okay so that was for the inputs for the outputs it's very similar but it's not because remember the the input multiplexers just use the four wires which is the s0 through the s3 address lines and uh that's that's the only ones that are coming from the the data bus and this one right here actually uses the signal line also so in my example that i have here on the table uh this is going to be the blue wire so you're going to use the the signal line plus the four address lines and in this one the en pin is actually the one that goes to the controller pin on the arduino is not the signal line here so this one is receiving a signal from the arduino because it's an output multiplexer and on the other one which is an input multiplexer this one is sending a signal to the arduino so that's the difference here and then of course you're going to have the voltage and the ground and on this one you do not have to have any uh jumpers or any resistors on the other side it's only for the input multiplexers okay so now if i wanted to do this this is how we're going to look at it right now in in my example here so basically this is the output multiplexer that i have right here um so of course i have the positive and the negative here feeding it with a common power rail and then i have the en pin is the one that's going all the way to the arduino to whichever pin you assign an output multiplexer on and then of course you have the s0 through the s3 which in my situation here is the orange white yellow and green and then the signal line which is my blue one it's also coming right here so you can see that on this one i'm using five wires to come here for the output multiplexer but for this one i'm only using four i'm not using the blue one here okay now let's say i wanted to add more multiplexers so of course you're going to put your main system bus distribution as close as you can to where you're going to have most of your buttons and switches and and everything right so let's say you put this right by the front of the of the cockpit and then you want it to also have you know all the switches and everything that you're going to have to have on the overhead okay so what i would do is i would take another extension with the eight wires going to another little hub that's gonna be on my overhead panel and that one right there then i would tap into that one and i would try obviously i would need to also take a power and a ground rail you know so i would um definitely take um you know another one of those i would like to use another one of these bigger ones rather than a shorter one because then i don't have enough room to put the ground in the power um and uh but if you're building this already like for a permanent setup you know the recommended is that you have a very thick copper wire where all your common grounds are gonna end up connecting to so you wouldn't do it on a thin little wire like this for all your grounds just to make sure that you have very good connections so so that's what i would do right now i would have i would extend my system bus and take it closer to my overhead panel you know wherever that's going to be at and and then i would from there i could connect you know all the lines whether it's for an input or an output multiplexer i would connect them to that and i would have more multiplexers out there to to keep expanding so you know as you can see the only thing that's going to be required is to take if you do it somewhat similar you know but obviously you're going to be soldering everything in place i guess um it would take one wire with the eight conductors and then from there you know very short distances you're gonna take you know and you're gonna add multiplexers to this and of course i would add my little jumpers here in the middle just like i did over here so that i can use both sides of this because remember there's no electrical continuity from this half of the board to this half of the board so i would need to do a little jumper so that i can use every single one of these little holes here okay so now we're going to go back to the website and we're going to talk about assigning them so we go to the configuration right here and you can assign a multiplexer pretty much on anything i'm going to be doing another video about uh what you can assign on every single pin what kinds of different devices and all that you can assign but depending on what you plan to do in the future i would recommend staying away from the colored ones because those are specialty ones and there are a few other ones that are also um kind of special so i would i will talk about that on that other video not on this one so you know let's say you want to add an input multiplexer you just click on the empty pin and then you just select add an input multiplexer now when you go into that one right there you're gonna see the 16 locations for the inputs so you know if you want to add you know whatever function you want to add let's say you want to add um you know this switch right here uh you just basically go to the multiplexer and you put it wherever you want to and now when you when you go back to it it's already assigned right there so that's how that works um now if you want to assign an output multiplexer uh you click again on the pin and then you select in mux for seven segment display okay with an output multiplexer there's several things you can do with it so when we click on it and you see the 16 positions available you can select whichever one you want and then you see that the only option it says is connect seven segment display but when you click on it you actually have the option for more things so you can do a seven segment display max 7219 like i mentioned you can do a tm 1637 and right here you need to select whether it's a six digit or a four digit and you can also select a dm13a led driver so you can connect up to 16 leds on one driver and one one pin and you can also select uh shift registers which are also for leds and all that but i haven't played around with those so i'm not going to talk about those so those are our options for the output multiplexer and now i just realized that i didn't talk about the input multiplexer an input multiplexer you can pretty much connect any uh switch you know a push button switch a toggle switch you can do a three position or on off on switch for a toggle you can do rotary switches you can do encoders anything else as an input you can also select only one multiplexer to be an analog multiplexer so if you go to the very bottom of the configurator and also on your arduino you'll notice that pins 54 through 69 have an a like a0 through a15 so that's 16 inputs that you can connect potentiometers and other analog sensors to the arduino but you can select one of them only one of them if you click on it you see that it gives you the option to add analog multiplexer so you can use one of them to give you 16 more connections for potentiometers or anything else like that that has analog input so now instead of having just 16 you have 15 plus 16 so you have 31 but you can only do one of them if you try to select another one you see that option is no longer available so you can choose any one that you want if you delete you know the one that you selected you can choose any other one but it could only be one that's an analog multiplexer so there's a lot of information here that everything is going to build off of this and it's going to help you understand more you know what each pin can be assigned and the different things you can do with different pins and all kinds of good stuff i mean there's so much information that you know that's why i'm not surprised that a lot of people get confused and a lot of people don't understand exactly what it is they need to do all right so this is uh this is pretty much the bulk of the material that i have researched for multiplexers uh hopefully some of this cleared it up for you a little bit and made it uh somewhat understandable how to connect you know to the arduino to the data distribution bus um and how to branch out you know so you can multiply you know what i think that's going to be it for this video before i make another 40 minute video and confuse you guys so hopefully you guys get something out of this one as well thanks for watching and see you on the next one
Info
Channel: Qosmokid
Views: 1,386
Rating: undefined out of 5
Keywords:
Id: hc2Ony8l59w
Channel Id: undefined
Length: 18min 25sec (1105 seconds)
Published: Tue Mar 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.