Ep.54 Analog Input Multiplexing with the 74HC4051 - 8 Sensors on 1 Pin

  Рет қаралды 155,857

EEEnthusiast

EEEnthusiast

Күн бұрын

Пікірлер: 197
@tbyers31
@tbyers31 8 жыл бұрын
This is very well done and super clear. The application I have experimented with that led me to your video is creating a multi-cell battery discharge tester. I would like to use the multiple analog inputs measure the voltages of a number of 18650 lithium cells (recycled from a laptop, e.g.) under load over time, all at once. The challenge with these old cells for ebike and electric vehicles is getting batteries of equal capacity. There are easy ways to measure the capacity of single cells but not many cells at once. A multiplexer solution would allow testing of the many cells needed in a shorter time frame. Thanks for the excellent video.
@udithkumarv734
@udithkumarv734 4 жыл бұрын
"For whatever reason you have 20 potentiometers and you have to read them." exactly what i want it for😂😂
@melcrose
@melcrose 4 жыл бұрын
Only 20?
@udithkumarv734
@udithkumarv734 4 жыл бұрын
@Janna for making a glove which reads movement based on potentiometer readings
@KrotowX
@KrotowX 3 ай бұрын
In my case there are output of 6 current sensors and diagnostic signals. But idea behind how to read them remains the same as guy in video explained..
@okachobi
@okachobi 6 жыл бұрын
Thank you for this video. The datasheet wasn't so clear for amateurs and this tutorial really helps.
@AlbertSvensson
@AlbertSvensson 2 жыл бұрын
Thank you, thank you, thank you. Finally got my project working. Just want to read one potentiometer at a time.
@Impulse_Photography
@Impulse_Photography 9 ай бұрын
I could see where I could use this to control a relay board - each relay controls a high power motor or other device. Also, to control camera by selecting one camera at a time - but you can use many cameras around your property with only one Screen output. Love this video !!
@robertosonzogni
@robertosonzogni 6 жыл бұрын
I've watched several tutorials on this argument, none worked (at least for me) except this. Thank you.
@Sohave
@Sohave Жыл бұрын
Great stuff for an Arduino beginner such as me. I plan to use Multiplexing for a project where I want to re create a track control panel for a model railroad.
@tr3kn3rd
@tr3kn3rd 8 жыл бұрын
Nice! Comes in really useful when you want to measure slower signals. From looking at the datasheet, the atmega328p can sample 15000 times per second at max 10 bit ADC resolution which can measure 1 x 7.5 KHz signal (good old Nyquist...should apparently sample slower than this to avoid aliasing but whatever.). Using your setup you can now instead measure 2 x 3.75 kHz signals, 3 x 2.5 KHz signals etc using only one pin! I would use this setup for a temperature measurement systems where you want to map the temperature at hundreds of different locations, for example to find where the heat is distributed in my apartment and find out where the heat is leaking out in winter :)
@EEEnthusiast
@EEEnthusiast 8 жыл бұрын
+Michael Segev very good point mike! I haven't really gone through the drawbacks of this setup, but you can't have "everything". This would be adequate for 90% of analog applications; not for high speed ones.
@vladstrulev
@vladstrulev 4 жыл бұрын
Vlad . Absolutely great lesson. Thank you very much for your time and knowledge sharing. Very appreciated.
@yorke1467
@yorke1467 Жыл бұрын
man, you just saved me I was about to give up figuring this out
@BilgeKaanAtay
@BilgeKaanAtay 8 жыл бұрын
It's looks like Sam Tyrell knows about electronics.
@mysporelo
@mysporelo 7 жыл бұрын
Bilge Kaan Atay all the readings were for something!
@av03
@av03 6 жыл бұрын
do you mean Samwell Tarly?
@BenStoneking
@BenStoneking 7 жыл бұрын
Excellent tutorial! Thank you for a perfectly clear explanation!
@SimplySteel
@SimplySteel 7 жыл бұрын
This is bloody good especially for a beginner as me
@pcantele
@pcantele Жыл бұрын
I was thinking of using this as part of an eight channel radio control transmitter. It should be easy enough.
@educationaltechnology8363
@educationaltechnology8363 2 жыл бұрын
very informative keep it up .me as a beginner I see a solution looking for a problem😆 I wish if you could make more examples of where to use such a chip thanks
@jvictorpower
@jvictorpower 8 жыл бұрын
This video help so much, man! Thanks a lot!
@barbasbandas6665
@barbasbandas6665 6 жыл бұрын
If you are using push buttons you could also tie one side of each button to ground with a different value resistor. That way each button will have a different analog read value so you can diferenciate them. And only uses one pin
@PhotonCommander
@PhotonCommander 3 жыл бұрын
Bro wonderful. Thank you so much for this video.
@lowrezable
@lowrezable 6 жыл бұрын
REALLY GREAT !!! I'm building a controller for audio mixing...
@itscrawford
@itscrawford 4 жыл бұрын
thanks! I really appreciate the in depth explaination in this video. Do you have a video which involves multiple multiplexers?
@tomevans1481
@tomevans1481 8 жыл бұрын
I'm still learning Arduino programming and need to display the voltage in the serial monitor.
@djberg3483
@djberg3483 5 жыл бұрын
Great stuff, this just took me from 2 megas down to one, with a bit more PCB work. Next step for me is to figure out how to read 0-120v via an analog pin, once I can do that my project will be a go.
@CaddyBlue
@CaddyBlue 5 жыл бұрын
I believe a normal voltage divider would suffice if you are only measuring the voltage (The power draw is basically voidable). With 2 resistors, 120v to 5 volt would be divided with 1 resistor being 24 times higher than the 2nd ( 120 / 5 = 24 ). Using www.ohmslawcalculator.com/voltage-divider-calculator 2 resistors with values 27 Ohm ( Closest to 24 and under 5v ) and 1 Ohm would give a reference voltage of 4.286V between the 2 resistors. This output would be linear to the input!
@happyhippr
@happyhippr 7 жыл бұрын
awesome video, great explanation of the concept
@nikanetique
@nikanetique 4 жыл бұрын
Exactly what i'm looking for. Tnx man!
@jagannathkulkarni
@jagannathkulkarni Жыл бұрын
Thanks for this interesting tutorial. If you please I just want to know what happens if two or more buttons are pressed simultaneously ? does it still reads the values or not ??
@itsgoubie
@itsgoubie 6 жыл бұрын
i did something wrong because my pins never read 0 even with a pulldown/up resistor. my wiring is probably wrong, i'll redo it. as to functionality and/or code, all working great. thank you!
@christinewurth5485
@christinewurth5485 6 жыл бұрын
Great tutorial! Thanks so much! I have used the 74HC595N before for a series of digital outputs. With limited understanding of how they actually work. :D For a new project a need to read a series of analog inputs (where the 74HC4051 might come in handy). And also control a series of analog outputs (or digital with PWM). I am still struggling with the difference between mulitplexers like this and shift registers. How specific is their use? Could I use another one instead? Could I use this one for analog outputs, too? Or could I just the 74HC595N I already have for this job? Would be super greatful for any hints. THANKS!!!!
@pranjalverma4154
@pranjalverma4154 4 жыл бұрын
i have the same question. did you manage to use the 74HC595 in the end?
@bilalnuru2959
@bilalnuru2959 4 жыл бұрын
Hey can i use the 4052 multiplexer ic instead of 4051? With this same code and connection please i need help i cant find the 4051 ic here
@raymccoy9105
@raymccoy9105 4 жыл бұрын
4052 has two banks of four inputs going to two output pins. (Or vice versa since the ins and outs are bidirectional.) You could read 8 values using two analog pins on the mC but that would require some wiring and code changes. While you would need two analog pins for input, it would require only two output pins for channel selection.
@mikg2618
@mikg2618 4 жыл бұрын
Same MUX used on Akai Apc40 and my master fader is not working (only one). Try to find why is it so, cause a numbers of pots are connected to same mux that fader attached to..
@ClaytonAllenFP
@ClaytonAllenFP 8 жыл бұрын
Very cool explanation. You mentioned flow in terms of sensing and analog input. So if I had an array of flow sensors how would this count each pulse and increment a flow value?
@EEEnthusiast
@EEEnthusiast 8 жыл бұрын
+Clayton Allen If you have an array of analog sensors, you would get a reading from each one of them into the array. After that, you can use any of the values stored there for any purpose in your program.
@stargazzn
@stargazzn 8 жыл бұрын
I have a real world use for this circuit. I have about 15 strawberry planters that will freeze this winter on my balcony if I don't do something. Bringing them inside is not a good option. I want to measure the temp of all my planters with an LM35 and I want to use some resistors to give them just enough heat so as not to freeze. It will get down to -10'F. So if I can use perhaps 5 watts worth of 1/2 watt resistors and keep the temp to about 37'F. I should be okay. In summary I need to Mux 15 Analog inputs and 15 digital outputs to the tune of perhaps 5 watts.
@haiaokuwa
@haiaokuwa 5 жыл бұрын
Thanks for this. Very nice
@sanjaybatra6593
@sanjaybatra6593 Жыл бұрын
how much minimum voltage can be read ? what is the resistance between input and output ( e.g Z and y0). why I asking this is as I want to interface multiple sensor to be read.
@chbonnici
@chbonnici 2 жыл бұрын
I wander if you can tell me how can you make this counter to count 0 to 15 with 15 dip switches . Let say dip switch 1 dual led shows 01 then add dip switch 2 and show 02 and so on. Every time add on dip switch so to read 15 all 15 dip switches must be on. Please help.
@themouseisinthehouse
@themouseisinthehouse 5 жыл бұрын
nice clear tutorial! would there be any electrical implications if I use two back to back to achieve routing from multiple inputs to multiple output? like increase in resistance, a decrease in the signals amplitude or maybe a delay?
@grantwallen5246
@grantwallen5246 8 жыл бұрын
I'm a new comer to arduino and I need a shield to help control 4 different items with various power for each. I need to supply 10W to a pair of speakers each needing 5W and another 6W to another set of speakers each needing 3W. I also need about 2.3V for my VU meter by Great Scott with just a little more power for my lcd screen by arduino. I'm also including TDA7492P 25W+25W Wireless Bluetooth 4.0 Audio Receiver Digital Amplifier Board. So I'd like to add this features together with 2 analog inputs and 3 digital for on and off of whole system, switching from radio to Bluetooth, and one to vary the on and off of the VU meter
@chadmckean9026
@chadmckean9026 3 ай бұрын
2:14 if you have pins 6,7,8 on ground why does the table show pin 7 as supply voltage
@neodimium
@neodimium 3 жыл бұрын
At t:415.66 I noticed forth column changed state. Without you touching that button. (and again at t:432.69)
@Doile911
@Doile911 5 жыл бұрын
Can you chain link more 8 channel multiplexers, or would you need a 16 channel multiplexer?
@subhadipghorui2216
@subhadipghorui2216 6 жыл бұрын
can i read the value indivisuali from each pin ? i want to use multiple analog sensor but i have only 1 analoginput (Nodemcu esp8266).....want to extend ......................so thanks alot . can u make another tutorial on above topic ..............BIG HELLP if you do.
@maxr382
@maxr382 3 жыл бұрын
I am building a ckt to read and report various states (24VAC or 0) in a heat pump to an esp8266. Interesting chip. I am going to see what it's max input is. Maybe I can just rectify the single out to the esp.
@factormarketing5652
@factormarketing5652 4 жыл бұрын
Thanks , It’s useful information :P
@Uniquelife_17
@Uniquelife_17 6 жыл бұрын
very nice
@franciszekjanusztalarek7017
@franciszekjanusztalarek7017 3 жыл бұрын
You can press 2 buttons twice?
@bryanbisimotopinas345
@bryanbisimotopinas345 5 жыл бұрын
Is it possible to have two of these and make an 8x8 grid?
@peterbarratt8699
@peterbarratt8699 5 жыл бұрын
Yes, just use 3 more pins to select the next 4051 to create a matrix.
@vijaybaleja6220
@vijaybaleja6220 4 жыл бұрын
great software
@myinfo7114
@myinfo7114 5 жыл бұрын
There is a new approach in science for reading an unlimited number of sensors in parallel. It is called the photon-pixel coupling method. Maybe you can do it with an Arduino.
@rimmersbryggeri
@rimmersbryggeri 6 жыл бұрын
I was wondering. Can you use many resistive inputs on an arduino pin like for example for controlling the indicator function including left right and hazards on a vehicle?
@dnyautechnology2023
@dnyautechnology2023 3 жыл бұрын
HOW CAN I HAD MORE MULTLPLEXER AND THE CODE THANK YOU
@belray7939
@belray7939 2 жыл бұрын
does it applicable in limit swtiches?
@haddow777
@haddow777 3 жыл бұрын
I see a number of pins are used to address which input is being read at which time. I am looking into a project that may need many analog inputs (basically 10+ temp sensors). Obviously the way this system works won't scale well as more and more pins will be consumed to specify input addresses. I was thinking that combining multiplexers with shift registers, where the shift registers will specify which analog address you are wanting to read would massively reduce the number of pins needed. What are your thoughts on this? I was hoping to avoid having to use multiple controllers having to talk to each other to get a bunch more analog inputs.
@PAK_MARINE
@PAK_MARINE 6 жыл бұрын
Sir I want 8 analog input and 8 digital output with this IC 74HC4051N or have some others IC
@mplenter9051
@mplenter9051 7 жыл бұрын
could you explain me how works the following piece of code? High && ( i & B00000001)
@adrianstefanescu3535
@adrianstefanescu3535 7 жыл бұрын
The answer to this would be helpful :). I'd subscribe for this answer :))
@doubleHLabs
@doubleHLabs 7 жыл бұрын
this tells the 74HC4051 which channel you want to listen to. In this example its channel 1. Then the 74HC4051 sends the value for channel 1 to the arduino
@adamlauz
@adamlauz 3 жыл бұрын
you look at "i" in binary form. for example if i=5 in the loop then it will be: [1]*2^2 + [0]*2^1 + [1]*2^0 which is represented as 101 or B00000101 in binary. So the goal is to activate the 6th (0..7) analoug in order to get it's value and the way to do it is by sending the S0,S1,S2=HIGH,0,HIGH to the multiplexer. The code resolves the logical statements: 1) B00000101 & B00000001 = B00000001, 2) B00000101 & B00000010 = B00000000, 3) B00000101 & B00000101 & B00000100 = B00000100. HIGH is actually the boolean True (or integer other than zero) and LOW is the boolean False (or zero) so HIGH && B00000001 is actually HIGH\True\"Integer other than zero" and HIGH && B00000000 is LOW\False\zero
@moisesmosso6328
@moisesmosso6328 4 жыл бұрын
How to daisy chain it with 74hc595 please
@joashnaidoo8644
@joashnaidoo8644 6 жыл бұрын
You cannot keep adding more sensors indefinitely. As you increase the sensor you increase the selector pins, which is basically your constraint on how many pins your micro-controller as. Just a side note there and to correct you.
@EEEnthusiast
@EEEnthusiast 6 жыл бұрын
Although that is true, you can always multiplex those as well or use an I2C selector IC to toggle those inputs that way. Nothing is ever "infinite" and you will run into power issues, communication issues as well as timing issues as you increase the number of sensors. That being said, you can definitely make it work if you take care of those problems.
@KAFA2020
@KAFA2020 6 жыл бұрын
Dear respected sir, Hope you are in good health with peace and happiness. I am really happy for your awesome tutorials. Now, I am doing a simple project where I need to display 24 switches state. If the switches is ON then it will show ON and if switch is OFF then it will show OFF. But I am not getting how to get 24 input into Arduino. Please sir, I need your help. I will be really grateful for your support.
@KAFA2020
@KAFA2020 6 жыл бұрын
Dear sir, I need to do same work for 24 switches. Please sir which mux IC, I need to do and what will be the change in program?
@GapRecordingsNamibia
@GapRecordingsNamibia 4 жыл бұрын
Good day, I came across your video, and thank you for the information, I am new to Arduino had done one or two projects but mostly learn as I go. I would like to ask if it is possible that you could explain how the binary bit of the code works, I understand the incrementale part of the binary sets, what I am wondering is how are you writing the correct addresses for each input? Are you just cycling through the bits and the chip only responds to the correct addresses or is there another thing going on that the addressing is precise? I hope this makes sense? Kind regards.
@kingshahzad78
@kingshahzad78 5 жыл бұрын
Hats off to your logic. Working perfectly but spent the whole day but did not understand " digitalWrite(pin_Out_S2, HIGH && (i & B00000100));"
@kingshahzad78
@kingshahzad78 4 жыл бұрын
@@jumbo999614 hahahahaha
@adamlauz
@adamlauz 3 жыл бұрын
you look at "i" in binary form. for example if i=5 in the loop then it will be: [1]*2^2 + [0]*2^1 + [1]*2^0 which is represented as 101 or B00000101 in binary. So the goal is to activate the 6th (0..7) analoug in order to get it's value and the way to do it is by sending the S0,S1,S2=HIGH,0,HIGH to the multiplexer. The code resolves the logical statements: 1) B00000101 & B00000001 = B00000001, 2) B00000101 & B00000010 = B00000000, 3) B00000101 & B00000101 & B00000100 = B00000100. HIGH is actually the boolean True (or integer other than zero) and LOW is the boolean False (or zero) so HIGH && B00000001 is actually HIGH\True\"Integer other than zero" and HIGH && B00000000 is LOW\False\zero
@tomevans1481
@tomevans1481 8 жыл бұрын
Nice tutorial. Would you have a source for the breadboard pots? Thanks!
@conquer-ai
@conquer-ai 8 жыл бұрын
i am going to read 4 sensor analog values into pin A0 for web interface its should read 4 analog sensor values one after another ......i need know what's the method for this and what are the changes i need to make in Coding
@LowLevelMask
@LowLevelMask 4 жыл бұрын
It's a very nice video. Could you teach me how to read the values sequentially in Arduino by connecting more than 3 mpu6050s to 74hc4051?
@jparky1972
@jparky1972 3 жыл бұрын
Mpu6050 runs via I2C. So to run up to 8 6050's you'd need to use the 4051 to switch the i2c data line. Can be done.
@jumbo999614
@jumbo999614 4 жыл бұрын
If you have both analog and digital sensors, then It's better to use analogRead() than digitalRead() because it covers both analog & digital right?
@justgotravel6646
@justgotravel6646 4 жыл бұрын
With multible 16 channel multiplexer what is the maximum input (ie. Buttons) you can get on a audino board? Also do you need to consider extra power sources?
@gabrielhimelfarb5962
@gabrielhimelfarb5962 4 жыл бұрын
Just a quick question: I want to use the multiplexed for several moisture sensors, if I understand, the moisture sensors should be connected to the Y0-Y7, while S0-S3 to a digital pin each, Z to an Analog pin, and VCC to 5V pin?
@startobytes
@startobytes 4 жыл бұрын
yes, I guess so
@monugaurav7942
@monugaurav7942 5 жыл бұрын
what should I do if I have to store these data separately into seprate variables..
@CharlieGuitar87
@CharlieGuitar87 6 жыл бұрын
Hello, I am looking to use an Arduino and a 74HC4051 to make the Switch of an RGB Scart between 8 Scart Inputs and 1 Scart output. Can you guide me on how to do this?
@danielcorley3013
@danielcorley3013 8 жыл бұрын
awesome job!...do you know of a way to use an arduino mega as a game controller? I didn't know enough and bought one not realizing they're not preprogrammed to emulate a controller like the teensy or the leonardo.
@jumbo999614
@jumbo999614 4 жыл бұрын
I have CD4051B. The layout is the same. So i guess pin connection is also the same. Mine has Inh, VEE, and VSS. I connect all 3 pins to ground rail of the breadboard but it doesn't work. When i push buttons, i get 0 value from the input channel. What did i do wrong? #define A 4 #define B 5 #define C 6 int IOport = A0; void setup() { pinMode(A, OUTPUT); pinMode(B, OUTPUT); pinMode(C, OUTPUT); pinMode(IOport, INPUT); Serial.begin(9600); } void loop() { int bt0 = readSensor(0,0,0); //int bt1 = readSensor(1,0,0); //int bt2 = readSensor(0,1,0); //int bt3 = readSensor(0,1,1); //int bt4 = readSensor(1,0,0); //int bt5 = readSensor(1,0,1); //int bt6 = readSensor(1,1,0); //int bt7 = readSensor(1,1,1); Serial.print(bt1); Serial.print(" "); delay(50); } int readSensor(int a_, int b_, int c_) { digitalWrite(A,a_); digitalWrite(B,b_); digitalWrite(C,c_); int val = digitalRead(IOport); return val; }
@raymccoy9105
@raymccoy9105 4 жыл бұрын
I have fought several nuances between datasheets. As far as the Inh (inhibit HIGH) vs E-bar (enable LOW) their function is the same, simply different notation. LOW is on, HIGH is off. Not that this solves your problem but figured I'd toss in the note in case it helps. After fighting with the connections as described in the video with Vee to supply voltage I finally figured out that that pin should actually be tied LOW. That one changed on my IC board ended two full days of frustration. Another problem I encountered, which may relate to your problem, is not changing ports based on "select pin" settings. What I finally figured out there is the pins were floating, typically passing through input applied on Y0. I had not added pull-down resistors to the three select pins so they were not turning OFF when I dropped the pins LOW on the Arduino. That realization pointed me in the right direction but took several tries to tweak the resistor value to effectively pull the signal down when off yet still send enough voltage to drive it. Finally settled on 330K. Much below that I was missing HIGH select signals (as pull downs function as a voltage divider) sending voltage to close to the 2V signal threshold noted on the datasheet. Afraid, and figured it was unnecessary to go any higher, figuring it might not drain the current fast enough to pull the signal low. It all worked for me. Finally! Hope this helps you, or at least someone frustrated enough to read this deep into the comments.
@jumbo999614
@jumbo999614 4 жыл бұрын
@@raymccoy9105 Thank you.
@cristiandarvich2713
@cristiandarvich2713 7 жыл бұрын
It's possible to multiplexing a multiplexor?? I'm serching for the cheapest way to digitalice 577 analog inputs of LDR for a musical proyect. Thanks!
@DM-iv4fb
@DM-iv4fb 4 жыл бұрын
Great Video. Is there any way to add LEDs to the circuit and the code so that when the buttons are pressed the LEDs will light up. Also is possible to add a toggle to the code so that each time you press a button it alternates between 0 and 1023? thanks
@Oshroth
@Oshroth 2 жыл бұрын
You would probably want to add a second multiplexer in output mode, though if you use a compatible multiplexer you can connect the address pins to the same address pins as the first multiplexer so that you only need one additional pin. Yes, there are examples of toggle buttons in code but it is just a matter of toggling a bool value when the button is just pressed
@abdurrahmanumar8925
@abdurrahmanumar8925 7 жыл бұрын
i tried the mulplexing using your codes on the same Arduiuno, the codes seem like your but it keeps bringing error can I have your help?
@jaceb_sqr
@jaceb_sqr 4 жыл бұрын
Anyone know how to get the individual analog values? So that I can map and constrain it? Thank you in advance
@chihauccisoilconte4474
@chihauccisoilconte4474 4 жыл бұрын
I have a question: can you press multiple buttons at the same time?
@raymccoy9105
@raymccoy9105 4 жыл бұрын
Can you pat your head and rub your belly at the same time? There should be no reason not. I have two of these tied together with common select pins, reading on two different analog pins. As the code cycles through, I am able to read one value from each chip output per analog pin giving me a total of 16 inputs. All function independently of the others.
@chihauccisoilconte4474
@chihauccisoilconte4474 4 жыл бұрын
@@raymccoy9105 well, the question came to my mind because the MUX uses 3 digital pins to select which input is selected (right?), and each input correspond to a combination of the 3 bytes, so, if I press two buttons at the same time the combinations to trigger are 2, and how can the MUX select 2 channels at the same time if the selectors pins are just 3?
@raymccoy9105
@raymccoy9105 4 жыл бұрын
@@chihauccisoilconte4474 the loop in update mux routine cycles through each of the eight channels. Within that loop the digital pins are used to select the channel and the value for is read on the one analog pin and stored in an array. Any buttons pressed (or the position of the potentiometer) affects each channel independently. After the the eight reads, the eight read values are printed from the array.
@chihauccisoilconte4474
@chihauccisoilconte4474 4 жыл бұрын
@@raymccoy9105 ok, thank you very much for the explenation!
@beaconofwierd1883
@beaconofwierd1883 6 жыл бұрын
I have a similar-ish setup, but I try to read really fast (38 KHz) and I’ve run into the problem that when I switch the input the first three to 8 readings (depenging on the impedance, using an impedence) becomes inaccurate (High spikes when switching). The strange thing is that it’s the first three readings no matter the read speed (9kHz up to 64 kHz) so I find it hard to believe that it’s the adc which needs time for charges to settle (since then it would take a fixed amount of time, not reads). Do you have any ideas what’s going on here?
@charnjit525
@charnjit525 4 жыл бұрын
If I want very fast response ,what is time between reading analog input pin of ...4067 and result happening?? In milliseconds???
@raymccoy9105
@raymccoy9105 4 жыл бұрын
With an Arduino Nano and a 4051 chip I was able to get 42 to 44 reads between 1ms interrupts. I had concerns about a potential error rate and dropped that back significantly for the final code.
@alirezamoghaddam7389
@alirezamoghaddam7389 5 жыл бұрын
hi nice tutorial is it possible to read analog values and put them seprately in a variable for uploading it to a iot cloud i am asking it for nodemcu cause it have just one analog pin
@beee0330
@beee0330 6 жыл бұрын
If i press all buttons at once (or even more buttons, lets say 50 buttons) will the arduino read them all correctly or there will be some kind of error?
@p1nesap
@p1nesap 8 жыл бұрын
Awesome.
@EEEnthusiast
@EEEnthusiast 8 жыл бұрын
+p1nesap Thank you!
@johnadrianinfante7990
@johnadrianinfante7990 6 жыл бұрын
SIr, what type of multiplexing does this project use FDM, WDM or TDM?
@satrah101
@satrah101 7 жыл бұрын
hi all. new to this. can i ask if this will be better for back ground noise or worse. and if its one pin will this work on atTiny 8 pin. Thanks in advance, great vid,
@gpsvitor
@gpsvitor 6 жыл бұрын
This is Great to do a bms
@Torxed
@Torxed 6 жыл бұрын
Late to the party here, but can you press two buttons at the same time and get a reading on two input pints at the same time? or even all the buttons+potentiometer at the same time?
@EEEnthusiast
@EEEnthusiast 6 жыл бұрын
Lord Anton Hvornum yes, you will get all the readings of multiple inputs. Of course, they do happen in a sequence (nothing is “at the same time”), but it happens extremely fast.
@Torxed
@Torxed 6 жыл бұрын
Sweet, yea I assumed that's how it worked but wasn't 100% sure. Cheers for clearing up my suspicions! Ordered a few and gona tinker with them! Great video and thanks for answering so quickly :)
@BRINDEOFUTURO
@BRINDEOFUTURO 8 жыл бұрын
Hello! How do I use two or three interconnected multiplexer, totaling 28 or 42 channels? Thanks in advance.
@EEEnthusiast
@EEEnthusiast 8 жыл бұрын
You would need to connect the output of the mux to the input of another. This would split one of your mux inputs into 8.
@BRINDEOFUTURO
@BRINDEOFUTURO 8 жыл бұрын
Ok. Thank you.
@nishitmistry2399
@nishitmistry2399 8 жыл бұрын
And what about the code for that if i want to create any case for any particulate pin input ?
@SteveF153
@SteveF153 7 жыл бұрын
I would be interested to see how to expand this, as well. Did you follow up on this?
@BenStoneking
@BenStoneking 7 жыл бұрын
NISHIT MISTRY this would be a very interesting and potentially confusing block of code, I would imagine. Do you think it would require nesting multiple "for" loops to read the pins within series of mux?
@alabaska182
@alabaska182 5 жыл бұрын
Is there a way to connect two analog devices to one analog input without having to connect either of the two through the digital pins as well? Trying to get two hall sensors (analog) connected to one analog input on arduino with MMJOY software.
@RichardHowin
@RichardHowin 4 жыл бұрын
CMIIW, base on your situation, i think it could be using mux 2 in 1.... Just use that module from the video, but using only S0 only. ._.v for the digital pins...
@williamsanchez34
@williamsanchez34 7 жыл бұрын
amazing
@ignassungaila5781
@ignassungaila5781 4 жыл бұрын
Hey can someone drop me the link that this video was inspired by?
@nishitmistry2399
@nishitmistry2399 8 жыл бұрын
What if i want to press more than 1 button at the same time ? is there any code for that?
@Smartliving-udanagayan
@Smartliving-udanagayan 7 жыл бұрын
sir how to used two or 03 shift registers ! please explain with sample arduino code thank you
@yusuf0650
@yusuf0650 6 жыл бұрын
It's called "daisy chain in shift registers". You can find examples by googling it.
@mikeoliver3254
@mikeoliver3254 7 жыл бұрын
could you real time control an 8x8x8 led cube this way? I can't think of any reason why it would not work on a mega but I am probably missing something.
@EEEnthusiast
@EEEnthusiast 7 жыл бұрын
Well, I would go the shift register route for that. The problem with these is that you will need to switch between LEDs, so you'd need to create the illusion of what is ON in an LED cube. You can't actually turn ON all 8 LEDs.
@jj74qformerlyjailbreak3
@jj74qformerlyjailbreak3 2 жыл бұрын
Couldn’t you also “I’m no expert and haven’t had an opportunity to play with Arduino” but what if we mapped ranges 0-100, 101-200, 201-300.....1023 and uses 8 or more switches or buttons for each “range” to be determined by the potentiometer? Seems logical in my head
@Skandawin78
@Skandawin78 7 жыл бұрын
I'm not clear about how ur updateMux1 function works. for ex if I = 4 in the for loop, will S0 be set to 4 00000001 S1 -> 4 00000010 and S2 -> 4 00000100 sorry I'm a newbie and desperately want to know how multiplexer works with this code. can u pls explain?
@ЗахарСушко-э5й
@ЗахарСушко-э5й 7 жыл бұрын
if the i = 4, in binary system it means, that i = B0000100 ( big letter B - means binary system), and when you doing this operation: 4 & B00000001 - it means you doing this operation: B0000100 & B00000001 and you get the answer: B0000101, that in decimal system = 5 - the 5th input in MUX. Read more about binary system and binary operations - it help you to understand more. I hope you'll undertand my answer, as you can see, my English level is not so good.
@wojciechrakszawski8935
@wojciechrakszawski8935 6 жыл бұрын
Here it looks rather more like: 4 & B00000001 -> B0000100 & B00000001 -> B0000000 Mostly because '&' function leaves "1" only on bits where there was "1" in both numbers That way you get coding demanded by multiplexer like: S0 is 2^0 (so 0 or 1), S1 is 2^2 (so 0 or 2), and S3 is 2^2 (so 0 or 4) With that if you whant to get e.g. input 5 those operations will set S0 high, S1 low, and S2 high Hope it helps to understand
@allinone671
@allinone671 7 жыл бұрын
and how to use it
@abrahammagnifico9538
@abrahammagnifico9538 5 жыл бұрын
unfortunately didn't understand :(
@vladstrulev
@vladstrulev 8 жыл бұрын
Thank you very much Vlad. Very nice tutorial and very nice explanation as always. Love your tutorials. Please make them coming.
@TheDradge
@TheDradge 5 жыл бұрын
Good video but you don't press buttons and/or the potentiometer at the same time to show that it really is reading multiple values at the same time. Would be more impressive to do that.
@Dr4wfox
@Dr4wfox 2 ай бұрын
Thank you, I was trying to figure out why my multiplexers werent working. I didnt knew that pins 6 and 7 had to be grounded
@kckc9245
@kckc9245 3 жыл бұрын
Nice .. 👍😎 How can i use this with 74HC595 ... With 16x outputs LEDs ... 16 Switchs... 16x input and 16x outputs. How can i turn off and on each Led ... I have 2 x. 74HC595. With 16x Running leds and 10x different FX. Can i use this to control each FX ? And Each LED.. ? Thank you.. In Advance..
@hayder.ismael
@hayder.ismael 3 жыл бұрын
Thank you for this video, it is really helpful. Just a question, can I see the value of analogue inputs at the same time, for example, if I press two bottoms simultaneously, will i see two values in the array?
@Oshroth
@Oshroth 2 жыл бұрын
Yes, each loop the code cycles through all 8 addresses in the multiplexer and grabs the current value so at the end/beginning of the loop you have an array with all of the values, so you will see a value for every button/input in the array
@fahadnadeem6130
@fahadnadeem6130 3 жыл бұрын
I need to multiplex and demultiplex, positive and negative voltages, so can I use cd74hc4067 for this purpose
@aleemuddinkhan1813
@aleemuddinkhan1813 3 жыл бұрын
Dear you shared an excellent approach can you please shored how we can use audio sensors to trigger any an event in Arduino ...........
Arduino Multiplexor - MUX INPUTS & OUTPUTS - ANALOG and PWM
13:21
Electronoobs
Рет қаралды 107 М.
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 87 МЛН
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН
Arduino MIDI Controller: Part 3 - Multiplexers
20:09
Notes and Volts
Рет қаралды 197 М.
Multiplexing Arduino Inputs: 16 Analogue Sensors on 2 Analogue Pins!
14:49
Charis Cat // Child of an Android
Рет қаралды 13 М.
Solving I2C Address Conflicts - TCA9548A I2C Multiplexer
24:29
DroneBot Workshop
Рет қаралды 103 М.
How To MUX Arduino Inputs & Outputs | Arduino Multiplexer
9:08
Kiyani's Lab
Рет қаралды 37 М.
MegaMUX - 32 Channel Multiplexer Board and Tutorial
9:54
SeanHodgins
Рет қаралды 32 М.
HOW TRANSISTORS RUN CODE?
14:28
Core Dumped
Рет қаралды 444 М.
HariFun #133 - 8 LEDs, 8 Buttons, just 2 Arduino pins!
8:20
Hari Wiguna
Рет қаралды 125 М.
Workbench Essentials When Starting Arduino! (Beginner Guide)
8:14
Can the ARDUINO NANO handle 64 potentiometers?
26:55
Notes and Volts
Рет қаралды 16 М.
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 87 МЛН