Skip to content
MakerBuddy

Hardware reference

MakerBuddy hardware, clearly documented.

Review the current MakerBuddy ESP32 hardware map, sensor acquisition, actuator behavior, networking, persistence, timing and security boundaries.

ControllerESP32
WirelessWi-Fi + BLE
AccessAPI + WebSocket

Platform overview

MakerBuddy is an ESP32-based educational and prototyping platform. This page reflects the current MakerBuddy_dev firmware 2.3 source and its WebApp/Chrome 2.5 and MobileApp 1.5.0 clients.

AreaCurrent implementation
ControllerESP32, dual-core 32-bit Xtensa LX6, up to 240 MHz
Memory520 KB SRAM, 448 KB ROM
Flash4 MB SPI flash
Wireless2.4 GHz Wi-Fi 802.11 b/g/n and Bluetooth 4.2/BLE capability
Interfaces usedDigital I/O, ADC1, PWM/LEDC, I2C and 1-Wire
Local controlHTTP REST on port 80 and WebSocket at /ws
Device persistenceESP32 Preferences/NVS namespace iot-kit
Typical input power5 V through USB-C, with onboard 3.3 V and 5 V rails

The current MakerBuddy runtime uses Wi-Fi, not Bluetooth, for dashboard communication. Exact ESP32 modules and MakerBuddy PCB revisions can vary; board markings and the schematic for the physical revision remain authoritative.

Input and sensor map

DeviceGPIOFirmware acquisition and representation
Push button / Wi-Fi reset5INPUT_PULLUP; active low; reports pressed/not pressed
LDR35Four ADC reads averaged and mapped to 0–100
Potentiometer34Four ADC reads averaged and mapped to 0–100
MQ-2 gas sensor33Four ADC reads averaged and mapped to 0–100
Soil moisture32Four ADC reads averaged; raw 0–4095 plus calibrated 0–100
HC-SR04 echo2Pulse measurement with 24 ms timeout; input is level-shifted for 3.3 V logic on the reference board
HC-SR04 trigger1510 µs digital trigger pulse
DS18B20261-Wire temperature in °C; disconnected reads become 0.0
DHT1125Temperature and humidity; invalid/NaN reads become 0.0
PIR motion18Active-high digital motion input

GPIO 32–35 are ADC1-capable, so these analog readings remain available while Wi-Fi is active. GPIO 2, 5, 12 and 15 have ESP32 boot/input implications; do not repurpose them without checking the board and boot-strapping behavior.

Soil calibration defaults to dry raw 3000 and wet raw 1200. The values are clamped to 0–4095 and calibrated moisture returns 0 if both endpoints are equal.

Ultrasonic readings are accepted only from 2 to 500 cm. An invalid sample retains the previous valid distance; before the first valid result, the value is 999 cm.

Output and actuator map

DeviceGPIOFirmware behavior
Single LED12analogWrite; state, 0–255 PWM and optional 500 ms blink cadence
RGB red13Inverted analogWrite output
RGB green14Inverted analogWrite output
RGB blue27Inverted analogWrite output
Active buzzer4Digital output; a direct dashboard/API command pulses for 500 ms
Servo19Pin-based LEDC at 50 Hz, 16-bit, 500–2500 µs mapped over 0–180°
Relay23Immediate digital state; requested delay fields are ignored
LCD SDA21I2C data for 1602 display
LCD SCL22I2C clock for 1602 display; address 0x27

RGB values exposed by the APIs are conventional 0–255 intensities. The physical PWM is inverted as 255 - value because the current design uses a common-anode RGB LED.

Never connect classroom experiments directly to mains electricity. Use the relay only with a suitable low-voltage educational load unless a qualified professional has designed and supervised the installation.

Component reference

Identify each supported module before connecting it, then use the surrounding pin maps and API guidance as you build.

DHT11 MakerBuddy component

DHT11

Temperature 0–50°C · Humidity 20–90%

DS18B20 MakerBuddy component

DS18B20

Waterproof temperature probe · −55 to 125°C

HC-SR04 MakerBuddy component

HC-SR04

Ultrasonic distance sensor · 2–400 cm

MQ-2 MakerBuddy component

MQ-2

Gas and smoke sensing · Analog output

Soil moisture MakerBuddy component

Soil moisture

Capacitive sensing · Analog output

PIR motion MakerBuddy component

PIR motion

Infrared motion detection · Digital output

Single-channel relay MakerBuddy component

Single-channel relay

5 V relay module · Isolated switching

SG90 servo MakerBuddy component

SG90 servo

Position control · 0–180°

1602 LCD MakerBuddy component

1602 LCD

16 × 2 character display · I2C interface

MakerBuddy onboard components diagram
Onboard components
MakerBuddy connector assignment to sensors diagram
Connector assignment to sensors

LCD behavior

The 16×2 I2C LCD has default rotation and custom-text modes. Firmware checks both custom lines against the physical 16-column limit and supports these live substitutions:

text
{temp} {humidity} {ds18b20} {light} {gas}
{soil} {distance} {pot} {motion} {button}

Validation uses each wildcard's currently rendered value, not the source token length. This makes a template such as Temp: {temp} practical, but a later, wider sensor value can make an edited template exceed the display width. Sequence LCD strings are stored in 17-byte fields; recognized wildcards are internally encoded to preserve the persisted binary layout.

Runtime timing

Ticker callbacks set flags only; sensor, display, persistence and network work runs in the main loop.

WorkCadence or trigger
Sensor acquisitionEvery 1 second
WebSocket telemetryAt most every 2 seconds
LCD update opportunityEvery 100 ms
Sensor-screen rotationEvery 3 seconds
Wi-Fi/IP, device-name and custom screensEvery 5 seconds
LED blink stateEvery 500 ms
Sequence processingEvery loop unless a deferred sequence save is pending
Stale WebSocket cleanupEvery 10 seconds

