my project is to use a pan-tilt laser turret to mark out a sundial on the ceiling of my south-facing front room. With a small horizontal mirror on a bracket outside the window, a spot of light is reflected (on sunny days) onto the ceiling.
I have the maths for how to lay out a calibrated set of hour lines (taking into account date, equation of time, etc) on the ceiling, and want to use a laser-pointer turret to shine a dot in the right place for any time/date so I can ‘join the dots’ marking out the lines properly on the ceiling without using a ruler or having the sun shining. By having a number of ‘correct’ reference points, marked when the sun was shining, noting down what az/el is needed from the laser to hit them, I should be able to solve for all the unknowns in the ceiling geometry and position of the laser turret.
I bought a Raspberry Pi Zero-WH, and a “Pan-Tilt HAT” and some laser diodes, but have found the precision and repeatability of steered position much too poor (as it’s based on servos). I need reliable accuracy and precision of better than 0.2 degrees in each axis. So I think I’m going to have to go to stepper motors (two, mounting one on the spindle of the other), probably geared down. My research suggests that the “Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit” would work with 28BYJ-48 5V Stepper Motors, which seem light and geared down enough to give me adequate precision.
I have a couple of questions:
- the “28BYJ-48 5V Stepper Motors” come with “ULN2003 Motor Driver Board”. I think I don’t need these, but can use direct connection to the Adafruit board?
- I need to solve the problem of establishing a consistent absolute direction for each axis. Either reading a shaft encoder, or driving the stepper to an end-stop to establish a reference position each power-up. Any suggestions for a mechanically neat way to do this? Most optical encoders seem to be about measuring rotation speed and distance rather than absolute position. Could I use a microswitch in each axis? What happens when the motor reaches the microswitch and stalls?
I’m pretty competent at maths and software but no good at mechanical fiddling about and quite weak at electronics, so any helpful advice would be very welcome…