Nicely done! Very thorough! Wow! Thank you for saving me from burning out the output pins on my Arduino! I only have two transistors in my starter kit, so I am displaying just 2 digits for now. I modified my displayDigits function to display each of the 2 digits for 1 ms each, and I added a for loop around that to set how long in ms to display the two digits for (eliminating the flicker). I set this to about 50 ms which worked great for my decimal counter (0 to 99). Now I know more about transistors!
@clarkso654 жыл бұрын
The best tutorial for arduino I have ever seen for now. :)
@ceoofpoonis36683 жыл бұрын
Clark what is your location
@killianrocky34313 жыл бұрын
Pro tip : watch movies at Flixzone. Me and my gf have been using it for watching a lot of movies these days.
@alvinjamir31303 жыл бұрын
@Killian Rocky Yea, I've been watching on Flixzone} for years myself =)
@GaryMarkowski3 жыл бұрын
Wonderful tutorial! BTW... I used the pin connections similar to the Arduino tutorial, so my bit positions are different from your spreadsheet, and the values being output for each number are different from your circuit. I used this code to determine the decimal values to output according to my pin connections. // Bit positions for each segment const int legTop = 0; const int legUpperRight =1; const int legLowerRight = 2; const int legBottom = 3; const int legLowerLeft = 4; const int legUpperLeft = 5; const int legMiddle = 6; const int legDecimalPoint = 7; int setSegments(int number, bool decimalPoint) { int retSegments = 0; switch(number) { case 0: bitSet(retSegments,legTop); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); bitSet(retSegments,legBottom); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); break; case 1: bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); break; case 2: bitSet(retSegments,legTop); bitSet(retSegments,legUpperRight); bitSet(retSegments,legMiddle); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legBottom); break; case 3: bitSet(retSegments,legTop); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); bitSet(retSegments,legBottom); bitSet(retSegments,legMiddle); break; case 4: bitSet(retSegments,legUpperLeft); bitSet(retSegments,legMiddle); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); break; case 5: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legMiddle); bitSet(retSegments,legLowerRight); bitSet(retSegments,legBottom); break; case 6: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legBottom); bitSet(retSegments,legLowerRight); bitSet(retSegments,legMiddle); break; case 7: bitSet(retSegments,legTop); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); break; case 8: bitSet(retSegments,legTop); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); bitSet(retSegments,legMiddle); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legBottom); break; case 9: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legMiddle); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); bitSet(retSegments,legBottom); break; case 0x0A: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legMiddle); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); break; case 0x0B: bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legMiddle); bitSet(retSegments,legLowerRight); bitSet(retSegments,legBottom); break; case 0x0C: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legBottom); break; case 0x0D: bitSet(retSegments,legMiddle); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legBottom); bitSet(retSegments,legUpperRight); bitSet(retSegments,legLowerRight); break; case 0x0E: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legMiddle); bitSet(retSegments,legBottom); break; case 0x0F: bitSet(retSegments,legTop); bitSet(retSegments,legUpperLeft); bitSet(retSegments,legLowerLeft); bitSet(retSegments,legMiddle); break; default: retSegments = 0; } // End Case if (decimalPoint) { bitSet(retSegments,legDecimalPoint); } return(retSegments); }
@Enigma758 Жыл бұрын
12:54 You are overdriving the 74HC595 which has a max chip current of 70mA. With 5v supply, 2.0v forward voltage of red led and 220ohm resistor, each segment requires (5-2)/220 = 13.6mA. When displaying an "8" that's 7 segments x 13.6mA = 95.2mA.
@deadlyorchard11 ай бұрын
I'm just starting out with micro controllers and just finished wiring this. If I proceed, will the shift register just have a shorter lifespan? If so, how much shorter?
@Enigma75811 ай бұрын
@@deadlyorchard It's a roll of the dice. Just use higher value resistors, 470 instead of 220 and you should be fine. You won't even notice the difference in brightness.
@randomrandom55 ай бұрын
I think you might've messed up the math there. (5-3)/220 = 0.00909, not 0.0136. 0.00909 x 7 segments = 0.0636 = 63.6mA
@Enigma7585 ай бұрын
@@randomrandom5 Actually it's the (5-3) part that has a typo. The forward voltage of a red LED is around 2v (see preceding sentence above). So my analysis still stands, and thanks for pointing out the typo! (corrected above)
@johnjackson97674 жыл бұрын
Fantastic explanation and walkthrough. Subbed.
@LHommeDeParfum4 жыл бұрын
Thanks for poiting out the flaws in the lesson 28 tutorial. Actually I am using a common anode but didn't realise the tutorial was about common cathode. But I could not figure out how to wire for a CC. So the shift register IC was boiling hot! I stopped everything. What are the modifications necessary for a common anode wiring? Cheers
@wclumiere56655 жыл бұрын
Very good and well explained tutorials Ricardo, I've been looking for this kind of 74HC595 shift register tutorials and even though there are plenty all over the net, I've been able to really understand how they work with your explanations. Could you please make a tutorial showing how to control a Led matrix and if possible how to create some effects on it like scrolling right to left and vice versa and some other effects? Like I said before there are a lot of videos about led matrices but they only show the hardware part but not how the code really works. If you decide to do it I will really appreciate it. Thanks for all your Hard Work. Keep it UP!
@rickmorenojr5 жыл бұрын
Thanks! Great suggestion! I worry that sometimes I go over the code in too much detail.
@amruthanair99885 жыл бұрын
wow such a good dumbo
@Inertia8885 жыл бұрын
@@rickmorenojr Certainly not too much detail. It has taken me quite a number of hours to find such a quality explanation with such detail that I am able to begin to understand this project. Since beginning with LCD displays and I2C connections, seven segment displays with this type of connection were surprisingly more complicated. Maybe this is why it has not been easy to find great tutorials on them? I don't know...🤷♂️ Either way, I am grateful for the work that you put in to help others learn. We may be very quickly approaching a world that will require this type of knowledge from us. At very least I think that having this knowledge will give a person a hand up in life.
@brunosuperman6 ай бұрын
My kit is the Super Starter Kit and it came with only 2 transistors. Your scheme is really complex. Is it the only way to connect this display?
@1996rblue7 ай бұрын
It works!!! Thank you so much!!!
@ElGarziaSiempre2 жыл бұрын
Beautiful tutorial! But if i want write a casual decimal value on the segment, what is the command for that?
@colepdx187 Жыл бұрын
I've never seen a 'char' data type that is 16 bits. In Arduino IDE the char is an 8 bit signed integer.
@MrMikeD284 жыл бұрын
Very well done video! I'd really like to convert this to a count down timer with minutes and seconds format MM.SS 99.59 to 00.00
@manuelfreitas71653 жыл бұрын
Why we need to use transistores? It's possible to do it without them? I'm using a esp32-cam and i need to wire my 4 digit 7 segment display with the 74hc595
@SpheresVA2 жыл бұрын
yeah I need mine without the processor
@abdullahanwar32704 жыл бұрын
is it possible to use the sn74hc595 with a common anode ?
@kvamsidharvamsi58005 жыл бұрын
Bro can you upload a video on how to use 2 or more single digit 7 segment display with 74hc595 shift register with Arduino ,i saw your videos all but there is no like that , your videos r great clean understand what we want to do in our projects , thanks for your hard work and we support u always
@rickmorenojr5 жыл бұрын
Great suggestion. Thanks!
@kvamsidharvamsi58005 жыл бұрын
@@rickmorenojr come on bro i want to use in my project for next month 10th can you post before that "2 or more single digit 7 segment display with 74HC595 " how to use and connect
@rickmorenojr5 жыл бұрын
Unfortunately, the Elegoo kit only includes one 7-segment display. I did order a few more and hoping they arrive soon.
@amruthanair99885 жыл бұрын
@@rickmorenojr from where do you get to know your circuits. I want to learn it myself a well
@cones9143 жыл бұрын
Before I watch this video I am going to make an assumption: The four digit display is controlled by setting certain segments from high to low and you can pick which one of the 4 digits you want to multiply.
@heidik17572 ай бұрын
What program are you using to build circuit diagrams?
@rikjanssen64407 ай бұрын
How do I connect my decimal point with with shift register? Do you have a code that then writes privileged 1.141?
@bernardo57584 жыл бұрын
So, the shift register is providing the power for the LEDs right? But in the 74HC595 datasheet, it says it's capable of providing 6mA output drive. But since you used 220 ohm resistors for limiting the current to the LEDs, that gives approx. (5-2)/220 = 14mA of current per LED. Wasn't that current supposed to fry the shift register?
@rickmorenojr4 жыл бұрын
I seem to recall that the Q0-Q7 max output current is 20ma each. I'll have to double check the datasheet. Though like many chips that are switch on and off rapidly, they can tolerate a little higher currents if need be.
@adixtrim5 жыл бұрын
very good...
@rickmorenojr5 жыл бұрын
Thanks!
@thetaylors87593 жыл бұрын
Okay I have tried to replicate the lesson from Elegoo (in which the four digits all cycle through) and have quadruple checked connections, and it goes through a very odd cycle starting with 1, 3, 5, 7, etc. Interestingly, if I move the red jumper wire from 5v (coming out of the Uno board) to the Vin pin, it works as shown above. Any idea what could be going on?
@rickmorenojr3 жыл бұрын
Greetings, first I need to confirm that you are using the same Elegoo lesson as shown in the video. Also Vin will supply unregulated power out. To get regulated 5V out, use the 5V pin. If you are using a USB cable, you're getting 5V from your computer. Your adapter may supply up to 9V. You can do a quick Google search for more information.
@muezaffar3 жыл бұрын
can you show the design of it in quartus 2 please?
@seo_bitna015 ай бұрын
how about 3 digit with keypad?
@adammiles50872 жыл бұрын
Shame in you Elegoo; you just wasted my whole day. All I wanted to do was display some numbers on the 4-panel LED, so I thought I'd start with the Elegoo demo and take it from there. Then I find it doesn't work and spend hours trying to debug it. Then I come across this video and it tells me how bad and dangerous the sample is! Now after watching this video, I see how complicated it will be so I am giving up and will just use the LCD. This video is great if you want to proceed with it; but I don't now.
@1996rblue7 ай бұрын
I kinda did it
@titoharyo68973 жыл бұрын
Do you have code colaborate with lm35??
@techsilv51703 жыл бұрын
Hi it's possible to that but with a 5digit 7segment?
@GerryChoco2 жыл бұрын
What if I have multiple display module? How can I control it ?
@aaamarco67263 жыл бұрын
buongiorno bel video, volendo fare un orologio con RTC3231, 4 display 7 segmenti, che visualizza: ore: min: sec, e che periodicamente da temp. e giorno, come faccio a leggere i dati dal RTC e a visualizzarli sui display? Grazie
@lacki99005 жыл бұрын
what do I have to write in the sketch to have a point at the 1000th place? At DisplayDigits [3] ??? you even wrote the byte DigitDP, but did not use it ...
@GaryMarkowski3 жыл бұрын
It is important to know the decimal value of the pin connections. In the original Arduino tutorial, the decimal value for the decimal point is 128. In the program here, the decimal value for the decimal point is 32. Add this value to the output value to turn on the decimal point.
@nxtlego3 жыл бұрын
The kit only comes with two transistors. What do I do?
@Jason-xl8fm3 жыл бұрын
Buy more, they aren't expensive. I saw a pack of 10 listed on adafruit for just under $2. I think he is using the Elegoo Complete Starter Kit which comes with 10 instead of 2.
@kolhatkarchinmay4 жыл бұрын
You will forget electronics and embedded systems after watching this video for sure!! Char is 16 bit...he'll yeah
@rickmorenojr4 жыл бұрын
Oh darn. To clarify, typically a char is a value from 0 to 255, which is single byte and typically represents a letter or character. A byte can be a value between -128 to 127. An unsigned byte is 0 to 255. While researching this lesson I found that a char in Java is a UTF-16 code unit. It's not necessarily a complete Unicode character, but it's effectively an unsigned 16-bit integer. I'm not sure if this still hold true.
@kolhatkarchinmay4 жыл бұрын
@@rickmorenojr Ohh I dont know about the Java man. But I think as far as u r twiking around embedded systems char is always 8 bit or 1 byte...yes ofcourse you can creat your typedef to creat your own 16 bit char😉. Great video by the way!!
@henriqueers4 жыл бұрын
Where's the pin for GND?
@kamleshajamere67844 жыл бұрын
where is the code
@rickmorenojr4 жыл бұрын
The link to the code is available in the show notes.
@2010RSHACKS4 жыл бұрын
@@rickmorenojr Can you please show how to connect the wires and components on the breadboard. I dont care how it works, I just want to use it...
@24-dinitrophenylhydrazine293 жыл бұрын
thank you sir.
@gohan32433 жыл бұрын
"char" should be "khar" since it is a character not a "tsaracter"
@kosiogboruche48893 жыл бұрын
thx
@عبداللهعبدالرحمن-غ8ذ3 жыл бұрын
Thanks for you
@CuberGamesOG2 жыл бұрын
Imagine if his name was Rick Astley
@ziggymondus87534 жыл бұрын
I don't get why you say "char array", instead of "character array" which would surely help learners absorb the concepts, as they would then recognise why 'char' is used in the code.
@rickmorenojr4 жыл бұрын
Well, Arduino's reference calls this data type a "char" www.arduino.cc/reference/en/language/variables/data-types/char/
@PercyPanleo4 жыл бұрын
@@rickmorenojr It's defined as "char" due to it being abbreviated. This is the case for (pretty much) any language that has a "char" data type.
@aaamarco67263 жыл бұрын
Ciao bel lavoro puoi fare un video per quali modifiche devo fare per adattarlo a questo? kzbin.info/www/bejne/l4PQf6CQns13btE kzbin.info/www/bejne/gYuweoaFapqgfbM grazie
@RetroGamer-zz5jn3 жыл бұрын
after watching this, theirs too much inconsistancy with ur examples and hard to follow witch diagram is correct one. i have 3 diff breadboards and none of them match ur cheap sketch up version on 12.42 time frame. the segement display doesnt leave eno room for wires to run
@SpheresVA2 жыл бұрын
He clearly lists the "junk ones" as JUNK. also, that's your problem, not his. the only cheap sketch up is yours, and yours is CLEARLY too small. get a new one and stop whining