Cov txheej txheem:

Auto Dog Feeder: 6 Kauj Ruam
Auto Dog Feeder: 6 Kauj Ruam
Anonim
Nws Pib Aub Feeder
Nws Pib Aub Feeder

Nov yog kuv qhov project ntawm Auto Pet Feeder. Kuv lub npe yog Parker Kuv nyob Qib 11 thiab kuv tau ua txoj haujlwm no thaum Lub Kaum Ib Hlis 11 2020 raws li CCA (Chav Kawm Culminating Activity) hauv txoj haujlwm no kuv yuav qhia koj yuav ua li cas thiaj ua Tus Tsiaj Tsis Pub Tuaj Nrog Arduino UNO. Koj tuaj yeem xaiv lub sijhawm uas koj tuaj yeem hloov pauv. Cov zaub mov yuav faib tawm los ntawm auger thiab pub koj cov tsiaj!

Khoom siv

Electronics:

  • Arduino UAS
  • L298N - 10 $ - Tswj Nema 17
  • NEMA 17 - 10 $ - Tig lub auger kom cov zaub mov xa mus
  • RTC (DS1307) - 10 $ - Muab sijhawm
  • 12V Cov Khoom Siv Hluav Taws Xob - 5 $ - Muaj zog txhua yam
  • Mini Breadboard - Rau qhov chaw txuas ntxiv
  • Jumper Wires - Txuas txhua yam
  • Poj niam rau Txiv neej cov xov hlau - Txuas txhua yam

Kho vajtse:

  • 3D luam ntawv filament - rau 3d tshuab luam ntawv
  • 2 M4 Bolts - Tuav lub hauv paus phaj hauv qhov chaw
  • 4 Nema 17 ntsia liaj qhov rooj - Tuav nema cia
  • PVC T 48mm sab hauv sab nrauv 66mm sab nrauv - 3 $

Cov Cuab Yeej:

  • 3D tshuab luam ntawv
  • Laum
  • Phom phom

Kauj ruam 1: Txheej txheem cej luam ntawm Tsim

Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim
Txheej txheem cej luam ntawm Tsim

Tus tsim ntawm tus tsiaj pub mis yog yooj yim heev. Lub plhaw mus rau sab saum toj ntawm PVC T. Tom qab ntawd lub hau npog nyob tom qab ntawm PVC T (raws li qhia hauv daim duab) nrog Nema 17 txuas nrog nws. Tom qab ntawd Nema 17 yuav raug thawb mus rau sab nraum qab ntawm Auger uas tuaj yeem pom saum toj no thiab ntsia liaj qhov rooj yuav nkag mus rau sab kom tuav nws nyob hauv qhov chaw yog li nws tsis deform lub qhov uas tuaj yeem pom saum toj no!

Tom qab ntawd tus auger yuav yooj yim thawb cov zaub mov tawm ntawm cov yeeb nkab thiab mus rau hauv lub tais!

Kauj ruam 2: Txheej txheem cej luam

Txheej txheem cej luam ntawm Txoj Cai
Txheej txheem cej luam ntawm Txoj Cai
Txheej txheem cej luam ntawm Txoj Cai
Txheej txheem cej luam ntawm Txoj Cai
Txheej txheem cej luam ntawm Txoj Cai
Txheej txheem cej luam ntawm Txoj Cai

RTC & The stepper muaj kev tso npe hu ua RTClib.h thiab Stepper.h uas ntxiv cov lej yooj yim rau RTC & Stepper. Yog cov lus yooj yim heev nws hais yog teev thiab feeb sib npaug lub sijhawm hais tias nws yuav tig lub nema uas yuav faib cov zaub mov. Tus so ntawm txoj cai yog yooj yim heev rau kev nkag siab txawm tias rau ib tus neeg nrog ib hnub ntawm kev paub dhau los.

Kauj Ruam 3: Txuas Nema 17 rau Base Phaj & Auger

Txuas Nema 17 rau Base Phaj & Auger
Txuas Nema 17 rau Base Phaj & Auger
Txuas Nema 17 rau Base Phaj & Auger
Txuas Nema 17 rau Base Phaj & Auger
Txuas Nema 17 rau Base Phaj & Auger
Txuas Nema 17 rau Base Phaj & Auger

