RamyFarahat

I build things that fly, and the systems that track them.

21, fourth-year HBO-ICT student, based in Amstelveen near Amsterdam.

Click several spots in the frame to plan a route of waypoints, and the drone flies them in order. Turn on cursor tracking and the tracker locks onto your cursor, the same way it locks onto a drone.Tap several spots in the frame to plan a route of waypoints. The drone flies them in order and the tracker follows it.

#1In progress

Indoor drone tracking & interception

A tracking system for one room. Four cameras watch the same space from different corners. Each camera finds the drone in its own image, and combining the four views gives its position in 3D. A few positions in a row give speed and direction, and that is enough to predict where the drone will be next.

The end goal is intercepting the drone. Interception already runs in simulation. In the real room I’m building detection and tracking first.

Cameras
4 × USB camera
Software
Python 3.12
3D view
Rerun
Calibration
Checkerboard (lenses), light wand (positions)
Mounts
Parametric Python CAD, 3D printed
Working on
Live 3D tracking
Real camera, real target. A small RC helicopter tracked live at about 11 frames per second. The overlay shows position, speed and heading. The yellow line is the track history, the magenta arrow the predicted direction, and the inset at the top right is the detection mask.
Simulation, four cameras. Several targets tracked at the same time, each with its own ID, speed and height. The position error is plotted in centimetres.
Interception, in simulation. The interceptor, with the green trail, flies to the calculated point of interception, where it meets the target on its predicted path.

Calibration

Before the cameras can measure anything in 3D, the system has to know two things: how each lens bends the image, and exactly where each camera sits and points. I calibrate both myself.

A printed checkerboard taped flat onto a tray, used for lens calibration.
The checkerboard. A printed pattern taped flat onto a tray, so it stays perfectly straight.
Lens calibration. 30 photos per camera, with the board in different positions and angles. Green shows the part of the image that is already covered. 2× speed
The end of the light wand: a bike light LED inside a glowing ping-pong ball on a broomstick.
The light wand. An old broomstick, the LED modules from two bike lights and two ping-pong balls as diffusers.
Waving the wand. About five minutes of slow waving through the whole room, high and low.
Wand calibration, all four cameras. Each camera finds the red and the blue light and tracks where they are in its image. Comparing the same moment across the cameras gives where each camera sits and where it points.
Where the cameras ended up. The four calculated camera positions in 3D, with the recorded wand tracks in red and blue.

From camera image to interception

  1. Capture

    Four USB cameras read from Python, on mounts designed for 3D printing.

    Done
  2. Lens calibration

    Each camera is calibrated with 30 photos of a printed checkerboard to correct lens distortion.

    Done
  3. Camera positions

    A self-made light wand, waved through the room, tells the system where every camera sits and where it points.

    Done
  4. Triangulation

    Combine four 2D detections into one 3D position per target.

    Works in simulation
  5. Prediction and interception

    Estimate speed and heading, predict the path and steer an interceptor onto it.

    Works in simulation

Problems I ran into

  • Measuring camera positions by hand

    Measuring where a camera sits with a tape measure easily ends up 5 mm or a few degrees off, and triangulation is very sensitive to that: one degree off already moves a point about 5 cm at 3 metres. So instead I wave a wand with two coloured lights in front of the cameras and let the system triangulate where every camera is. Another bonus: if I move a camera a little, I don’t have to measure again. Five minutes of waving the wand and it’s calibrated.

  • Lens distortion

    Camera lenses bend straight lines, and that error ends up in every 3D position. I fixed it with a printed checkerboard: 30 photos per camera, with the board in different positions and at different angles in the frame.

  • Frames that aren’t in sync

    The calibration is only accurate if all four cameras take their picture at the same moment. Even a small time difference matters a lot when the wand is moving. That’s why I bought cameras with trigger pins, so an ESP32 can make all four take a picture at exactly the same time.

  • Building the wand

    I needed two bright, round lights in different colours. I used an old broomstick, the LED modules from two bike lights and two ping-pong balls as diffusers. It worked great.

#2Grounded

650 mm quadcopter

A 650 mm quadcopter I built myself, from a bare carbon frame to the first flights. It runs ArduCopter on a Pixhawk 2.4.8 flight controller, with a 6S battery and GPS. The first goal was to let it fly on its own from point A to point B.

The second goal was GPS-denied navigation, so the drone could find its way without GPS. For that I added a Matek optical-flow sensor with a rangefinder. I got as far as flying it with the flow sensor holding its position.

Frame
650 mm quad, carbon
Flight controller
Pixhawk 2.4.8
Firmware
ArduCopter 4.7.1
Ground station
Mission Planner 1.3.83
Power
6S battery
Sensors
GPS, Matek optical flow and rangefinder
Goals
A-to-B flight, GPS-denied navigation
Reached
Position hold on optical flow

Build log

Keep scrolling to move through the build.Swipe sideways to move through the build.

The 650 mm frame half assembled on the floor, with carbon arms, landing gear, motors and tools around it.
1. FrameArms, landing gear and the first motors on. Everything else still on the floor.
The quadcopter seen from above with the flight controller, GPS mast, battery and wiring laid out around it.
2. ElectronicsFlight controller, ESCs, power and GPS wired in.
The finished quadcopter held up on a lawn, with a laptop in front running Mission Planner and the ArduPilot map.
3. Ground stationSetup in the field with Mission Planner. GPS lock on 19 satellites.
4. First flightsTest flights with the full setup.

Grounded

