Here's a short video of a mostly complete valve in action.
<iframe width="420" height="315" src="https://www.youtube.com/embed/jRVEJPx6WlM" frameborder="0" allowfullscreen></iframe>
At start up there is a 10 second window where an input (3 second button press) will toggle it into calibration mode. Once in calibration mode it finds the magnet in the large gear from both directions and then waits for user input. Each button press at this point steps the valve one step with the goal being for the user to move it to the full open position. Once full open is reached it will store the offset from the magnet position in EEPROM and use this to find closed each time it auto-homes (via command or on power up/re-start).
Once out of calibration mode, at button press moves the valve open or closed. The opposite of whereever it is currently.
In the end these will be controlled over the serial bus I'm using for all the other modules on the tank.
<iframe width="420" height="315" src="https://www.youtube.com/embed/jRVEJPx6WlM" frameborder="0" allowfullscreen></iframe>
At start up there is a 10 second window where an input (3 second button press) will toggle it into calibration mode. Once in calibration mode it finds the magnet in the large gear from both directions and then waits for user input. Each button press at this point steps the valve one step with the goal being for the user to move it to the full open position. Once full open is reached it will store the offset from the magnet position in EEPROM and use this to find closed each time it auto-homes (via command or on power up/re-start).
Once out of calibration mode, at button press moves the valve open or closed. The opposite of whereever it is currently.
In the end these will be controlled over the serial bus I'm using for all the other modules on the tank.