You are on page 1of 25

instructables

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module

by oliverb

Int ro Fe e de r

This project uses an ESP8266 WIFI board via the Blynk 34 individual feeds
Mobile app to trigger a measure of dry food for your
cat or in a suitable outdoor enclosure Koi Carp pellets Thermal fused for safety
for your sh pond.
Designed to be hidden away in a cupboard
Only a few basic electronic components are used and
any wiring is kept to a minimum. Manual feed button

Further details can be found on my web site here Pet Bly nk App

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 1
Feeder Web Page Start Time and Date

There are many Instructables on using the ESP8266 Last Fed Time and Date
board just search this site or try this Intructable
Individual display of Manual, Timer and App feeds
Two old mobile phones are used as a video servers
one monitors the feeding via the Blynk app and Manual feed from App button
another is used as a general IP cam using IP Webcam
Pro. The feeder uses the hopper from a cereal feeder Feed bowl view from remote camera
and has a stepper motor attached to the feed aps to
rotate them an exact dose of dry food. Timer On O control

Although the hopper can feed 34 measure of food we Display of 1 st and 2nd timer feeds
would only really use this if we were away for the
weekend. We also have neighbours/friends and family Calibration button
who could look in on the cat if there are any
problems. Our cat has access to the utility room via a Feed Hopper food level indicator
cat ap and I use a 2nd old mobile as a monitor to
check she is coming and going OK.

Fe a t ure s /Funct io ns

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 2
Step 1: PET Safety

Using this feeder you could probably feed your cat in I only really use it if I will be away for the weekend and
an emergency for a couple of weeks (my cat has a cat then I can always call a neighbour to look in on my cat
ap to the garden so can come and go as she wants) if I have any concerns.
but this is not recommended.

I also use a couple of video cameras, one to keep an and is powered over it's charger lead.
eye on the feeder via the Blynk app and uses the RTSP
Camera Server from Google play and one to monitor Pic 1 IP Cam Pro running on an old S4
the room where my cat can access from the garden.
Pic 2 Once running and port forwarding enabled the
The cameras used to monitor the cat's room is an old video feed can be viewed from the internet on your
mobile phone that uses an app called IP Webcam Pro mobile, tablet or laptop.
and it is is available from the Google Play store. IP
Webcam Pro turns your old mobile into an IP cam so Pic 3 Make sure your pet has enough water while you
you can access the camera from the internet to are away by using one of these water dispensers.
monitor your PET on video and audio.

The camera is mounted on a cheap car phone mount

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 3
Step 2: Parts List

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 4
Ha rdw a re Thermal Fuse EYP28H115

Cereal dispenser Push Switch

Timber o cuts Fuse Holder with fuse

Wood screws 2 x capacitor and 1 resistor see schematic for details

2 Old mobile phones Vero board see layout for details

Mounting boxes Notes

Motor Shaft Coupler I used an old Samsung S3 and S4 for this project. I
had these laying around. The S4 has a cracked screen
Ele ct ro nics but as it is on used as an IP camera it does not matter.
The feed bowl camera is powered from the feeder and
ESP8266 WIFI board the room monitor camera is powered from it's mains
charging plug so if the phone batteries are na it
NEMA 17 Stepper motor with integrated planetary doesn't matter.
gearbox with a 26.85:1 gear ratio
Pic 1 shows the S3 monitoring the cat bowl using the
Stepper motor mounting bracket RTSP Camera Server from Google play

LM2596 step down voltage converter module Pic 2 shows the S4 monitoring the cat's room using IP
Webcam Pro also available from the Google Play store
Dual H Bridge Stepper Motor Drive Controller Board
Module

Step 3: Design

Design The feeder frame is made from o cuts of timber I had


laying around in my workshop. A standard cereal
The feeder is designed to be tted in a kitchen base dispenser is tted to this wooden frame and a stepper
unit. Any size down to around 300mm width should motor is attached to the drive shaft instead of the
be ne. Using a short length of standard 68mm down manual control handle.
pipe cut through the base of the cabinet and a 112.5°
O set Bend to allow the pipe to exit the cabinet If you are feeding sh outside then a waterproof
through the plinth and into the cat/dog bowl. Once cabinet will need to be constructed on the side of the
the feeder operates gravity will take the feed down pond.
the pipe and into the bowl.

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 5
Step 4: Construction

