Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Solar-Powered Arduino UNO Seed Sowing Machine with Moisture Sensing and Motor Control

View and Edit Project In Cirkit DesignerImage of Solar-Powered Arduino UNO Seed Sowing Machine with Moisture Sensing and Motor Control

Solar Powered Seed Sowing Machine Circuit Documentation

Summary

The Solar Powered Seed Sowing Machine is an automated system designed to sow seeds and maintain soil moisture at an optimal level. The system is powered by a solar panel, which charges a lithium-ion battery through a SunnyBuddy charge controller. The Arduino UNO microcontroller serves as the central processing unit, interfacing with various sensors and actuators to control the machine's operations. The circuit includes sensors for line tracking and obstacle avoidance, an ultrasonic sensor for distance measurement, and a motor driver to control two DC motors. The embedded code on the Arduino UNO manages the soil moisture sensor and activates a water pump when the soil's moisture level falls below a predefined threshold.

Component List

Arduino UNO

SunnyBuddy-v13

Polymer Lithium Ion Battery - Generic

Solar Panel

HC-SR04 Ultrasonic Sensor

KY-033 Line Tracking Sensor

DC Motor (2x)

Motor Driver

MKE-S11 IR Infrared Obstacle Avoidance Sensor

Wiring Details

Arduino UNO

SunnyBuddy-v13

Polymer Lithium Ion Battery - Generic

Solar Panel

HC-SR04 Ultrasonic Sensor

KY-033 Line Tracking Sensor

DC Motor

Motor Driver

MKE-S11 IR Infrared Obstacle Avoidance Sensor

Documented Code

/*
 * Solar Powered Seed Sowing Machine
 * This Arduino sketch controls a soil moisture sensor and a water pump.
 * The system is powered by a solar panel and a lithium-ion battery.
 * When the soil moisture level drops below a threshold, the water pump is activated.
 */

const int moistureSensorPin = A0; // Soil moisture sensor connected to A0
const int relayPin = 7; // Relay module connected to digital pin 7
const int threshold = 400; // Moisture level threshold

void setup() {
  pinMode(relayPin, OUTPUT); // Set relay pin as output
  digitalWrite(relayPin, HIGH); // Turn off the pump initially
  Serial.begin(9600); // Initialize serial communication
}

void loop() {
  int moistureLevel = analogRead(moistureSensorPin); // Read moisture level
  Serial.print("Moisture Level: ");
  Serial.println(moistureLevel); // Print moisture level

  if (moistureLevel < threshold) {
    digitalWrite(relayPin, LOW); // Turn on the pump
    Serial.println("Pump ON");
  } else {
    digitalWrite(relayPin, HIGH); // Turn off the pump
    Serial.println("Pump OFF");
  }

  delay(2000); // Wait for 2 seconds before next reading
}

This code is designed to run on the Arduino UNO microcontroller. It reads the moisture level from a soil moisture sensor and controls a relay to power a water pump. The relay is activated when the moisture level falls below a set threshold, indicating that the soil is dry and needs watering. The system is designed to be energy efficient, running on power supplied by a solar panel and stored in a lithium-ion battery.