← Projects/P-02
Autonomous light-tracking turret
Camera-based anti-drone systems go blind at night, but drones flying with night vision emit infrared. As a team of three we built a prototype that finds an IR source, centers on it with a proportional control loop, measures the distance and, once the target is close enough, fires a 3D-printed dart with a burst of compressed air. The project was graded 10/10.
01How it works
Four infrared photodiodes sit around a panel: up, down, left, right. Comparing them in pairs gives an error signal in each axis; a proportional controller drives two 180° servos (pan and tilt) until the four readings are equal, which means the panel points straight at the source. An ultrasonic sensor then measures the distance, a buzzer beeps faster as the target approaches, and a solenoid valve releases compressed air to fire the dart.
The shot is guarded by several layers: separate arm and stop buttons, an ultrasonic proximity check that only allows firing once the target is inside the set distance, and a 2 s audible and visual warning (buzzer and red LED) before the valve opens. After every shot the system disarms itself.
Losing the source drops Alert back to Scan · the stop button returns any state to Disarmed · after firing, the system disarms.
02Electronics
The analog circuits were my part: the photodiode amplifiers and the transistor stages that let the 3.3 V logic switch the 12 V valve and the buzzer.
- Sensing: 4× SFH203P IR photodiodes in a transimpedance stage built on MCP6002 op-amps (Rg = 5.5 MΩ for a 0.6 µA maximum photocurrent, no dark-current offset).
- Actuation: 12 V / 0.5 A solenoid valve switched by a BD137 power transistor from the 3.3 V logic; buzzer through a BDX33C Darlington; two PWM servos.
- Ranging: HC-SR04 ultrasonic module.
- Controller: dsPIC33FJ32MC202 programmed in C. The course supplied the ADC, PWM and ultrasound drivers; the team wrote the timer, servo, buzzer, LED and push-button drivers and the state machine, and reused a P/PI/PD/PID module from the labs (the turret runs its P term).
03Mechanics
The turret body, servo housings, antenna mount and the dart were modeled in Solid Edge and 3D-printed, then assembled on a pan-tilt base, with the compressed-air launcher and its solenoid valve on the sensor head.
The launcher works a bit like a syringe. With a pump we filled a small chamber with pressurized air, and a butterfly valve driven by a 12 V solenoid kept it shut. When the microcontroller energizes the solenoid, the valve opens and the stored air rushes through a tube into the barrel, pushing the dart out. Depending on how much pressure we pumped into the chamber, the dart flew about 5 to 10 m.
04The team
We were three, and all of us worked on every part of the turret, so nobody was left without a job. My main areas were the analog electronics, all of which I did, plus part of the code and part of the CAD. One teammate did most of the CAD and a good share of the code; the other wrote much of the code and the technical documentation. It paid off: the turret worked in the final demo and the project was graded 10/10.