Hasta el momento ya hemos realizado varias versiones de PLC con los microcontroladores de ATMEL y. Viendo los comentarios muchos ingenieros me recomendaban realizar un PLC pero con los microcontroladores de ESP32. Efectivamente hoy veremos como realizar un PLC con ESP32, para esta primera versión contaremos con 8 entradas digitales de 24V y 8 salidas a reles. En principio los dispositivos ESP32 tienen un bajo costo y consumo de energía, y lo que le hace más interesante es que tiene la tecnología de WIFI y BLUETOOTH incorporado, por si fuera poco este dispositivo cuenta con dos núcleos.
En conclusión, este dispositivo trae incluido un microcontrolador con pines de I/O digitales y análogas, wifi, bluetooth, doble núcleo. Es decir, con este dispositivo podemos realizar 2 instrucciones de manera simultanea.
DATOS TÉCNICOS
- Tensión de alimentación……………………….…………24VDC
- Corriente de alimentación………………….……………90mA
- Entadas digitales 15-24VDC……………………….……8
- Salidas RLY…………………………………………………………8
-
- Tensión AC…………..……….………………….….……250V
- Corriente AC…………………………………………….5A
- Tensión DC………………………………………………30V
- Corriente DC……………………………………………5A
-
- Entorno de programación………………………..………..Arduino IDE
- Condiciones ambientales min……………………….….-40°
- Condiciones ambientales max…………………..……….150°
- Dimensiones……………………………………………………….106x91mm
- Empotrable………………………………….……………………Sí
- Wifi……………………………………………………………………………….Sí
- Bluetooth……………………………………………………………………..Sí
- doble nucleo………………………………………………………………..Sí
- Programación directa (PC-PLC with ESP32)…………Sí
LISTA DE COMPONETES
Categoría | Cantidad | Referencias | Valor | PCB Package | Código almacén |
Condensadores | 26 | C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12, C13,C14,C15,C16,C17,C23,C24,C25,C27, C28,C29,C30,C31,C32 |
100nF | 0603_CAP | (see &buy) |
Condensadores | 3 | C18,C19,C20 | 10uF | 1206_CAP | (see &buy) |
Condensadores | 1 | C21 | 470uF | CAP SMD 10.5X10MM ALUMINUM 470UF/35V | (see &buy) |
Condensadores | 1 | C22 | 220uF | CAP SMD 6.3X7.7MM ALUMINUM 220UF/16V | (see &buy) |
Condensadores | 1 | C26 | 220uF | CAP SMD 6.3X7.7MM ALUMINUM 220UF/16V | (see &buy) |
Resistencias | 31 | R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,R12, R13,R14,R15,R16,R34,R37,R40,R43,R46, R49,R52,R55,R58,R59,R61,R62,R65,R66,R76 |
10k | 0603_RES | (see &buy) |
Resistencias | 8 | R17,R18,R19,R20,R21,R22,R23,R24 | 20k | 1206_RES | (see &buy) |
Resistencias | 8 | R25,R26,R27,R28,R29,R30,R31,R32 | 680 | 0603_RES | (see &buy) |
Resistencias | 21 | R33,R36,R39,R42,R45,R48,R51,R54,R57,R60, R64,R67,R68,R69,R70,R71,R72,R73,R77,R79,R81 |
1k | 0603_RES | (see &buy) |
Resistencias | 8 | R35,R38,R41,R44,R47,R50,R53,R56 | 4.7k | 0603_RES | (see &buy) |
Resistencias | 3 | R63,R74,R75 | 10k | 0805_RES | (see &buy) |
Resistencias | 2 | R78,R80 | 536 | 0603_RES | (see &buy) |
Integrados | 2 | U1,U7 | 74HC14 | TSSOP14 | (see &buy) |
Integrados | 2 | U2,U8 | 74HC541 | TSSOP20 | (see &buy) |
Integrados | 4 | U3,U4,U5,U6 | ILD207T | SO8 | (see &buy) |
Integrados | 2 | U9,U16 | TLP127 | SOIC250P670X300-4 | (see &buy) |
Integrados | 1 | U10 | ESP-32s | ESP-32S | (see &buy) |
Integrados | 1 | U11 | LM2576-3,3 | TO170P1410X464-6 | (see &buy) |
Integrados | 1 | U12 | 7812 | DPAK-N | (see &buy) |
Integrados | 1 | U13 | LD1117S33 | SOT230P700X180-4 | (see &buy) |
Integrados | 1 | U14 | CH340CE | SO16 | (see &buy) |
Integrados | 2 | U15,U17 | LM358N | SO8 | (see &buy) |
Transistores | 13 | Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10,Q11,Q12,Q13 | PMBT3904,215 | SOT23-3 | (see &buy) |
Transistores | 1 | Q14 | FQD11P06TM | DPAK-N | (see &buy) |
Diodos | 8 | D1,D2,D3,D4,D5,D6,D7,D8 | LED-GREEN | LEDC1608X60 | (see &buy) |
Diodos | 1 | D9 | SS14-TP | DIOM5226X230N | (see &buy) |
Diodos | 8 | D10,D12,D14,D16,D18,D20,D22,D24 | RR1VWM6STFTR | SOD2614X116 | (see &buy) |
Diodos | 11 | D11,D13,D15,D17,D19,D21,D23,D25,D30,D31,D32 | LED-RED | LEDC2012X120 | (see &buy) |
Diodos | 2 | D26,D27 | MMSZ3V6CW | SOD123 | (see &buy) |
Diodos | 1 | D28 | SS14-TP | DIOM5226X230N | (see &buy) |
Diodos | 1 | D29 | B330A-13-F | DIOM5226X230N | (see &buy) |
Miscelánea | 2 | BTN1,BTN2 | RST | BUTTON SMD 2P | (see &buy) |
Miscelánea | 1 | F1 | 1A | FUSE SMD | (see &buy) |
Miscelánea | 1 | J1 | KFM736-5_0-5P | KFM736-5.0-5P P=5.0MM | (see &buy) |
Miscelánea | 4 | J2,J5,J6,J8 | TBLOCK-M2 | T-BLOCK 2PIN BLUE | (see &buy) |
Miscelánea | 3 | J3,J4,J7 | TBLOCK-M3 | T-BLOCK 3PIN BLUE | (see &buy) |
Miscelánea | 1 | J9 | MICRO USB B | MICRO USB B | (see &buy) |
Miscelánea | 1 | J10 | CONN-H4 | CONN-SIL4 | (see &buy) |
Miscelánea | 1 | L1 | 100u | SMD 12.5X12.5X5MM | (see &buy) |
Miscelánea | 8 | RL1,RL2,RL3,RL4,RL5,RL6,RL7,RL8 | HF49FD/012-1H12G | RELAY24VPLC V1 | (see &buy) |
CODIGOS DE PRUEBA C++ (Arduino)
TEST INPUTS AND OUTPUTS
const int act_in = 12; //to enable the inputs const int act_out = 23;//to enable the outputs // inputs const int in1 = 14; const int in2 = 27; const int in3 = 26; const int in4 = 25; const int in5 = 33; const int in6 = 32; const int in7 = 35; const int in8 = 34; // outputs const int ot1 = 15; const int ot2 = 2; const int ot3 = 4; const int ot4 = 5; const int ot5 = 18; const int ot6 = 19; const int ot7 = 21; const int ot8 = 22; void setup() { pinMode(in1, INPUT); pinMode(in2, INPUT); pinMode(in3, INPUT); pinMode(in4, INPUT); pinMode(in5, INPUT); pinMode(in6, INPUT); pinMode(in7, INPUT); pinMode(in8, INPUT); pinMode(ot1, OUTPUT); pinMode(ot2, OUTPUT); pinMode(ot3, OUTPUT); pinMode(ot4, OUTPUT); pinMode(ot5, OUTPUT); pinMode(ot6, OUTPUT); pinMode(ot7, OUTPUT); pinMode(ot8, OUTPUT); pinMode(act_in, OUTPUT); pinMode(act_out, OUTPUT); digitalWrite(act_in, 1); // with 1 enable. with 0 disable inputs digitalWrite(act_out, 1);// with 1 enable. with 0 disable outputs } void loop() { // simple test inputs and outputs if (digitalRead(in1))digitalWrite(ot1, 1); else digitalWrite(ot1, 0); if (digitalRead(in2))digitalWrite(ot2, 1); else digitalWrite(ot2, 0); if (digitalRead(in3))digitalWrite(ot3, 1); else digitalWrite(ot3, 0); if (digitalRead(in4))digitalWrite(ot4, 1); else digitalWrite(ot4, 0); if (digitalRead(in5))digitalWrite(ot5, 1); else digitalWrite(ot5, 0); if (digitalRead(in6))digitalWrite(ot6, 1); else digitalWrite(ot6, 0); if (digitalRead(in7))digitalWrite(ot7, 1); else digitalWrite(ot7, 0); if (digitalRead(in8))digitalWrite(ot8, 1); else digitalWrite(ot8, 0); }
9 comentarios. Dejar nuevo
Me gustaría saber cómo hacer un pedido montado en el sitio de PCB.
HOLA, excelente trabajo, disculpa soy nuevo en esto vi lo que haces y me parece fascinante me pregunto que podría hacer con esta targeta q muestras en tu video (plc), quiero aprender de esto. ¿se puede uno mandar a imprimir la placa?
Me parece muy interesante este proyecto, lo podrías hacer con 12 o 14 salidas a rele y 3 entradas de pulsos en 110vac? Dejo mi correo por si quieres comunicarte: [email protected]
Buenisimo…
Faltarían unas entradas analógicas y sería perfecto
Hi dear, is there a way to buy from you assembled? Tnks
Hello, sorry, it just is a demo version
Me gustaría saber cómo hacer un pedido montado en el sitio de PCB, gracias por el trabajo que haces, un saludo
Podrías mostrar la conexión del esp32 para pode hacer que funcione porfas.