Skip to content

OpenBot Compact

OpenBot Compact is a small four-wheel OpenBot body for an ESP32 DevKit V1 + L298N drive. It has a LEGO-compatible studded lid, a screw-fastened cover, a tilting phone holder, removable screw-retained electronics mounts and three battery options. Every printed part fits a Bambu Lab A1 mini (largest part 104 × 168 mm).

Front view

Drive 4 × TT dual-shaft gear motors, left pair and right pair in parallel on one L298N
Controller ESP32 DevKit V1 (30-pin), OpenBot firmware DIY; phone link by Bluetooth or USB cable
Sensors HC-SR04 ultrasonic (front), 4 × LM393 optical wheel encoders, battery voltage
Power Choose one: 2S or 3S 18650 box on the lid, or a small LiPo pack inside (see Battery options)
Fasteners Only M3 × 10 and M3 × 25 pan-head screws, M3 nuts and 19 heat-set inserts
Printing PLA, two A1 mini plates, ≈ 12 h and ≈ 305 g, plus the parts for your chosen battery option

Left and right in this guide always mean the robot's own left and right: stand behind the robot (switch end) and look forward over the lid toward the ultrasonic sensor. This is the same convention the firmware uses for "left" and "right" motors and encoders.

Contents

Printed parts

Chassis with electronics mounts

Part Qty Where it goes / print orientation
bottom_cover (STEP) 1 Chassis; floor down, no supports
top_cover (STEP) 1 Studded lid with two cable openings; flat underside down, studs up
lid_plug (STEP) 2 Closes the lid openings; restores the two studs. Studs up.
lid_grommet (STEP) 1 (optional) Replaces a plug where a cable passes through. Studs up.
esp32_carrier (STEP) 1 ESP32 carrier with four snap hooks; stands on its flat base, no supports
sensor_support (STEP) 4 Speed-sensor supports; any support fits any wheel
power_board_stand (STEP) 1 Holds the 5 V converter and the divider perfboard behind the heatsink. Base down.
pcb_spacer (STEP) 4 2.4 mm insulating standoffs under the L298N
pcb_washer (STEP) 8 0.8 mm insulating washers: 4 for the L298N, 4 for the speed sensors
phone_mount_tilt_base (STEP) 1 Phone-holder base with two hinge cheeks; stands upright on its foot, no supports
phone_mount_tilt_column (STEP) 1 Phone-holder column, tilts back 0–30°; stands upright, supports only under the band stud
phone_mount_top (STEP) 1 Sliding phone grip; stands upright, supports only under the band stud
phone_mount_bottom (STEP) 1 (optional) Fixed phone-holder base instead of the tilting base and column; stands upright on its foot, supports only under the band stud
led_adapter_12mm (STEP) 4 Adapters for 12 mm panel lights: 2 front, 2 rear
led_adapter_10mm (STEP) 4 (optional) Same for 10 mm panel lights, instead of led_adapter_12mm; 6 mm long so short threads still reach the nut
led_adapter_8mm (STEP) 4 (optional) Same for 8 mm panel lights, instead of led_adapter_12mm; 6 mm long so short threads still reach the nut
led_adapter_6mm (STEP) 4 (optional) Same for 6 mm panel lights, instead of led_adapter_12mm; 6 mm long so short threads still reach the nut
encoder_disk (STEP) 4 Optional; print in opaque filament, or use matching purchased disks. Prints flat.

The four sensor supports are identical, so any one fits any position. The parts for your battery are listed under Battery options.

Printing

STL and STEP files for every part are in cad/stl and cad/step, already in print orientation and in millimetres; print at 100 % scale. The phone holder parts are shared with the other bodies and live in body/phone_mount.

Open compact_A1_mini.3mf in Bambu Studio. Plates 1 and 2 hold every standard part in the required quantity. Plates 3–5 each hold one battery option; print only the one you chose. Plate 6 holds the optional fixed phone holder, plate 7 the optional LED adapters for 10, 8 and 6 mm lights.

