Nice work Pablo! Glad to see the reducer working well for you. The video is great.
The formula for working out the final drive ratio is as follows:
1 stage:
ratio1=(#lobes1 - #pins1)/#lobes1
Note: the negative value indicating that the output motion will be reversed vs the input
Now, when you add the second stage, you do not use the same formula as the differential nature modifies it.
2nd stage formula:
ratio2=(#lobes2 - #pins2)/#pins2
Notice the division by the number of pins, not the number of lobes.
Total Ratio = ratio1*ratio2
In drives that have #pins-#lobes=1 for both stages, the final ratio can be simplified to be:
ratio=1/(#lobes1*#pins2)
Also, this does not work if #lobes1=#lobes2 as there is no differential action.
So as long as your desired ratio can be factored in at least two, you can create it with two stages. This does explain the observed behavior in my design, so it is at least true for #lobes1=#pins2=10. I used the paper here on hypocycloidal friction drives to work out the details.
As to the question of how little clearance is required between the cam and the pins, it depends on the construction of the reducer. There seem to be two types of commercial reducers. One type that uses preloaded rollers as cam follower. The other has a series of offset cams that run against solid pins (as my and Pablo's designs do).
For the preloaded roller design, there is no clearance required (in fact it should be slightly negative).
For the solid pin designs, the commercial units seem to have two or three cam plates operating out of phase from each other on separate eccentric centers. I would surmise that this is to allow preload of the cam plates against the pins while still allowing enough clearance to allow them to rotate.
I also found an interesting paper on the modification of the cam for optimum performance in the solid pin version. It involves modifying the cam so that the peaks and valleys will not contact the pins. This is done to avoid the portions of the cam that simply add friction and do not contribute to motion (pressure angle is not favorable). The paper is here. The translation is not great, but the math is fine.
Forgot to add the picture of the single stage reducer I built before I developed the cam generation script. It works somewhat, but it is "sticky" due to the non-optimal lobe shape.