GERBER:

https://mega.nz/file/eRwA1Q5D#6HnrcAPaUwlRHEnMkTAI0cX6lRa_7LEuygl4qB_5niA

SCHEMATIC DIAGRAM

HERE WE WILL SEE THE SCHEMATIC DIAGRAM AND ALL THE VALUES OF THE ELECTRONIC COMPONENTS USED FOR OUR TIMER PROJECT.

74HC595

INFO

The 74HC595 register allows converting data from serial to parallel format. It is an ideal chip to expand the digital outputs of our Arduino/Pic, 3 Arduino pins can easily handle more than 500 outputs. The 74HC595 is used in the construction of LED Matrix/Cubes, Relay management and more.

The 74HC595 internally has a shift register, a latch register, and tri-state outputs. The shift and storage registers have separate clocks. It has one serial input, eight parallel type outputs (8 bit) and one serial output (Q7S) to use registers in cascade and thus further expand the number of parallel outputs.

TECHNICAL SPECIFICATIONS

Chip: 74HC595

CMOS technology

Compatible with TTL voltages

Operating Voltage: 3.3V - 5V

16 pin DIP type packaging

Offset Frequency (max): 100 MHz

BOOTLOADER ATTINY85

Ok, we have to burn a bootloader to the chi adn then uplaod the code. For both those steps we need the connections below to an Arduino. In my case I will use Arduino UNO. So, make the connections as below between the Arduino SPI port and the PCB. We will sue the Arduino as ISP to uplaod codes.

 Install ATtiny Boards

Run your Arduino IDE. We need to install the ATtiny85 boards in case that you don't already have that. To install the boards, copy the link below. Go to Ardduino IDE, to File -> Preferences -> Paste the link in the "Additional Boards Manager URLs". If you already have another link ther, add a comm "," first and then paste the new link. Save and close preferences. Now go to Tools -> Board -> Boards Manager. In this manager search for ATtiny adn install the attiny boards. Now, if you go on tool -> board, you should see the ATtiny boards as well.

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

Arduino As ISP

In order to use the Arduino as an ISP programmer, we need to uplaod a code to it so for taht, go to Examples -> ArduinoISP -> ArduinoISP and open that example code. Then make sure yous elect the type of board for your Arduino, in my case, Arduino UNO. Select the com and leave the default programmer as "AVRISP mkII". Connect the USB, select the COM and uplaod the code to the Arduino UNO.

Bootloader Burn

Ok, now the Arduino has the ISP code so it will act as a ISP programmer. Now, let's butn the bootloader. Go to Tools -> Board and selectt the ATtiny25/45/85 type of board. Then, once that is selected, go to Tools -> Processor -> And select the ATtiny85. Then go to Clock -> and select the internal 8MHz one so we will burn that bootlaoder. Go to Tools -> Programmer and make sure you now change the normal programmer from "AVRISP mkII" to "Arduino as ISP". Finally, amke sure the Arduino UNO is connected to the PCB to the ISP port and go to Tools -> Burn Bootloader. The Arduino Rx/Tx LEDs will blink and after a while you will get the bootloader burn complete on the screen.

CODE ARDUINO

int clockpin = 2; //Cuando ay que leer los bit      SH
    int data     = 1;   //Envio datos                     DS
    int latch    = 0;  //indica pin de salida en el chip ST


    // no cambiar el const int
    const int  left_sen  = 4 ;   // pin 2 como entrada para el sensor izquierdo
    const int  right_sen = 3;    // pin 3 como entrada para el sensor derecho


    //VARIABLES PARA EL CONTADOR ASCENDIENTE
    // estas variables si puede ser cambiado
    int contador             = 0;
    int contadorU            = 0;
    int contadorD            = 0;
    int contadorC            = 0;
    int contadorM            = 0;
    int estado_left_sen      = 0;      // estado  del pulsado actual
    int lastButtonState_left = 1;     // estado  del pulsado anterior


    boolean start            = false;
    boolean start1           = false;
    boolean ena_D            = false;
    boolean ena_C            = false;
    boolean ok               = false;


    unsigned long time;
...
Read more »