Provisioning, Wi-Fi connection attempts, current buzzer pulses and OTA contain blocking paths. They are exceptions to the normal flag-driven design.

Network behavior

On first provisioning, firmware derives MakerBuddy_XXXX from the last two MAC-address bytes, protects the access point with 12345678, and runs wildcard captive DNS at 192.168.4.1. The setup form stores the normalized device name, SSID and password, then restarts.

In station mode, the board attempts three connection batches with up to 20 waits of 500 ms per batch. A successful connection starts the HTTP/WebSocket server and, when a device name exists, advertises <device-name>.local through mDNS. On failure, the firmware disables Wi-Fi and continues standalone rather than falling back automatically to provisioning.

Holding GPIO 5 for 10 seconds clears only the saved network credentials and restores the default LCD mode before restart. Other preferences remain.

All device application traffic is plain HTTP/WS. There is no HTTPS/WSS mode in the current firmware.

Automation engine internals

The ESP32 stores and executes up to 10 sequences with up to 10 steps each. Supported step actions cover LED on/off/PWM, eight RGB presets/off, buzzer and relay on/off, servo position, and LCD display.

Automation priority is Condition → Timer → Forever → None. A running rule locks only the device used by its current step against lower-priority rules. A timer waiting for its next interval owns no actuator. Condition rules debounce a matching expression for 300 ms; if the condition becomes false mid-cycle, the rule finishes the current cycle before stopping so cleanup actions can run.

Each sensor expression supports a threshold or two comparisons combined with AND/OR. Firmware 2.3 also supports an optional second sensor expression, with another AND/OR joining both complete expressions. Equality is approximate, with an absolute difference below 0.1.

See Documentation for the REST and compact WebSocket sequence formats.

Device persistence

All saved values use the ESP32 Preferences namespace iot-kit.

KeysStored data
wifi_ssid, wifi_password, deviceNameNetwork and device identity
lcdDefault, customText1, customText2LCD state
potMappingIdNumeric potentiometer mode; legacy potMapping is migrated
soilDry, soilWetSoil calibration
seqCountActive sequence count
seq_0seq_9Compact binary sequence records
seqc_0seqc_9Versioned second-condition extensions
seqms_0seqms_9Manually stopped flags
seqBlobLegacy full-array format, migrated and removed after a successful load

Sequence writes use dirty/remove bitmasks so only affected slots are rewritten. Runtime fields are reset when records load, and orphaned keys beyond the valid count are removed. The structures in MakerBuddyTypes.h participate in binary storage; reordering or resizing fields requires a deliberate migration.

Potentiometer mapping is loaded or migrated during boot and then deliberately forced to none. Users must select a target again after each restart.

Required development libraries

LibraryPurpose
ESPAsyncWebServerAsynchronous HTTP and WebSocket server
AsyncTCPESP32 asynchronous TCP transport
ArduinoJson 6.xREST and compact WebSocket JSON
DHT sensor libraryDHT11 acquisition
Adafruit Unified SensorDHT dependency
OneWire1-Wire transport
DallasTemperatureDS18B20 acquisition
LiquidCrystal_I2C1602 I2C LCD control

The current source does not use ESP32Servo; servo PWM is generated directly with the Arduino-ESP32 pin-based LEDC API.

ini
lib_deps =
  me-no-dev/ESPAsyncWebServer
  me-no-dev/AsyncTCP
  bblanchon/ArduinoJson@^6.21.3
  adafruit/DHT sensor library
  adafruit/Adafruit Unified Sensor
  paulstoffregen/OneWire
  milesburton/DallasTemperature
  marcoschwartz/LiquidCrystal_I2C

OTA implementation warning

The clients check http://app.makerbuddy.cc/firmware.json and pass a selected binary URL to the board. The firmware then:

  1. 1Clears the entire iot-kit Preferences namespace.
  2. 2Detaches the sensor, LCD and LED-blink tickers.
  3. 3Downloads the supplied URL over HTTP and streams it into the ESP32 updater.
  4. 4Shows progress on the LCD and restarts after a successful complete update.

Configuration is cleared before download success is known. A failed OTA therefore still erases Wi-Fi, device identity, rule, calibration, LCD and mapping settings; it also leaves the periodic tickers detached until reboot. OTA URLs are neither origin-restricted nor signature-verified in firmware 2.3.

Security boundary

MakerBuddy firmware 2.3 is designed for a trusted local learning network:

  • REST and WebSocket commands have no authentication or authorization.
  • HTTP, WebSocket, provisioning and OTA traffic are unencrypted.
  • CORS allows all origins and private-network access.
  • The provisioning access point uses a fixed password stored in firmware.
  • OTA accepts a client-selected HTTP URL without signature validation.

Do not expose port 80 to the public internet. Isolate classroom devices where appropriate, do not use production credentials on the MakerBuddy network, and do not use its readings or controls for medical, industrial, life-critical or certified safety decisions.

Supported reference components

The current code supports DHT11, DS18B20, LDR, MQ-2, capacitive soil moisture, HC-SR04, PIR motion, push-button and potentiometer inputs. It controls the onboard single LED, common-anode RGB LED, active buzzer, single-channel relay, SG90-class servo and 1602 I2C LCD.

Third-party modules can differ in voltage, current, signal polarity and connector order even when the plugs look compatible. Check the module datasheet, board labels and exact MakerBuddy PCB revision before connecting an unlisted part.

Build with MakerBuddy

Ready to turn an idea into a working project?

Start with prepared hardware, see results quickly, and keep going all the way into code.