Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
<!DOCTYPE html SYSTEM "about:legacy-compat"><html lang="en-US" data-colors-preset="contrast" data-primary-color="#307FFF"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="robots" content="noindex"> <meta name="built-on" content="2023-12-08T02:24:12.346021155"><meta name="build-number" content="${buildNumber}"> <title>Hardware design | CIMPLC-Hardwaredocs</title><script id="virtual-toc-data" type="application/json">[{"id":"io-terminal","level":0,"title":"IO Terminal","anchor":"#io-terminal"},{"id":"o-block","level":0,"title":"O Block","anchor":"#o-block"},{"id":"power-management","level":0,"title":"Power management","anchor":"#power-management"},{"id":"remote-i-o-block","level":0,"title":"Remote I/O Block","anchor":"#remote-i-o-block"},{"id":"rs232","level":0,"title":"RS232","anchor":"#rs232"},{"id":"rtc","level":0,"title":"RTC","anchor":"#rtc"},{"id":"can","level":0,"title":"CAN","anchor":"#can"},{"id":"rs485","level":0,"title":"RS485","anchor":"#rs485"},{"id":"eeprom","level":0,"title":"EEPROM","anchor":"#eeprom"},{"id":"esp32-devkitc","level":0,"title":"ESP32-DEVKITC","anchor":"#esp32-devkitc"},{"id":"i-block","level":0,"title":"I Block","anchor":"#i-block"}]</script><script id="topic-shortcuts" type="application/json"></script><link href="https://resources.jetbrains.com/writerside/apidoc/6.6.6-b205/app.css" rel="stylesheet"> <link rel="apple-touch-icon" sizes="180x180" href="https://jetbrains.com/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="https://jetbrains.com/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="https://jetbrains.com/favicon-16x16.png"><link rel="manifest" href="https://jetbrains.com/site.webmanifest"><link rel="mask-icon" href="https://jetbrains.com/safari-pinned-tab.svg" color="#000000"><meta name="msapplication-TileColor" content="#000000"/><meta name="msapplication-TileImage" content="https://resources.jetbrains.com/storage/ui/favicons/mstile-144x144.png"/><meta name="msapplication-square70x70logo" content="https://resources.jetbrains.com/storage/ui/favicons/mstile-70x70.png"/><meta name="msapplication-square150x150logo" content="https://resources.jetbrains.com/storage/ui/favicons/mstile-150x150.png"/><meta name="msapplication-wide310x150logo" content="https://resources.jetbrains.com/storage/ui/favicons/mstile-310x150.png"/><meta name="msapplication-square310x310logo" content="https://resources.jetbrains.com/storage/ui/favicons/mstile-310x310.png"/> <meta name="image" content=""><!-- Open Graph --><meta property="og:title" content="Hardware design | CIMPLC-Hardwaredocs"/><meta property="og:description" content=""/><meta property="og:image" content=""/><meta property="og:site_name" content="CIMPLC-Hardwaredocs Help"/><meta property="og:type" content="website"/><meta property="og:locale" content="en_US"/><meta property="og:url" content="jtmaston.github.io/CIMPLC-Hardware/1.0/hardware-design.html"/><!-- End Open Graph --><!-- Twitter Card --><meta name="twitter:card" content="summary_large_image"><meta name="twitter:site" content=""><meta name="twitter:title" content="Hardware design | CIMPLC-Hardwaredocs"><meta name="twitter:description" content=""><meta name="twitter:creator" content=""><meta name="twitter:image:src" content=""><!-- End Twitter Card --><!-- Schema.org WebPage --><script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebPage", "@id": "jtmaston.github.io/CIMPLC-Hardware/1.0/hardware-design.html#webpage", "url": "jtmaston.github.io/CIMPLC-Hardware/1.0/hardware-design.html", "name": "Hardware design | CIMPLC-Hardwaredocs", "description": "", "image": "", "inLanguage":"en-US" }</script><!-- End Schema.org --><!-- Schema.org WebSite --><script type="application/ld+json"> { "@type": "WebSite", "@id": "jtmaston.github.io/CIMPLC-Hardware/#website", "url": "jtmaston.github.io/CIMPLC-Hardware/", "name": "CIMPLC-Hardwaredocs Help" }</script><!-- End Schema.org --></head> <body data-id="Hardware-design" data-main-title="Hardware design" data-article-props="{"seeAlsoStyle":"links"}" data-template="article" data-breadcrumbs="Reference.md|Version 1" > <div class="wrapper"><main class="panel _main"><header class="panel__header"><div class="container"><h3>CIMPLC-Hardwaredocs 1.0 Help</h3><div class="panel-trigger"></div></div></header><section class="panel__content"><div class="container"><article class="article" data-shortcut-switcher="inactive"><h1 data-toc="Hardware-design" id="Hardware-design.md">Hardware design</h1> <p id="91758676_7337">The hardware design was done to be as modular as possible: The problem was broken down into sub-modules, each utilizing a hierarchical sheet. This way, modifications down the line can be brought without any need to perform complex operations on the schematic (and, with a little luck, also on the PCB).</p><p id="91758676_7338"><figure id="91758676_7339"><img alt="overallDiagram.png" src="CIMPLC-Hardware/overallDiagram.png" title="overallDiagram.png" width="3507" height="2480"></figure> Overall schematic</p><p id="91758676_7340">We'll analyze the structure and modules, from left to right, top to bottom, explaining goals and functionality.</p><section class="chapter"><h2 id="io-terminal" data-toc="io-terminal" >IO Terminal</h2><p id="91758676_7341">More of an aesthetic choice than anything, this block houses the individual 3 x 10 pin headers to the outside.</p></section><section class="chapter"><h2 id="o-block" data-toc="o-block" >O Block</h2><p id="91758676_7342">Short for output block, houses components necessary to generate output signals to the headers. Takes pairs of signals, low-side command signals (marked O_ACT_#), and high-side outputs (O_DAT_#). Implicit nets are power lines (+24v, +3.3v, GND). At a logic level, a TRUE signal on O_ACT_X triggers O_DAT_X to switch to high voltage. <span id="91758676_7343" ><span class="text-line-through">a FALSE signal on O_ACT_X causes O_DAT_X to be pulled to ground</span></span> (see <a href="errata.html" id="91758676_7344" data-tooltip="Output pins left undefined in logic level "False state": Due to the fast development cycle and my inexperience with electronics, an oversight was introduced, which means that pin states are not well-defined: they are either at 24v, or at ???. This is due to lack of any…" >Errata (1)</a>)</p></section><section class="chapter"><h2 id="power-management" data-toc="power-management" >Power management</h2><p id="91758676_7345">For V1, this is a placeholder block: due to me wanting to restrict the amount of variables (as well as the fact that very early designs considered using mechanical relays for switching), I decided to move power delivery off-board, via an external voltage regulator. In the current configuration, contains headers to bring +24v, +3.3V and GND, all sourced externally. (See <a href="errata.html" id="91758676_7346" data-tooltip="Output pins left undefined in logic level "False state": Due to the fast development cycle and my inexperience with electronics, an oversight was introduced, which means that pin states are not well-defined: they are either at 24v, or at ???. This is due to lack of any…" >Errata (3)</a>)</p></section><section class="chapter"><h2 id="remote-i-o-block" data-toc="remote-i-o-block" >Remote I/O Block</h2><p id="91758676_7347">This block implements the I/O controllers utilized in the project. Due do the high pin count of the PLC, it was necessary to extend the default pinout of the microcontroller. The solution adopted is to use I2C-based extenders. This block takes, as inputs, standard I2C data and clock lines (SDA, SCL), as well as address selector bits (in cases, like in the V1, where multiple extenders were used). Outputs signals from the extenders, as either logic level high or low, depending on the situation. Default behavior is, on boot, to drive all outputs low.</p></section><section class="chapter"><h2 id="rs232" data-toc="rs232" >RS232</h2><p id="91758676_7348">Houses the RS232 transceiver, as well as supporting components. Internally, RS232 (as well as 485, as we'll touch on later), are mapped to the UART pins of the ESP32, with the additional flow control signals getting dedicated pins (in V1, these hardware flow control pins go largely unused). Please also see <a href="errata.html" id="91758676_7349" data-tooltip="Output pins left undefined in logic level "False state": Due to the fast development cycle and my inexperience with electronics, an oversight was introduced, which means that pin states are not well-defined: they are either at 24v, or at ???. This is due to lack of any…" >Errata(2)</a> for how programming the ESP32 can interfere with the RS232 bus and vice-versa. Connects to the outside via DB9 connector.</p></section><section class="chapter"><h2 id="rtc" data-toc="rtc" >RTC</h2><p id="91758676_7350">This block is designed to house an RTC (real-time clock) module, with associated components (battery included), to be used in synchronizing the PLC and ensuring proper timestamping of events and time management. Connects via I2C to the controller. Please note that, for the V1, an external module is used, namely <a href="https://cleste.ro/modul-rtc-ds3231-at24c32.html" id="91758676_7351" data-external="true" rel="noopener noreferrer" >this</a>.</p></section><section class="chapter"><h2 id="can" data-toc="can" >CAN</h2><p id="91758676_7352">Houses the CAN transceiver and supporting components. Takes CAN_RX and CAN_TX data lines from the CAN controller integrated in the MCU, and outputs data via a screw terminal located on the side of the board. Please see <a href="errata.html" id="91758676_7353" data-tooltip="Output pins left undefined in logic level "False state": Due to the fast development cycle and my inexperience with electronics, an oversight was introduced, which means that pin states are not well-defined: they are either at 24v, or at ???. This is due to lack of any…" >Errata(4)</a> to the reason why this had to be disabled on V1.</p></section><section class="chapter"><h2 id="rs485" data-toc="rs485" >RS485</h2><p id="91758676_7354">Houses the RS232 transceiver, as well as supporting components. Internally, it is mapped to the UART pins of the ESP32. Connects to the outside via a DB9 connector.</p></section><section class="chapter"><h2 id="eeprom" data-toc="eeprom" >EEPROM</h2><p id="91758676_7355">Houses the eeprom, used to store program data. In order to keep the design simple, a two-wire I2C eeprom was chosen.</p></section><section class="chapter"><h2 id="esp32-devkitc" data-toc="esp32-devkitc" >ESP32-DEVKITC</h2><p id="91758676_7356">The microcontroller board. This houses the ESP32, as well as allowing for it to be removed and replaced via socketed pins.</p></section><section class="chapter"><h2 id="i-block" data-toc="i-block" >I Block</h2><p id="91758676_7357">Short for input block. This houses the pre-processing of signals, before being fed into the MCU's ADC, which handles sampling of data, conversion from discrete to logical values, and conversion from analog to digital. Somewhat reversed to the O Blocks, I_DAT_X represents the physical pin of the PLC, connecting it to the outside world, while I_ACT_X represents the pre-processed signal to be fed into the ADC.</p></section><div class="last-modified"> Last modified: 08 December 2023</div><div data-feedback-placeholder="true"></div><div class="navigation-links _bottom"> <a class="navigation-links__prev" href="specifications.html">Technical Specifications</a> <a class="navigation-links__next" href="output-block.html">Output Block</a> </div></article><div id="disqus_thread"></div></div></section></main></div> <script src="https://resources.jetbrains.com/writerside/apidoc/6.6.6-b205/app.js"></script></body></html>4a01813c8This file is pinned to the selected release. Download the original to open it in your design tool.