Inspiration

Enhanced oil recovery (EOR) experiments are still heavily manual. In physical simulation labs, operators may need to work near high-temperature, high-pressure, toxic, and long-duration systems to open and close valves, read gauges, switch flow paths, collect samples, and respond to abnormal conditions. Some experiments can require multiple people working in shifts for days. I have seen real safety risks in this environment, including hydrogen sulfide exposure and steam burns.

For about five years, I wanted to build an AI robot for petroleum laboratories. The missing piece was not the petroleum-engineering idea. It was the cross-disciplinary software, electronics, embedded control, robotics, and product engineering needed to turn the idea into a working prototype.

Codex changed that. As a petroleum engineer, I used Codex as a practical software and hardware engineering partner. In a few months, it helped me solve the most important starting point: robotic valve control for EOR experiments.

What it does

EOR Autonomous Lab Robot starts with the most common and safety-critical action in these experiments: valve operation.

The current prototype is a retrofit intelligent valve actuator and control system. Instead of replacing legacy high-pressure valves, the actuator is designed to clamp onto existing manual valves, preserve the valve stem for manual or robotic backup, and add remote control, angle control, servo-driven motion, and networked operation.

The prototype includes:

  • ESP32-based valve control.
  • BLE remote-control integration.
  • FashionStar serial-bus servo actuation.
  • Hold-to-run behavior: press and hold to rotate, release to stop and hold.
  • Preset valve motions for close, 90 degrees, 180 degrees, and 360 degrees.
  • A 3D-modeled and 3D-printed valve-control mechanism used for physical control testing.
  • A larger AI laboratory robot architecture for sensing, safety checks, valve execution, sampling, inspection, and future closed-loop EOR experiment planning.

How I built it

I started from petroleum lab requirements rather than from a generic robotics demo. The key design decision was retrofit automation: many EOR labs already have expensive pressure-rated valves and rigs, so a practical robot must work with existing equipment.

Codex helped translate that requirement into an engineering path. It helped reason through the structure of the valve actuator, servo behavior, controller and chip choices, wiring and connection plans, BLE control mode, Arduino IDE-ready firmware, and the overall robot architecture. It also helped prepare the English demo video, README, and submission materials.

How Codex changed the workflow

Codex was not just autocomplete. It acted like an always-available engineering teammate for a domain expert who did not originally have a software or hardware background. I could describe a petroleum experiment problem in natural language, then use Codex to turn that problem into control logic, firmware, mechanical constraints, test plans, and documentation.

This changed my daily research workflow. Instead of waiting until I had time to learn every software and hardware detail from scratch, I can now supervise several Codex tasks across multiple computers, review their outputs, test the physical prototype, and iterate. For traditional petroleum R&D, that is a major productivity shift: a domain engineer can move from idea to prototype much faster.

Challenges

  • EOR labs use many legacy valves and heterogeneous rigs, so full replacement with standard electric valves is not practical.
  • Safety matters more than full autonomy, so the design must preserve manual or robotic takeover.
  • Valve control has to be reliable: motion while held, stop on release, and clear preset positions.
  • AI planning must be constrained by experiment rules, safety checks, and human authorization.
  • The project spans petroleum engineering, mechanical design, electronics, embedded firmware, BLE, robotics, and AI systems.

Accomplishments

  • Turned a five-year petroleum lab automation idea into a working valve-control prototype direction.
  • Built and tested physical 3D-printed valve-control hardware.
  • Created ESP32/BLE/FashionStar servo firmware suitable for Arduino IDE.
  • Defined a practical control model for EOR laboratory valves.
  • Demonstrated how Codex can help a domain expert cross into software and hardware engineering.

What's next

Next, I plan to connect the valve-control layer to pressure, temperature, flow, and computer-vision gauge reading; expand the EOR experiment rule library; and add higher-level AI planning that converts natural-language EOR procedures into safe, auditable robot actions.

Built With

  • arduino
  • ble
  • computer-vision
  • eor
  • esp32
  • openai-codex
  • petroleum-engineering
  • robotics
  • servo-control
Share this project:

Updates