bomonike

iiot4.png This is at https://bomonike.github.io/iiot4 from code at private repo https://github.com/bomonike/bomonike.github.io/blob/master/iiot4.md

MCU (Microprocessor Unit)

“MCU” here has nothing to do with the Marvel Cinematic Universe.

This article contains technical notes on HOW to construct and make use of Micro Computer Units (Arduino, Raspberry Pi, micro:bit, ESP32, Intel NUC, Zima, etc.).

They are cheap (around $30-200 each) and thus purchased by schools and hobbyists.

Unlike desktop computers one can purchase from Costco costing $1,000 or more, the MCUs by definition do not have a large motherboard with components that can be taken out and replaced.

MCUs are cheap because their components are all on “System on a Chip” (SOC).

References

https://www.rapidtables.com/electric/electrical_symbols.html

git@github.com:bomonike/IIOT-4.0-Project.git https://github.com/CCC-Industry4/IIOT-4.0-Project by https://www.linkedin.com/in/matthew-graff-1029a1159/

TODO: article on LinkedIn Medium, and Substack.

ESP32PLUS is a universal WIFI plus Bluetooth development board based on ESP32, integrated with ESP32-WOROOM-32 module and compatible with Arduino. It has a hall sensor, high-speed SDIO/SPI, UART, I2S as well as I2C. It runs the freeRTOS operating system.

Assembly Strategies

How can a class of 10 people be all kept busy to assemble each kit?

“Choose one student to read aloud the instructions” while others listen with nothing else to do increases the chance of error and lack of full participation.

Here is my plan:

  1. Procure parts (6 AA batteries)
  2. Define teams that operate at the same time:

    A. QA Team anticipates delays
    B. Computer Team
    C. Parts Team assembles parts into sub-assembly bags
    D. Base Team assembles all the sub-assemblies together
    E. Floor Teams assembles each sub-assembly

  3. Have each participant wash their hands.
  4. Clarify roles and interdependencies.
  5. Practice assembly workflow by holding practice rounds using a picture of each part with its name.
  6. Computer setup
  7. QA Test signals
  8. Connection to Ignition server for virtualization

Sub-Assemblies


Workflow Dependencies

Preparations:

  1. Obtain assembly bags.
  2. QA Team prepares two sets of labels: on the tray and on each part.
  3. Board team defines where each board would be placed and assembled.
  4. Parts team assembles the nuts and bolts for each assembly in separate bags.
  5. Practice workflow using

Game day:

  1. Parts team places parts into bins with designated locations.
  2. Base team receives boards and places them on their map.
  3. QA Team and Parts Team switch tables (so parts don’t move).
  4. QA Team labels each item.

QA team:

  1. Track external shipping and receipt of the kits.
  2. To practice assembly workflow without risk of damaging real parts, create a card to represent each item during practice.

  3. Designate a table and chairs for each team.
  4. Make a list of who is at each team table.
  5. Take a picture of them holding, under their chin, a card with their name.

  6. Preparation: Organize items. This is a strategy from the “S5” lean approach to enable visibility for fast and error-free selection of items.

    • ($2 from Walmart) plastic trays used to hold cutlery in kitchen drawers. The plastic is not conductive.
    • Get a box fishermen use to hold lures to hold small screws.
    • Static management
  7. Create sticky lables for each part.
  8. Make sure parts are kept in
  9. Inspect finished items.

Computer team:

  1. Download the https://docs.keyestudio.com/projects/KS5009/en/latest/docs/index.html

  2. Print out the Kit List in 3-hole punched paper. PROTIP: The PDF view has misshapen Parts List pages, so print pages 2-7 in the website view.

    https://docs.keyestudio.com/projects/KS5009/en/latest/docs/index.html#kit-list

  3. Print out the instruction book (126 pages) in 3-hole punched paper and place it a notebook with tabs.

