Skip to the content
2 layers62.2 × 22.9 mmModbusRTUFeather, the printed circuit board in 3D

ModbusRTUFeather

timshac/WekaHR

WekaHR - Internet accessible Modbus RTU Slave Holding Registers - read and set registers from modbus or the internet

Size
62.2 × 22.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
12
Nets
31
Pads
56
Tracks, vias
67, 5
Pours
3
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
5 Jun 2020
Updated
23 Apr 2021

Overview

ModbusRTUFeather is an open-source printed circuit board by timshac, from the timshac/WekaHR repository on GitHub, published under the MIT licence. It is a 2-layer board of 62.2 × 22.9 mm with 12 parts on 31 nets, routed with 67 tracks and 5 vias.

It is built around the SP3485EEN. Its parts include 2 capacitors, 2 resistors, 2 ICs, 2 diodes and 2 connectors.

Main components

1

README

README.md

WekaHR modbus slave holding registers synchronised with google sheets

WekaHR

The WekaHR is a modbus slave (RS-485) with read/write registers that are synced with your google sheet. Your PLC can connect to the WekaHR modbus slave to read and write register values to report data or configure PLC operations.

Components

  • WekaHR featherwing
  • a PLC (supplied by you)
  • Particle Argon (Wifi) or Boron (cellular) IOT device
  • Google Sheet Application

Connect hardware

  1. Wire the WekaHR to your PLC. The WekaHR is powered by 5v DC. Schnieder PLCs provide 5v via the modbus port
  2. Insert the Boron or Argon into the WekaHR
  3. Connnect particle Boron or Argon to the particle cloud, and give the device a name (deviceName)

Then you are ready to flash the firmware

Flash Firmware

Clone this repository, and install the particle command line tools

text
cd WekaHR/firmware/particle_gen3
# compile and flash over WiFi or Cellular
particle flash deviceName 

# or, for usb connected particle
particle compile argon|boron --saveTo=bin
particle serial list
particle serial flash bin

Initial WekaHR module setup, for a fresh new module

Issue these commands to in the particle console (console.particle.io). The modbus baud is set in the code, currently to 19200 8N1

text
SetUnitID 10   # to set modbus slave ID (defaults to 10)
SetEventName "companyname/projectname"   # set the particle webhook event name

Save a copy of the linked google sheet

Save a copy of this WekaHR Google Sheets Template and follow the instructions in the worksheet to connect your particle to the google sheet using a webhook.

Connect particle cloud to google sheet

Follow the instructions in the google sheet to connect your particle device to the google sheeet using a particle webhook integration.

Particle API - Functions

int ManualUpdate(String args = "")

Trigger a manual JSON packet publish and JSON settings register response. Running this function ensures that application register values are set in the WekaHR.

int PublishUnitID(String args = "")

Publish the current modbus id. Defaults to 10.

int SetUnitID(String args = "number 1-247")

Set the device modbus id.

int PublishEventName(String args = "")

Publish the current event name.

int SetEventName(String args = "eventName")

Set the current event name. Suggested format is CompanyName/ProjectName, where multiple customer sites may share the same CompanyName and ProjectName.

int PublishSettingsJSON(String args)

Publish the current JSON settings saved to EEPROM.

int SetSettingsJSON(String args)

Save string args as current JSON settings to EEPROM. Use with caution.

JSON Published to Google Sheet

text
JSON:
{
  "name": "companyname/dairyshed",
  "data": "{\"v\":\"1.0\",\"func\":\"writeLog\",\"addr\":0,\"HR\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2048,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}",
  "ttl": 60,
  "published_at": "2019-10-20T01:54:46.580Z",
  "coreid": "coreid"
}

the data key, when interpreted as JSON:
{"v":"1.0","func":"writeLog","addr":0,"HR":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2048,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}

Version "v" key, "v" = "1.0", where 1.0 could be anything < 2.0. (eg 1.1,1.2, etc) The holding registers are given as an array, starting at address "addr". HR = [javascript array]. The current length of the array is 80 [registers addr + 0 to addr + 79], but could be anything from length 1-100.

The WekaHR accepts a JSON response that sets HR values. The response looks like:

text
{"40":1,"41":2,"42":3,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":12,"sheet":"https://docs.google.com/a/xxx.xxx.xxx/spreadsheets/d/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/edit","row":38}

This includes registers set and their numeric value to be set, as well as the source google sheet or application url.

Licenses

  • Hardware: CERN-OHL-P
  • Firmware: MIT
  • Documentation: MIT

Parts

12
QtyValueFootprintReferences
2Conn_01x02Connectors_Terminal_Blocks:TerminalBlock_Pheonix_PT-3.5mm_2polJ1, J2
10.1uFCapacitors_SMD:C_0603_HandSolderingC1
110uFCapacitors_SMD:C_0805_HandSolderingC2
1220Resistors_SMD:R_0603_HandSolderingR2
1330Resistors_SMD:R_0603_HandSolderingR1
1ARGONwinely_kicad:FeatherWingU1
1D_SchottkyDiodes_SMD:D_SOD-323_HandSolderingD1
1G***WEMOS_J:SHAClogo2SHAClogo2
1LEDLEDs:LED_0603_HandSolderingD2
1SP3485Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mmU2
1VAL**winely_kicad:PCB_FeatherWing_4holePCB**

Similar boards

  • 2 layers170 × 120 mmIO256, the printed circuit board in 3D

    IO256

    AnalogDragon/Taiko-256

    Taiko JVS for Namco System 256

    270 parts7
  • 2 layers70 × 76 mmControl, the printed circuit board in 3D

    Control

    Jochen0x90h/RoomControl

    Smart home room controller based on nRF52840 with MQTT and and IEEE 802.15.4 radio support. Buttons and relays for lights and roller shutters can also be connected with a local bus using LIN physical layer

    79 parts3
  • 2 layers75.5 × 72.7 mmPanel, the printed circuit board in 3D

    Panel

    timshac/RS-485-FeatherWing

    RS-485 FeatherWing for Feather style microcontrollers. Instant Mobile App possible with Particle.io ecosystem

    52 parts2
  • 4 layers90 × 95 mmWiegand bridge, the printed circuit board in 3D

    Wiegand bridge

    EdgeCoil/wiegand-bridge

    ESP32-S3 Wiegand reader bridge for Home Assistant: 4-layer board, BOM and ESPHome firmware.

    197 parts1
  • 4 layers250 × 100 mmFreEDrum, the printed circuit board in 3D

    FreEDrum

    Gemuesesaft/freEDrum

    Open source EDrum trigger module

    492 parts1GPL-3.0
  • 4 layers45 × 62 mmDeye jk can gateway, the printed circuit board in 3D

    Deye jk can gateway

    butchja/esphome-jk-bms-can-PCB

    HW platform for https://github.com/Ackmaniac/esphome-jk-bms-can

    77 parts
  • 2 layers60 × 63 mmBldc sic, the printed circuit board in 3D

    Bldc sic

    klaus-liebler/esp32-bldc-controller

    118 partsMIT
  • 6 layers69.7 × 37.4 mmRadio module, the printed circuit board in 3D

    Radio module

    tmolteno/TART-3

    The TART radio telescope, Version 3.

    112 parts1GPL-3.0

Questions

How big is the ModbusRTUFeather PCB?

It measures 62.2 × 22.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ModbusRTUFeather use?

12 parts, built around the SP3485EEN. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ModbusRTUFeather KiCad files?

From the timshac/WekaHR repository on GitHub, at the commit this page was made from: the board is hardware/MRv0.6-featherwing/kicad/ModbusRTUFeather.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the ModbusRTUFeather design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).