PLC-01 Studiobabazadeh.dev › PLC_1 [PLC-01] › Program blocks › Main [OB1]Online
CPU clock2007-08-01 00:00:00×640 d/s
Cycle—1 scans
RUN/STOPERRORMAINT
Main [OB1] · PropertiesProgram cycle · optimized block access

Block title

Moe Babazadeh

CTO at Neuroject · building since 2007

Comment

I architect AI-driven platforms and scalable digital products. CTO at Neuroject, building the alignment layer for construction enterprises. Building since 2007: robots, IoT and firmware, then web, mobile and AI platforms.

Moe Babazadeh
Author
Mohammad Babazadeh
Family
CTO, Neuroject
Language
LAD
Created
2007
commits since 2021
11.8k+
products live
10+
devices in production
5
sensor records logged
0.5B+
apps on App Store and Google Play
2
weekly downloads of packages I patched
300k+

PLC_1 › Program blocks › Main [OB1]

Monitoring

power flow no flow · Click any contact on an %I address to change it. Long rungs scroll sideways.

  1. Network 1:

    Start, stop, seal in

    Three-wire control. FirstScan latches Run when the CPU starts up. Stop is a normally-closed button read through a normally-open contact, so a broken wire stops the program too.

    %I0.0"Start"%M1.0"FirstScan"%M10.0"Run"%I0.1"Stop"%M10.0"Run"
  2. Network 2:

    Replay

    Hold Replay to set the CPU clock back to August 2007, when the first freelance job started. The role timers and the year counter reset on the same input.

    %I0.2"Replay"WR_LOC_TDTLENLOCTIMEDTL#2007-08-01-00:00:00DSTFALSEENORET_VAL"Clock".Ret
  3. Network 3:

    CPU clock

    Reads the clock into "Clock".Now. In this simulation it runs about 640 days a second until it reaches October 2026, then in real time.

    RD_LOC_TDTLENENORET_VAL"Clock".RetOUT"Clock".Now"Clock".Now>=DTLDTL#2026-10-01-00:00:00%M10.1"Now"
  4. Network 4:

    Stack light

    Red when stopped, amber while the clock catches up with today, green once it has. The normally-closed contacts pass power while their bit is FALSE.

    %M10.0"Run"%Q1.0"LampRed"%M10.0"Run"%M10.1"Now"%Q1.1"LampAmber"%M10.0"Run"%M10.1"Now"%Q1.2"LampGreen"
  5. Network 5:

    Years building

    CTU counts rising edges, so every January counts once.

    "Clock".Now.MONTH==USInt1%DB2"C_Years"CTUIntCUR"Replay"PV19QCV
  6. Network 6:

    Freelance · Web Developer

    2007 – 2012

    Websites and web apps for clients in PHP, JavaScript and jQuery.

    One retentive timer per role. TONR keeps its elapsed time when the role ends, and it counts in LTIME because a 32-bit TIME stops at T#24D_20H_31M_23S_647MS.

    %M10.0"Run""Clock".Now>=DTLDTL#2007-08-01-00:00:00"Clock".Now<=DTLDTL#2012-10-01-00:00:00%DB3"T_Freelance"TONRLTimeINR"Replay"PTLT#1888DQET
  7. Network 7:

    Niknam Electronic Rayan · Software → Senior Software Engineer

    2012 – 2020

    IoT platforms, live GPS tracking and connected devices.

    %M10.0"Run""Clock".Now>=DTLDTL#2012-10-01-00:00:00"Clock".Now<=DTLDTL#2020-08-01-00:00:00%DB4"T_Niknam"TONRLTimeINR"Replay"PTLT#2861DQET
  8. Network 8:

    Alget.nl · Senior Frontend Developer

    2020 – 2021

    A React marketplace that took local grocers online.

    %M10.0"Run""Clock".Now>=DTLDTL#2020-08-01-00:00:00"Clock".Now<=DTLDTL#2021-02-01-00:00:00%DB5"T_Alget"TONRLTimeINR"Replay"PTLT#184DQET
  9. Network 9:

    0&1 · Lead Frontend Developer

    2021 – 2024

    Active-Class LMS and proctoring, Attendum firmware and apps on both stores.

    %M10.0"Run""Clock".Now>=DTLDTL#2021-02-01-00:00:00"Clock".Now<=DTLDTL#2024-06-01-00:00:00%DB6"T_0and1"TONRLTimeINR"Replay"PTLT#1216DQET
  10. Network 10:

    Neuroject · Chief Full Stack Engineer → CTO

    2024 – now · still running

    Built NeuroBuild, then CTO of the alignment layer for construction enterprises.

    Open-ended: the preset is the largest LTIME there is.

    %M10.0"Run""Clock".Now>=DTLDTL#2024-06-01-00:00:00%DB7"T_Neuroject"TONRLTimeINR"Replay"PTLT#106751D…QET
  11. Network 11:

    Neuroship · Chief Full Stack Engineer (contract)

    2026 – now · still running

    Contract role alongside Neuroject.

    Open-ended: the preset is the largest LTIME there is.

    %M10.0"Run""Clock".Now>=DTLDTL#2026-05-01-00:00:00%DB8"T_Neuroship"TONRLTimeINR"Replay"PTLT#106751D…QET
  12. Network 12:

    Ship platforms

    Each platform switches on in the year it shipped, if every discipline in its stack is on. Switch an input off to see what depends on it.

    %M10.0"Run"%I0.4"Web"%I0.6"Cloud""Clock".Now.YEAR>=UInt2024%Q0.0"NeuroBuild"%I0.4"Web"%I0.7"AI""Clock".Now.YEAR>=UInt2026%Q0.1"SmartClaim"%I0.3"Firmware"%I0.5"Mobile"%I0.4"Web""Clock".Now.YEAR>=UInt2023%Q0.2"Attendum"%I0.4"Web""Clock".Now.YEAR>=UInt2021%Q0.3"ActiveClass"%I0.5"Mobile""Clock".Now.YEAR>=UInt2024%Q0.4"EduGuide"
  13. Network 13:

    Hardware in production

    Devices in production today, so they switch on once the clock reaches October 2026. Every one of them runs on firmware.

    %M10.0"Run"%I0.3"Firmware"%M10.1"Now"%Q0.5"Logger"%Q0.6"EPC"%Q0.7"MiniPLC"
