กลับไปหน้ารวมไฟล์
rims-arduino-library-e2251a-en.md
rims-arduino-library demo

This library implements RIMS controls for home brewers. For a definition of a RIMS, see What is a RIMS?.

For me, an Arduino microcontroller combined with an LCD Keypad shield was cheaper and far more customizable than a commercial PID controller. With this library, a commercial PID controller is unnecessary. It includes an automatic PID tuning toolkit. Temperature can be read with a thermistor, a resistance temperature detector (RTD), or any custom temperature probe. The heater is controlled via pulse-width modulation (PWM) of a solid-state relay (SSR).

rims-arduino-library Web Site GNU General Public License version 3.0 (GPLv3)

Technical Implementation: FSM and Logic

The project is a sophisticated exploration of software engineering and high-performance embedded systems. It uses a specialized Finite State Machine (FSM) framework to structure code for complex, multi-state projects with robust software logic.

  • Software Architecture layer: The RIMS (Recursive Implementation of State-machines) library provides a formal way to define "states" (e.g., IDLE, RUNNING, ERROR) and the "transitions" between them based on sensor inputs.
  • Timing Logic layer: Using the millis() function, the library manages time-based transitions without blocking the main execution loop.
  • Input layer: Multiple pushbutton switches act as state triggers, moving the system between various programmed behaviors.
  • Display layer: The LCD provides a clear and versatile way to show the "current state" and relevant telemetry data in real-time.

Hardware Infrastructure

  • Arduino Uno: The primary host for the RIMS library and all associated FSM logic and state-transitions.
  • LCD Keypad Shield (or similar): Provides the user interface, display, and input controls. The images below show the various interface screens.
  • Solid-State Relay (SSR): Controls the heating element via PWM.
  • Temperature Sensor: Can be a thermistor, RTD, or custom probe.
  • Hall Effect Flow Sensor: Monitors liquid flow for safety.
  • External Speaker: For audible alarms.
  • Jumper Wires & Power Supply: For connecting all components.

Features & User Interface

  • User interface made with DFRobot LCD Keypad Shield for Arduino or similar (can be customized)
  • Heater action: solid-state relay (SSR) time proportioning control (or pulse width modulation, PWM), LED duty-cycle indicator
  • Temperature sensor: RTD reading with an instrument amplifier and cubic fitting, thermistor reading with voltage divider, custom temperature probe support, measurement pre-filtering before PID
  • PID temperature regulation enhanced: derivative filter, smart integration clamping anti-windup, multiple controller (up to 4, optional) for different mash water quantities
  • Automatic PID tuning: Autotuner based on relay identification, Fourier analysis and Ziegler-Nichols methods
  • Manual PID tuning: Process model identification tools
  • Tripped breaker detection on heater: any 5V DC power-supply
  • Countdown timer that is activated only when temperature setpoint is reached
  • Data logger: simple serial communication (usb port), SPI flash memory (Winbond 1 Mbytes), USB Menu to access brew data on SPI flash memory (by holding <OK> at startup)
  • Hall effect flow sensor: turn off heater if flow is critically low,
  • Alarm with external speaker: bad flow\disconnected temperature probe errors, timer is elapsed, no voltage on heater, different frequencies for each alarms (alarm distinction)

Future Expansion

  • OLED Identity Dashboard Integration: Add a small OLED display to show a larger life bar and a real-time "State Map" diagram.
  • Multi-Sensor Bio-Security Integration Support: Connect several sensors (e.g., ultrasonic or IR) to trigger autonomous state transitions without user input.
  • Cloud Interface Registration Synchronization: Add a WiFi module (ESP8266/ESP32) and link to a cloud dashboard to precisely control and track your state data from your smartphone.
  • Advanced Velocity Profile Customization Support: Add a small slider or potentiometer to manually adjust the "Timing Thresholds" inside each state transition.

RIMS Arduino Library is a perfect project for any software enthusiast looking for a more interactive and engaging structured-coding tool!

Project Link: https://sourceforge.net/projects/rims-arduino-library/

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
  - "1x RIMS Library (Arduino)"
author: "francisgagnon9"
category: "Software & OS"
components:
  - "1x Any 5V DC power supply"
  - "1x Arduino UNO"
  - "1x Windbond W25Q80BV - 1 MByte SPI Flash"
  - "1x Any old PC speaker (or buzzer)"
  - "1x LCD Keypad Shield For Arduino"
  - "1x Hall effect flow sensor"
  - "1x Temperature probe : any PT-100 RTD"
description: "A fun and advanced Arduino library for implementing Finite State Machine (FSM) logic."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles: []
encryptedPayload: "U2FsdGVkX1+cThYWlCh6LYr5j1tfhClYOIkflnUHPUv/odfOREOgb3jFsCzDjkOiWRPNTyP82/Mmu69lhd9MN6ebsYoUqCb3OtsC3aKPRFw="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/rims-arduino-library-e2251a_cover.png"
lang: "en"
likes: 2
passwordHash: "f569e26453f5ee757fcc115754bf8ba1c6405560244f34f77e2e8112ea4e59a1"
price: 1499
seoDescription: "An advanced and playfully interactive Arduino library for beginners interested in Finite State Machine (FSM) logic."
tags:
  - "library"
  - "fsm"
  - "rims"
  - "arduino"
  - "advanced"
title: "RIMS Arduino Library"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/BcqXruYyhZ8"
views: 6797