Arduino Mega 2560 Controlled Peristaltic Pumps and Servo Motors with NeoPixel Feedback
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed around the Arduino Mega 2560 microcontroller, which serves as the central processing unit for controlling various peripherals including servos, a peristaltic pump, LEDs, and DC motors with encoders. The circuit includes user input interfaces such as pushbuttons, a potentiometer, toggle switches, and a rocker switch. Power management is handled by power MOSFETs and a DC power source. The circuit also features an Adafruit NeoPixel Stick for visual output.
Component List
Microcontroller
- Arduino Mega 2560: A microcontroller board based on the ATmega2560, with a multitude of GPIO pins for interfacing with various components.
Actuators
- Servo: A rotary actuator that allows for precise control of angular position.
- Peristaltic Pump: A type of positive displacement pump used for pumping various fluids.
- DC Motor with Encoder: A motor that provides feedback on its position or velocity via an encoder.
Power Components
- Power MOSFET: Used for switching heavy loads with a small control signal.
- DC Power Source: Provides the necessary power to the circuit.
Input Devices
- Pushbutton: A simple switch mechanism for controlling some aspect of a machine or a process.
- Potentiometer: A three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider.
- Toggle Switch: A switch that can maintain its state either open or closed.
- Rocker Switch: A button for switching power with a seesaw action.
Indicators
- Adafruit NeoPixel Stick: An LED strip with individually addressable RGB LEDs.
- LED: Two Pin (white): A basic white light-emitting diode.
Passive Components
- Resistor (200 Ohms): A passive two-terminal electrical component that implements electrical resistance as a circuit element.
Wiring Details
Arduino Mega 2560
- 5V connected to Toggle Switch (COM)
- A0 connected to Potentiometer (Output)
- A1 connected to DC Motor with Encoder (Encoder B)
- A2 connected to DC Motor with Encoder (Encoder B)
- D11 PWM connected to Servo (pulse)
- D12 PWM connected to Servo (pulse)
- D13 PWM connected to Adafruit NeoPixel Stick (DATAIN)
- D52 connected to Toggle Switch (L1)
- D50 connected to Toggle Switch (L2)
- D48 connected to Rocker Switch (1)
- D42, D40, D38, D36, D34, D32, D30, D28, D26, D24, D22 connected to corresponding Pushbuttons (Pin 1)
- D43, D41, D39, D37 connected to corresponding Power MOSFETs (PWM)
Servo
- GND connected to GND
- VCC connected to VCC
Peristaltic Pump
- "+" and "-" connected to corresponding Power MOSFETs (+V(5-36V) and GND(5-36V))
Power MOSFET
- PWM connected to Arduino Mega 2560 (D34, D43, D41, D39, D37)
- GND connected to GND
- GND(5-36V) connected to DC Power Source (Ground)
- +V(5-36V) connected to DC Power Source (Positive)
Pushbutton
- Pin 2 connected to corresponding Resistor (pin2)
- Pin 3 connected to VCC
- Pin 1 connected to Arduino Mega 2560 (D42, D40, D38, D36, D34, D32, D30, D28, D26, D24, D22)
Resistor (200 Ohms)
- Pin 1 connected to GND
- Pin 2 connected to corresponding Pushbutton (Pin 2)
Adafruit NeoPixel Stick
- GND connected to GND
- +5V connected to VCC
- DATAIN connected to Arduino Mega 2560 (D13 PWM)
LED: Two Pin (white)
- Cathode connected to Power MOSFET (GND(5-36V))
- Anode connected to Power MOSFET (+V(5-36V))
Potentiometer
- GND connected to GND
- Output connected to Arduino Mega 2560 (A0)
- VCC connected to VCC
Toggle Switch
- COM connected to Arduino Mega 2560 (5V)
- L1 connected to Arduino Mega 2560 (D52)
- L2 connected to Arduino Mega 2560 (D50)
Rocker Switch
- 1 connected to Arduino Mega 2560 (D48)
- 2 connected to VCC
DC Motor with Encoder
- Encoder B connected to Arduino Mega 2560 (A1, A2)
- GND connected to GND
- VCC connected to VCC
- Motor +ve connected to GND
- Motor -ve connected to VCC
Documented Code
Arduino Mega 2560 - sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino Mega 2560 - documentation.txt
(No additional documentation provided)