Arduino Shield expansion board

Arduino Shield expansion board design documentation

Home / Technical Documentation / Arduino Shield expansion board design documentation

Hardware Version: 1.2 · Compatible Boards: Arduino Uno, Mega, Leonardo · License: CC BY-SA 4.0

https://github.com/felis/USB_Host_Shield_2.0/raw/master/images/shield.jpg
If you encounter a page that cannot be opened, please read this article

Overview

This professional-grade Arduino shield integrates relay control, multi-protocol sensor interfacing, and robust power management into a single stackable module. Designed for industrial automation, building management systems, and IoT applications, it provides galvanic isolation between control logic and high-power circuits while offering comprehensive protection features. The shield implements three core subsystems through carefully designed electronic circuits that ensure reliability in electrically noisy environments.

Key Features

  • 4x Isolated Relays
    SPDT relays rated for 10A/250VAC switching with optocoupler isolation (5kV RMS) between Arduino GPIOs and high-voltage circuits. Each relay features MOSFET drivers with back-EMF suppression.
  • Multi-Protocol Sensor Interface
    8x analog inputs (0-5V range with anti-aliasing filters), 4x digital I/O (3.3V/5V tolerant), plus dedicated I²C and SPI bus connectors with appropriate pull-up resistors.
  • Intelligent Power Management
    Dual input capability (6-24V DC via barrel jack or terminal block) feeding a high-efficiency buck converter (5V@2A) and LDO regulator (3.3V@500mA) with reverse polarity protection and overcurrent safeguards.
  • Safety-Certified Design
    Compliant with EN 61010-1 (Overvoltage Category II) with proper creepage/clearance distances, thermal derating provisions, and transient voltage suppression.

Hardware Implementation Details

Relay Control Subsystem

The relay module uses a cascaded protection approach:

  1. Signal Isolation – PC817 optocouplers create a 5kV isolation barrier between Arduino GPIOs (D4-D7) and power circuits
  2. MOSFET Drivers – IRF520 N-channel MOSFETs provide sufficient current (≥500mA) to energize relay coils
  3. Back-EMF Protection – 1N4007 flyback diodes clamp voltage spikes during coil de-energization
  4. Contact Protection – RC snubber networks (0.1µF + 47Ω) across relay contacts suppress arcing

Relays are positioned ≥10mm from sensitive components, with 40mil power traces to minimize voltage drop during high-current switching.

// Relay Control Example with Safety Interlock
#define PUMP_RELAY 4
#define SAFETY_INTERRUPT 2

void setup() {
  pinMode(PUMP_RELAY, OUTPUT);
  attachInterrupt(digitalPinToInterrupt(SAFETY_INTERRUPT), emergencyShutdown, FALLING);
}

void loop() {
  // Normal pump cycling
  digitalWrite(PUMP_RELAY, HIGH);
  delay(300000); // 5 minutes ON
  digitalWrite(PUMP_RELAY, LOW);
  delay(600000); // 10 minutes OFF
}

void emergencyShutdown() {
  digitalWrite(PUMP_RELAY, LOW); // Immediate power cutoff
  while(1); // Locked state until reset
}

Sensor Interface Architecture

The sensor subsystem implements a three-stage conditioning approach:

  1. Input Protection
    • 5.1V Zener diodes clamp overvoltage events
    • 1kΩ series resistors limit fault currents
    • TVS diodes suppress ESD transients
  2. Signal Conditioning
    • 2nd order anti-aliasing filters (1kΩ + 100nF) with 160Hz cutoff
    • Configurable voltage dividers for high-voltage sensors (jumper-selectable)
  3. Interface Flexibility
    • Digital I/O: Schmitt trigger inputs for noise immunity
    • I²C: 4.7kΩ pull-ups compatible with 3.3V/5V devices
    • SPI: Buffered signals with separate ground plane

Power Management System