Pic 1 The feed hopper parts are obtained from a Wall on the brackets could break away.
Mounted cereal Dispenser available from Ebay.
Pic 4 The old hand lever is pulled out of the dispenser
You can get them in singles doubles or triples. I with the plastic D shaft.
ordered a triple so I had spare parts in case I damaged
anything in the design/build process. Pic 5 The plastic D shaft is then pulled out of the hand
lever ready to be xed to the motor coupler. The
If you use the same hopper as me then you know they plastic handle is not used in this project.
are easy to dismantle and re-build into this project.
Pic 6 Build the wooden mounting frame using timber
Pic 2 and 3 Disassembly of the Cereal Dispenser o cuts. The sizes are shown as a guide only and the
height especially can be reduced if required.
To take apart the old dispenser remove the dispensers
from the wall mounting brackets. Then remove the Pic 7,8,9,10 & 11 Show construction details. Note the
brackets from the wall mount. The brackets are xed plastic hopper bracket is tted just below the wooden
to the plastic wall mounts by two self tapping screws, mounting bar to allow the connection of the drive
remove them all. shaft to the stepper motor.

Pic 3 The brackets can then be re-used in the nal Pic 12 Shows the stepper motor bracket. This is bolted
project. to a small piece of timber screwed to the rear of
wooden mounting bar. Detail in pics 8 & 11.
Note when xing the brackets to the new feeder use
at head screws and don't over tighten or the plastic Pic 13 Shows the 2 plastic project boxes mounted on

the wooden legs of the frame. The box on the left module and manual feed switch.
contains the power and stepper motor driver modules
and the box on the right contains the ESP8266

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 6
IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 7
IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 8
IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 9
IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 10
Step 5: Electronics

O v e rv ie w and provides feedback to your mobile Blynk app.

Speci cation:

Safety Chip Module: CP2102

Power to this project is from my common 12volt Working temperature: -40 ~ + 125
power supply. This supply can deliver 12volts at 10
amps so I always use fuses in my projects. I have also Power input: 4.5V ~ 9V (10VMAX)
used a thermal fuse strapped to the stepper motor.
This is probably overkill but this fuse will shut o USB-powered Current: continuous transmission:
power to the stepper motor and the other project approx. 70mA (200mA MAX)
components if it overheats.
Standby: <200uA

The measured current draw with motor running and Size: approx. 45 x 25 x 6mm/1.77 x 0.98 x 0.23'' Weight:
mobile phones running as IP servers is 250mA so you approx. 6g
can easily power this project from a wall mounted
power module if required. Depending on the safety Vo lt a g e Re g ula t o r M o dule LM 259 6 Pic 2
devices in your chosen power module you may or
maynot need fuses. Power for the L298N, ESP8266 module and the
Samsung S3 mobile phone is delivered by a LM2596
De s ig n DC to DC converter.
The 12v feed used by the stepper motor is dropped
I have used modules where possible to keep the down to 5volts. The circuit uses 160mA with the
design and construction of this project as straight mobile On (display o ) and the video server app
forward as possible. running. This rises to 250mA wit the the stepper motor
running.
Veroboard is used to mount some of the
components/modules there is no PCB layout or Voltage Regulator Module LM2596Speci cations:
design. I have used a fuse on the main 12v input to
this project. The power cable is rated at 2 amp and I Recti cation mode:Non-synchronous recti er
have used a 1 amp fuse. I have also tted a thermal
fuse attached to the stepper motor housing as as Module property:Non-isolation buck
additional safety device.
Input voltage:4V-40V
ES P8 26 6 m o dule Pic 1
Output voltage:1.5V-34V(Adjustable)
The ESP8266 module contains a CP2102 chip to allow
direct programming via Arduino IDE from a Windows Output current:Rated current is 2A,maximum
PC or Mac. 3A(Additional heatsink is required)

This module connects to the Blynk server via your WIFI Conversion e ciency:92%( highest )
router. The module then controls the stepper motors

Switching frequency:65KHz

