But which wire will be soldered to what word? Attached with this step is the sequence of the headers connection according to the program I have written. These headers will then go the female headers of the PCB. Now I took three ribbon cables having eight wires each and on one end, I soldered male headers and other end will be soldered to LEDs. After this, I soldered the resistor to the copper wire and soldered the cathode of LEDs of the same word together. Then I pushed the LEDs in the holes keeping the resistor led close to the copper wire. Then I took 4 solid copper wires and stick them between two rows of LEDs. After this, I made holes for the LEDs according to the length of the words so that they do not look dim when LEDs glow. Now I cut the template to actual size and stick it on the cardboard using some glue. I printed the template attached t this step on a white paper and two copies on a transparent sheet, as the ink is a bit light. Step 5: Make the Circuit Board.Īfter LEDs are done, I took a cardboard from an appliance packaging, 8×8 inch in size. If the date and time displayed on the monitor is correct, you know that the RTC is working fine. Now remove power from the RTC, leave it for a minute or two, connect it to Arduino once again, and open serial monitor. Without disconnecting anything, I commented the line back again and uploaded the sketch to Arduino. Then I uncommented that line and uploaded the program to Arduino. Then I opened the sketch attached in this step and set the parameters of the “setDS3231time” by referring the commented line just above it, to set the correct date and time of the RTC. I connected the RTC to Arduino like any other I2C device (SDA to A4 and SCL to A5), and applied power. If you want to test the functioning of the shift register, I have attached a sketch in this sketch along with the pictures, just apply power, connect pin 11, 12 and 14 to any digital pins of Arduino and upload the sketch. Now the current output capability of this shift register is only 20 mA per pin, and we will be needing more than that, that’s where ULN2803 comes in. If the third parameter is MSB first, then the MSB of the serial data will be sent first and will actually be reflected in the pin ‘Qh’ of the register preceding the remaining data and if the third parameter is LSB first, the LSB will be shown in the pin ‘Qh’. The first two are self-explaining, fourth one is the 8 bit serial data, written in binary format here. To execute all of this in Arduino IDE, there is a function called shift out having four parameters (see picture). When all the bits are completely sent, the latch is pulled high to actually reflect the data in the 8 output pins. The shift register determines that new data is coming by checking the status of the clock pin, if clock pin is high, the data is new. Then each of the 8 bits is sent one by one. The latch is pulled down before sending the serial data. Pin 9 is used for daisy chaining and is connected to next 74595. Pin 10 is called serial clear, and is used to clear the output of shift register, will be held high throughout the project pin 13 called output enable, as the name implies, enables the output, will be held held low. Pin 14 – aka serial input, Pin 12 – aka latch, Pin 11 – aka clock, are the control pins I talked about. Like all 74 series ICs, 8 and 16 are power pins. Pin number 1 through 7 along with pin 15 is the parallel output data. What I’m trying to say is just by using three pins, you can control lots and lots of digital devices. This shift register can also be daisy chained with another shift register to control even more LEDs, and the second one can be daisy chained with the next shift register and so on. And that is the problem because we will be working with a lot of LEDs in this project.Ī shift register consumes very less pins of the microcontroller, 3 in this specific case, and can control a large number of LEDs with it, which is 8 in this case. Even after combining them we only have 20 number of pins, out of which not all are output capable. An Uno has 14 digital I/O pins and 6 analog input pins. You might wonder why we need a shift register. We are going to use 74HC595 which is an 8 bit SIPO shift register that means it will take 8 bit serial data, and convert it into 8 bit parallel data. There are four kinds of shift register – Serial In Parallel Out (SIPO), SISO, PISO, and PIPO.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |