Mechatronics Engineering · GUC Cairo
Embedded Systems · Control Theory · Hardware Prototyping
I build things that sit at the boundary of software and hardware — PID controllers tuned to 17-count Hall sensor windows, circuits debugged at the register level, simulations that predict what the breadboard will do before I touch a wire. Currently a Mechatronics Engineering student at the German University in Cairo, working from simulation to reality, one project at a time.
About
I'm Mohamed Belal — a Mechatronics Engineering student at the German University in Cairo (GUC), expected to graduate in 2028. My work lives at the intersection of electronics, software, and mechanical systems. I don't just simulate — I build, break, debug, and rebuild until it works.
The thread connecting all my projects is the feedback loop. Whether it's a PID controller catching a levitating magnet at a 17-count Hall sensor window, or an NTC thermistor triggering a relay at exactly the right temperature — I care about making systems that respond, adapt, and behave predictably under real-world conditions.
I work bare-metal where it matters (register-level C on STM32), reach for the right abstraction when it doesn't (Arduino, FreeRTOS), and validate everything in simulation before soldering a single component.
Experience
// Project 1: Spur Gear Joint Gearbox Stages : 4 Ratio : 1:20 Safety FoS : > 3.0 Coupling : Stepper motor + encoder Bearings : McMaster-Carr ABEC-1 standard // Project 2: Planetary Gearbox Stages : 2 (compound + simple) Ratio : 1:40 OD limit : < 120 mm Stage 1 : Compound planetary Stage 2 : Simple planetary Coupling : Stepper motor + encoder // Electronics (KiCad) Tasks : Sensor study Tool : KiCad schematic capture Output : Sensor circuit design
Work
/* STM32 FreeRTOS ControlTask 1kHz */ #define SETPOINT 56 #define KP 10.0f #define KI 0.6f #define KD 1.7f #define BASE_PWM 3000 #define DERIV_ALPHA 0.97f /* differential Hall sensor position */ float input = hallA0F - hallA1F; float error = SETPOINT - input; /* IIR derivative + anti-windup */ filteredDeriv = DERIV_ALPHA*filteredDeriv + (1.0f-DERIV_ALPHA)*(input-lastInput); outputSum += ki_scaled * error; outputSum = CLAMP(outputSum,-3000,3000); /* gain scheduling */ float kpU=(error<-20)?KP*1.3f :(error>10) ?KP*1.2f:KP; /* PID → TIM1 PWM output */ uint16_t pwm=CLAMP(BASE_PWM +kpU*error+outputSum -kd_scaled*filteredDeriv,0,3500); TIM1->CCR1=pwm;
; Proteus netlist — key nodes ; R1=68k R2=1k R3=1k R4=4.7k ; TH1=10k NTC · RL1=12V/400Ω V1 VCC 0 DC 12 R1 VCC NTC_TOP 68k TH1 NTC_TOP 0 NTSA0XH103 ; Q1 collector → Q2 base Q1 Q1C Q1B 0 BC547 R4 VCC Q1C 4.7k Q2 RL_COIL Q1C 0 BC547 ; D1 temp-compensation Q1↔Q2 D1 Q1B Q1C 1N4148 RL1 VCC RL_COIL RELAY_12V C1 VCC RL_COIL 2.2u
% Composite Trapezoidal — no cumtrapz function pos = trap_integrate(t, acc) n = length(t); vel = zeros(n,1); pos = zeros(n,1); for i = 2:n dt = t(i) - t(i-1); vel(i) = vel(i-1) ... + 0.5*(acc(i)+acc(i-1))*dt; pos(i) = pos(i-1) ... + 0.5*(vel(i)+vel(i-1))*dt; end end % Newton-Raphson root finder function t_star = newton(poly, t0) t = t0; for k = 1:50 ft = horner(poly, t); dft = horner(poly_deriv(poly), t); t = t - ft/dft; if abs(ft) < 1e-8; break; end end t_star = t; end
public class Marble { private int position; private Player owner; private boolean safe; private boolean inBase; public void move(int steps, Board b) { if(inBase && steps!=4 && steps!=13) throw new InvalidMoveException( "Can't leave base with this card"); int target = b.calcTarget(position,steps); Marble blocker = b.getAt(target); if(blocker!=null && blocker.safe) throw new InvalidMoveException( "Target is protected"); b.move(this, target); } }
Contact
I'm always open to discussing projects, collaborations, internship opportunities, or just talking mechatronics. Whether you're building something or want to see more of my work — reach out.
The fastest way to reach me is email or LinkedIn. All project code lives on GitHub.