GEVINO Civile: Ethernet Smart Building Controller
Industrial Arduino-compatible controller with Ethernet, RS485, relays, and I/O for building automation, monitoring, and smart control applications.
About this project GEVA Elettronica(이탈리아) 가 설계·제조한 상용 PLC GEVINO Civile 의 Arduino 라이브러리입니다
프로젝트가 하는 일
GEVINO Civile은 Microchip SAMD21(ARM Cortex-M0+, 48MHz) 기반의 Arduino 호환 건물·가정 자동화 PLC입니다. Arduino Zero 호환이라 표준 Arduino IDE(및 Cursor, OpenPLC)로 개발하며, 계전급 릴레이 출력·12V 입력·RS485 버스·micro-SD와 다양한 옵션 라디오(Wi-Fi, Bluetooth, 셀룰러 모뎀, M-Bus, 이더넷)를 제공합니다.
- 릴레이 3개(250VAC/30VDC, 5A), 최대 7개(K1…K7) 로 확장
- 디지털 입력 4개(12V, In1…In4)
- RS485 반이중 + M-Bus
- 시리얼 5개: USB, Wi-Fi(ESP), 셀룰러 모뎀(SIM800), RS485, M-Bus
- 전면 micro-SD·micro-USB·LED 19개, I²C+SPI 버스
- 라이브러리는 기본값이 현재 하드웨어 v1.4(구형 v1.2는
#define for_v1_2). 리비전 간 차이는 RS485 송신 활성 핀뿐(v1.4=pin2, v1.2=A0)
COMPONENTS
| Component | Notes | Qty |
|---|---|---|
| SAMD21 (ARM Cortex-M0+, 48MHz) | Arduino Zero 호환 MCU (Flash 256KB/RAM 32KB) | x 1 |
| WIZnet W5500 (RJ45 이더넷 모듈, 옵션) | 원격 디버그·FTP 프로그래밍·통신 (SPI, ETH_CS=5) | x 1 |
| 릴레이 250VAC/30VDC 5A | 기본 3개, 최대 7개(K1…K7) | x 3~7 |
| 디지털 입력 12V | In1…In4 (A1~A4) | x 4 |
| RS485(반이중) + M-Bus | Serial1 (TxEn=pin2) | x 1 |
| micro-SD / micro-USB | 부트로더·프로그래밍/디버그 | x 1 |
| 옵션 모듈 | Wi-Fi(ESP01)·Bluetooth(HC-xx)·SIM800·RTC·OLED 128×128·220V PSU | 옵션 |
WIZnet이 들어가는 위치
사용되는 WIZnet 제품은 W5500이며, RJ45 이더넷 옵션 모듈로 제공됩니다.
- 연결: SPI, ETH_CS = Arduino pin 5 (W5500 칩셀렉트). micro-SD(SD_CS=12)와 SPI 버스를 공유하며 칩셀렉트로 구분
- 용도(README 명시): Ethernet Telnet으로 디버그, Ethernet FTP로 프로그래밍(SD 부트로더 필요), 통신. 팩토리 테스트 예제
GEVINO_Civile가 Ethernet을 포함해 자체 점검 - 라이브러리: 예제는 표준 Arduino Ethernet 라이브러리 사용
- 구성 주의: 이더넷 모듈을 장착하면 추가 릴레이는 2핀 단자로 1개만 확장 가능(모듈 미장착 시 4개까지 확장)
즉 W5500은 이 산업 PLC를 네트워크에 연결해 원격 디버그·원격 프로그래밍·통신을 담당하는 옵션이며, 하드웨어 TCP/IP·SPI·8소켓·32KB 버퍼로 안정적인 유선 연결을 제공합니다.
핀맵 (요약, Arduino SAMD 번호)
| 기능 | 핀 | 매크로 |
|---|---|---|
| 디지털 입력 In1~In4 | A1 / A2 / A3 / A4 | In1…In4 (active HIGH) |
| 릴레이 K1~K4 | 6 / 7 / 8 / 9 | setK1…resK4 |
| 릴레이 K5~K7 | 42 / 38 / A5 | setK5…resK7 (옵션) |
| W5500 ETH_CS | 5 | ETH_CS |
| micro-SD CS | 12 | SD_CS |
| RS485 TxEn | 2 (v1.4) / A0 (v1.2) | set_RS485_TxEn |
| M-Bus/모뎀 (Serial2) | TX=10 / RX=11 | Mbus_Bt_Tx/Rx |
| SIM800 리셋 | 27 | setResSim800 |
| RX/TX LED | 25 / 26 | setLedRx/Tx |
구현 메모
- 개발: Arduino IDE에서 보드 Arduino Zero (Native USB Port) 선택. 단일 헤더 라이브러리
src/gevino_civile_io.h하나만 include. - 초기화 순서 중요: 헤더가 Serial2/Serial3(SERCOM UART)와 인터럽트 핸들러를 인스턴스화하므로, 반드시 하나의 .ino에서만 include하고
Serial2.begin()/Serial3.begin()이후gevino_io_setup()호출. - 시리얼 맵: SerialUSB(USB-C 콘솔) · Serial(ESP01 Wi-Fi) · Serial1(RS485) · Serial2(M-Bus/모뎀) · Serial3(SIM800)
- 권장 스타일:
loop()에서delay()지양, switch/case 기반 비블로킹 상태머신. RS485/Modbus·M-Bus·모뎀·Ethernet·SD·OLED 레시피는AGENTS.md참고. - 핵심 라이브러리는 외부 의존성 없음(일부 예제만 SdFat·Ethernet·U8g2 사용).
유사 프로젝트
GEVINO Civile처럼 W5500으로 산업/건물 자동화 기기를 제어·연결하는 maker.wiznet.io 프로젝트 4개입니다.
- Smart Device Control using WIZnet W5500 and STM32 (Benjamin) — https://maker.wiznet.io/Benjamin/projects/smart-device-control-using-wiznet-w5500-and-stm32/ W5500+STM32로 기기를 네트워크로 원격 제어하는 예제. GEVINO Civile의 "이더넷으로 PLC 제어"와 목적이 가장 가깝습니다.
- Securing Industrial PLCs with WIZnet W5500 — Open-Source IoT Gateway (Benjamin) — https://maker.wiznet.io/Benjamin/projects/securing-industrial-plcs-with-wiznet-w5500-an-open-source-iot-gateway-solution/ PLC 데이터를 W5500 유선 이더넷으로 안전하게 올리는 산업 IoT 게이트웨이. 하드웨어 TCP/IP 오프로드·유선 안정성이 공통점입니다.
- Communication with Siemens PLC using M5Stack W5500 LAN Module (Benjamin) — https://maker.wiznet.io/Benjamin/projects/communication-with-siemens-plc-using-m5stack-w5500-lan-module-m5stacklansiemensplc/ 산업 PLC(Siemens)와 W5500 LAN 모듈로 통신·데이터 수집. PLC를 이더넷에 연결하는 성격이 GEVINO와 닮았습니다.
- How to Design a Super Simple Sensor System for Industrial Monitoring (ssekim) — https://maker.wiznet.io/ssekim/projects/how-to-design-a-super-simple-sensor-system-for-industrial-monitoring-applications/ 산업 모니터링용 센서 시스템의 W5500 이더넷 서브시스템. GEVINO의 산업 입출력+이더넷 구성과 통합니다.
| 항목 | GEVINO Civile (기준) | ① Smart Device Control | ② Industrial PLC Gateway | ③ Siemens PLC Comm | ④ Simple Sensor System |
|---|---|---|---|---|---|
| 성격 | 완성형 건물자동화 PLC | W5500 원격 제어 예제 | PLC 데이터 IoT 게이트웨이 | PLC 통신·수집 | 산업 모니터링 센서 시스템 |
| MCU | SAMD21 | STM32 | STM32/게이트웨이 | M5Stack(ESP32) | (이더넷 서브시스템 중심) |
| W5500 | 옵션(원격 디버그/FTP/통신) | 원격 제어 링크 | 유선 데이터 백홀 | LAN 통신 | 유선 데이터 인터페이스 |
| I/O | 릴레이·12V 입력·RS485 | 대상 기기 제어 | PLC 연동 | PLC 연동 | 센서 수집 |
FAQ
Q: 이 제품은 무엇인가요? A: 이탈리아 GEVA Elettronica의 Arduino 호환 건물 자동화 PLC로, 릴레이·12V 입력·RS485·micro-SD를 갖추고 다양한 옵션 통신 모듈을 지원합니다.
Q: W5500은 어떻게 쓰이나요? A: 옵션 RJ45 이더넷 모듈로, SPI(ETH_CS=5)로 연결해 원격 디버그(Telnet)·FTP 프로그래밍·통신에 사용합니다.
Q: 이더넷은 기본 탑재인가요? A: 아니요. Wi-Fi·Bluetooth·모뎀·RTC·OLED 등과 함께 선택 옵션입니다. 이더넷 모듈 장착 시 추가 릴레이 확장은 1개로 제한됩니다.
What the Project Does
GEVINO Civile is an Arduino-compatible home/building-automation PLC built around the Microchip SAMD21 (ARM Cortex-M0+, 48 MHz). Being Arduino Zero compatible, you program it with the standard Arduino IDE (also Cursor, OpenPLC), while getting mains-grade relay outputs, 12 V inputs, an RS485 bus, a micro-SD slot, and a rich set of optional radios (Wi-Fi, Bluetooth, cellular modem, M-Bus, Ethernet).
- 3 relays (250 VAC / 30 VDC, 5 A), expandable to 7 (K1…K7)
- 4 digital inputs (12 V, In1…In4)
- RS485 half-duplex + M-Bus
- 5 serial ports: USB, Wi-Fi (ESP), cellular modem (SIM800), RS485, M-Bus
- Front micro-SD · micro-USB · 19 LEDs, I²C + SPI buses
- Library defaults to current v1.4 hardware (
#define for_v1_2for the older board); the only pin that changes between revisions is the RS485 transmit-enable (pin 2 on v1.4, A0 on v1.2)
Where WIZnet Fits
The WIZnet product is the W5500, offered as an RJ45 Ethernet option module.
- Connection: SPI, ETH_CS = Arduino pin 5 (W5500 chip-select); shares the SPI bus with micro-SD (SD_CS = 12), distinguished by chip-select
- Use (per README): debug via Ethernet Telnet, programming via Ethernet FTP (needs the SD bootloader), and communication. The
GEVINO_Civilefactory-test example includes an Ethernet self-check - Library: examples use the standard Arduino Ethernet library
- Config note: with the Ethernet module fitted, only 1 extra relay can be added (via a 2-pin terminal); without it, up to 4 extra relays
So the W5500 is the option that connects this industrial PLC to a network for remote debug, remote programming, and communication, providing a stable wired link with hardware TCP/IP, SPI, 8 sockets, and a 32 KB buffer.
Pin Map (summary, Arduino SAMD numbering)
| Function | Pin | Macro |
|---|---|---|
| Digital inputs In1–In4 | A1 / A2 / A3 / A4 | In1…In4 (active HIGH) |
| Relays K1–K4 | 6 / 7 / 8 / 9 | setK1…resK4 |
| Relays K5–K7 | 42 / 38 / A5 | setK5…resK7 (optional) |
| W5500 ETH_CS | 5 | ETH_CS |
| micro-SD CS | 12 | SD_CS |
| RS485 TxEn | 2 (v1.4) / A0 (v1.2) | set_RS485_TxEn |
| M-Bus/modem (Serial2) | TX=10 / RX=11 | Mbus_Bt_Tx/Rx |
| SIM800 reset | 27 | setResSim800 |
| RX/TX LEDs | 25 / 26 | setLedRx/Tx |
Implementation Notes
- Dev: in Arduino IDE select board Arduino Zero (Native USB Port). Include the single-header library
src/gevino_civile_io.honly. - Init order matters: the header instantiates the Serial2/Serial3 SERCOM UARTs and their ISRs, so include it in exactly one .ino and call
gevino_io_setup()afterSerial2.begin()/Serial3.begin(). - Serial map: SerialUSB (USB-C console) · Serial (ESP01 Wi-Fi) · Serial1 (RS485) · Serial2 (M-Bus/modem) · Serial3 (SIM800)
- Style: avoid
delay()inloop(); use non-blocking switch/case state machines. SeeAGENTS.mdfor RS485/Modbus, M-Bus, modem, Ethernet, SD, OLED recipes. - Core library has no external dependencies (only some examples use SdFat/Ethernet/U8g2).
Similar Projects
Four maker.wiznet.io projects that, like GEVINO Civile, control/connect industrial or building-automation devices via the W5500.
- Smart Device Control using WIZnet W5500 and STM32 (Benjamin) — https://maker.wiznet.io/Benjamin/projects/smart-device-control-using-wiznet-w5500-and-stm32/ Remote device control over the network with W5500+STM32 — closest to GEVINO Civile's "control a PLC over Ethernet."
- Securing Industrial PLCs with WIZnet W5500 — Open-Source IoT Gateway (Benjamin) — https://maker.wiznet.io/Benjamin/projects/securing-industrial-plcs-with-wiznet-w5500-an-open-source-iot-gateway-solution/ An industrial IoT gateway that sends PLC data securely over W5500 wired Ethernet; shares the hardware TCP/IP off-load and wired reliability.
- Communication with Siemens PLC using M5Stack W5500 LAN Module (Benjamin) — https://maker.wiznet.io/Benjamin/projects/communication-with-siemens-plc-using-m5stack-w5500-lan-module-m5stacklansiemensplc/ Communicates with a Siemens PLC over a W5500 LAN module — connecting a PLC to Ethernet, like GEVINO.
- How to Design a Super Simple Sensor System for Industrial Monitoring (ssekim) — https://maker.wiznet.io/ssekim/projects/how-to-design-a-super-simple-sensor-system-for-industrial-monitoring-applications/ The W5500 Ethernet subsystem of an industrial-monitoring sensor system — matches GEVINO's industrial I/O + Ethernet combination.
| Item | GEVINO Civile (ref) | ① Smart Device Control | ② Industrial PLC Gateway | ③ Siemens PLC Comm | ④ Simple Sensor System |
|---|---|---|---|---|---|
| Nature | Complete building-automation PLC | W5500 remote-control example | PLC-data IoT gateway | PLC comms/collection | Industrial-monitoring sensor system |
| MCU | SAMD21 | STM32 | STM32/gateway | M5Stack (ESP32) | (Ethernet-subsystem centric) |
| W5500 | Option (remote debug/FTP/comms) | Remote-control link | Wired data backhaul | LAN communication | Wired data interface |
| I/O | Relays·12V inputs·RS485 | Controls target device | PLC integration | PLC integration | Sensor collection |
FAQ
Q: What is this product? A: An Arduino-compatible building-automation PLC by GEVA Elettronica (Italy) with relays, 12 V inputs, RS485, micro-SD, and various optional communication modules.
Q: How is the W5500 used? A: As an optional RJ45 Ethernet module, connected over SPI (ETH_CS = 5), for remote debug (Telnet), FTP programming, and communication.
Q: Is Ethernet built in? A: No — it's an option alongside Wi-Fi, Bluetooth, modem, RTC, OLED, etc. With the Ethernet module fitted, extra-relay expansion is limited to one.