Plate Contents Time* Filament*
1 – Chassis and accessories chassis, power-board stand, ESP32 carrier, 4 sensor supports, 4 LED adapters, 4 spacers, 8 washers ≈ 7 h 50 min ≈ 215 g
2 – Lid and phone holder studded lid, tilting phone holder (base, column, grip), 4 encoder disks, 2 lid plugs ≈ 3 h 50 min ≈ 90 g
3 – Battery A (2S box) 2S battery box, its cover, lid grommet ≈ 1 h 40 min ≈ 42 g
4 – Battery B (3S box) 3S battery box, its cover, lid grommet ≈ 2 h 20 min ≈ 58 g
5 – Battery C (LiPo tray) LiPo tray ≈ 15 min ≈ 5 g
6 – Fixed phone holder (optional) fixed phone-holder base ≈ 1 h ≈ 23 g
7 – LED adapters (optional) 4 each for 10, 8 and 6 mm lights; print only your size ≈ 25 min ≈ 10 g

*Estimates with Generic PLA; plates 2–7 are scaled from part volume. Your times will differ. Press Slice plate for each plate before printing.

Profile: 0.4 mm nozzle, 0.20 mm layers, 4 walls, 5 top and 5 bottom layers, 30 % gyroid infill, textured PEI plate. Only the phone-holder parts need supports, and only under the small band stud. The wall holes in the chassis are round and at most 20 mm across. The phone-holder parts print standing upright, and the project turns supports on for them alone: a small tree under the lip of the band stud, inside the channel. Pull it out with pliers through the open back of the channel. Supports are off for every other part; if you add a part from the STL folder, leave them off unless it is a phone-holder part. Before printing, select the PLA that is actually loaded and check the layer preview.

  • The lid prints flat with its studs up. The chassis prints floor down with the cavity open.
  • After printing, clear strings from insert holes, sockets and cable openings.
  • Print the 0.8 mm washers flat at 0.20 mm. They insulate the boards and spread the screw load. Tighten only until seated and replace any washer that deforms.
  • Keep PLA parts out of hot cars and direct summer sun, because PLA softens at about 55 °C.

Battery options

There isn't room inside the chassis for a 3-cell 18650 holder (76 × 62 × 20 mm). Every spot with 20 mm of headroom is too narrow. Pick one of these three options instead:

A – 2S 18650 box (recommended) B – 3S 18650 box C – LiPo tray inside
Where On the lid, behind the phone holder On the lid, behind the phone holder Inside, above the motor driver
Battery 2 × 18650 in a 2-cell series holder (≈ 77 × 41 × 20 mm) 3 × 18650 in a 3-cell series holder (≈ 76 × 62 × 20 mm) 2S or 3S LiPo, max. 75 × 31 × 20 mm (e.g. 3S 450–650 mAh, 2S 1000–1300 mAh)
Voltage 8.4 V full, 7.4 V nominal 12.6 V full, 11.1 V nominal 8.4 V or 12.6 V full
Energy ≈ 21 Wh (2 × 2800 mAh) ≈ 31 Wh (3 × 2800 mAh) ≈ 5–10 Wh
Printed parts battery_box_2s + cover, 1 lid_grommet battery_box_3s + cover, 1 lid_grommet lipo_tray
Charger Li-ion charger with separate slots Li-ion charger with separate slots LiPo balance charger
Notes Best match for TT motors: about 6.4 V reaches them after the L298N's drop. Over-voltage for 3–6 V TT motors (≈ 10.6 V after the L298N). Use higher-voltage motors or limit speed. Smallest capacity. The pack is out of sight and protected.

All three keep the firmware's 30 k / 10 k battery divider. Only the voltage limits in the firmware change (see step 6).

2S battery box on the lid 3S battery box on the lid LiPo tray

A and B – battery box on the lid. The box presses onto the lid's studs behind the phone holder like a LEGO brick. Its floor has a channel that leads the battery wires down through the rear lid opening. Lay the holder in the box with its wires at the end with the channel. Feed the wires through the floor opening and the lid_grommet into the chassis, then press the studded cover onto the four pegs. The cover has studs too, so LEGO bricks still fit on top. The box clears the corner lid screws. The 3S box sits fully within the lid, with 14 mm between the box and the rear edge. All four lid screws remain accessible with the box installed.

C – LiPo tray inside. The tray stands on two legs in the gaps between the motors and sits just above the L298N and the snap hooks of the ESP32 carrier. The battery's own height and the closed lid hold it down. Strap the pack to the tray with a 20 mm hook-and-loop strap through the four slots. If the pack is thinner than 18 mm, add a foam pad on top so it can't rattle. Do all the L298N wiring first: the tray covers its terminals, but lifts straight out.

Lithium safety. Use cells from a reputable dealer. Protect 18650 packs with a protection board (BMS). Fit a plug-in voltage alarm to a LiPo, because neither the firmware nor the pack switches off when it is empty. Fit a fuse close to the battery. Charge LiPos only on a balance charger, on a non-flammable surface, and never unattended. Don't use a pack that is swollen or damaged.

Hardware and electronics to buy

Only two screw lengths are needed: M3 × 10 mm and M3 × 25 mm, both pan head with a head about 5.5 mm across (no countersunk heads). Washers for the circuit boards are printed. Don't add washers under the lid or carrier screws, because their lengths assume the head seats directly on the plastic.

The links below go to a supplier or an Amazon US search. Check the listed dimensions and ratings before you order, because boards sold under the same name can have different hole patterns.

Fasteners

Qty Part Used for Buy
19 (+ spares) M3 × 5.7 mm brass heat-set inserts, the common 4.6 mm OD size (e.g. ruthex RX-M3x5.7) 14 in the chassis, 5 in the phone holder ruthex
15 M3 × 10 mm pan-head screws 4 lid, 2 carrier, 4 L298N, 5 phone holder search
12 M3 × 25 mm pan-head screws 8 motors, 4 speed sensors (+2 for the fixed phone holder) search
8 M3 hex nuts, 5.5 mm across flats, ≈ 2.4 mm thick 8 motors (+2 for the fixed phone holder) search
4 Small cable ties (≤ 3 mm wide) 5 V converter and perfboard on the power-board stand search
≈ 350 g 1.75 mm PLA all printed parts search

Electronics and drive

Qty Part Specification / notes Buy
1 ESP32 DevKit V1, 30-pin PCB about 27.94 × 50.97 mm. Check the hole positions, because DevKit clones differ. search
1 L298N driver module About 43.5 × 43.5 mm with holes on a 37 × 37 mm square. search
4 TT dual-shaft gear motors One shaft drives the wheel and the other drives the encoder disk. Fits a 53.35 mm motor body. Choose a voltage rating that suits your battery option. search
4 TT wheels ≈ 65 mm diameter search
4 LM393 optical speed sensors PCB ≈ 14.2 mm wide and ≈ 38.1 mm long, with one 3 mm hole. All four are mounted; by default the firmware reads the front pair. search
4 Encoder disks Only if not printing them; must match the TT shaft and the sensor slot search
1 HC-SR04 ultrasonic sensor 45.5 × 20.5 mm PCB, transducers 25.5 mm apart (centre to centre); a 3.3 V version (e.g. HC-SR04P) also works search
1 Round rocker switch Fits the rear panel hole; rated for the battery voltage and motor current search
1 5 V converter, ≥ 2 A, max. 21 × 43 × 14 mm Fits the power-board stand. For 3S, an LM2596 module works. For 2S, choose a type that still gives 5 V from a 6 V input (e.g. MP1584 or a buck-boost). search
1 Small perfboard, max. 24 × 34 mm Battery and echo dividers, light drivers; sits on the back of the stand search
1 set 1 % resistors Battery divider 30 k + 10 k; echo divider 10 k + 20 k; lights 4 × 1 k + 4 × 100 k search
2 + 2 White and red panel indicators (optional) 12 mm thread fits led_adapter_12mm; for 10, 8 or 6 mm lights print the matching adapter. Check the lamp voltage search
4 NPN transistors, e.g. PN2222A (optional, for lights) Low-side switch for each lamp search
1 set Dupont jumpers, silicone power wire, heat-shrink Size the power wire for the motor stall current search