Stopped straight away, after I researched the consequences of flying a drone this size.

Problems I ran into

  • No manual for the frame

    The frame came without an instruction manual, so I had to work out the build order myself. Almost everything I built had to come apart and go back together again.

  • A failsafe test that ended in a 15 m fall

    I tested what happens when the RC controller disconnects. I had read that the drone should land, but mine was set to RTL (return to launch), which climbs to 15 m, flies back to the launch spot and lands there. So when I switched the controller off, the drone started climbing. I panicked and switched the controller back on, but it only starts with the arm switch down, and that disarmed the drone at 15 m. It fell onto grass, and I had to fix a lot of broken parts.

Why it’s grounded

The build worked and it flew. After the first test flights I researched the consequences of flying a drone of this size and weight. Then I stopped the project straight away.

#3Cancelled

PCB drone

A drone built entirely by me: a frame I designed and 3D printed, and my own flight controller.

The first flight controller was an ESP32-S3 on perfboard, wired by hand. With that I wrote and tuned the stabilisation myself on a test rig. The next step was a real board: a 4-layer PCB with an STM32, designed in KiCad and manufactured.

Problems I ran into

  • PID values that worked one moment and failed the next

    During tuning, settings that kept the drone stable could start oscillating a few minutes later. The cause turned out to be the battery: as it drained from about 14 V to 13 V, the same throttle command gave the motors less thrust, so the PID values no longer matched. I measured the thrust at different battery voltages with a thrust scale and added voltage compensation, so every throttle level gives the same thrust whatever the battery voltage.

  • My face on the silkscreen

    I wanted to put my own face on the board’s silkscreen. On the real PCB it came out as one big white blob.

  • One small error on the board

    A small mistake in the design ended up on the manufactured PCB.

  • No budget for a second board

    Fixing it meant ordering a new board. My budget for the project wasn’t enough for that, so I cancelled the project.

  1. v0

    Perfboard prototype

    An ESP32-S3 on perfboard, wired by hand.

  2. v0

    PID tuning on a test rig

    My self-designed, 3D-printed frame balancing on one axis.

  3. v1.0

    Flight controller 1.0

    The 4-layer board with the STM32 in KiCad, front and back. The speckled patch is my face on the silkscreen.

Hand-wired perfboard with an ESP32-S3 board, screw terminals and jumper wires.
The first flight controller. An ESP32-S3 on perfboard, wired by hand.
PID tuning on a test rig. My self-designed, 3D-printed frame balancing on one axis.
Flight controller 1.0 in KiCad. The 4-layer board with the STM32, front and back.

#4Paused

Love Box

A pair of boxes for couples. You can send each other sweet messages, record an audio or video message, or start a video call. Each box runs on one ESP32 and one ESP32-CAM. A central server connects all the boxes and knows which two belong together.

I designed it to be sold. Adding a new pair means adding two boxes on the server and linking them, and the customer only has to enter their Wi-Fi.

The project is paused so I can focus on the drone projects.

Per box
1 × ESP32, 1 × ESP32-CAM
Screen
TFT display
Backend
Central pairing server
Setup
Own Wi-Fi network with a setup page
Design
Functional design and screen flow in draw.io
Breadboard with ESP32 boards, jumper wires and two small TFT screens. One screen shows Connecting.
Breadboard prototype in the “Connecting” state, joining the Wi-Fi network.
Box A and Box B both connect to the pairing server, which links them as a pair. A second pair, Box C and Box D, connects to the same server. Pairing server Box A ESP32 + ESP32-CAM Box B ESP32 + ESP32-CAM Box C Box D A new pair is two entries on the server
Every box talks to the pairing server. The server keeps track of which two boxes form a pair and connects them.

How a box starts up

From my functional design. The numbers are the screen states.

  • Welcome

  • Wi-Fi credentials already set?

    No: go to 1. Yes: go to 2.

  • 1

    Set Wi-Fi credentials

    The box starts its own Wi-Fi network and shows on screen how to connect with a phone. A setup page asks for the Wi-Fi name and password. After you confirm, the screen shows “Confirmed” for three seconds.

  • 2

    Connecting to Wi-Fi

    If this fails, the box shows “Connection failed” and asks if you want to change the credentials.

  • 3

    Connecting to the server

    Shows “Connection failed” when the server can’t be reached.

  • Already paired?

    No: go to 4. Yes: go to 5.

  • 4

    Pairing screen

  • 5

    Idle

    From here you can:

    6Open messages
    7Record an audio message
    8Record a video message
    9Start a video call

    Sent by the server

    10Incoming video call
    11Incoming message

Problems I ran into

  • The ESP32 isn’t strong enough

    A box has to capture and send audio plus video at 6 to 12 frames per second, and at the same time receive and show the audio and video from the other box. The ESP32 can’t handle all of that.

  • It has to be expandable

    Anyone should be able to build or buy a box and pair or unpair it with my server without help. That’s why every box connects to one central server, which keeps track of all boxes and pairs.

What I work with

Programming

  • C++
  • Python
  • LabVIEW

Embedded

  • Embedded systems development
  • Microcontrollers: STM32, ESP32-S3, ESP32
  • PID control and flight stabilisation
  • IoT and client–server pairing

Hardware

  • PCB design in KiCad (4-layer)
  • 3D modelling
  • 3D printing

Drones and vision

  • ArduPilot and Mission Planner
  • Camera calibration
  • Multi-camera triangulation
  • Tracking and prediction

Ways of working

  • Linux systems
  • Agile and Scrum
  • Functional design