![CatFeeder](https://3dcrawler.ams3.digitaloceanspaces.com/thingiverse/4366318-CatFeeder-3317827066.jpg)
CatFeeder
Description
My CatFeeder is equipped with a laser sensor that checks the food level in the food bowl. By turning the potentiometer, you change the set point of the food level inside the bowl. The first line of the display shows the current food level. The second line shows the set point you have selected. I have added the arduino nano software that I use on my CatFeeder today. I have also added a Fritzing sketch that show how to connect all the parts. All the 3D printed part you have to glue together with some kind of superglue. I hope someone will make my pet feeder like it is or with a modification. Here are the components I have used. Motor: https://www.ebay.com/itm/Reversible-Electric-Worm-Gear-Motor-12V-8rpm-6mm-Output-Shaft-Gearmotor/183867809745?hash=item2acf601fd1:g:5X0AAOSwhkJdSXDb L298N https://www.ebay.com/itm/L298N-DC-Stepper-Motor-Driver-Module-Dual-H-Bridge-Control-Board-for-Arduino/362863436137?hash=item547c58a169:g:gkYAAOSwe6FaJ5Df Laser sensor https://www.ebay.com/itm/VL53l0x-Breakout-oF-Enfernungssensor-Modul-GY-VL53L0XV2-Distance-Sensor/254315928298?hash=item3b36691aea:g:XbsAAOSwerddQWW5 Oled https://www.ebay.com/itm/0-96-I2C-IIC-Serial-128X64-128-64-Blue-OLED-LCD-LED-Display-Module-for-Arduino/312207439884?epid=0&hash=item48b103780c:g:kVUAAOSwZGRbZYfX Potentiometer https://www.ebay.com/itm/WH148-B1K-B1M-Ohm-Linear-Taper-Rotary-Potentiometer-Panel-Pot-3-PIN-Knob-Cap/124031440318?hash=item1ce0d995be:m:m2NiUMv_JMPvd63eX1YnmRg Power connector https://www.ebay.com/itm/20PCS-5-5mm-x-2-1mm-DC-Power-Supply-Female-Jack-Socket-Panel-Mount-Connector-M81/392706939079?hash=item5b6f2858c7:g:afkAAOSwJVJeWcd0 Here is my INO file for the CatFeeder: #include <Wire.h> #include "Adafruit_VL53L0X.h" #include <SPI.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> const int FEEDpin; const long onDuration = 60000;// Feed time const long offDuration = 1800000;// Feeder wait 30 minutes before it feeds again int FoodState = HIGH;// initial state of LED long rememberTime=0;// this is used by the code Adafruit_SSD1306 display = Adafruit_SSD1306(); Adafruit_VL53L0X lox = Adafruit_VL53L0X(); void setup() { pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT); pinMode(FEEDpin,OUTPUT);// define FEEDpin as output display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.display(); delay(50); Wire.begin(); lox.begin(); display.setTextSize(2); display.setTextColor(WHITE); } void loop() { int sensorValue = (analogRead(A0)/5.065); VL53L0X_RangingMeasurementData_t measure; lox.rangingTest(&measure, false); if (measure.RangeStatus != 4) { display.clearDisplay(); display.setCursor(35,0); display.print(measure.RangeMilliMeter); // Oled show actual food level i first line and setpoint food level i second line display.print(" mm"); display.setCursor(35,16); display.print(sensorValue); display.print(" mm"); display.display(); delay(50); } else { display.display(); display.clearDisplay(); return; } if(FoodState == HIGH) { if( (millis()- rememberTime) >= onDuration){ FoodState = LOW; rememberTime=millis(); } } else { if((millis()- rememberTime) >= offDuration){ FoodState = HIGH; rememberTime=millis(); } } digitalWrite(FEEDpin,FoodState); if(FoodState == HIGH && measure.RangeMilliMeter >= sensorValue){ // sensorValue = wanted food level you can adjust with potentiometer. digitalWrite(7, HIGH); digitalWrite(8, LOW); analogWrite(9,255); }else{ digitalWrite(7, LOW); digitalWrite(8, LOW); } }// loop ends Happy printing!!
Statistics
Likes
39
Downloads
0