I am a complete novice at arduino. I just want to know if this is possible before I start investing in components. I need to start and stop a chain drive conveyor {can't slip} powered by a 12 volt motor in the exact same place each time I manually start the cycle. I want it to stop automatically. The controller would have to power a relay to power the motor due to high amp draw of motor. This is on a piece of equipment without access to any other power supply but a 12 volt battery. I am looking at an optical rotary encoder to count the revolutions of the shaft. I would count the revolutions the shaft makes between my start and stop point and I assume enter that in the program. Is this possible? Thanks

  • definitely possible .... it would be more reliable to sense the conveyer belt itself, in case there is slippage between the drive and the belt
    – jsotola
    Nov 1, 2020 at 18:04
  • That sounds fine. Just note that when powering up the system, you don't know the position of the conveyor. If you need that, you'd have to add something to manually "home" the conveyor, or add another sensor to find the "home" position of the belt. Ffor example adding a magnet to the belt, or a piece of reflective tape, and using a hall-effect sensor/photo-reflective sensor to find the "home" position. After that you only need to count rotations of the rotary encoder.
    – Gerben
    Nov 2, 2020 at 16:37
  • Would a hall sensor work in a dirty or wet environment? Nov 3, 2020 at 0:48

1 Answer 1


Although your solution would work, it seems open to problems such as missed clicks, starting at a different place etc. A better, more robust and error free solution might be to use a hall sensor. Essentially what a hall sensor does is close a switch when a megnetic force is applied. So all you have to do is add a magnet to your conveyor/chain. This way, you can easily control where you want it to stop just by moving the magnet, and it doesn't matter what the starting position is because it will always stop as soon as the megnet reaches the sensor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.