Battery and charging

Buy the items for the battery option you chose.

Option Parts Buy
A – 2S box 2 matched 18650 cells, 2-cell series holder (≈ 77 × 41 mm), 2S protection board, inline fuse (≈ 5 A), XT30 pair, Li-ion charger cells · holder · BMS/fuse/XT30 · charger
B – 3S box 3 matched 18650 cells, 3-cell series holder (≈ 76 × 62 mm), 3S protection board, inline fuse, XT30 pair, Li-ion charger cells · holder · BMS/fuse/XT30 · charger
C – LiPo tray 2S or 3S LiPo up to 75 × 31 × 20 mm with XT30, 20 mm hook-and-loop strap, LiPo balance charger, LiPo voltage alarm LiPo · strap · charger

Other

Qty Part Notes Buy
1 Rubber band or light spring Tensions the phone grip search
1 90° (right-angle) micro-USB data cable Flashing in place, and a wired phone link through the lid. A straight plug doesn't fit next to the L298N (see step 6). Match the plug to your board (micro-USB or USB-C). search
1 USB power blocker / data-only adapter (only for a wired phone link) Stops the phone and the 5 V converter from feeding each other search
1 Android phone Must run the OpenBot app. Check that it fits the holder in its case. –
– Tools Temperature-controlled soldering iron with an M3 insert tip, screwdriver/hex keys, multimeter, cutters, wire stripper search

Assembly

Exploded view

1. Install the inserts

Empty shell

Use standard M3 × 5.7 mm heat-set inserts (for example ruthex RX-M3x5.7, 4.6 mm outer diameter) in the 4.0 mm pilot holes. Press each insert in square and flush with a temperature-controlled iron and insert tip. Let it cool before screwing into it.

Install 14 inserts in the chassis:

  • 4 in the L298N bosses
  • 4 in the speed-sensor bosses
  • 2 in the front pair of long-PCB bosses (these hold the ESP32 carrier)
  • 4 in the corner posts at the top of the walls (these hold the lid)

Leave the two rear long-PCB bosses empty, because only the alternative PCB uses them.

2. Install motors and speed sensors

Motors installed Sensors installed

Fit the four TT motors with the wheel shafts through the side openings and the wires facing the centre. Fasten each motor with two M3 × 25 mm screws and nuts. Make sure the screws clear the gearbox internals. Leave the wheels off until the bench test is done.

Push an encoder disk onto each inboard shaft. Place a sensor support over each of the four sensor bosses with its flat side toward the motor. The D-shaped socket stops it rotating. Seat the LM393 board between the two upper guides and fasten it with one printed washer and one M3 × 25 mm screw.

Turn each shaft by hand. The disk must pass through the optical slot without rubbing, and the sensor leads must stay clear of it.

3. Secure the ultrasonic sensor and panel parts

Ultrasonic retention

Push the HC-SR04 straight into the front recess from inside, with both transducers through the round openings, until the two flexible arms at its ends click over its upper corners. The recess locates the board, and the arms stop it from falling back into the chassis. To take it out, push the tops of both arms outward and pull the board back.

Fit the two white front lights, the two red rear lights (each in the printed LED adapter that matches its thread size) and the round rocker switch, using the retaining hardware supplied with them. Route the wires away from the wheels and encoder disks.

4. Fit the ESP32 and motor driver

Flash the firmware first (step 6) if you don't have a right-angle USB cable. Once the L298N is in, a straight USB plug no longer fits the ESP32.

Screw the ESP32 carrier to the two front long-PCB bosses with two M3 × 10 mm screws; its base sits flat on the chassis floor. Press the ESP32 down onto the four 2.2 mm locating pegs, through its own mounting holes, until the four corner hooks click over the board. No screw passes through the ESP32 PCB. To take the board out, push the two hooks at one end outward and lift that end. If your board's holes don't line up with the pegs, don't force it.