PLC_1 › PLC tags › Default tag table22 tags · monitoring

PLC tags

Every input is a discipline, and its comment lists the tools behind it. The outputs are what shipped. Cross-references are worked out from the program, so they point at the networks that read R or write W each tag.

NameTypeAddressMonitorCommentUsed in
"Start"Bool%I0.0FALSEStart button, normally openNW1 R
"Stop"Bool%I0.1TRUEStop button, normally closed, so it reads TRUE until pressedNW1 R
"Replay"Bool%I0.2FALSEHold to set the CPU clock back to August 2007NW2 RNW5 RNW6 RNW7 RNW8 RNW9 RNW10 RNW11 R
"Firmware"Bool%I0.3TRUEEmbedded CNW12 RNW13 R
"Web"Bool%I0.4TRUETypeScript, React & Next.js, Laravel (PHP), PostgreSQL & MySQLNW12 R
"Mobile"Bool%I0.5TRUEReact Native & ExpoNW12 R
"Cloud"Bool%I0.6TRUEAWSNW12 R
"AI"Bool%I0.7TRUEPython & FastAPINW12 R
"FirstScan"Bool%M1.0FALSESystem memory: TRUE for the first scan after start-upNW1 R
"Run"Bool%M10.0TRUEThe program is latched onNW1 RNW1 WNW4 RNW6 RNW7 RNW8 RNW9 RNW10 RNW11 RNW12 RNW13 R
"Now"Bool%M10.1FALSEThe CPU clock has reached October 2026NW3 WNW4 RNW13 R
"NeuroBuild"Bool%Q0.0FALSEConstruction platform, at NeurojectNW12 W
"SmartClaim"Bool%Q0.1FALSEAI-assisted R&D tax credit claimsNW12 W
"Attendum"Bool%Q0.2FALSEAttendance: readers, beacons, apps, dashboardNW12 W
"ActiveClass"Bool%Q0.3FALSELMS with live exam proctoringNW12 W
"EduGuide"Bool%Q0.4FALSEStudent app on both storesNW12 W
"Logger"Bool%Q0.5FALSEGSM weather stationsNW13 W
"EPC"Bool%Q0.6FALSEPressure and flow controllerNW13 W
"MiniPLC"Bool%Q0.7FALSECompact PLC on STM microcontrollersNW13 W
"LampRed"Bool%Q1.0FALSEStack light, red: stoppedNW4 W
"LampAmber"Bool%Q1.1TRUEStack light, amber: catching up with todayNW4 W
"LampGreen"Bool%Q1.2FALSEStack light, green: running, up to dateNW4 W
HMI_1 [Platforms] › Screens5 screens · live

Platforms shipped

