How to Add Outputs to an

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ค. 2024
  • Serial In Parallel out (SIPO) shift registers can take data in a single input and transfer it to multiple outputs. This type of shift register can be used to expand the outputs of an Arduino. Watch as Karen shows how to create a circuit that uses only 3 I/O pins of an Arduino to create 8, 16, or more outputs: bit.ly/2QkyqhE
    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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 102

  • @malcolmhodgson7540
    @malcolmhodgson7540 3 ปีที่แล้ว +24

    Karen, by far the clearest explanation on the internet. Really grateful for your clear teaching style.

  • @malgailany
    @malgailany 3 ปีที่แล้ว +7

    I like the clear and concise explanation of the shift register as well as the Arduino code.
    Thank you, Karen!

  • @kugodx9
    @kugodx9 2 ปีที่แล้ว

    As someone who only picked up the hobby a year ago, I just want to say THANK YOU!!!!!!!!!!!! Your explanations are beyond helpful and have greatly contributed to early projects.

  • @reasonablebeing5392
    @reasonablebeing5392 3 ปีที่แล้ว +1

    Another great video. You have a gift for explaining this stuff. I hope Element 14 recognizes this and we continue to see your videos here.

  • @chasem7889
    @chasem7889 3 ปีที่แล้ว +1

    This is a great explanation, and helped me get past an issue I had daisy-chaining two of these together!
    Thank You!

  • @rewanderson5541
    @rewanderson5541 3 ปีที่แล้ว +12

    Hey, exactly what I need for one of my projects! Thanks.

  • @joegoetz3705
    @joegoetz3705 3 ปีที่แล้ว

    Nice. I was having a hard time cascading these and you made it clear. thank you

  • @mnavarrotube
    @mnavarrotube 2 ปีที่แล้ว

    Extremely clear and detailed explanation. Thanks

  • @marios_ideas
    @marios_ideas 3 ปีที่แล้ว

    Very nice explanations. I did similar video and it is great to see a slightly diffrent angle when explaining this topic

  • @robertrobert5583
    @robertrobert5583 3 ปีที่แล้ว

    Such a clear and helpful explanation. Thank you.

  • @edwarnick3427
    @edwarnick3427 ปีที่แล้ว

    I agree with the previous comment.... your's is simply the best explanation I've seen! Nice job!

  • @jasonree
    @jasonree 3 ปีที่แล้ว

    Thanks Karen, excellent as always!

  • @mitchellhw2006
    @mitchellhw2006 3 ปีที่แล้ว +5

    You did great. Very good presentation. APPLAUSE

  • @jabmd32
    @jabmd32 3 ปีที่แล้ว +1

    easy to understand thank you karen

  • @scry7293
    @scry7293 2 ปีที่แล้ว

    Easy to understand. It helped a lot. Thx

  • @valdisblack1541
    @valdisblack1541 3 ปีที่แล้ว +27

    05:10 it's more reliable here to define constants instead of using variables. variables are stored in the RAM of the microcontroller, but constants are always in the code section and won't spend limited space in microcontroller's RAM.

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว +7

      I’m still very new to Arduino coding and tbh, copied this code from someone else’s project. I had to look everything up to see how it worked.
      Thanks for adding your knowledge. I hope it helps someone out.

    • @MarinusMakesStuff
      @MarinusMakesStuff 3 ปีที่แล้ว +1

      @@maker_karen1785 Ah, are you the person in the video? :) It would be nice to also credit the person who has written the original code in the description.

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว +10

      @@MarinusMakesStuff Hi, yes I'm Karen in the video. I do all the research, writing, filming, and editing for The Learning Circuit. (Well most of the editing. Max makes it look shiny.)
      That's a really good point. I got a lot of my reference material from www.arduino.cc/en/tutorial/ShiftOut. But I'm looking at their example code and it doesn't match mine at all. I tend to piecemeal information together for my videos, so I'm not sure if I directly copied code from anywhere or just borrowed bits. I move through making these videos so quickly that the information can be a blur sometimes. I always keep a References list of URLs but none of the ones for this episode have code like what I used. I will try to keep that in mind in the future and try to make sure the original code authors are referenced in the description.

    • @After_Tech_Industries
      @After_Tech_Industries 3 ปีที่แล้ว

      @ op, good to know

    • @ryanbareither89
      @ryanbareither89 2 ปีที่แล้ว

      This is one of those little coding tips that will help me for the rest of my life.

  • @krzysztofbaranowicz7735
    @krzysztofbaranowicz7735 3 ปีที่แล้ว +1

    I am very happy, you come 😄🤗🤗 back

  • @sithummethmika1676
    @sithummethmika1676 2 ปีที่แล้ว +1

    thanks a lot and i love your tutorials

  • @4BohrKid
    @4BohrKid 3 ปีที่แล้ว +1

    this was probably one of the best videos I've ever watched

  • @iot_enthusiast
    @iot_enthusiast 3 ปีที่แล้ว

    Very well explained!

  • @brandontay2053
    @brandontay2053 3 หลายเดือนก่อน

    Great explanation!

  • @nicholasglover7636
    @nicholasglover7636 3 ปีที่แล้ว

    Great video! How would you go about controlling the shift register without using the shiftOut function?

  • @mioritic6798
    @mioritic6798 3 ปีที่แล้ว

    Possibly the best Karen out there, congrats :)

  • @OmeedNOuhadi
    @OmeedNOuhadi 3 ปีที่แล้ว

    Thank you Karen!

  • @adrianschnyderch
    @adrianschnyderch ปีที่แล้ว

    This is the best explainer video for me, thank you for this great work. Now I have a question: what software did you use to create the animation from 1:10

  • @howardc2452
    @howardc2452 ปีที่แล้ว

    Very nice project. Thank you.

  • @ArponRoy
    @ArponRoy 3 ปีที่แล้ว

    8:40 Can you tell me about the swing machine sitting behind you? It looks like digital one. Can you tell me the brand or any details that I could found similar one ?
    BTW very good explanation of shift register. thanks

  • @gauravsr4439
    @gauravsr4439 3 ปีที่แล้ว

    thanks.. its really helpful 🙏

  • @Mostafa-cv8jc
    @Mostafa-cv8jc 7 วันที่ผ่านมา

    Very good explanation

  • @AlbertoGuitarrista
    @AlbertoGuitarrista 2 ปีที่แล้ว

    This amazing explanation has really helped me. Thank you very much, indeed! Oh! And that smile... :-)

  • @TheBic4
    @TheBic4 3 ปีที่แล้ว

    awesome stuff keep it up!

  • @zoltanmeksz7625
    @zoltanmeksz7625 4 หลายเดือนก่อน

    Very good teacher.

  • @matreive5917
    @matreive5917 3 ปีที่แล้ว

    Great video, very clear. Thanks for posting.

  • @Enigma758
    @Enigma758 ปีที่แล้ว +1

    @Maker_Karen I'm glad you used 470 ohm resistors as the 74HC595 has a max chip current of 70mA

  • @h2o40fpv
    @h2o40fpv ปีที่แล้ว

    Thank u for this video.

  • @anokhautomation4453
    @anokhautomation4453 2 ปีที่แล้ว

    Nice tutorial 🎉🎉🎉👍

  • @kuczaq69
    @kuczaq69 2 ปีที่แล้ว

    Very good content, thx!

  • @schedarr
    @schedarr 3 ปีที่แล้ว

    That was epic!

  • @mdanisurrahman101
    @mdanisurrahman101 3 ปีที่แล้ว +1

    owesome project

  • @michaelzajac5284
    @michaelzajac5284 3 ปีที่แล้ว

    I finally you have arduino!

  • @awo1fman
    @awo1fman 3 ปีที่แล้ว +4

    Great tutorial! 👍 I can't help but notice the LEDs are set up backward for counting up in binary LOL. 😝 Could just turn the board around or flip the video. 🤔 😁

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      Haha. You’re right. I didn’t even notice that!

  • @MrCardeso
    @MrCardeso 3 ปีที่แล้ว +1

    Thanks, Karen!

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      Always the same comment. Always happy to see it. :D

    • @MrCardeso
      @MrCardeso 3 ปีที่แล้ว +1

      @@maker_karen1785 It was either that or "Hodor!". I may not have immediate use for the topic at hand, but I want you to know that I appreciate your work.

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      @@MrCardeso Haha. Aww thank you!

  • @williefleete
    @williefleete 3 ปีที่แล้ว +2

    also the output enable explanation is a little inaccurate. Pulling the pin high will make the outputs go high Z or essentially open circuit, it disconnects the output drivers. However you can use PWM on the pin to control LED brightness etc (I use it on the jumbo clock to control the Aux LED brightness, I use the signal from the "blanking" pin used on the CD4511 which I use to control the digit brightness, inverted using a spare ULN2003 and a pull up on the OE of the register controlling the LEDs)

  • @masoudjafarzadeh
    @masoudjafarzadeh ปีที่แล้ว

    Hi Karen 🙋‍♂️
    Is it possible to write a code that can be used to 0 and 1 one of the specific outputs of the shift register

  • @josegregoriocontrerasvarga5693
    @josegregoriocontrerasvarga5693 28 วันที่ผ่านมา

    Hi . The same proces work tp the 74LS259 ?

  • @sandeepgupta6526
    @sandeepgupta6526 ปีที่แล้ว

    Thanks,nice

  • @EntruvWriting
    @EntruvWriting 3 ปีที่แล้ว +1

    Thanks for the video!
    Two quick questions:
    1) How would you make it so that the second shift register doesn't start receiving bits (or lighting up) until the first one is full (all LEDS are lit)?
    2) I know you can use bytes to tell the shift register what pattern to display (ex. 0b01001010), but does this carry over to the second shift register? If I put in a 16-bit number, would it show that pattern using both shift registers?
    Thanks!

    • @LandOfSigh
      @LandOfSigh 3 ปีที่แล้ว +2

      For Q1, it depends on what you wish to do. A quick and dirty way is to call serialOut() twice before the digitalWrite(latchclock, high) is called. That way the data in the first serialOut() is in the second shift register, while the second serialOut() is in the first shift register when the latch is 'activated'.
      For Q2, int is already 16 bit, so it is already 16 bits and no change is needed! However, if you are looking to transfer all 16 bits in one call of serialOut() you will be disappointed. From the arduino reference for shiftOut() under notes and warnings, shiftOut() only supports transferring 8 bits each time it is called.

    • @robertrobert5583
      @robertrobert5583 3 ปีที่แล้ว +1

      @@LandOfSigh thanks for this. Now I understand why she skipped over that part!

  • @GerardWassink
    @GerardWassink 3 ปีที่แล้ว +2

    When the purpose of the exercise it to explain the shift register, it suffices. When the purpose is to add more outputs, try the I2C bidirectional ic MCP23017, it’s much more versatile... You can add 8 of the to the I2C but giving you 128 ports that can individually set as input o output. Couple outputs to a ULN2803 and inputs thrugh an opto-coupler, and you’re in business.

    • @goodwill7643
      @goodwill7643 3 ปีที่แล้ว

      50PCS = € 49,15 / lot MCP23017
      50PCS = € 4,03 / lot Hc595ag Shift Register
      If you need 50PCs and you don't care about 45€ being thrown away, then it doesn't matter what to use.
      I was always wondering about MCP23017 why it cost as MCU, but has only a tiny part of functionality.

  • @boopeshkumarprabhakaran
    @boopeshkumarprabhakaran 2 ปีที่แล้ว

    How to Take outputs? Can I use 16 channel relay with this?

  • @amandakleisnerova7473
    @amandakleisnerova7473 3 ปีที่แล้ว

    Hello, how to make 16bit D/A converter with two 74HC595 and resistor ladder ?

  • @animongahajime9302
    @animongahajime9302 2 ปีที่แล้ว

    How do select only a specific pin on the register and set it's value?

  • @goodwill7643
    @goodwill7643 3 ปีที่แล้ว +1

    Could you please make tutorial how to use multiple Shiftregisters with Serial Data Output pin? Thank you

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว +1

      There’s a video coming out next week about adding inputs that uses the serial output.

  • @farosrohmangeloraramadan3897
    @farosrohmangeloraramadan3897 2 ปีที่แล้ว

    great animation, georgeus girl

  • @wtun8660
    @wtun8660 ปีที่แล้ว

    Is it possible to find a code to control 170 outputs using Arduino Uno and shift register number 22

  • @williefleete
    @williefleete 3 ปีที่แล้ว +1

    I've used shift registers to drive some BCD - 7 segment decoders (CD4511), each shift register can drive 2 digits, I have cascaded 4 shift registers to drive six CD4511 7 segment display drivers which drive ULN2003 open collector drivers and and 8 extra LEDs (by omitting the 4511's and driving the ULN2003 off the shift reg outputs). Did I mention the LED displays in this are made from LED strips, one whole digit is around 130mmx220mm. I made them into a clock, which I call the "jumbo clock". I have some smaller displays that use a similar thing, 2 shift registers for 4 digits (or 3 and a few directly controlled segments). I made a few 18b20 based thermometers using some 44.5mm LED displays

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      That sounds pretty frickin cool. I'd love to see pictures and a write up of what you did.

  • @faysalahmed613
    @faysalahmed613 2 ปีที่แล้ว

    Mem,Can you describe 4094be shift register with detailed

  • @jobbe-wijnen
    @jobbe-wijnen 9 หลายเดือนก่อน

    I broke my head thinking about that HC595, until i realised that the outputs SOURCE current when high, but also SINK current, when low. Please tell me that is correct, otherwise I will again not sleep over it.😂

  • @elionehme4870
    @elionehme4870 4 วันที่ผ่านมา

    i did the same thing but my shift register outputsb are turning off sometimes is my shift register perhaps falty?

  • @sanketjadhav2255
    @sanketjadhav2255 3 ปีที่แล้ว +1

    Why is 2nd shift reg 1 bit behind???

  •  3 ปีที่แล้ว +1

    Please note you can use SPI to control a 595 at 16MHz! Using OE as a CS pin for it, you can share the SPI bus with the 595 and any SPI slaves.

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว +1

      I’ve never messed around with SPI, but I’ve been told to add it to my list so maybe there will be a video about it in the future.

    •  3 ปีที่แล้ว

      @@maker_karen1785 great, thanks for your answer ;-)

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      @ Now I've started reading up on it. That Arduino code line "Serial.begin(9600)" makes a lot more sense now. You may have just sent me down a rabbit hole. ;-)

  • @mustafasaad2128
    @mustafasaad2128 3 ปีที่แล้ว

    عاشت ايدج

  • @jiricech4678
    @jiricech4678 ปีที่แล้ว +1

    For what is there 10k resistor (CLR pin) ?

    • @DeltaGen42
      @DeltaGen42 11 หลายเดือนก่อน

      This is a pulldown resistor. When the pin on the arduino is brought low, its possible for a voltage to remain on the pin. the resistor gives it a path to ground.

  • @OMNI_INFINITY
    @OMNI_INFINITY 8 หลายเดือนก่อน +2

    Really it doesn't have ANYTHING to do with decimal. They are simply switches. Using decimal representation of binary for that is simply more convenient. Those are basically dip switches.

  • @xselectroniccircuits6290
    @xselectroniccircuits6290 ปีที่แล้ว

    👌👌

  • @alfredkaserekasivanzire9488
    @alfredkaserekasivanzire9488 3 ปีที่แล้ว

    There is a 74HC165. It's a shift register too. But it seems that it is used differently on arduino. I hope to see you showing how to use it too.

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      Yup, that’s next!

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      Ok I just checked and it's actually a 166, but they're very similar. :P

    • @alfredkaserekasivanzire9488
      @alfredkaserekasivanzire9488 3 ปีที่แล้ว

      74HC165 for many INPUT. You have described the one for many OUTPUT

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว +1

      @@alfredkaserekasivanzire9488 This video uses a 595. There is another video coming up that uses a 166 to show adding inputs. But I made that video at the beginning of July so I forget exactly which chip I used. That video should be released in 3 weeks.

  • @user-dz7jo5eb5j
    @user-dz7jo5eb5j 8 หลายเดือนก่อน

    Don't they teach you to keep your indentation nice and tidy in electrical engineering?

  • @heemagauss8691
    @heemagauss8691 2 ปีที่แล้ว

    understand what i want and apply in 10 minutes instead of 3 hours

  • @lacourarieeric7650
    @lacourarieeric7650 3 ปีที่แล้ว

    dommage vidéo en anglais rien compris mais le visuel semblais être bien

  • @Khujandiho
    @Khujandiho ปีที่แล้ว

    I think she deserves Starbucks gift card. :) thank you

  • @arnelcondino2634
    @arnelcondino2634 3 ปีที่แล้ว

    Hi Karen

  • @canlobin2240
    @canlobin2240 3 ปีที่แล้ว +1

    i like you

  • @Calphool222
    @Calphool222 3 ปีที่แล้ว

    05:57 isn't a great explanation of how a for loop works. A for loop typically has three parts that work with a variable:
    1. what should the variable be initialized to? 2) when do you want me to break out of the for loop? and 3) how quickly should I increment or decrement the variable? These three values are separated by a semicolon. Technically the rules of how you set up a for loop don't _require_ these three things, but by convention that's typically how they're coded.
    In the example that was given, the loop will count from 0 - 255, then terminate. Since the code is in the function loop(), it then starts over at 0 because loop() gets called by the Arduino base code over and over again.

    • @goodwill7643
      @goodwill7643 3 ปีที่แล้ว

      Video focused on ShiftRegister and C++ syntax is extra. On the screen you have working example of loop and for more details check book "C++ in 21 Days"
      Karen is more familiar with ICs and in Arduino/C++ she is relatively new.
      www.amazon.com/Sams-Teach-Yourself-Days-5th/dp/0672327112

  • @lucsonnelson8037
    @lucsonnelson8037 2 ปีที่แล้ว

    Not safe for the arduino period....🤞🤔

  • @zdenkokovac4557
    @zdenkokovac4557 3 ปีที่แล้ว

    😁👋💞

  • @budward7846
    @budward7846 3 ปีที่แล้ว

    The /OE pin has nothing to do with shifting or latching, and taking it HIGH will most certainly change the parallel outputs - they will be tri-stated! Who edits this stuff?

    • @maker_karen1785
      @maker_karen1785 3 ปีที่แล้ว

      If you feel that what I presented is incorrect, would you like to share the correct information so we can all learn?

    • @budward7846
      @budward7846 3 ปีที่แล้ว

      @@maker_karen1785 Surely. www.ti.com/lit/gpn/SN74HC595 Notice that on the first-page Logic Diagram /OE is the top input, and is only connected to the output-enables of the parallel outputs - it is asynchronous to the clocks and does not interact with the shift logic. If I am incorrect my apologies; please point out my mistake.

    • @AI_Image_Master
      @AI_Image_Master 2 ปีที่แล้ว

      The way she said it was confusing. You are correct. The /OE pin has nothing to do with the shifting or the latching. It has everything to do with the output. She was referring to the output not changing until /OE is high. Generally if you are not waiting for other things to complete you just tie it high and your output will change when the latch changes. However you might not want to show your register change and /OE can be controlled by some other Logic input to it. Chances are that your output might be going to a bus so the high /OE is a high impedance state to make sure that you do not put your data on the bus until it is time to.