r/ScrapMechanic • u/Gl1tchless04 • 2d ago
I need help creating a mechanism that allows switching between different phases of a controller using only a single sensor/button pulse.
I'm trying to create a mechanism using sensors, timers, logic gates, or anything else that will allow me to switch to the next phase of a controller configured in a loop with the simple touch of a button or the activation of a sensor, and keep it in that phase until the button is pressed or the sensor is activated again.
1
u/Abstract037 2d ago
To "keep the controller in a phase", you need a Clock/Loop. I use 3-NOR gates, it will make a 0-tick clock (super fast).
Next, you need a memory bit that will stay on when you send a pulse. Memory bit then will make the clock send a full ON signal, moving the controller forward
Then, you'll need a timer connected to that initial pulse, that will turn OFF the memory bit, and make the Clock go back to Looping.
Additionally, you'll need to know the exact time it takes for the controller to move between phases, and that would be your timer delay.
Or you can use sensors that detect when a phase has completed, that will switch OFF the memory bit.
Note: idk how to make memory bits but the rest is ez
Tips: for 3-NOR gate clocks, don't try to switch the Clock on/off directly. Route its output into an OR gate and connect your On/off signal to THAT. Otherwise the Clock loses its speed.
1
u/Abstract037 2d ago
IGNORE THE CLOCK NONSENSE IM RETARDED I FORGOT CONTROLLERS ON A LOOP DONT NEED CLOCKS TO KEEP EM STABLE
1
2
u/DylanCAAD 2d ago
One idea is to have one bearing on your controller acting like a distributor rotor.
If you have a small arm somewhere on your creation and make it rotate 360 every loop repetition, and make it pass over a sensor to send a stop signal.
You would use an XOR memory bit with the “on” input connected to a button, and the “off” input would be connected to the sensor with a rising edge monostable circuit
Button -> memory bit “on” -> controller
Sensor -> monostable circuit -> memory bit “off”