On Windows/Mac:

  1. Install Arduino IDE from https://www.arduino.cc/

    On the Mac:

    brew info arduino
    ==> arduino: 1.8.19
    https://www.arduino.cc/
    Deprecated because it is discontinued upstream! it will be disabled on 2024-12-17.
    Not installed
    From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/a/arduino.rb
    ==> Name
    Arduino
    ==> Description
    Electronics prototyping platform
    ==> Artifacts
    Arduino.app (App)
    /Users/johndoe/Applications/Arduino.app/Contents/Java/arduino-builder (Binary)
    ==> Analytics
    insta
    
  2. Install drivers
  3. Configure Arduino IDE settings

  4. Install MicroPython interpreterThonny (password necessary)

    brew info thonny ==> thonny: 4.1.6
    
  5. Drag the icon to the sidebar. Open Thonny.

    VIDEO: Thonny | Great Python IDE for beginners

  6. Click on lower-right “Configure”. Select ESP32.
  7. Right click to open in new tab: https://micropython.org/download/ESP32_GENERIC/
  8. Select v.1.17 according to the Keystudio docs, which is NOT the “(latest)”. Click “.bin” to download version at

    v1.23.0 (2024-06-02) .bin / [.app-bin] / [.elf] / [.map] / [Release notes] (latest)

  9. Clicking “here” of “Program your board using the esptool.py program, found here.” takes you to:

    https://github.com/espressif/esptool

    Its README says it’s “A Python-based, open-source, platform-independent utility to communicate with the ROM bootloader in Espressif chips.”

  10. “Burn microPython firmware” means

    If you are putting MicroPython on your board for the first time then you should first erase the entire flash using:

    esptool.py –chip esp32 –port /dev/ttyUSB0 erase_flash

    From then on program the firmware starting at address 0x1000:

    esptool.py –chip esp32 –port /dev/ttyUSB0 –baud 460800 write_flash -z 0x1000 esp32-20190125-v1.10.bin

  11. Use esptool.py to install ESP32 WROOM firmware from https://micropython.org/download/ESP32_GENERIC/

  12. Install libraries: ESP32_AnalogWrite-0.1.0.zip 2018-10-28 4.20 KiB from

    https://www.arduinolibraries.info/libraries/esp32-analog-write

    It provides an analogWrite polyfill for the ESP32 Arduino framework by wrapping the LEDC library. It generates PWM (Pulse Width Modulation) signals on ESP32 pins using a familiar Arduino-style analogWrite syntax.

    https://github.com/erropix/ESP32_AnalogWrite/tree/master

  13. “Connect the smart home to your computer with a USB.”

Arduino projects:

https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/KS5009-Python.html#python-projects

On Raspberry Pi or Zima Linux machine:

  1. Install Ignition to
  2. MQTT??

Parts team:

  1. Takes possession and safekeeping of inventory.
  2. Take each item from the big box and gently lay them into the tray.

    PROTIP: Keep items in individual bags to decrease dirt and static electricity damage.

    Put excess bags in the delivery box.

  3. Give wood pieces to the Base Team.
  4. Inspect each piece for damage.
  5. Take inventory to ensure that all items in the parts were received.

  6. After use: return parts to holders.

Base team:

  1. Create a printed mat where each board is placed (on the “factory floor”). This would involve taping sevaral sheets together or, if available, printing a large format “blueprint” paper.

    The floor plan may change over time with experience.

  2. Place each board received on the designated spot on the printed mat.
  3. As each panel is received, pop-out items from each board (A, E, F, H, L, M)
  4. As each sub-assmbly parts bag is received, put on top of its associated board.

  5. Report status to dashboard.

  6. After use: disassemble and return parts.

KIT Ingredients

start.sh installs

https://docs.vultr.com/install-mosquitto-mqtt-broker-on-ubuntu-20-04-server disable anonymous connections

sudo npm install -g –unsafe-perm node-red

Security

https://www.nexcom.com/news/Detail/industry-4-0-and-beyond-a-focus-on-exceptional-ot-network-security

Training

Lorain County Community College in Ohio. https://www.lorainccc.edu/engineering/industry-4-0-teacher-training/ uses Canvas LMS to present their “Industry 4.0 Teacher Training Info Session” October 3rd, 2024 11:00AM and October 17, 2024 3:30PM

## 4.0 Solutions by Walker Reynolds

Looker studio

https://www.hivemq.com/resources/smart-manufacturing-using-isa95-mqtt-sparkplug-and-uns/First expounded in the book, Future Perfect by Stanley M. Davis in 1989, the concept of integrating an entire organisation’s value chain to the point of achieving lot size one manufacturing capabilities at costs similar to those of mass-produced products was put forward as being the holy grail of most manufacturing enterprises.

Node-RED exposes the interactions

IEC 62264/ISA95 standard in the year 2000

an MQTT Broker can be used as a centralised server for coordinating the exchange of ISA95 models implemented using Sparkplug, in a Unified Namespace architecture. ISA 95 does not impose a pyramidal network-and-system architectural approach for its implementation, as it is purely a functional modeling standard, not an inter-networking one.

* https://www.hivemq.com/mqtt/mqtt-sparkplug-essentials
* https://www.hivemq.com/mqtt/unified-namespace-uns-essentials-iiot-industry-40
* https://www.hivemq.com/solutions/manufacturing
* https://www.hivemq.com/blog/foundations-of-unified-namespace-architecture-iiot

instructions on building Smart home: https://docs.keyestudio.com/projects/KS5009/en/latest/docs/index.html

For downloading libraries and sample codes: https://github.com/keyestudio/KS5009-Keyestudio-Smart-Home-Kit-for-ESP32

House Pins Connections:

Cheatsheets

https://github.com/marcelpetrick/cheatsheets/blob/master/esp32.md

Rust on

https://github.com/esp-rs/awesome-esp-rust

https://github.com/rust-embedded/awesome-embedded-rust This is a curated list of resources related to embedded and low-level programming in the Rust programming language, including a selection of useful crates.

MQTT

https://github.com/kevinkk525/micropython-mqtt