Garage Door Simulator
My son had a physics assignment to estimate the power required to raise a garage door. He needed to make a video for this. I wanted to build an interactive simulation to teach about a simplified linearized model versus what differential equations can actually do in the real world.
Now that I’m using AI to understand the world around me, my son’s physics project provided an opportunity to understand how garage doors work. They’re super simple, just a motor that pulls on a door. But there’s a couple interesting things going on. The first one is that it’s possible when you disconnect the motor to just lift the several hundred pounds of door up with a single arm because the torsion spring is pulling it up. And the door starts to move horizontally after the door goes around the first turn, which gets it out of the way but also makes it easier to move.
The motor itself in my garage runs on 120 volt AC and spins really fast. It started and stopped by a start-run capacitor. Newer units use a DC motor feed from a transformer and rectifier to allow soft start and battery backup.
Inside the opener’s AC motor there are two separate coils of wire wound around the stationary outer part, the stator. Each coil becomes an electromagnet when current flows through it.
The capacitor matters because household AC power alone is a simple sine wave that would just make the motor buzz back and forth, not turn. The capacitor delays the current into one of the coils by a fraction of a cycle. So the two coils peak one after the other instead of together. Let’s name the coils Coil A and Coil B. That handoff between the coils makes the magnetic field sweep around the motor, and the rotor follows it. This is just like two hands spinning a wheel one after the other.
To reverse the garage door, switch the order of the capacitor firing: the capacitor on coil A and A lags, so the field sweeps one way. Put it on coil B and B lags, so it sweeps the other way. In many openers the two coils are identical, and the capacitor is wired between them. The “up” relay feeds power to one end and the “down” relay to the other, which decides which coil gets the delayed current.
Since the motor spins at about 1,500 RPM, a worm on the motor shaft drives a larger worm gear, which is often made out of nylon, which reduces from 10 to 40 to 1. A worm drive is good because it’s hard to back drive, which helps hold the door in place when the motor stops. This worm gear turns the output shaft, and the sprocket on that shaft pulls the chain. A pretty simple drivetrain.
The arrows in the illustration show the forces on the door at each point in its travel. The red arrow is gravity: the door’s 78 kg pulls down with about 765 N from its centre of mass. Gravity matters less as the door goes more horizontal. The magenta arrows are the lift from the torsion springs, delivered through the two cables. With the door closed they carry almost the whole 765 N, about 380 N per cable. As the door rolls onto the horizontal track, the track takes over more of its weight and the magenta arrows shrink to match. Because the springs balance the door, the opener only has to make up the difference. The dark cyan arrow is the opener’s force on the door, pushed through the door arm. At the start of opening it is only about 20 N, just enough to overcome roller friction and the drag of the bottom seal. The light cyan arrows split that force into a lift and a pull.
With the door closed the arm leans about 42° from vertical, so it pulls up and back at once, and the arm carries about one and a half times the chain’s pull. The springs do the heavy lifting; the motor steers and tops up.
The torsion spring is cool because it is not a normal spring with a linear constant that increases its force. It doesn’t pull on anything directly; it twists. One end is bolted to a bracket on the wall and cannot turn. The other end is clamped to the steel shaft that runs above the door. When the door is closed, the spring has been wound about seven turns.
Like a wound-up rubber band it is always trying to unwind, and the only part free to move is the shaft. So the spring twists the shaft, about 19 newton-metres from each spring in this example. At each end of the shaft is a small drum, about 10 cm across, with a steel cable wrapped around it and running down to the bottom corner of the door. As the shaft tries to turn, the drums try to reel those cables in. A twist of 19 N·m on a drum with a 5 cm radius becomes a pull of about 380 N on each cable, and two cables together roughly equal the door’s own weight (78 kg, or about 765 N).
The door is effectively hanging from a pair of wound-up springs, balanced. As the door rises, the cables wind onto the drums and the springs give up their twist. They lift less and less, which is fine, because the horizontal track is taking over more and more of the door’s weight. What a cool, balanced, system.
You can see a full simulation of all the forces at garagedoor.theboohers.org/ but you can get a small sample of everything together below. (Btw, perfect introduction to differential equations.)
The Math
This is a great chance to show differential equations in action. The model has a single coordinate, \( s \): how far the bottom roller has travelled along the track. Every other position follows from it.
The whole door has one moving part as far as the math is concerned: \(s\), how far the bottom roller has travelled along the track. Every section, roller, cable and the trolley can be worked out from \(s\), so one equation describes the entire door.
In words: the force needed to speed the door up equals what the opener supplies, minus gravity, plus the spring, minus friction.
The left side is the door’s inertia: \(M(s)\) is how heavy the door feels at position \(s\), \(\ddot s\) is its acceleration and \(\dot s\) its speed. On the right, \(F_{\text{op}}\) is the opener’s push, \(G\) is gravity, \(S\) is the spring’s lift and \(F_f\) is friction, which always opposes the motion. The simulation runs this equation backward: it knows how the door moves and solves for \(F_{\text{op}}\), the force the opener must supply at each point.
The door’s effective mass adds up every section’s sliding and turning:
Each of the four sections has mass \(m_s\) and height \(h\). The first sum is the sections sliding, with \(\mathbf c_i\) the centre of section \(i\). The second is the sections turning, with \(\phi_i\) its tilt and \(m_s h^{2}/12\) a flat panel’s resistance to rotating. Because the sections speed up and tilt as they round the curve, \(M(s)\) changes along the track, and that is where the \(\tfrac12 M'(s)\,\dot s^{2}\) term in the main equation comes from.
Gravity is the slope of the door’s potential energy:
\(\bar y_i\) is the height of each section’s centre. \(G\) is largest when the door is closed and hanging straight down, and falls toward zero as the sections lie flat on the horizontal track, where the track carries their weight.
The torsion spring unwinds as the cable winds onto the drum:
The springs start wound \(n_0\) turns, about 7 here. Every \(2\pi r_d\) of cable wound onto a drum of radius \(r_d\) gives back one turn, so \(n(s)\) is the wind left. The spring’s twist is \(k\) newton-metres per turn, and the drum turns it into the cable pull \(T_c\). \(S\) is that pull measured along the door’s travel. It is positive because the cable shortens as the door rises. A balanced spring makes \(S\) track \(G\) almost exactly.
Friction comes from the rollers pressing on the track:
\(N_j\) is how hard roller \(j\) presses on the track. On the vertical track \(t_z = 0\) and the cables hold the door, so the rollers only guide it. On the horizontal track \(t_z = 1\) and the full weight share \(w_j\) rests on the roller. On the curve of radius \(R\), a moving roller is also pushed outward by \(m_j v_j^{2}/R\). Rolling friction is a small fraction \(\mu\) (about 0.03) of that, plus a steady drag \(F_{\text{seal}}\) from the bottom seal and hinges.
Finally, the opener and the electric bill:
The chain pulls a trolley, and the trolley pulls the door through the door arm. \(\zeta'(s)\) is how far the trolley moves per unit of door travel, so where the trolley moves less than the door, the chain must pull harder. Power is force times speed, the same at the door or at the trolley (moving at \(v_t\), about 0.18 m/s). The motor and gearbox are about 55% efficient (\(\eta\)), and the board and radio draw about 8 W on standby (\(P_{\text{standby}}\)). The \(\max(P,\,0)\) means that when the door pushes back on the motor, that energy is lost as heat rather than returned to the wall.
Be the first to write a comment.