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!
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?
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.
thank you, I have followed all the steps but sometimes errors occur, for example I press button 1 nothing happens and when I press button 5 it reads button 1, to overcome this I lower the input voltage to 3.8 volts then for a few moments it returns to normal, until the voltage sometimes it changes, an error occurs again, when I measure the error on the resistor, every time the input button is not pressed, there is a voltage of 0.3 volts which should be 0 volts and it reads on the serial monitor, there is data entering with the wrong value even though no button is pressed. , what do you think is the cause??
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?
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?
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.
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.
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.
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)"
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.
@@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
@@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.
@@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 /
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 😄
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
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.
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.
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?
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~.)
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
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 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.
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
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!
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)
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 !
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!
You are welcome!
It is very simple and good explanation. I believe even 12 years old kid would understand what is going on.
Bravo sister 👍👍👍👍. Iam student electronic. Iam pasion of electronic 🥰🥰🥰🥰🥰🥰
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?
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!
Very nice video just what me and my team need for our next project! Thank you so much!
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
informative, clear, comprehensive, interesting
Great video👍🏼
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.
yeah, i am aslo confused when the arduino code use PE , while ine block diagram , it shows CE control .
واقعا عالی بود دستت درد نکنه 👍
I am a fan of ladies who have passion in electronics and coding. they are rare.
thank you, I have followed all the steps but sometimes errors occur, for example I press button 1 nothing happens and when I press button 5 it reads button 1, to overcome this I lower the input voltage to 3.8 volts then for a few moments it returns to normal, until the voltage sometimes it changes, an error occurs again, when I measure the error on the resistor, every time the input button is not pressed, there is a voltage of 0.3 volts which should be 0 volts and it reads on the serial monitor, there is data entering with the wrong value even though no button is pressed. , what do you think is the cause??
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?
These videos are fantastic. Very clear and easy to understand. Many thanks for posting!
This was so very helpful. Thank you.
Great video thanks for sharing. Instead of using 3 wires hooked up to arduino, how can we make it wireless? Thank you.
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?
Good vid. A jumper wire kit like element14's part# 2770339 would be a lot better for hooking up ground and Vcc.
Awesome I have been messing about with my Rpi and run out of inputs and outputs!! Thanks Karen!
What about the switching speed ?? Will it be like direct input to GPIOs ??
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.
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.
Fantastic video thank you so much
Interesting, I've used shift registers for output many times but didn't know they could be used for input.
#metoo . This open whole new door . Unlimited number of inputs and outputs.
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
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.
I'm using an ATtiny85 I.C., Is it possible to use a customized circuit of 555 timer I.C. as an external clock ?
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)"
Fantastic tutorial!
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?
Karen - Many thanks! This is exactly what I was looking for to better understand this chip.
hi lady . very good course .
how can i use this result derectely with led streep
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.
@@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
@@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.
@@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 /
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 😄
thank you very much. i learned more!!
That was well done - I learned a lot.
Thanks. I'm glad.
Так сложно объяснить простейшее устройство - это просто искусство👍
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
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.
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.
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?
where'd you find your buttons
Instead of using the resistors can we use the PULLUP_INPUT method?
Very cool. Thank you.
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~.)
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.
And when I say 'circuit' I imply performing arts rather than physical phenomena.
Very well explanation! Thanks...
Great! keep up nice work.
Bravo. Thanks!
great video!
Hello sister I like your video thank you very much
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
No debounce?
How to use hardwire interrupt with this code to turn on/off led
thank you
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.
hey did you find your answer? I have the same question
@@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.
@@haddow777 I understand, thank you!
Thanks, Karen!
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
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!
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)
Waw amazing sister naice video
It bothers me that the ground wire connecting the two rails is red 😆
good thing that ground isn't bothered at all ;)
I know, I really need to make more black jumpers. I was using all the premade ones and didn't have any more black.
@@maker_karen1785 gotta do what you gotta do :P
Do you mean debounce not debug
Cool!!!
Time to turn this arduino into a full blown desktop Keyboard!
You could do it with the first 8 buttons as long as you don't mind typing in binary. :)
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 !
👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻❤❤
good
I got the 1k like! :D
Hi Karen
[waves hello]
And that's how your nes controller works
hi
"now that we know how the chip works" .... lol.
Well you have to pitch at the level you're targeting dude.
2 view
Eine ganz ordentliche Leistung, mein lieber! Ich hoffe das Video gefällt dir!