The power architecture employs a multi-stage regulation strategy:

  1. Input Protection Stage
    • SS34 Schottky diode prevents reverse-polarity damage
    • P6KE15A TVS diode absorbs voltage transients
    • Resettable polyfuse (2.5A hold current) limits fault currents
  2. DC-DC Conversion
    • Primary regulation: LM2678 buck converter (92% efficiency at 12V input)
    • Secondary regulation: AMS1117 LDO provides clean 3.3V rail
    • Power path selection: Jumper chooses between USB or external supply
  3. Output Distribution
    • Dedicated sensor power headers with separate ground planes
    • Bulk capacitance (470µF) sustains voltage during relay engagement
    • Star grounding topology minimizes noise coupling

Technical Specifications

Relay Performance

ParameterValueNotes
Contact ConfigurationSPDT (Form C)Break-before-make operation
Max Switching10A @ 250VAC, 10A @ 30VDCResistive loads
Coil Power70mA @ 5V per relayTotal 280mA for all four
Mechanical Life10⁷ operationsNo-load condition
Electrical Life10⁵ operationsAt rated load

Power System Characteristics

OutputRegulatorRippleMax CurrentProtectionEfficiency
5VLM2678≤50mV2A continuousOCP, OTP, UVLO92%@12V
3.3VAMS1117≤10mV500mAThermal shutdown85%@5V in

Safety Implementation

The shield incorporates multiple protection layers:

  1. Galvanic Isolation
    • 5kV optoisolators separate control and power domains
    • 3mm creepage distance between high/low voltage sections
  2. Thermal Management
    • Thermal relief vias under buck converter IC
    • 80% derating rule for relay current capacity
  3. Fault Containment
    • Guard rings around high-voltage traces
    • Solder jumpers for critical safety functions

Critical Safety Notice:

When switching inductive loads (motors, solenoids), always use external snubber circuits. The onboard RC networks are only suitable for resistive loads under 5A. Never exceed 8A continuous current through relays.

Application Examples

Industrial Motor Control System

Industrial Motor Control System
graph TB
  A[Arduino UNO] --> B[Relay Shield]
  B --> C[3-Phase Motor Starter]
  B --> D[PT100 Temperature Sensor]
  B --> E[4-20mA Pressure Transmitter]
  D -->|Analog A0| B
  E -->|I²C| B
  C -->|Relay1-3| B
  B --> F[24V DC Power Supply]

Implementation Notes:

  • Use interlocking logic to prevent simultaneous relay engagement
  • Implement sensor calibration via EEPROM-stored coefficients
  • Add MODBUS communication for PLC integration

Smart Greenhouse Controller

#include <Wire.h>
#include <Adafruit_Sensor.h>

void readEnvironmentalSensors() {
  // I²C temperature/humidity
  sensors_event_t temp, humidity;
  dht.temperature().getEvent(&temp);
  dht.humidity().getEvent(&humidity);
  
  // Analog soil moisture
  int moistureRaw = analogRead(SOIL_SENSOR);
  float moisture = map(moistureRaw, 0, 1023, 0, 100);
  
  // Control logic
  if (humidity.relative_humidity < 60 || moisture < 40) {
    digitalWrite(IRRIGATION_RELAY, HIGH);
    delay(300000); // 5 minutes watering
    digitalWrite(IRRIGATION_RELAY, LOW);
  }
}

Frequently Asked Questions

Can I stack multiple shields on one Arduino?

Yes, but power sharing requires careful planning. Disable unused relays via software (digitalWrite(RELAY_PIN, LOW)) and provide supplemental cooling. Maximum two shields with external 2A power supply.

How to interface 4-20mA industrial sensors?

Use a 250Ω precision resistor across the analog input to convert to 1-5V range. For best results:
Select 24V power mode via JP2
Connect sensor+ to 24V_OUT
Connect sensor- to 250Ω resistor
Connect resistor junction to analog input

Why does my relay chatter during operation?

This indicates insufficient coil power. Solutions:
Add 470µF capacitor across 5V relay supply
Verify power source provides ≥1A current
Check for voltage drops across connectors
Enable the RELAY_HOLD mode in software (reduces coil current by 30%)

Support & Contribution

Bug Reports: Jinxinyang
Hardware Support: [email protected] (include schematic snippet)
Contributions: See CONTRIBUTING.md for design guidelines

Blog Recommendation

Secret Link