Stepper Motor Control with Proximity Sensors

Job ID: 39668566

Budget: $15 – $25 USD

write an Arduino sketch. stepper motor pul pin 2, dir pin3, 1600 steps per revolution. relay 1 pin 4, relay2 pin5, sensor 1 pin 6, sensor 2 pin7. Relays are wired to the normally open. Start by moving the stepper motor 40 degrees clockwise. next check to se if sensor 1 is active. if sensor 1 is active continue to the loop. if sensor 2or neither is activated turn on relay 2 until there is a signal from sensor 1 then shut off relay 2. In the loop, turn on relay 1, delay 15 seconds, turn on relay2 until there is a signal fron sensor 2. delay 5 seconds. run the stepper motor counter clockwise 40 degrees at 40 rpm. delay 2 seconds turn off relay 1. run the stepper motor at 20 rpm 40 degrees clockwise. turn on relay 2 until there is a signal from sensor 1.