Output ripple:30mV( maximum )

Voltage regulation:± 2.5%Load regulation:

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 11
±0.5%Dimension:43mmx21mmx14mm(LxWxH)

M o t o r D riv e Co nt ro lle r B o a rd M o dule L29 8 N


D ua l H Bridg e DC St e ppe r Pic 3

Speci cations
L298N as main chip

High working voltage to 46v,large current can reach


3A MAX and continue current is 2A, power to 25w.

Can drive one 2-phase stepper motor, one 4-phase


stepper motor or two DC motors. Built-in 78M05,get
power from drive power, however, when drive power
is over 12V, use the external 5v power as power supply.

Large capacity lter capacitance, back EMF protection


diode, more stable and reliable.

Speci cation: Double H bridge drive Chip: L298N (ST


NEW ) Logical voltage: 5V Drive voltage: 5V-35V Logical
current: 0mA-36mA Drive current: 2A(MAX single
bridge) Max power: 25W Size:43 x 43 x 26mm(LxWxH)

Note: This module has a built-in 5v power supply,


when the driving voltage is 7v-35v, this supply is
suitable for power supply DO NOT input voltage to
+5v supply interface, however leading out 5v for
external use is available. When ENA enable IN1 IN2
control OUT1 OUT2 When ENB enable IN3 IN4 control
OUT3 OUT4

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 12
Step 6: Module & Board Layouts

The modules are housed in Perspex topped boxes Pic 5 Rear of Fuse Board

Pic 1 The LN298 H Bridge stepper motor module and Pic 6 Cutaway shows position of fuse board above the
DC to DC converter in 1 box stepper motor.

Pic 2 The ESP8266 module is housed in the 2nd box This allows the thermal fuse to be physically
connected to the stepper motor (clamped in place by
Pic 3 2nd box with ESP8266 module removed to show twisted copper wire)
Vero Board layout

Pic 4 Vero Board Layout of the Fuse Board

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 13
IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 14
Step 7: Stepper Motor

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 15
Pic 1 This is a short geared NEMA 17 Stepper motor. It StepperStep Angle(W/O Gearbox) 1.8°
has an integrated planetary gearbox with a 26.85:1
gear ratio, the resolution reach 0.067°step angle. Holding Torque 3NmRated

It's a good solution in applications that need very low Current/phase 0.4APhase
rotation speeds and/or lots of torque. I tried an
identical motor without the gearbox and it was OK Resistance 30ohms
until I added the pet food into the hopper then it
jammed. Recommended Voltage 12-24V

Pic 2 Shows the stepper motor dimensions. Inductance 34mH±20%(1KHz)

The stepper motor is connected to the feeder drive Gearbox Type Planetary
shaft by a drive coupler Pic 3
Gear Ratio (Exact Gear Ratio)26 + 103/121
Couplers come is most sizes, my motor has a 6mm
shaft and the feeder has a 8mm shaft. E ciency 81%

Pic 3 shows the stepper motor mounting bracket. Backlash at No-load<=1°


Make sure your bracket has the extra inner holes for
mounting to the planetary gearbox. Max.Permissible Torque 3Nm(425oz-in)

My Stepper Motor Specs Moment Permissible Torque 5Nm(708oz-in)

Manufacturer Part Number17HS13-0404S-PG27 Shaft Maximum Axial Load 50N

Motor Type Bipolar Shaft Maximum Radial Load 100N

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 16
Step 8: Schematic

Note the shematic has an error 5v out from the to 0v when the switch is not operated.
LM2596 OUT+ should be connected to the 5v on the
stepper motor driver board. The OUT- should go to D1 to D4 on the module connect to the Dual H bridge
the 0v on the stepper motor driver board. stepper motor module.

The schematic is very simple and there is not too The Dual H bridge stepper motor module Out 1 to 4
much wiring to do. connect to the stepper motor connector.

12v is fed to the LM2596 voltage module and stepper Note


motor 12v input via a 1amp cartridge fuse and a 2a
Thermal fuse rated at 115°C. Note:
The Dual H bridge stepper motor module has a built-
The LM2596 voltage module provides regulated 5v to in 5v power supply, this is not used and is disabled
the ESP8266 module, the stepper motor module 5v using the link on the module.
input and also 5v to power the feed bowl monitor
camera. When ENA enable IN1 IN2 control OUT1 OUT2 When
ENB enable IN3 IN4 control OUT3 OUT4. Enable both
The ESP8266 module has a manual feed switch these using the links on the module.
connected to it. The input is held low via a 10K resistor

Step 9: The Blynk App

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 17
Blynk was designed for the Internet of Things. It can The animation shows how the app looks when a feed
control hardware remotely, it can display sensor data, is made from within the app. On pressing the feed
it can store data, visualize it and do many other button there is a short delay while the stepper motor
things. rotates the feeder aps. Once the stepper motor stops
the ESP8266 module sends a signal back to update
See the O cial "how Blynk Works" page for more the "App Feeds" count ,take a feed o the current
details. Hopper value and update the "Last Time & Date Fed" .
The bar counter drops 1 feed level as well.
Pic 1 The main app page shows details of each Blynk
widget Pic 5 Clone this project

Pic 2 On return from power loss or on restart the Start Log in to the Blynk app and press QR button in
Date and Time and all count are reset to 0 (the Hopper Projects gallery. After scanning the the QR code Pic 5 a
count returns to 34). The Last Feed Date and Time new Project will be created, all the widgets, settings,
however do not reset as it is important to know when layout will be cloned. You will need enough Energy
your pet was last fed. Balance to clone my Project.

Pic 3 The adjust button is used to calibrate the feeder. Pic 6 Shows the Blynk Widget settings used for this
Each time the button is pressed the feeder rotates a project.
few degrees to set the feeder aps in the correct start
position for feeding. Pic 7 Shows the pin numbers for each widget

Pic 4 Feeding from the Blynk App

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 18
IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 19
Step 10: Blynk Video Stream Setup

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 20
Pic 1 Setting up the Video Stream on Blynk can be a Battery info On
bit tricky.
IP Address O
The Blynk help guide says" Simple widget that allows
you to display any live stream. Widget supports RTSP Signature S3
(RP, SDP), HTTP/S progressive streaming, HTTP/S live
streaming. For more info please follow o cial Android Time Stamp On
documentation. At the moment Blynk doesn’t provide
streaming servers. So you can either stream directly Bitrate 240 Kbits/s
from camera, use 3-d party services or host streaming
server on own server (on raspberry for example)" I Keyframe Interval 3 sec
have tried many di erent I/P cameras but could not
get them to work. I have opted to use an old Samsung Audio
S3 as a video server using an app called RTSP Camera
Server from Google Play. the icon can be seen in Pic 2. Enable microhone On

Once setup I was able to get video and sound onto my Stereo O
Blynk Video Streaming Widget. The settings are crucial
as the video will only display if the setting are exactly Sampling Rate 8000
right. The sound seems to play on most settings.
The table below shows the settings that worked on RT S P S e t up
my setup S3 camera server and S7 running Blynk. The
encoder setting will probably di er from phone to Enable recording On
phone but try h264 if that is an option on your phone.
RTSP Port 5560
RT S P Ca m e ra S e rv e r S e t t ing s
HTTP Playlist Port 8094
VideoResolution320x240
Blynk Video Streaming Settings URL Address
Frames per Second15 rtsp://dyndnshostname.dyndns.org:rtsp port
number/camera
Aspect ratio4x3 To test locally rtsp://camera IP address:8094/camera
Set RTSP and HTTP Playlist Port to suit your network
QualityMedium On your Hub/Router set port forwarding for your
camera/phone to the RTSP Port (or HTTP Port if
EncoderOMX.SEC.AVC.Encoder testing locally) Don't forget to set your Dyndns Host
name and Dyndns password in the settings as well.
Capture MethodGLSurface(fast)

O v e rla y inf o

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 21
Step 11: Code

I have included the code for this project.

You will need to add your WIFI credentials and Blynk auth token and upload it to the ESP8266 WIFI board.

Download
https://www.instructables.com/ORIG/FCZ/BERI/J3EPNWXA/FCZBERIJ3EPNWXA.zip

Step 12:

Hello Brett,

