What is the math behind converting angular moment of a wheel to the brake that stops it? Hopefully my diagram makes sense.

I am trying to understand how I would calculate the momentum that the break would receive if it brought the wheel (rotating clockwise) to a full stop. I intend on doing a science project that looks like the following 

And I accelerate the wheel then apply a break it in order to flip the square over and repeat over and over in order to have some sort of moving wheel (tenth grade science project for school), and explain the basic concepts of conservation of momentum and angular velocity, but I have no clue how to add the weight of the overall contraption (assuming the  break pads weigh X, and the wheel weighs Y and has velocity Z, walls weigh A, etc.). I do not plan on actually building it, but I am supposed to be able to show how the math would work if it did exist. Got the idea from this YouTube video.
Any help would be greatly appreciated.
 A: So probably the easiest way to treat this problem is to view it as a conservation of energy problem, rather than focusing on exactly what happens with the brake.
Your flywheel has some angular momentum $L$, your cube has some moment of inertia $I$ about its edge. If it were uniform then I think this is $I = (2/3)ma^2$ where $m$ is the mass of the cube and $a$ is the length of the side—your cube is not uniform of course, but we can imagine it is done $ka^2$ for, say, $0<k<2$. If the brake acts instantaneously, the cube should get an angular momentum $\omega = L/I$ which then is an energy $\frac12I\omega^2=\frac12L^2/I.$
To get to its topmost position, the center of mass of the cube has to go from height $a/2$ to height $a\sqrt{2}/2$ and therefore the basic inequality is$$L^2/(k m a^2) > m g a (\sqrt2-1).$$
Where the stopping time of the brakes starts to matter, is that if you can't get enough torque to start this thing lifting, or the flywheel is not stopped before the thing is halfway up, then you might incur other losses that prevent you from getting to the appropriate height.