Each platform is an output of network 12. Its lamp follows the program: switch off a discipline it needs and the lamp goes out.

NeuroBuild
NeuroBuild screenshot

%Q0.0 "NeuroBuild"FALSE

NeuroBuild

The alignment layer for construction enterprises: one multi-tenant platform for BIM models, WBS, quantity take-off, bills of quantities, tenders, and 4D progress reports, now with AI for natural-language questions and early risk warnings. I lead it as CTO.

  • Next.js
  • Laravel
  • AWS
  • Autodesk APS
SmartClaim
SmartClaim screenshot

%Q0.1 "SmartClaim"FALSE

SmartClaim

AI-assisted R&D tax credit claims for the UK, Ireland, Australia, and South Africa. I work across the FastAPI and pgvector API, the SvelteKit app, and the TypeScript client SDK, and added its security gates: secret scanning, Semgrep, and Trivy on every pull request.

  • FastAPI
  • OpenAI
  • pgvector
  • SvelteKit
  • TypeScript
Attendum
Attendum screenshot

%Q0.2 "Attendum"FALSE

Attendum

Attendance monitoring live at universities in the UK and US. I wrote the firmware for the ESP32 card readers (NFC, RFID, BLE, over-the-air updates) and the nRF52840 Bluetooth beacons, and built the iOS and Android app, the staff dashboard, and a Canvas LTI app. At a single university, it has more than 200 devices online, covers over 100 classrooms and 10,000 classes, and has received over 3 million records in the past two years.

  • ESP32
  • nRF52840
  • React Native
  • Next.js
Logger
Logger screenshot

%Q0.5 "Logger"FALSE

Logger

GSM weather stations that take several sensors each and send their logs home. The fleet has been online for over 15 years: more than 50 active stations and over half a billion records.

  • Hardware
  • Firmware
  • GSM
  • Sensors
  • Telemetry
Active-Class
Active-Class screenshot

%Q0.3 "ActiveClass"FALSE

Active-Class

An LMS with live exam proctoring and Azure Face identity checks. I built the user dashboard, an Office add-in that brings live polls and word clouds into PowerPoint and Word, and the product website.

  • React
  • Redux
  • Firebase
  • Office.js

More blocks

  • %Q0.4

    Education Guide

    A React Native app on both stores that helps students starting university get to know their course, campus, city, and career options.

    Expo · React Native · TypeScript

  • FB21

    School.how

    Online tutoring for every child: diagnostic tests, courses, quizzes, and 1-to-1 lessons over live video. I built the dashboard and the website.

    Next.js · MUI · VideoSDK · Uppy

  • %Q0.6

    EPC

    An electronic pressure and flow controller: embedded hardware and firmware that hold pressure and flow at their setpoints. In production.

    Hardware · Firmware · Process control

  • %Q0.7

    Mini PLC

    A compact PLC controller built on STM microcontrollers: the board and firmware for automation on a small footprint. In production.

    STM · Firmware · PLC

  • FB24

    react-query-kit: strictVariables

    An opt-in flag I added to react-query-kit (31k weekly downloads) so a forgotten query argument fails at compile time instead of at runtime.

    TypeScript · React Query

  • FB25

    Gatsby: insecure uuid removed

    Removed a deprecated uuid version from gatsby-cli and gatsby-plugin-sharp that could fall back to Math.random() and was flagged on every Gatsby install.

    Node.js · Security

  • FB26

    Pulse IoT

    Device telemetry on plain shared PHP hosting: ingest, rollups, alarms with hysteresis, OTA firmware, and reports. No Composer, npm, or build step.

    PHP 8 · Vanilla JS · OpenAPI

  • FB27

    Photo Dedup

    A native macOS app that finds duplicate and look-alike photos by how they look. Fully offline, and nothing is ever deleted.

    Swift · SwiftUI · Vision

  • FB28

    matrix-keypad-freertos

    Reads matrix keypads as a FreeRTOS task, with built-in debouncing and configurable layouts and pin maps. Portable across microcontrollers.

    C · FreeRTOS

  • FB29

    nanostores/persistent: tab sync fix

    Fixed persisted data being wiped when the app was opened in a second tab, in a store used 82k times a week.

    TypeScript

  • FB30

    Learning Kit

    The product website for Learning Kit, built for 0&1.

    Next.js · AWS Amplify

  • FB31

    Exam Kit

    The product website for Exam Kit, an online exam monitoring system by 0&1.

    Nuxt · Tailwind CSS

PLC_1 [PLC-01 Mini PLC] › Device configuration5 devices in production