Ua ntej koj xav nqa koj lub hauv paus phaj thiab txuas nws rau koj Nema 17 siv qhov ua ntej ua ntej ntawm lub hauv paus phaj. Thaum ua tiav qhov koj xav muab lub qhov rau Nema siv lub qhov nraub qaum rau nws. Tom qab ntawd txuas lub hauv paus phaj nrog lub auger thiab Nema txuas tom qab ntawd ntsia hlau M2 ntsia hlau rau txhua sab.

Kauj Ruam 4: Txuas L298N & RTC

Txuas L298N & RTC
Txuas L298N & RTC
Txuas L298N & RTC
Txuas L298N & RTC

Cov kauj ruam no yuav qhia koj li cas xaim L298N & RTC

Peb yuav pib nrog tus pin 8, 9, 10, 11 mus rau L298N

  • Tus Pin 8 (Dawb) rau IN1
  • Pin 9 (Ntshav) rau IN2
  • Pin 10 (Pink) rau IN3
  • PIN 11 (Daj) rau IN4

Tom ntej no peb yuav txuas Nema 17 mus rau L298N

  • OUT1 rau 1 ntawm NEMA
  • OUT2 rau 2 ntawm NEMA
  • OUT3 rau 3 ntawm NEMA
  • OUT4 rau 4 ntawm NEMA

Txuas 12v thiab Arduino rau L298N (Tsis tuaj yeem pom 12V yog li xav txog 9V roj teeb raws li lub zog)

  • Volts rau 12V
  • Hauv av rau GND
  • 5V txog 5V ntawm Breadboard

Txuas RTC rau Arduino

  • GND to CSY
  • 5V txog 5V ntawm Breadboard
  • SDA to AWM A5
  • TXL to A4

Jumper Pins

Txhua tus jumper pins yuav tsum nyob ntawm L298N

Kauj Ruam 5: Coding Nrog Cov Lus

Coding Nrog Cov Lus
Coding Nrog Cov Lus
Coding Nrog Cov Lus
Coding Nrog Cov Lus
Coding Nrog Cov Lus
Coding Nrog Cov Lus

Cov cai meej dua hauv cov duab saum toj no

// Lub npe: Parker Frederick

// Project Name: Auto Pet Feeder // Date: Tuesday, November 10th 2020 // Xibfwb: M. Bonisteel // Desc: Pub koj cov tsiaj nyob rau lub sijhawm!

// Libaries rau yam uas kuv siv #include #include #include "RTClib.h"

RTC_DS1307 rtc; // Hais dab tsi RTC kuv siv

// Nov yog qhov uas koj teem sijhawm rau zaub mov

Teev Sijhawm int mornFeedTime = 12; int hmoFeedTime = 7; // feeb int mornFeedTimeM = 29; int hmoFeedTimeM = 00; // Seconds int mornFeedTimeS = 20; int hmoFeedTimeS = 00;

char daysOfTheWeek [7] [12] = {"Hnub Sunday", "Monday", "Tuesday", "Wedsneday", "Thursday", "Friday", "Saturday"}; // Ua rau cov hnub ib txwm hloov mus ua hnub ntawm lub lim tiam

const int pub = 200; // Nov yog koj cov kauj ruam ntau npaum li cas koj xav kom nws tig

Stepper myStepper (pub, 8, 9, 10, 11); // Koj tus pin rau lub Nema 17 thiab feem ntau lwm cov steppers

teeb tsa tsis muaj dab tsi () {Serial.begin (9600);

thaum (! Serial); // Yog tias RTC tsis ua haujlwm nws yuav tso tawm hauv lub vijtsam txuas yog (! Rtc.begin ()) {Serial.println ("Tsis tuaj yeem pom RTC"); thaum (1); }

// Qhov no yuav qhia koj seb puas yog Lub Sijhawm Tiag Tiag tab tom khiav thiab nws yuav tso tawm ntawm lub vijtsam txuas yog (! Rtc.isrunning ()) {Serial.println ("RTC tab tom khiav!");

rtc.adjust (DateTime (F (_ DATE_), F (_ TIME_)))); // Qhov no yuav siv koj lub sijhawm computer thiab siv nws ntawm RTC

// Yog tias koj xav kom muaj sijhawm teem hloov lub sijhawm computer koj tuaj yeem ua nws ntawm no //rtc.adjust(DateTime(2020, 10, 29, 8, 28, 0)); // Xyoo/Ib Hlis/Hnub/Teev/feeb/Thib Ob} myStepper.setSpeed (200); // Ceev koj xav kom nws tig ntawm}

void loop () {DateTime tam sim no = rtc.now ();

// Qhov no yuav ua rau qhov sib txawv ntawm cov teev nws yog tam sim no thiab lwm yam int hr = now.hour (); int mi = tam sim no.minute (); int se = now.second ();

// Txoj cai yog li ntawm lub sijhawm teem nws yuav faib cov zaub mov thiab nws yuav tig 5 zaug, qhov no yog rau noj thaum sawv ntxov

yog (hr == mornFeedTime && mi == mornFeedTimeM && mornFeedTimeS == se) {Serial.println ("Noj tshais!"); myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

}

// Txoj cai yog li ntawm lub sijhawm teem nws yuav faib cov zaub mov thiab nws yuav tig 5 zaug, qhov no yog noj hmo hmo

yog (hr == nightFeedTime && mi == nightFeedTimeM && nightFeedTimeS == se) {Serial.println ("Noj hmo!"); myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700);

myStepper.step (-feed); ncua (700); }

// Qhov no yuav tso tawm YEAR, MONTH, DAY, HOUR, MINUTE, SECOND hauv cov ntawv xov xwm

Serial.print (tam sim no.year (), DEC); Serial.print ('/'); Serial.print (now.month (), DEC); Serial.print ('/'); Serial.print (now.day (), DEC); Serial.print ("("); Serial.print (hnubOfTheWeek [tam sim no.dayOfTheWeek ()]); Serial.print (")"); Serial.print (tam sim no teev (), DEC); Serial.print (':'); Serial.print (tam sim no.minute (), DEC); Serial.print (':'); Serial.print (now.second (), DEC); Serial.println (); }

Lub Vev Xaib Kuv tau siv rau RTC Kuv tau tshem tawm feem ntau yam uas tsis yog cov lus uas hais tias RTC nyob lossis tsis yog. Kuv feem ntau siv lub vev xaib no los kawm paub yuav ua haujlwm RTC li cas

Lub Vev Xaib Kuv tau siv rau Stepper lub cev muaj zog qhov no tau pab kuv nkag siab yuav ua li cas rau program stepper kom khiav Kuv tsis tau khaws ib yam dab tsi los ntawm nws. Nws tsuas yog pab kuv nkag siab yuav ua li cas rau nws

Kauj Ruam 6: Teeb Meem thiab Kuv Yuav Kho Li Cas

Teeb meem thiab Kuv Yuav Kho Li Cas!
Teeb meem thiab Kuv Yuav Kho Li Cas!

Ob peb teeb meem kuv muaj

  • Kuv xav tau 12v fais fab mov, Kuv tsuas muaj 9v roj teeb kuv pom ib qho thiab nws tau daws sai.
  • Thaum sib txuas L298N nrog NEMA 17 Kuv tau xaim tsis raug ntawm A thiab A- uas ua rau nws tshee me ntsis. Kuv yooj yim kho nws los ntawm kev hloov cov xov hlau rau lwm txoj kev.
  • Sim ua kom txoj cai yooj yim dua vim tias hauv nqe lus yog myStepper.step (-feed); dhau thiab dhau los saib tsis meej. Yog li kuv yuav tsum hloov nws rov qab.
  • Kuv tau ua cov phaj me me tsis raug raws li pom hauv daim duab yog li kuv yuav tsum 3D luam tawm ib qho tshiab me ntsis thiab nws haum zoo meej!
  • Teeb meem Kuv muaj yog nws jams txij li lub auger yog me me yog li nws jams txoj kev yooj yim kuv tuaj yeem kho yog los ntawm kev nthuav dav auger me me!

Pom zoo: