How to Add Multiple Inputs to an

Sdílet
Vložit
  • čas přidán 24. 07. 2024
  • In this fourth and final video about shift registers, Karen shows how to use them to add inputs to an Arduino. Using one or more parallel-in serial-out shift registers, 8, 16, or more inputs can be added by using only 3 Arduino I/O pins: bit.ly/2Fi1ynv
    Engage with the element14 presents team on the element14 Community - suggest builds, find project files and behind the scenes video: bit.ly/2MFMG0v
    Visit the element14 Community for more great activities and free hardware:
    Tech spotlights: bit.ly/2KLz0TS
    Roadtest and Reviews: bit.ly/2KH4fj3
    Project14: bit.ly/2wPnajx
  • Věda a technologie

Komentáře • 93

  • @adrianaolveracabral2685

    Very nice video just what me and my team need for our next project! Thank you so much!

  • @mastermathsflorida1559

    Very cool - thanks so much. Having blown 2 of 4 inputs on rpi explorer hat trying to read gate limit switches, I might just need this!

  • @anthonybarton4252
    @anthonybarton4252 Před rokem

    This was so very helpful. Thank you.

  • @Amb3rjack
    @Amb3rjack Před rokem +1

    These videos are fantastic. Very clear and easy to understand. Many thanks for posting!

  • @xrphobby1341
    @xrphobby1341 Před 2 lety

    Thank you for your video, very educational. How do you put debounce on the switches? I tried to use this but my 7-segment display output is showing random numbers or display. I guess it's the debounce on the switches that cause the problem. Thank you.

  • @GarethHaylings
    @GarethHaylings Před 3 lety

    Thanks for the video. Really helpful. Just a question. If I have 8 input button that I want to switch on 8 leds and mini vibration motors instantly when pressed then would I use the 1st shift register as serial input and parallel output for the buttons then a 2nd shift register as parallel input/output for the leds and mini vibration motors. Is this the correct way to do it? If so which are the best shift registers to be used for this task?

  • @fammertens9419
    @fammertens9419 Před 3 měsíci

    Now this is an explanation the way i like it...i was looking for a way to expand my GPIO's for my homebrew pinball machine! it uses over 50 switches so...thank you so much for a clear description!

  • @ElvizzV2
    @ElvizzV2 Před 3 lety +2

    Very cool, thanks for the good explanation and examples!
    I just wonder why you did not use shiftIn this time, when you used shiftOut last time for the shift register output? 🤔
    But I will definitely have to use shift registers in one of my next projects... just have to come up with something that needs tons of I/O 😄

  • @davedavies3796
    @davedavies3796 Před 3 lety +1

    That was well done - I learned a lot.

  •  Před 3 lety

    Very well explanation! Thanks...

  • @McMurchie
    @McMurchie Před 2 lety

    Fantastic tutorial!

  • @xrphobby1341
    @xrphobby1341 Před 2 lety

    Great video thanks for sharing. Instead of using 3 wires hooked up to arduino, how can we make it wireless? Thank you.

  • @wandersonsilva-fx1cs
    @wandersonsilva-fx1cs Před 2 lety

    Ms. Fantastic your class, congratulations!
    Want to ask a question? How to apply this Shift Register in a remote control project with Arduino,
    Example: a robot walking forward while moving a mechanical arm?

  • @adailyllama4786
    @adailyllama4786 Před 3 lety

    Karen - Many thanks! This is exactly what I was looking for to better understand this chip.

  • @murrrr8288
    @murrrr8288 Před 3 lety

    great video!

  • @masonunger7170
    @masonunger7170 Před rokem

    Fantastic video thank you so much

  • @fench1234567
    @fench1234567 Před 8 měsíci

    I don't see much material out there for universal shift registers such as CD40104 use with arduino or much of anything else now. I understand that from an industry standpoint that the cd40104 is considered obsolete, but I'm still curious whether it could at least be used for fun output effects, if not more. Any ideas on that? Is it a possibility or just an effort heavy work around for stuff the arduino is already better at doing?

  • @cavicster
    @cavicster Před 3 lety +1

    Very cool. Thank you.

  • @DerekPicard
    @DerekPicard Před 3 lety

    Great video👍🏼

  • @Rick_Cavallaro
    @Rick_Cavallaro Před 7 měsíci

    I love this video. Great examples. But I am left with one question... When "stacking" two shift registers, it would seem that the 2nd shift register is shifting bits into the first via its DS pin. But we I don't see that we ever tell either arduino to accept serial data in. What have I missed?

  • @erahmadkamram
    @erahmadkamram Před rokem

    informative, clear, comprehensive, interesting

  • @fatehkhayat797
    @fatehkhayat797 Před 2 lety

    واقعا عالی بود دستت درد نکنه 👍

  • @377_dipanjan_bakshi8
    @377_dipanjan_bakshi8 Před 3 lety

    Instead of using the resistors can we use the PULLUP_INPUT method?

  • @ronalxi1477
    @ronalxi1477 Před 2 lety

    thank you very much. i learned more!!

  • @spectredivision8971
    @spectredivision8971 Před rokem

    I'm using an ATtiny85 I.C., Is it possible to use a customized circuit of 555 timer I.C. as an external clock ?

  • @abdolrezaeshghipour7390

    Great! keep up nice work.

  • @burhanuddinbhiwaniwala618

    Hello mam.... Begin just a beginner and have started learning very basic of arduino... I came across how we can expand are I/O pin in arduino... But i was wondering can we store the status of those pins in the eeprom of arduino... So even if power cuts the expander regain its previous state before the power cut

  • @ashutoshmallik2435
    @ashutoshmallik2435 Před rokem

    What about the switching speed ?? Will it be like direct input to GPIOs ??

  • @pavelkraynyukhov1990
    @pavelkraynyukhov1990 Před 2 lety

    It is very simple and good explanation. I believe even 12 years old kid would understand what is going on.

  • @jssahoo3205
    @jssahoo3205 Před 3 lety

    How to use hardwire interrupt with this code to turn on/off led

  • @jasonree
    @jasonree Před 3 lety +1

    Awesome I have been messing about with my Rpi and run out of inputs and outputs!! Thanks Karen!

  • @thedanishviking88
    @thedanishviking88 Před rokem +1

    For this application, could you use the 74HC165 instead? I have tried researching the difference between the 165 and 166 and for this project I think it would be ok, but just not 100% sure.

    • @J.D-g8.1
      @J.D-g8.1 Před 8 měsíci

      Yes you can use the 165. The 165 reads the inputs when the LD is low, the 166 when LD is low and rising CLK. Also some pins are different. Read the data sheet, but yes, both can be used.

  • @artstechnology7809
    @artstechnology7809 Před 3 lety +2

    Bravo sister 👍👍👍👍. Iam student electronic. Iam pasion of electronic 🥰🥰🥰🥰🥰🥰

  • @christianelzey9703
    @christianelzey9703 Před 3 lety +12

    Interesting, I've used shift registers for output many times but didn't know they could be used for input.

    • @Khujandiho
      @Khujandiho Před 2 lety

      #metoo . This open whole new door . Unlimited number of inputs and outputs.

  • @OMNI_INFINITY
    @OMNI_INFINITY Před 10 měsíci

    Bravo. Thanks!

  • @garymize7272
    @garymize7272 Před 4 měsíci

    where'd you find your buttons

  • @Jack_Cui
    @Jack_Cui Před 2 lety

    hi , a simple question , for 2 chips 16bit projects. so just connect the second Q7 pin to the first chip SI(serial in ) , so that after 16 cycle clock input get , we can get 16 bit signal? i am very curious . by the way , in ther arduino code , you use the PE pin to enable parallel input or enable the serial output , but in your 3:53 diagram block , you use the CE pin , i see the schematic , your CE pin is always conncected to GND. so i suppose your schematic match your arduino logic , those are correct. am i right ? thanks for your feedback in advance.

    • @yt4krist0f
      @yt4krist0f Před 8 měsíci

      Yes, the explanation was wrong: to change between paralell read and serial write the PE pin should be used.
      The CE pin is just for enabling the CP pin.

  • @11219tt
    @11219tt Před měsícem

    Im a C++ novice building building a midi controller using a pro micro. This is still a bit over my head.
    Any suggestions of what to watch?

  • @GeekRedux
    @GeekRedux Před 6 měsíci

    Good vid. A jumper wire kit like element14's part# 2770339 would be a lot better for hooking up ground and Vcc.

  • @MrCardeso
    @MrCardeso Před 3 lety +1

    Thanks, Karen!

  • @DynamicSun
    @DynamicSun Před 3 lety

    how can i build an spezial-key keyboard for my pc and then how can i write an driver software to do stuf on my pc by clicking this Arduino keys ... :-) the world is full of ideas

  • @Learnelectronics738
    @Learnelectronics738 Před 3 lety

    Hello sister I like your video thank you very much

  • @haddow777
    @haddow777 Před 3 lety

    Hello. I have been looking for a way to access a large number of analog inputs while minimizing pins used. What are your thoughts on the use of multiple multiplexers while using shift registers to provide input addresses to the multiplexers? In my mind, scaling from a few inputs to many will just add time to ones read cycle without having to consume more pins.
    Is this a reasonable way to go about this? Do you know of any issues that would prevent it? Or maybe do you know of a better solution?
    Any help would be great. I was also thinking, if it is feasible, then it may be a good video that this one could continue onto.

    • @BlackYellowGamer
      @BlackYellowGamer Před rokem

      hey did you find your answer? I have the same question

    • @haddow777
      @haddow777 Před rokem

      @@BlackYellowGamer not really. I built the setup in a simulator and it seemed to work, but then when I assembled real components it didn't work very well. First off, for my purposes, I was needing a fairly accurate analog result, but the components each added resistance to the circuit, so it skewed the results.
      I'm fairly sure one, if they studied up on the chips and put in the time could compensate for it. There were some other issues I never worked out either.
      Ultimately, I ended up rethinking my requirements in the middle of testing the setup and going in another direction, so I just kind of left that approach behind.

    • @BlackYellowGamer
      @BlackYellowGamer Před rokem

      @@haddow777 I understand, thank you!

  • @codekids99
    @codekids99 Před 3 lety

    thank you

  • @JarppaGuru
    @JarppaGuru Před 6 měsíci

    3:58 should /PE turned high now if there multiple chips so serial data move from other chip. i say yes and its not harm to use it

  • @guyknaan1674
    @guyknaan1674 Před 3 lety +1

    3:53 minor mistake, CE needs to stay low the entire time, PE is the one that needs to be turned on and off. You got it right when showing the ardiuno, but it was wrong here. Still great video.

    • @Jack_Cui
      @Jack_Cui Před 2 lety +1

      yeah, i am aslo confused when the arduino code use PE , while ine block diagram , it shows CE control .

  • @althuelectronics5158
    @althuelectronics5158 Před 3 lety

    Waw amazing sister naice video

  • @duncanwalduck7715
    @duncanwalduck7715 Před 3 lety

    That is a fairly super-duper (and 'universal') shift register. I believe the convention among EE's is to stock up hard, and that well in advance [of anything... »the siliconocalpse?«]- hence the reason one sees so many 'legacy' components in designs - which of course you end up imitating in your own. This could almost recommend a new stock line (if shift registers are the thing... as they often are. At least in ~theory~.)

    • @duncanwalduck7715
      @duncanwalduck7715 Před 3 lety

      Am I coining a new term if I say "pin golf" (as in "code golf")? - I2C is the ur example. SR's work that circuit.

    • @duncanwalduck7715
      @duncanwalduck7715 Před 3 lety

      And when I say 'circuit' I imply performing arts rather than physical phenomena.

  • @karte2626
    @karte2626 Před 2 lety

    Cool!!!

  • @mohssinebouchmal8694
    @mohssinebouchmal8694 Před 2 lety

    hi lady . very good course .
    how can i use this result derectely with led streep

    • @magicianofelectronics951
      @magicianofelectronics951 Před 2 lety +1

      you will have to connect each LED with separate wire and it will create a bundle of wire, you can use multiplexing but it will also increase wires but half then above configuration, best option is to use coded leds which comes with builtin shift register.

    • @mohssinebouchmal8694
      @mohssinebouchmal8694 Před 2 lety

      @@magicianofelectronics951
      Hi lady . Thank you .
      But i meant : use the led strep library code .based on the numeric input number via shift rigistry . as example the interactive pannel led or tables. Thank you

    • @magicianofelectronics951
      @magicianofelectronics951 Před 2 lety +1

      ​@@mohssinebouchmal8694 Means you want to do the same with normal LEDs using shift register? but you want to control with the same code used for programmable LED?, By the way the reply is not from the lady of element14 community.

    • @mohssinebouchmal8694
      @mohssinebouchmal8694 Před 2 lety

      @@magicianofelectronics951 Hi, I'm sorry. I was reading the answer very fast.I didn't notice who answered me,sorry.
      Exactly. That's what I want to translate or mapping a lot of digital inputs from a shift register (3 ×74hc165) Directly to a LEd.strip ws2812 . = 24 led /

  • @lloydrmc
    @lloydrmc Před rokem

    No debounce?

  • @KJ7JHN
    @KJ7JHN Před 3 lety +1

    I like your electronics videos, but could you do a quick video on sewing? Maybe reading from a pattern? Keep making electronics videos, there aren't enough of them out there. I'm currently looking to make a capacitive touch button with a cap and resistor. A video on that would be AWESOMENESS! Cheers!

  • @octogames6823
    @octogames6823 Před 2 lety

    I got the 1k like! :D

  • @SimplyStuart94
    @SimplyStuart94 Před 3 lety +13

    It bothers me that the ground wire connecting the two rails is red 😆

    • @Davedarko
      @Davedarko Před 3 lety +1

      good thing that ground isn't bothered at all ;)

    • @maker_karen1785
      @maker_karen1785 Před 3 lety +2

      I know, I really need to make more black jumpers. I was using all the premade ones and didn't have any more black.

    • @SimplyStuart94
      @SimplyStuart94 Před 3 lety +2

      @@maker_karen1785 gotta do what you gotta do :P

  • @hugdelphi
    @hugdelphi Před 2 lety

    good

  • @AaronYool
    @AaronYool Před 3 lety +3

    if you are going to name your pins, rather than declaring integers and trusting the compiler to optimize efficiently (especially if you want to later have the code be relatively portable) please use sized integer definitions to explicitly tell the compiler to do what is proper: "#define PIN_NAME uint8_t(12)"

  • @JarppaGuru
    @JarppaGuru Před 6 měsíci

    6:16 bad idea use pin2 any where else than interupts and if use sdl sda then cant use interupys and a4 a5 also not xD bcoz they same pins

  • @romycruz4498
    @romycruz4498 Před 3 lety +2

    I am a fan of ladies who have passion in electronics and coding. they are rare.

  • @markstigers7602
    @markstigers7602 Před 2 lety

    Do you mean debounce not debug

  • @Good.Morning.YouTube
    @Good.Morning.YouTube Před rokem

    👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻❤❤

  • @user-uk7uu9us1w
    @user-uk7uu9us1w Před 3 lety

    And that's how your nes controller works

  • @JarppaGuru
    @JarppaGuru Před 6 měsíci

    3:04 no its chip enable when its high nothing shift or latch. paraller enable load paraller in low and high its not serial enable its just work that way it read in even you not really want bcoz thats how it works
    its kinda if have 74ls575 serialout() sketch just replace chip 74ls165 use same code only change serialin() and some bla bla lol. if pins same

  • @TH3Willster
    @TH3Willster Před 2 lety

    Wow... first time a woman has blow my mind with her clothes on! Just kidding of course. But in all due seriousness. YOU. ARE. A. STAR!!! Keep up the great videos and you will go far. Lets wish together now.. 3... 2... 1.. I WISH FOR 1 MILLION SUBSCRIBERS!!! Good luck on the journey and please keep us little guys in mind when you go big. Now down to business
    3:11 I found that at this time stamp, i was a little tired. Try add more graphics or some kind of joke... Might help keep us watching till the end...
    That was a joke, video is almost flawless.
    Thanks for all the help. keep it real and stay hot (hot shoe or smething)

  • @MagicGumable
    @MagicGumable Před 3 lety +3

    Time to turn this arduino into a full blown desktop Keyboard!

    • @jennitro
      @jennitro Před 3 lety +1

      You could do it with the first 8 buttons as long as you don't mind typing in binary. :)

  • @arnelcondino2634
    @arnelcondino2634 Před 3 lety

    Hi Karen

  • @devqbasic2384
    @devqbasic2384 Před 3 lety

    hi

  • @romycruz4498
    @romycruz4498 Před 3 lety

    They said, i mean science said that the children inherit their intelligence from the mother. If this lady has or will have a children they'll be working in NASA !

  • @melcrose
    @melcrose Před 3 lety

    "now that we know how the chip works" .... lol.

    • @Mankey1234
      @Mankey1234 Před 3 lety

      Well you have to pitch at the level you're targeting dude.

  • @devqbasic2384
    @devqbasic2384 Před 3 lety +1

    2 view

    • @Davedarko
      @Davedarko Před 3 lety +1

      Eine ganz ordentliche Leistung, mein lieber! Ich hoffe das Video gefällt dir!