PLC LOGO V1 SMD
Today we will make a PLC with our ATMEGA328P-AU microcontroller and we will be able to program it in ladder language from the LDMICRO software.
Supplies
GERBER PLC:
https://mega.nz/file/vR5TlKRJ#cx-B7pfYHF7--85s9yd1aL1eBkHQp2_gpNC_62-R_0I
DATASHEET ATMEGA328P-AU:
https://mega.nz/file/TIwglT5L#nDjYniBQSYgmayw9g4qu0SmuCxX-tJIRql1tM2TINe0
SCHEMATIC DIAGRAM PDF:
https://mega.nz/file/mIA3ibpR#r5QKzchQfV_6cQgoh4r2SdS0iQB1VJmO3hZEupYfzcg
DATASHEET CH340C:
https://mega.nz/file/GZQQyKJI#snphAnj72atgmawFX9K71RO3zGDSN3tFWcn5yCEqQPQ
DATASHEET PC817:
https://mega.nz/file/PUhGlLzD#lYXN0WYL5moQUalfPf3Pi6hdbIb8x-VpfjPg0JZe7MI
SCHEMATIC DIAGRAM
Like all my projects, I share the schematic diagram so that you can do it yourself. The schematic diagram was designed in EASYEDA, a very professional and free electronic circuit design software, we can observe the electronic components that we use for this project and their respective values.
Sometimes the schematic diagram is not very noticeable as an image and that is why I share the PDF file where you can see it in great detail and very visible.
PDF:
https://mega.nz/file/mIA3ibpR#r5QKzchQfV_6cQgoh4r2SdS0iQB1VJmO3hZEupYfzcg
FUNCTIONING
Firstly, the power supply of the project is 24VDC, so we control the 24VDC coil micro relays and internally it has a fixed LM2576S regulator.
DE 5VDC for all ICs such as the microcontroller and the communication chip that use 5vdc
We have 8 digital inputs from I0 to I7 controlled at 24VDC all inputs are isolated by PC817 OPTOCOUPLERS that are optotransistors and also the same operation of the digital outputs in this case we have 4 relays.
It should be noted that this project is designed in the SIEMENS LOGO, which is a plc with 8 inputs and 4 outputs, so we have done it similarly and thus we have our own plc at LOW cost
The programming is direct to the PCB itself since we have included the communication with the integrated CH340C that will allow me to load my program from the PC to my own PCB
It should be noted that it also has an optional bluetooth communication and load the bootloader of the chip from the same card
ATMEGA328P-AU
DESCRIPTION
INFO
The ATmega328P-SMD microcontroller manufactured by ATMEL (now part of Microchip®) belongs to the AVR® family of microcontrollers with 8-bit RISC architecture, in surface package or SMD format. It is the microcontroller used in the Arduino Nano/Mini/Pro-Mini/Uno-SMD.
It has features such as: 32 KB of FLASH memory with read-while-write capability, 1 KB of EEPROM memory, 2 KB of SRAM, 23 general purpose I/O lines, 32 general process registers, three flexible timers/ counters with compare mode, internal and external interrupts, USART mode programmer, a 2-wire byte-oriented serial interface, SPI and I2C, 8-channel 10-bit A/D converter (2 more than the Arduino Uno), "watchdog programmable timer" with internal oscillator, and five software selectable energy saving modes. The device operates between 1.8 and 5.5 volts. Its architecture allows it to execute instructions in a single clock cycle, reaching a power of 1 MIPS.
NOTE: It does not come with the Arduino Bootloader pre-loaded (Optiboot), so it is necessary to program the chip once soldered on the board.
TECHNICAL SPECIFICATIONS
Chip: ATMEGA328P-AU (ATMEL AVR)
SMD Encapsulated Format: 32-VQFN
Pins: 32
FLASH memory: 32KB
RAM memory: 2KB
EEPROM memory: 1KB
Operating frequency: 20MHz max.
CPU: 8-bit AVR
I/O Pins: 23
Analog inputs (ADC 10-bit): 8
Supply voltage: 3.3V-5V DC
Input/output voltage: 5V TTL max.
PROGRAMMING LD MICRO
As we can see the programming, we can do it through the LDMICRO software that allows me to do it through the ladder language and then change it to an extension of the ARDUINO IDE to be able to program the micro and pass the program as we see there we have an example of a direct start with a START AND STOP this boot is self-locking and we see it there in the images
ELECTRONIC COMPONENTS
- 1 JACK DC
- 2 DIODES 1N5819 SMD (SL)
- 4 DIODES 1N4148W SMD (T4)
- 9 RESISTORS 5.6K 1206 SMD
- 13 DIODES LEDS 0805 RED AND GREEN SMD
- 4 CAPACITORS 100NF 100V SMD 1206
- 15 RESISTORS 1K 1206 SMD
- 3 ARRAYS 10K 1206 4 RESISTOR PACK
- 4 RESISTORS 1206 100ohm SMD
- 1 RESISTOR 10K 1206 SMD
- 12 OPTOCOPLADORES PC817
- 4 TRANSISTORS 1AM SMD NPN
- 1 CRYSTAL 16MHZ
- 1 CI CH340C
- 1 CI ATMEGA 328P-AU
- 1 BOBINA 100UH
- 2 CAPACITOR 100UF16V SMD
- 1 REGULATOR LM2576S-5V
- 1 BUTTON 4 PINS
- 4 MICRO RELAY 24VDC 4 PINS
- 1 USB CONECTOR TYPE C
- 1 USB CONECTOR TYPE D
- 1 BLOCK TERMINAL BLUE 10PINS
- 1 BLOCK TERMINAL BLUE 8 PINS
- 1 PCB
FEATURE
- VIN 24VDC
- INTERNAL VOLTAGE 5VDC
- CONTROL OUTPUT RELE 30VDC 5A
- CONTROL OUTPUT RELE 220VAC 5A
- 8 DIGITAL INPUTS
- 4 DIGITAL OUTPUTS
- IMAX 300mA
- DIRECT PROGRAMMING PC TO PCB
- PROGRAMMABLE IN LADDER LANGUAGE
- PROGRAMMABLE IN ARDUINO IDE
- EFFICIENT AND WORKS PERFECT
EASYEDA
This project was made in the Easyeda software as we can see the tracks and the 3D image of the project working perfectly are no difficulty
PCBWay
PCBWAY has 10 years in the electronics industry manufacturing professional PCBs, assembling PCBs managing to satisfy the demands of all parts of the world, in addition to meeting the highest quality and delivery time standards. PCBWAY allows the manufacture of your PCBs from 5 units.
This project was carried out thanks to PCBWAY, a company dedicated to the manufacture of prototypes and professional PCBs, in addition to offering you a ready assembly service with all the components in your PCBS, complying with the established quality and delivery time standards.
We thank PCBWAY, a leading company for manufacturing and assembling professional PCBs with the highest quality, PCBWAY has fair reasonable prices, punctual shipping time and 24-hour customer service, it also offers you the option of quoting all its services in his web page. Do not think twice and start manufacturing your professional PCBs from 5 units safely.
10pcbs at $5 order them here www.pcbway.com
We thank PCBWAY for the professional pcb they provide us for this project.
GERBER PCB:
https://mega.nz/file/vR5TlKRJ#cx-B7pfYHF7--85s9yd1aL1eBkHQp2_gpNC_62-R_0I