Guidance on controlling stepper motor with light sensor

Hi all,

I would like to know how do I control the movement of the stepper motor with a light sensor on an arduino uno board? I am planning to control the movements of a roller blinds using the light sensor as a detection of the Sun's luminosity and when it reaches a certain lux, the blind will be activated by the light sensor together with the movement of the stepper motor. And when there's no light, the blinds will go back to it's default location. Please guide me in this if possible.

Thank you.

You have not told us what you are already able to do?

  • Can you make the stepper motor move back and forth?
  • Can you detect changing light levels with your sensor?

If not you need to figure those out separately first.

A stepper motor is probably not ideal for this task because it needs power all the time to prevent it missing steps. A simple DC motor with upper and lower limit switches would probably be better. You will need at least one limit switch with the stepper motor anyway so that the Arduino can know where it starts from.

...R Stepper Motor Basics Simple Stepper Code