Put the four 2.4 mm printed spacers on the L298N bosses, set the driver on them, and fix each corner with a printed 0.8 mm washer and an M3 × 10 mm screw (37 × 37 mm pattern). Check that solder joints underneath clear the chassis and that the heatsink has room to breathe.

Power-board stand. Strap the 5 V converter to the front of the stand and the divider perfboard to the back, each with two cable ties through the slots. The stand sits on the floor behind the L298N heatsink, between the two rear speed sensors and in front of the switch. The closed lid holds it down, so it needs no screws.

Electronics installed

5. Wire power and signals

Wiring diagram

Use the GPIO numbers printed on the ESP32. All grounds must be connected together. Keep wiring clear of gears, encoder disks, screw tips and the lid seam, and tie it down against vibration.

Connection ESP32 GPIO Notes
L298N IN1 / IN2 (left motors) 32 / 33
L298N IN3 / IN4 (right motors) 25 / 26
L298N ENA / ENB – Leave the enable jumpers fitted (speed is set by PWM on the IN pins)
Encoder front left / front right 35 / 39
Encoder rear left / rear right (optional) 34 / 23
Ultrasonic TRIG 5
Ultrasonic ECHO 18 directly with a 3.3 V sonar; through a 10 k (ECHO → GPIO18) / 20 k (GPIO18 → GND) divider with a 5 V sonar
Battery voltage 4 30 k from switched battery + to GPIO4, 10 k from GPIO4 to GND
Front lights L / R (optional) 19 / 12 through NPN transistor stages
Rear lights L / R (optional) 16 / 17 through NPN transistor stages; they also blink as indicators
OLED display SDA / SCL (optional) 21 / 22 128 × 64 SSD1306 (I2C), powered from 3.3 V
  • Motors: wire both left motors in parallel to OUT1/OUT2, + (red) to OUT2 and − (black) to OUT1. Wire both right motors to OUT3/OUT4, + (red) to OUT3 and − (black) to OUT4. The two sides are mirrored, so this makes both drive forward. If a side still turns the wrong way, swap that side's two motor wires.
  • Encoders: power the LM393 boards from 3.3 V, not 5 V. Their on-board pull-ups then keep the outputs at a safe level for the ESP32. GPIO34, GPIO35 and GPIO39 are input-only and have no internal pull-ups.
  • Sonar: a 3.3 V-capable sonar (e.g. HC-SR04P or RCWL-1601) is simplest: power it from 3.3 V and connect ECHO directly. A standard 5 V HC-SR04 needs the 5 V converter and the 10 k / 20 k divider on ECHO, because its 5 V echo signal can damage the ESP32. Never connect a 5 V ECHO directly.
  • Lights: each lamp is switched by an NPN transistor (1 k base resistor, 100 k base-to-emitter pull-down). Never drive a panel lamp directly from an ESP32 pin. The pull-down also keeps GPIO 12 (right front light) low while the ESP32 starts, which it needs (see step 6).

Power

Battery + → protection/BMS → fuse → switch → L298N motor supply (+12 V terminal). The 5 V converter takes the switched battery voltage and feeds the ESP32 5 V/VIN pin and the HC-SR04. Leave the L298N's 5 V terminal unconnected. Never connect USB and the external 5 V supply at the same time unless a USB power blocker sits in the cable. Keep the battery disconnected while you assemble.

With option A (2S), the motors see about 6.4 V, which suits common 3–6 V TT motors. With option B or a 3S LiPo, they see about 10.6 V. Use motors rated for that, or limit the speed in the app.

6. Configure firmware and bench test

The easiest way is the firmware setup page in Chrome or Edge. Choose DIY and ESP32 Dev Module, keep Phone app, choose your battery (2S Li-ion or 3S Li-ion, see the table below) and the parts you fitted, then press Flash firmware. Later changes to the battery or the parts, for example adding the lights, only need Update settings only, without flashing.

