Arduino UNO Controlled Stepper Motor with Phototransistor and Pushbutton Inputs
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit incorporates an Arduino UNO as the central microcontroller, interfaced with a phototransistor for light sensing, two pushbuttons for user input, a ULN2003 driver to control a 28BYJ-48 stepper motor, and a resistor for current limiting or voltage division in conjunction with the phototransistor. The Arduino UNO is programmed to interact with these components, likely to respond to light changes and user inputs to drive the stepper motor accordingly.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
Phototransistor
- A light-sensitive transistor that changes its electrical properties in response to light intensity.
28BYJ-48 Stepper Motor
- A small, 5-line, 4-phase stepper motor that can be driven by a ULN2003 chip.
Pushbutton (x2)
- A simple switch mechanism for controlling some aspect of a machine or a process. Buttons are typically made out of hard material, usually plastic or metal.
ULN2003
- A 7-channel Darlington transistor array with high-voltage outputs designed for driving inductive loads such as relays, solenoids, and stepper motors.
Resistor (10k Ohms)
- A passive two-terminal electrical component that implements electrical resistance as a circuit element.
Wiring Details
Arduino UNO
5Vconnected to ULN2003+GNDconnected to ULN2003GND, Resistorpin2, and both PushbuttonsPin 4A0connected to PhototransistorED7connected to Pushbutton (Instance 1)Pin 1D6connected to Pushbutton (Instance 2)Pin 1D5connected to ULN2003IN4D4connected to ULN2003IN3D3connected to ULN2003IN2D2connected to ULN2003IN1
Phototransistor
Econnected to Arduino UNOA0Cconnected to Resistorpin1
28BYJ-48 Stepper Motor
BLUEconnected to ULN2003COIL1PINKconnected to ULN2003COIL2YELLOWconnected to ULN2003COIL3ORANGEconnected to ULN2003COIL4REDconnected to ULN2003COIL5
Pushbutton (Instance 1)
Pin 1connected to Arduino UNOD7Pin 4connected to Arduino UNOGND
Pushbutton (Instance 2)
Pin 1connected to Arduino UNOD6Pin 4connected to Arduino UNOGND
ULN2003
+connected to Arduino UNO5VGNDconnected to Arduino UNOGNDIN1connected to Arduino UNOD2IN2connected to Arduino UNOD3IN3connected to Arduino UNOD4IN4connected to Arduino UNOD5COIL1toCOIL5connected to corresponding wires of the 28BYJ-48 Stepper Motor
Resistor (10k Ohms)
pin1connected to PhototransistorCpin2connected to Arduino UNOGND
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the phototransistor, read the pushbuttons, and drive the stepper motor using the ULN2003 driver.
Additional Files
documentation.txt: This file is mentioned but no content was provided. It is likely intended for additional notes or explanations regarding the circuit's operation or code details.