I'm finally putting together your project. :)

Have some issues/questions though.

In your diagram, on the LM2596, you're feeding the OUT+ (which should have the output set to 5V
right?) to the L298N ground (0V) and the LM2596 OUT- to ther L298N (5V), which by the jumper
configuration you're using, should be feeding 5V output. Why's that? Are you powering the
ESP8266 from the LM2596 5V output? If so, I'm missing that on your diagram or it's just my
diagram reading skills that are poor.

Also, by your diagram, it seems you're using D5 and SD0? Is that correct?

I do not intend to set a mobile as a webcam to the feeder, do I still need the capacitors?
Hi ZeroBR.
The LM2596 is set to 5v. The labels on the stepper motor driver are correct but I have drawn the
connecting wires to the wrong place. OUT+ should go to 5v and 0v to 0v.
I will have to correct that!

D5 and SD0 is correct.


The capacitor are just a bit of noise suppression/regulation. Try the circuit without them it will prob.
be fine.

Thanks for the reply Brett,

On the LM2596 part, if you are feeding 12v to it and set it to output 5V, what will happen if you
connect the OUT+ to the 5V line of the L298N? I thought with the jumper on, the 5V line of the
L298N would supply 5V outwards, and we're just feeding 5V in? I'm a bit confused.

From where are you feeding the 5V to the ESP8266 Module? I do not see the connection to that
module either.

Thanks a lot for still helping us out with the project. :)


Hey how are you? I bought everything to replicate your project. The only problem I have is that I
cannot compilate the project. Would you mind helping me with this error?

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 22
Thank you in advance,