To use the Arduino IDE instead, get the firmware from the firmware folder and open firmware/openbot/openbot.ino. All settings are in the SETTINGS section at the top (or download a settings file from the setup page and put it next to openbot.ino):

  1. Set the robot type:
#define OPENBOT DIY
  1. Set the battery limits for your battery option. The divider factor stays as it is.
Option VOLTAGE_LOW VOLTAGE_MAX
A – 2S 18650, or 2S LiPo 6.8f 8.4f
B – 3S 18650, or 3S LiPo 10.2f 12.6f

The app's battery gauge runs from VOLTAGE_LOW (empty) to VOLTAGE_MAX (full). The firmware never cuts the motors on low voltage, so the protection board (options A and B) or a LiPo voltage alarm (option C) has to protect the cells.

  1. Optional parts, if you fitted them:
#define HAS_SPEED_SENSORS_BACK 1   // rear encoders
#define HAS_LEDS_FRONT 1           // white lights on GPIO 19 / 12
#define HAS_LEDS_BACK 1            // red lights on GPIO 16 / 17
#define HAS_OLED 1                 // OLED display on GPIO 21 / 22
  1. In the Arduino IDE, install the esp32 board package 2.0.17. The firmware uses ledcSetup/ledcAttachPin, which were removed in core 3.x. Then select ESP32 Dev Module and upload.

USB access. The ESP32 sits upside down in its carrier, so its USB socket is underneath the board and faces the L298N's power terminal only about 8.5 mm away. With the driver installed, only a right-angle plug fits, with the cable leaving upward between the two boards. Either flash before fitting the L298N, or use a 90° cable.

The motor pins are not ESP32 boot pins, so the motors stay off at power-on. GPIO 5 (sonar trigger) and GPIO 12 (right front light) are boot pins. GPIO 12 must stay low while the ESP32 starts; the transistor stage's 100 k pull-down keeps it low, so never pull it up. If the board won't boot or flash with everything connected, disconnect the sonar trigger and the right front light and retry.

Bench test (wheels off, chassis propped up, Serial Monitor at 115200 baud):

Send Expect
f A feature string that reports DIY
(watch output) A plausible battery voltage and sonar distance
c60,0, then c0,0 Only the left side turns, forward
c0,60, then c0,0 Only the right side turns, forward

While the wheels turn, check that the encoder counts change. Stop straight away if a disk rubs, a wire gets warm or the ESP32 resets.

Install the OpenBot Robot Android app. Choose Bluetooth, grant the permissions it asks for, scan and connect to OpenBot: DIY (or the Bluetooth name you set on the setup page). For a wired link instead, see the next step.

7. Fit the battery, phone holder and lid

Phone holder Lid openings with plug and grommet Closed body

Phone holder. The holder tilts, so the camera can also look up, for example at a person standing in front of the robot. To make the camera look down instead, screw the foot on turned around by 180° and put the phone in with its screen toward the column.

Hinge of the tilting phone holder Tilting phone holder at 0, 15 and 30 degrees, mounted normally (top) and turned around (bottom)

  1. Melt three M3 inserts into the column, the same way as in step 1: one into each end of the pivot hole at the back, and one into the front lock hole, which is open on one side only.
  2. Melt two M3 inserts into the holes in the bottom of the foot. Screw the foot to the forward pad of the lid with two M3 × 10 mm screws from underneath.
  3. Set the column between the cheeks with the open lock hole toward the cheek that has four holes. Drive an M3 × 10 mm screw through each cheek into the pivot inserts and tighten them until the column turns without play. Put a drop of medium-strength (blue) threadlocker on both pivot screws so they cannot work loose.
  4. Tilt the column until its lock insert lines up with one of the three cheek holes: the lowest gives 0°, the middle one 15° and the top one 30°. Lock it there with the third M3 × 10 mm screw.
  5. Fit the sliding grip and tension it with a rubber band or spring. With the phone in its case, check that it is held firmly, the camera has a clear view and no buttons are pressed.