Hardware in production

The rack is the hardware I’ve shipped: the Mini PLC as the CPU, then field devices from GSM weather stations to Bluetooth beacons. Select a module to find it in the overview.

Device overview
SlotModuleTypeDescriptionIn the field
1PLC-01 Mini PLCCompact PLCBuilt on STM microcontrollers, for automation on a small footprint.In production
2DI 8 Digital input8 × 24 V DCStart, Stop, Replay and the five disciplines.I 0.0 – 0.7
3DQ 16 Digital output16 × 24 V DCFive platforms, three devices and a three-colour stack light.Q 0.0 – 1.2
4LG-01 LoggerGSM weather stationSeveral sensors per station, with logs sent home over GSM.50+ stations15+ years online0.5B+ records
5EPC-01 EPCPressure and flow controllerEmbedded hardware and firmware that hold pressure and flow at their setpoints.In production
6AT-01 Attendum readerESP32 card readerNFC, RFID, BLE and over-the-air updates. Wireless, with a battery that lasts about 16 months.200+ devices online3M+ records in 2 years10K+ classes covered
7AT-02 Attendum beaconnRF52840 BLE beaconBluetooth proximity check-in, updated over the air with DFU.In production
PLC_1 › Online & diagnostics › Diagnostics buffer5 events · newest first

Fixed upstream

Faults found in other people’s code and fixed at the source, in packages downloaded more than 300k times a week.

  1. 12026

    Type safetyHuolalaTech/react-query-kit ↗

    Fault A forgotten argument compiled fine and only failed at runtime.

    Fix Opt-in strictVariables: typed query variables become required at the call site.

    ★ 48631k/wk
  2. 22025

    Type safetyDefinitelyTyped/DefinitelyTyped ↗

    Fault Calls that Autodesk documents failed to type-check.

    Fix Typed the optional RegExp filters on the Forge Viewer’s getPropertyHashes.

    ★ 51k22k/wk
  3. 32022

    Securitygatsbyjs/gatsby ↗

    Fault That version can fall back to Math.random(), which is unsafe for IDs. npm flagged it on every install.

    Fix Removed the deprecated uuid@3.4.0 from gatsby-cli and gatsby-plugin-sharp.

    ★ 56k163k/wk
  4. 42022

    Data lossnanostores/persistent ↗

    Fault Opening the app in a second tab wiped saved data.

    Fix Synced storage events only for the store’s own key.

    ★ 38382k/wk
  5. 52021

    Bugmicroapps/gatsby-plugin-react-i18next ↗

    Fault Refs passed to localized links were silently dropped.

    Fix Added forwardRef support to the localized Link.

    ★ 1195.4k/wk
Global libraries › Roots6 types · 2008 → 2017

Roots

Project history

I started building websites as a freelancer in 2007, studied electrical engineering with a focus on control systems, and spent my university years building robots, including a 1st place at RoboCup IranOpen 2010.

Since then I’ve built for an electronics and IoT company, a grocery marketplace, an edtech company and a construction-tech company. Today I’m CTO at Neuroject, leading the platform that connects BIM, schedules, budgets and risks for construction enterprises, and bringing AI into it.

Along the way I’ve shipped apps to the App Store and Google Play, hardware that’s still logging data after 15 years, and fixes to open source projects like Gatsby and DefinitelyTyped.

  • V2008–2012

    BSc Electrical Engineering, Control Systems

    University of Tabriz. Thesis: a two-wheel self-balancing robot with real-time fuzzy control.

  • V2009–2011

    Small Size League soccer robots

    A team of five fully autonomous robots playing a real match.

  • V2010

    RoboCup IranOpen, 1st place

    Deminer Technical Challenge.

  • V2010

    National Skills Competitions, bronze

    Mobile Robotics.

  • V2014–2016

    MSc Nanoelectronics Engineering

    University of Tabriz. Thesis: plasmonic wave sources based on multilayer structures.

  • V2017

    Paper on arXiv ↗

    Design, engineering and optimization of a grid-tie multicell inverter for energy storage.

Online access › Accessible devices4 nodes reachable

Go online

Building a platform, a device, or the team behind them? Connect.

Go online · moe@babazadeh.dev
Ways to reach Moe
InterfaceAddressStatus
Emailmoe@babazadeh.dev reachable
LinkedInlinkedin.com/in/moe-babazadeh ↗ reachable
GitHubgithub.com/moeBabazadeh ↗ reachable
CV (PDF)babazadeh.dev/resume.pdf ↗ reachable