Projects

Built from scratch

Independent hardware and software builds: embedded systems, PCBs, and robots I've designed and built from scratch.

The animation shows three units of my autonomous robotic fleet, drawn from the car's own CAD, with ultrasonic pings ahead of each one.

Assembled autonomous car with custom PCB, Arduino Nano and ultrasonic sensors in a 3D-printed chassis

Autonomous Robotic Fleet

Independent project · In progress

Arduino Nano · MAX78000 · KiCad · Fusion 360 · PyBullet

A small autonomous car built from scratch (breadboard prototype, custom PCB, 3D-printed chassis, and firmware), the first unit of a fleet working toward leader–follower behavior learned with multi-agent RL.

  • Reactive obstacle avoidance with three ultrasonic sensors, plus gyro-based heading from an MPU-6050 IMU
  • Custom two-layer KiCad PCB and a Fusion 360 chassis designed around it
  • MAX78000 vision board linked over UART as groundwork for camera-based control
ESP32 RC Car

Wireless RC Car (ESP32 + ESP-NOW)

Independent project

ESP32 · Arduino C++ · ESP-NOW

An RC car driven by two ESP32s talking directly to each other over ESP-NOW, Espressif's peer-to-peer Wi-Fi protocol (no router or network needed). One board reads the controls; the other turns each packet into wheel commands.

  • Compact packet: speed level, direction, and stick displacement are packed into one small struct sent to the receiver's MAC address, keeping latency at 100 ms or less
  • Differential steering: the receiver slows the inside wheel in proportion to stick displacement and mirrors the command for the opposite-facing servo
  • Event-driven: all control happens in the ESP-NOW receive callback (a small state switch on direction), so the main loop stays empty; wheel speeds are returned through pointers
Packet format shared by both boards Transmitter_Demo.ino / Receiver_330.ino
// Must match on transmitter and receiver
typedef struct carInfo {
  uint8_t speed;          // 0: Slow. 1: Medium. 2: Fast.
  uint8_t direction;      // 0: Idle. 1: Forward. 2: Backward
  int32_t displacement;   // value between -2400 +2400
} carInfo;

// Transmitter: register the receiver as a peer, then send the struct
memcpy(peerInfo.peer_addr, broadcastAddress, 6);
esp_now_add_peer(&peerInfo);
esp_now_send(broadcastAddress, (uint8_t *) &carData, sizeof(carData));
Turning stick displacement into wheel speeds Receiver_330.ino
// Servo commands: 90 = stop; farther from 90 = faster
uint8_t forward[3]  = { 120, 150, 180 };
uint8_t backward[3] = { 60, 30, 0 };

// Scale a wheel toward stop in proportion to how far the stick is pushed
uint8_t calculate_wheel_speed(int32_t xDisplacement, uint8_t speed, int32_t maxDisplacement) {
    return speed - ((int16_t)speed-90) * ((float)xDisplacement/maxDisplacement);
}

// Mirror a command around 90 for the servo mounted the other way
uint8_t reverse_direction(uint8_t speed) {
  return speed - ((int16_t)speed-90)*2;
}

void setSpeeds(uint8_t speed, uint8_t *leftSpeed, uint8_t *rightSpeed, uint8_t *direction, int32_t xDisplacement) {
  if (xDisplacement<-100) {        // Left turn: slow the left wheel
    *leftSpeed = reverse_direction(calculate_wheel_speed((xDisplacement*-1), direction[speed], leftMax));
    *rightSpeed = direction[speed];
  }
  else if (xDisplacement>100) {    // Right turn: slow the right wheel
    *leftSpeed = reverse_direction(direction[speed]);
    *rightSpeed = calculate_wheel_speed(xDisplacement, direction[speed], rightMax);
  }
  else {                           // Straight
    *leftSpeed = reverse_direction(direction[speed]);
    *rightSpeed = direction[speed];
  }
}
Quadcopter with red and white arms and an Arduino flight controller on grass next to a FlySky FS-i6 transmitter

Self-Leveling Drone

Independent project

C++ · Arduino · PID control

A quadcopter that levels itself after pilot input, using a gyroscope/accelerometer for attitude estimation and a FlySky radio transmitter/receiver for manual control.

  • Built, soldered, and tested the full stack: Arduino flight controller → ESCs → brushless motors
  • Implemented PID control on gyroscope feedback to regulate motor speed and tilt
Assembled quadcopter frame with four brushless motors and propellers
Frame. Quad frame, brushless motors, ESCs, and props assembled.
Arduino Uno wired on top of the quadcopter frame with a radio receiver
Electronics. Arduino flight controller, IMU, and FlySky receiver wired in.
Alejandro flying the quadcopter over a grass field at dusk
Flight testing. Hovering under manual control while tuning the PID loops.
Smart Doorbell

Smart Doorbell

Course project · Brigham Young University

Sep – Dec 2023  |  Raspberry Pi · Embedded C

A Raspberry Pi doorbell that takes a photo when it's rung, shows it on a display, and uploads it to an online server.