How to lock an object so is always showing the same face when rotates
I think this can be achieved with drivers as well.
Drivers
You could add a driver to the rotation direction around the axis of the pedal, and then have it driven via Scripted Expression by the rotation of the gear object.
The expression should be &quot;-var&quot; since the pedal turns in the opposite direction with the same angular velocity.
Also, because the pedal is most likely a child of the gear, make sure Space it set to World Space (otherwise it won't work)
Constrains
Another way is to is to do it using constraints and empties. You could add an Empty at the location of the pedal origin (or pivot or turning axis), and add an empty exactly below it on the ground.
Add a Damped track constraint to the pedal with Ground Empty as the Target, and set it to the X axis. Add a Copy Location Constraint to the Ground Target and with the Pedal Empty as a target, and check the boxes next to X and Y (but not Z).
You need the extra Pedal Empty because it won't work if you target the pedal itself directly (probably because the constraint on pedal is targeting the Ground Empty and it causes a direct loop).

Left is with drivers. Right with constraints.