At 30° the phone still clears the battery box by about 15 mm. If you don't need the tilt, print phone_mount_bottom instead of the foot and column: press two M3 nuts into its pockets and screw it to the lid pad with two M3 × 25 mm screws from underneath. It takes the same grip, and the phone sits 10.5 mm lower.

Lid openings. The lid has two 1 × 2-stud openings, one in front of and one behind the phone pad. Fit the lid with the phone pad toward the ultrasonic sensor at the front. The pad is 16 mm forward of the lid centre; the rear stud area carries the battery box. Press a lid_plug into each unused opening; it restores the studs, and a 1 mm ledge at the bottom of the opening stops it from falling through. Where a cable passes, use the lid_grommet instead:

  • Wired phone link: route a 90° USB cable from the ESP32 up through the front opening to the phone. Put a USB power blocker in the line so the phone and the 5 V converter don't feed each other. In the app, choose USB instead of Bluetooth.
  • Battery box (options A and B): the battery wires come down through the rear opening.

Fit the LiPo tray now if you use option C. Tuck the wires away from the rim, lay the lid flat on the chassis, and drive four M3 × 10 mm screws (no washers) into the corner inserts. Tighten them evenly until seated. The lid must not lift, and the holder must not rock. For options A and B, press the battery box onto the studs behind the phone holder.

Fit the wheels only after the bench test passes. Do the first drive slowly on a clear, level floor, then recheck all screws and the phone grip. Lift the robot by the chassis, not the lid, phone holder or battery box.

Alternative integrated-driver PCB

Alternative PCB footprint

The chassis also takes the OpenBot PCB V2 (Arduino Nano + DRV8871 drivers), which uses a 121.031 × 28.448 mm mounting pattern. This is a different electrical build, not an ESP32 drop-in. It runs the PCB_V2 firmware with the Nano wiring.

  • Leave out the ESP32 carrier, the L298N and the power-board stand.
  • Put 4 inserts in the four long-PCB bosses. With the 4 sensor, 4 lid and 5 phone-holder inserts, that is 17 inserts in total.
  • Mount the board on four printed 2.4 mm spacers, with a printed washer and an M3 × 10 mm screw at each hole.
  • Hardware totals: 13 × M3 × 10 (4 lid, 4 PCB, 5 phone holder), 12 × M3 × 25, 8 nuts.

Order the board from the PCB V2 manufacturing files and BOM, for example through JLCPCB or PCBWay. Check the height of the populated components and the solder-joint clearance before you fasten it. The battery options above work the same way with this board.

Troubleshooting

Symptom Check
Compile errors about ledcSetup / ledcAttachPin The esp32 core is 3.x. Install 2.0.17.
USB plug won't go into the ESP32 The L298N is in the way. Use a 90° plug or remove the driver to flash.
ESP32 won't boot or flash once wired Loading on GPIO 5 (sonar trigger), or something pulling GPIO 12 (right front light) high. Disconnect them and retry.
ESP32 resets when the motors start Weak or flat battery, or a 5 V converter that can't regulate from 2S. Check the 5 V rail under load.
Sonar always 0 or erratic With a 5 V sonar, the echo divider is missing or wrong; with a 3.3 V sonar, check its supply
No counts from an encoder Sensor not on 3.3 V, disk not in the slot, or disk not opaque
Robot turns when it should go straight One side's motor wires are swapped, so swap the pair on OUT1/OUT2 or OUT3/OUT4
Battery reading wrong or app shows "low" Divider must be 30 k (top) / 10 k (bottom), and the voltage limits must match your option
Lid won't seat A wire is trapped on the rim, the LiPo is too thick, or a lid insert stands proud of its post
Battery box loose on the lid Printed studs came out undersize. Raise flow slightly or check the printer's dimensional accuracy, then reprint the box

Views

Front Rear
Front view Rear view
Top Underside
Top view Underside

Renders leave out wiring. Boards, battery holders and the LiPo pack are shown as simplified shapes.

Next

Install the OpenBot Robot app on your phone and connect to the robot as described in step 6.