Arduino: 1.8.10 (Mac OS X), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL
ciphers (most compatible), ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-
sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from
/Users/frog/Downloads/Blynk_ESP8266_Feeder_14_no_passwords/Blynk_ESP8266_Feeder_14_no_passwords.ino:44:0:
/Users/frog/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h: In member function
'void BlynkWifi::connectWiFi(const char*, const char*)':
/Users/frog/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h:54:19: warning: variable
'myip' set but not used [-Wunused-but-set-variable]
IPAddress myip = WiFi.localIP();
^
In file included from /Users/frog/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkApi.h:17:0,
from /Users/frog/Documents/Arduino/libraries/Blynk/src/BlynkApiArduino.h:14,
from /Users/frog/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h:24,
from
/Users/frog/Downloads/Blynk_ESP8266_Feeder_14_no_passwords/Blynk_ESP8266_Feeder_14_no_passwords.ino:44:
/Users/frog/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SimpleTimer-
1.0.0/SimpleTimer.h: At global scope:
/Users/frog/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkTimer.h:36:21: error: redefinition of
'class BlynkTimer'
#define SimpleTimer BlynkTimer
^
/Users/frog/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SimpleTimer-
1.0.0/SimpleTimer.h:10:7: note: in expansion of macro 'SimpleTimer'
class SimpleTimer {
^
/Users/frog/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkTimer.h:36:21: error: previous
definition of 'class BlynkTimer'
#define SimpleTimer BlynkTimer
^
/Users/frog/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkTimer.h:41:7: note: in expansion of
macro 'SimpleTimer'
class SimpleTimer {
^
Multiple libraries were found for "ESP8266WiFi.h"
Used:
/Users/frog/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/ESP8266WiFi
Multiple libraries were found for "BlynkSimpleEsp8266.h"
Used: /Users/frog/Documents/Arduino/libraries/Blynk
Multiple libraries were found for "TimeLib.h"
Used: /Users/frog/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Time-
1.5.0
Multiple libraries were found for "SimpleTimer.h"
Used:
/Users/frog/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/SimpleTimer-
1.0.0
Multiple libraries were found for "Stepper.h"
Used: /Applications/Arduino.app/Contents/Java/libraries/Stepper
exit status 1
Error compiling for board Generic ESP8266 Module.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 23
No worries, I could fix it.
Now I'm trying to make this work.
Thanks!
Hi, I've same problem. how you fix it?

I finally completed the project but sometimes the wheel get stuck when the food is trying to go out.
I'm using the same motor than you suggested. Thoughts?
Thanks!
Has your motor got planitary gears? What sort of power supply are you using? Maybe the power
supply is not upto the job? Also sounds a silly question what does your food look like. If it has
many flat/sharp edged maybe it is causing the feeder to jam?
edit- have looked at your pic and your food looks nice and round that should not be the cause of
the problem.
So, sometimes the wheel get stuck while running and with full food. I don't know why or how to fix
it yet.

Hi Oliver, I tried to replicate your project, currently have Node MCU connected to the Blynk app.
Every time I hit Play - top right corner, Man Trigger starts counting up and Vertical Bar counts
down even though App Feed is not pressed. What could be the issue?
Hey how are you? It happens the same to me. Did you solved it? How did you it?
Thanks!
No, I didn't. I ended up building a different project all together using Sonoff itching and MQTT

Hey change the line int start = 14; with a 1 instead.


int start = 1;
That solves the problem!
See all replies. The diagram is correct. If you don't fit resistor R1 the motor control pin will free float
and will prob drive the motor continuosly. Changing the line as above is not the correct solution.
Thanks for reply! I have changed the diagram because it was far wrong! But still can't make the
stepper motor to stop. It continues feeding, Which project did you do that can recommend to me?
Thanks!
See all replies. The diagram is correct. If you don't fit resistor R1 the motor control pin will free float
and will prob drive the motor continuosly.
For the hardware I went with a sonoff itching MQTT. I hooked it up to my existing pet feeder so I
didn't really build the entire contraption.

For the itching it's set to 3 sec which is equivalent to 1 cup of cat food.

Time control is set on Homebridge Homekit, Home Assistant or any other platform that outputs
MQTT could be used as well.

Also, check this out


https://github.com/lance36/catFeeder
The resistor wasn't necessary. I just replace the 14 with a 1 and everything works like a charm
now. What the 14 number means for your design?
The resistor is necessary. As I said before the resistor holds the stepper start low when the start
button is not pressed. If the resistor is left out then pin14 is left floating. This is why the motor runs
non stop. By changing Pin14 to PIN1 you have in effect disabled Pin14.

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 24
If you do not want the Man switch then you could have just left out the code for Pin14 and the
resistor.
Hi JavierD78. You sau the diagram is wrong. What did you change? If your stepper motor is
continually running make sure the 10K resistor R1 is in place.
Not sure what you mean by "PLAY" button. There is no play button. In the top right hand corner
there is the "FEED" button. Pressing this will feed once then stop.
Hi JeyK2. My pet feeder is stored away in the loft so I can't check to see if I am having the same
issues as you.
Have you loaded the software from the QR code on my web page?
http://www.brettoliver.org.uk/Cat_Feeder/Pet_Feeder.htm
Hello, clone your blynk project, but I'm having a problem with the hopper lever counter, it does not
stop subtracting, doing nothing. for what is this? I pobe on a wemos d1 and a mini too.
Hi JulianC5.
Not sure what you mean by the Hopper level counter. You need to set the hopper level to match
your hopper here int hopperLevel = 34; // Hopper hold 34 feeds. My Hopper holds 34 feeds. I
checked this by filling the hopper and counting the manual triggers until the hopper was empty.
Each time Manual, App or Timer is triggered the Hopper count should decrement by 1.
yes! repair it! tanks!!!!

What we try to say is that when everything is connected the stepper motor does not stop moving. It
runs and runs when it wants and never stops. How can we solve that? I think the code you
uploaded is wrong
Hi make sure the 10K resistor R1 is in place. This holds the manual feed off when the man fedd
button is not pressed.
I could solved it. The code was wrong. There's a line that says:
int start = 14;
The 14 must be changed with 1 instead.

Hey it happen the same to me. How did you fixed it?
Thanks!
Can it be wired to a regular 2 wire motor as to a stepper motor?

Hi JeyK2. No a stepper motor has to be used.

Great Instructable. Very detailed! I published a similar feeder a few weeks ago. I used the Blynk
app and a NodeMCU to feed my fish. A webcam is a great addition. I always worry something in
the process goes wrong.
Well done!

IOT Pet Feeder Using the Blynk Mobile App & an ESP8266 Module: Page 25

You might also like