Back To Basics: Arduino Mega 2560 Pin Usage with HCSCI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello once again fellow flight simmers and cockpit builders welcome to another episode of my back to basics series although judging by the number of things you see on the screen right now it probably doesn't look very basic right but there's a good point because due to all the different things that we can connect to our arduinos you know while using hixi it's kind of a good idea i thought if not downright important at the very least helpful to know what you can connect on each pin because there is some things that you can connect on certain pins only and you cannot connect them somewhere else so today i'm gonna go ahead and go through what kind of things you can connect on every single pin of the arduino while we're building our home cockpits using hixi all right but before we go any further i would like to put out my shiny new disclaimer that any information that i give you on these videos is my understanding of the material presented on the hixi website i always recommend that you go to the website yourselves and read through everything and hopefully between the videos and what you read on the website it'll finally click and make sense to you and make your building a lot more enjoyable so as of the day of this recording i was on firmware version 1.0.72 and the website and configurator pages were as shown the way they were on march 18th 2021 okay without further ado let's get started so there's going to be a lot of information but you won't need to memorize all of it because obviously you know you can find it while you are configuring your setup so but you know because we can connect like for example uh toggle switches you know like this or like these right here uh this is just a basic two position this is the three you can connect push buttons or you can connect leds um you know potentiometers uh rotary switches with multiple number of positions stepper motors um yeah these are steppers and then the vid 6606 stepper driver you can do pulse with modulated devices with this chip right here uh you can do the dm13a you know for led lights this is a shift register i think it's a hc 74 595 or something uh lcd screens seven segment displays servos and then this is some other type of potentiometer lighting potentiometers so you know we got and then there's some other stuff that i don't even own that i don't have here but there's a wide variety of things that we can connect to our arduinos so i'm going to walk you guys through what pins we can use for connecting certain things and what pins are not available to connect for anything at all so let's go to the website and let's get started right away so hopefully it doesn't turn out to be a very long video first thing we got to do is of course go to the configurator page because that's where our whole pin layout is going to be and as you'll notice and as you've seen on your arduinos um there are a total of 69 pins on the arduino um but you'll notice here with uh hixi that zero and one are not available at all um and then if you come down here to you know 21 you'll also notice that 22 through 29 are not available because those are the ones that are used for the the address bus and the data lines for outputs so right off the bat just keep in mind that 0 1 and 22 through 29 are not available to use and if you're this is if you're using usb if you're using ethernet it looks like you do have 0 and 1 but you don't have 10 10 is missing right here and then you're also missing 21 through 29 which are once again the address bus and the data lines so that's going to be something that we're going to have to keep remembering over and over as we go through this okay so first we're gonna do a digital inputs so digital inputs can be used for anything that's an on and off so it can be used for a multi-position rotary switch for any type of switches like this that have a contact uh whether it's a toggle switch like this or whether it's a push button or a toggle like this so that's what inputs can be used for it okay so through all these examples i'm gonna i'm gonna concentrate on usb because that's what i use but if i remember i'll try to go back and mention ethernet but just remember on ethernet zero and one are available but number 10 is not available um all right so let's go ahead and just uh concentrate on usb for now um because i'm gonna i'm even gonna confuse myself if i try to keep going back and forth between the two probably all right so uh for an input we can pretty much select any pin that is available on the list even the analog ones which are number 54 through 69 the only one we cannot select is number 13. um so if you go like let's say we try to assign a push button here and we go to number 13 you'll see that it won't let you but if you just try to select any other pin it will it will allow you to select it so that's for inputs and input multiplexers so anywhere you can select an input you can select an input multiplexer as well as you can see but once again if we go to number 13 you see that the input multiplexer option is grayed out because you cannot select it and i believe the reason for that is because if we uh if we look at the arduino there's an led that is uh linked to pin number 13 and as we might know already an led is a diode so it only allows current to flow in one direction so if you're trying to put an input on that pin and it has to go backwards through the led it cannot flow so that's why you cannot assign an input on that one at least that's the way i see it all right so next thing we're going to do is we're going to talk about analog inputs so analog inputs are used like for potentiometers like this one right here or sliding potentiometers that you got like right here and you can also use other things like uh photo resistive uh sensors and magneto resistive sensors um so those are right there you can assign those on any pin on the a0 through a15 okay so let's say for example you wanted to assign as many of you guys probably already know when you buy a rudder pedal or yolks or especially the cheaper ones they come with potentiometers so if you wanted to to use um you know something like that you would need you see how you cannot select it right there because that's not an analog input so you have to go through a0 through a15 so if you wanted to assign that there you can let's say you wanted to do the pitch you also would need to select one of those because if you try something out here it won't let you so you would need to go down here and of course the same thing for the roll so you would need to select it right there so anything that that has a variable position you know like a smooth transition uh the speed brakes you can also i think you can do the flaps with a potentiometer you can do the throttle the mixture and the prop uh maybe the carburetor heat you know so those are some of the things that i can think of so if you wanted to use a potentiometer you can use on a0 through a15 only and one more thing that is kind of cool let's say just for example that you were going to run out of of these or simply you just wanted to take a a input multiplexer and analog one you can select any pin and you can select it as an analog multiplexer so those you could only do from a0 to a15 but only one of them as i mentioned before in my previous video you can only have one analog multiplexer and then you would be able to connect all your analog devices into that one and then just run one wire to the arduino here to to whatever one you put them up the input analog multiplexer on so that's kind of convenient right there all right so just remember analog inputs and analog multiplexers only on a0 through a15 but you can only have one analog multiplexer whichever one you select okay the next thing we're going to talk about is we're going to talk about leds so leds you can connect on every single pin that is available so in this case of course it would be outputs because they would be output into an led so this is for direct connection so if you wanted to connect an led directly onto the arduino you can select any single pin that is available even number 13 and obviously for leds you are not going to be able to you know you don't select it like this you would actually go to for example let me go to the radios yeah let me go to the audio radios so if you wanted to you know have an led for the audio marker here you would just put it wherever you want it and like i said you can even assign one on number pin 13. so every single pin that you see here even on the analog ones you can put an led output direct connection to the arduino so that's for leds for a seven segment displays the only pins you can use for a direct connection of a seven segment display whether it's a uh max 7219 or a tm 1637 or a custom made one that you made with a dm 13a led driver or a i believe they're called 74 hc 595 shift register you can connect those only to pins number 30 to 37 so if you try to select any other pin you see that that is not available connect seven segment display is not an available option so you can try all of them and you won't be able to the only ones you can connect it is between 30 and 37 you can see that you can connect one there and then you would have to select of course which type the ones that unless you make your own and you're able to use the one of these bottom ones down here the only ones you're really going to have to worry about is the max 7219 or the tm 1637 which is the ones that i've used only so just remember that only pins 30 to 37 for seven segment displays okay now we're going to go to lcd displays lcd displays are a little bit more forgiving i guess you can say because you can connect those to pins number 20 21 and 30 through 49 so you can select if oops i chose the wrong one so if you look on 20 you can see that you have the option to connect an lcd display if you connect any of the ones in 30 to 37 you also have it right there and if you go even if you go all the way down to 49 you still have that option right there but if you go past 49 you no longer have that option so it's pins 20 21 and 30 to 49 for lcd displays direct connection the next one is led drivers which i've only played around with the dm13a and that's the one that i concentrate on most because i have already connected one of those to my test panel and and i like it i like the way it works it seems a little bit complicated to connect them but it's not really that bad and eventually i'll get to the part where i do a video just on those so led drivers are exactly like pretty much like leds you can connect it on any pin that you see here including the analog ones so you can see that it's a serial led driver so you can put those anywhere you want they're all available even where you can connect the seven segment displays even on the specialty ones that we're going to talk about right here so any pin is available including number 13 as well for that's for led drivers like the dm13a okay for the led matrix which is basically it i believe it runs off of the max 7219 um you can only connect them the same as the seven segment displays um i guess to the plug-in it looks just like a just like a seven segment display so you can only select also 30 to 37 for the led matrix based on the max 7219 all right so that's pins number 30 through 37. all right the next one we're going to talk about is the pulse width modulated device which is basically like a coil and that one uses a tlc 5947 chip so that's this one right here that you can see the purple one obviously i haven't used it i i have no headers on it or anything connected to it but eventually i hope to someday play around with it okay so if we go back to the configurator um the only place you can connect those is also 30-37 so as you can see 30-37 are very special because there's only certain things you can connect on them and that's why they're highlighted yellow so if you click on one of them you can see that it gives you the option to add a pwm driver based on the tlc 5947 which is the one i just showed you right now so you can connect those on 30 to 37 just like lcd this i'm sorry just like seven segment displays um if you try to you know click on any other one you see that that option is grayed out so it's not available so it's a good idea you know and i and i wanted to mention this at the beginning and i forgot that if you depending on what you are planning to do in the future with your home setup you know your cockpit it's a good idea to try to stay away from the pins that are specifically for certain type of devices so if you know that you're going to want to connect more than let's say seven or eight seven segment displays then don't connect any inputs on these because you're gonna you're not gonna have enough later you're gonna have to move them and then you're gonna be in trouble so stay away from all these right here that are pink green blue and also the yellow ones for just for future expandability the next thing we're going to talk about is direct pulse width modulated devices so if you want to build a let's say a gauge with a coil which is a pulse width modulated device that one right there you can connect on pins number two through 13 and then also 44 45 and 46. so in order to demonstrate that let's go back to let's go to the flight instruments and that gives you the option to use a stepper motor a pulse width modulated control device which is a coil and also a servo so if you wanted to use a pulse width modulated control device then you would basically have to select something between 2 and 13 or 44 45 or 46 the good thing about that is if you try to select one that's not one of those it'll tell you which ones you can put it on so that's kind of helpful right there so then if you just select number five then you see that the airspeed indicator is there and you would have to wire it up according to how the pages instruct you to in order for it to work but that's if you don't want to use a driver you know like the like the little board that i showed you earlier you can just do direct and i guess you can have a total of 15 if you count two through 13 and also 44 45 and 46 okay so let's go back out here for a little while to my mess here on the table and i'm sorry i just noticed the refrigerator was running hopefully it didn't pick it up that loud um so another thing you can also do which is part of the beauty of the expandability of um of a hixi i almost said similar cockpit again it's going to be a while before i get used to not saying that is that you can also use an uno or a nano board which is this white one that i have right here to use it as a lcd controller a stepper motor controller or a servo controller and also for the key matrix so in case you wanted to build like the fmc or something or you wanted to have 176 more inputs uh just in case all the hundreds and hundreds that you can get with uh multiplex supports were not enough for you well you can add one of these to add 176 more inputs okay so if we go back to the configurator here um once again i mentioned before that these colorful ones right here 14 15 16 17 18 and 19 were special so these colors right here correspond to these colors up here as you can see 14 and 15 are for an lcd controller um and that would be on and arduino that is called rx and tx3 so if you click on this right here and you have one of those boards set up this is where you would assign whatever functions you wanted to display on your lcds you would need to click on that right there and then it'll give you the pin out for the for that arduino nano controller and all the lcds that you have connected to that so and then you go back to the board you would click on that right there again and once again for 16 and 17 that is rx and tx 2 and that is for a servo controller because it's green as you can see up here too so when you click on that the same thing it will show you all the different pins that you can connect servos to all right so that's what that's all about i believe you can connect up to 18 servos to this controller board here and then we go back to the master again and finally a number 18 and 19 which is uh which is rx and tx 1 you can connect either the key matrix or the stepper motor controller uh so you would need to if you wanted to use both of them they do have on the pages a way to daisy chain them so you can have two of them you don't have to just have one or the other you'll be able to still have a stepper motor controller board and a key matrix as well so obviously you would need to have two arduino uno's or nanos in order to do that but once again if you click on those it gives you the pin outs for all the the stepper motors or for the key matrix uh the way you're going to line it up and we're not going to get into the wiring of that right now that's probably even way above my head as well all right so so that's pretty much it that's um i hope that you know by basically going over all these things uh you can plan ahead a little bit that so if you know that you want to use certain things in your setup eventually you just basically stay clear of those pins that are specialty and i'm gonna have a list i'll put it up on my google drive and i'll put the link in the description with a document that i wrote for all these things but you really don't need to memorize it because as you as you go through your configuration here you'll be able to tell you know what you can connect where just by clicking on it you know it'll give you the options that are available but if you want it it'll be available there so i guess that's going to be it for this video hopefully it didn't turn out too long i guess i'll find out after i'm done editing it but i i just thought that it was good information that might help you in your planning you know for your home cockpit setup for the future alright so thank you guys very much for watching like always and we'll see you on the next one all right so i think that's going to be it for this video hopefully it didn't turn out too long i guess i'll find out once i'm finishing with the editing process but yeah i think this information was very important um like i said in the beginning you know it's it's something that i think you should know right off the bat so that you can kind of plan ahead for whatever you might be adding into your home cockpit in the future at least you don't have to go back and undo some of the things that you already did because you didn't know that on certain pins you can only connect certain type of devices or components so that's going to be it for this one hopefully it helps out that which is always my my goal and uh thank you very much for watching we'll see you on the next one
Info
Channel: Qosmokid
Views: 1,250
Rating: undefined out of 5
Keywords:
Id: wSeT2CUfY0Y
Channel Id: undefined
Length: 25min 22sec (1522 seconds)
Published: Thu Mar 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.