        <style>
            #donation_buttons td{
                border:medium none;
                background: inherit !important;
            }
            #donation_buttons table{               
                border:medium none;
                margin: auto;
                width: auto;
            }
        </style>
        {"id":6321,"date":"2021-03-14T23:10:26","date_gmt":"2021-03-14T23:10:26","guid":{"rendered":"http:\/\/rogerbit.com\/wprb\/?p=6321"},"modified":"2021-03-14T23:24:56","modified_gmt":"2021-03-14T23:24:56","slug":"how-to-make-an-automatic-fish-feeder","status":"publish","type":"post","link":"https:\/\/rogerbit.com\/wprb\/2021\/03\/how-to-make-an-automatic-fish-feeder\/","title":{"rendered":"How to make an automatic fish feeder"},"content":{"rendered":"<p><iframe loading=\"lazy\" title=\"\ud83d\udc1f\ud83d\udc20 Como hacer un alimentador autom\u00e1tico de peces \ud83d\udc20\ud83d\udc1f - PCBWay.es\" width=\"1160\" height=\"653\" src=\"https:\/\/www.youtube.com\/embed\/PzxpNWPKFEM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>In this tutorial we will see how to make an automatic fish feeder with arduino nano, a 28byj-48 stepper motor with its respective controller. In addition, a real-time PSTN or clock is included, ds1307 although it also serves the ds3231, which will allow us to configure the system to do the food download at the scheduled time, it includes the source code, the gerber file, the stl files to print the feeder, all totally free as always.<\/p>\n<hr \/>\n<p>You may be interested in projects in Arduino, pic, robotics, telecommunications,\u00a0<a href=\"http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1\">subscribe http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1<\/a>\u00a0videos with full source code and diagrams<\/p>\n<div id=\"ubm-banners-rotation-n1\" data-interval=\"4000\" class=\"ubm_banners_rotation\" style=\"overflow: hidden; width: 200px; height: 150px;\"><div id=\"3_ubm_banner\" class=\"ubm_rotating_banner\"><a href=\"https:\/\/bit.ly\/3aXRDAu\" target=\"_blank\" rel=\"dofollow\"><img src=\"https:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/useful_banner_manager_banners\/3-2-logo youtube.png\" width=\"100%\" height=\"100%\" alt=\"SUSCRIBETE A NUESTRO CANAL DE YOUTUBE, TUTORIALES GRATIS\" \/><\/a><\/div><\/div>\n<hr \/>\n<h4>Circuit<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-scaled.jpg\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-6303\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-1024x700.jpg\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-1024x700.jpg 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-300x205.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-768x525.jpg 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-1536x1050.jpg 1536w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-2048x1400.jpg 2048w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-820x561.jpg 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/circuito-1320x902.jpg 1320w\" alt=\"\" width=\"1024\" height=\"700\" \/><\/a><\/p>\n<p>We will use pins 2, 3, 4 and 5 for stepper motor control, and A4 pins with the SDA pin of the PSTN module, and pin A5 with PSTN SCL.<\/p>\n<h4>Materials<\/h4>\n<hr \/>\n<h4>An Arduino nano<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/arduino-nano.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6304\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/arduino-nano.jpg\" sizes=\"(max-width: 376px) 100vw, 376px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/arduino-nano.jpg 800w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/arduino-nano-300x300.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/arduino-nano-150x150.jpg 150w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/arduino-nano-768x768.jpg 768w\" alt=\"\" width=\"376\" height=\"376\" \/><\/a><\/p>\n<p>The Arduino Nano is a small board, complete and compatible with the test board based on the ATmega328 (Arduino Nano 3.x). It has about the same functionality as the Arduino Duemilanove, but in a different package. It only lacks a DC power connector and works with a Mini-B USB cable instead of a standard one.<\/p>\n<div class=\"googlepublisherpluginad\"><ins class=\"adsbygoogle\" data-ad-format=\"auto\" data-ad-client=\"ca-pub-7015362231217796\" data-ad-slot=\"4055351676\" data-ad-channel=\"WordPressSinglePost\" data-adsbygoogle-status=\"done\"><ins id=\"aswift_0_expand\" tabindex=\"0\" title=\"Advertisement\" aria-label=\"Advertisement\"><ins id=\"aswift_0_anchor\"><iframe loading=\"lazy\" width=\"803\" height=\"280\" id=\"aswift_0\" name=\"aswift_0\" sandbox=\"allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation\" frameborder=\"0\" src=\"https:\/\/googleads.g.doubleclick.net\/pagead\/ads?client=ca-pub-7015362231217796&amp;output=html&amp;h=280&amp;slotname=4055351676&amp;adk=4171074799&amp;adf=567219105&amp;pi=t.ma~as.4055351676&amp;w=803&amp;fwrn=4&amp;fwrnh=100&amp;lmt=1615762824&amp;rafmt=1&amp;to=pso&amp;psa=1&amp;channel=WordPressSinglePost&amp;format=803x280&amp;url=http%3A%2F%2Frogerbit.com%2Fwprb%2F2021%2F03%2Fcomo-hacer-un-alimentador-automatico-de-peces%2F&amp;flash=0&amp;fwr=0&amp;rpe=1&amp;resp_fmts=3&amp;wgl=1&amp;adsid=ChEIgIW3ggYQ4ca6n5X8z6-tARJIAJw0rJDYvxJR0PDNTtl41_73NSl1q30UrVI813Ki6s4zpU6EdyTBHw70o75g4QL0raM9tWOtCXnGBSy0Sa5Puq2D7o_9pQ7r&amp;dt=1615762816601&amp;bpp=49&amp;bdt=921&amp;idt=2808&amp;shv=r20210309&amp;cbv=r20190131&amp;ptt=9&amp;saldr=aa&amp;abxe=1&amp;cookie=ID%3D0f685256e1dc55df-22f693603cb800a5%3AT%3D1603161978%3ART%3D1603161978%3AS%3DALNI_MbXG5_po_qOwUts4dhS9hiGNqnDcg&amp;prev_fmts=803x280%2C0x0%2C1349x657&amp;nras=2&amp;correlator=466913892372&amp;pv_ch=WordPressSinglePost%2B&amp;frm=20&amp;pv=1&amp;ga_vid=1398756030.1615762820&amp;ga_sid=1615762820&amp;ga_hid=2056533097&amp;ga_fc=0&amp;u_tz=-180&amp;u_his=3&amp;u_java=0&amp;u_h=768&amp;u_w=1366&amp;u_ah=728&amp;u_aw=1366&amp;u_cd=24&amp;u_nplug=3&amp;u_nmime=4&amp;adx=93&amp;ady=3186&amp;biw=1349&amp;bih=657&amp;scr_x=0&amp;scr_y=580&amp;eid=31060427%2C21065724&amp;oid=3&amp;psts=AGkb-H-50xlHNKuuBY3roNO0Pcgv1dZhJhswvP6IqhGoPns4X1WVpXMUcT7Q8Wm6JTLfwJpZG18PJ0NY2w&amp;pvsid=79834463930311&amp;pem=423&amp;wsm=1&amp;ref=http%3A%2F%2Frogerbit.com%2F&amp;rx=0&amp;eae=0&amp;fc=896&amp;brdim=0%2C0%2C0%2C0%2C1366%2C0%2C1366%2C728%2C1366%2C657&amp;vis=1&amp;rsz=%7C%7CeEbr%7C&amp;abl=CS&amp;pfx=0&amp;fu=8320&amp;bc=23&amp;ifi=1&amp;uci=a!1&amp;btvi=2&amp;fsb=1&amp;xpc=uAYYDUeAK1&amp;p=http%3A\/\/rogerbit.com&amp;dtd=7862\" marginwidth=\"0\" marginheight=\"0\" vspace=\"0\" hspace=\"0\" allowtransparency=\"true\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\" data-google-container-id=\"a!1\" data-google-query-id=\"CJL86cnxsO8CFdgQrQYdXJUL_w\" data-load-complete=\"true\" data-mce-fragment=\"1\"><\/iframe><\/ins><\/ins><\/ins><\/div>\n<table>\n<tbody>\n<tr>\n<td>Microcontroller<\/td>\n<td>ATmega328<\/td>\n<\/tr>\n<tr>\n<td>Architecture<\/td>\n<td>Avr<\/td>\n<\/tr>\n<tr>\n<td>Operating voltage<\/td>\n<td>5 V<\/td>\n<\/tr>\n<tr>\n<td>Flash memory<\/td>\n<td>32 KB of which 2 KB uses the bootloader<\/td>\n<\/tr>\n<tr>\n<td>Sram<\/td>\n<td>2 KB<\/td>\n<\/tr>\n<tr>\n<td>Clock speed<\/td>\n<td>16 MHz<\/td>\n<\/tr>\n<tr>\n<td>Analog pins IN<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>Eeprom<\/td>\n<td>1 KB<\/td>\n<\/tr>\n<tr>\n<td>DC current by I\/O pins<\/td>\n<td>40 mA (I\/O pins)<\/td>\n<\/tr>\n<tr>\n<td>Input voltage<\/td>\n<td>7-12 V<\/td>\n<\/tr>\n<tr>\n<td>Digital I\/O Pins<\/td>\n<td>22 (6 of which are PWM)<\/td>\n<\/tr>\n<tr>\n<td>PWM output<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>Energy consumption<\/td>\n<td>19 mA<\/td>\n<\/tr>\n<tr>\n<td>PCB size<\/td>\n<td>18 x 45 mm<\/td>\n<\/tr>\n<tr>\n<td>Weight<\/td>\n<td>7g<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Pin diagram<\/h3>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-6033\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-1024x1024.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-1024x1024.png 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-150x150.png 150w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-300x300.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-768x768.png 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-600x600.png 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-820x820.png 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/11\/Pinout-NANO-1320x1321.png 1320w\" alt=\"\" width=\"1024\" height=\"1024\" \/><\/a><\/p>\n<hr \/>\n<h4>Female pins<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/kit-pines-hembra-arduino.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6305\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/kit-pines-hembra-arduino.jpg\" sizes=\"(max-width: 270px) 100vw, 270px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/kit-pines-hembra-arduino.jpg 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/kit-pines-hembra-arduino-300x300.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/kit-pines-hembra-arduino-150x150.jpg 150w\" alt=\"\" width=\"270\" height=\"270\" \/><\/a><\/p>\n<hr \/>\n<h4>A LED<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/Led.Rojo_.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6306\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/Led.Rojo_.jpg\" sizes=\"(max-width: 306px) 100vw, 306px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/Led.Rojo_.jpg 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/Led.Rojo_-300x300.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/Led.Rojo_-150x150.jpg 150w\" alt=\"\" width=\"306\" height=\"306\" \/><\/a><\/p>\n<hr \/>\n<h4>A 28byj-48 stepper motor with its controller<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/motorpap.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6307\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/motorpap.jpg\" sizes=\"(max-width: 376px) 100vw, 376px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/motorpap.jpg 506w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/motorpap-300x259.jpg 300w\" alt=\"\" width=\"376\" height=\"325\" \/><\/a><\/p>\n<p><strong>The parameters of this stepper motor are:<\/strong><\/p>\n<ul>\n<li>Model: 28BYJ-48 &#8211; 5V<\/li>\n<li>Nominal voltage: 5V (or 12 V, value indicated on the rear).<\/li>\n<li>Number of phases: 4.<\/li>\n<li>Speed reducer: 1\/64<\/li>\n<li>Pass angle: 5,625o \/ 64<\/li>\n<li>Frequency: 100Hz<\/li>\n<li>DC Resistance: 50o \u00b17 % (25oC)<\/li>\n<li>Traction frequency: &gt; 600Hz<\/li>\n<li>Traction-free frequency: &gt; 1000Hz<\/li>\n<li>Torque with traction: &gt;34.3mN.m (120Hz)<\/li>\n<li>Self-position torque: &gt;34.3mN.m<\/li>\n<li>Torque with friction: 600-1200 gf.cm<\/li>\n<li>Drag in torque: 300 gf.cm<\/li>\n<li>Insulation Resistance &gt; 10M (500V)<\/li>\n<li>Electrically ingilised: 600VAC\/1mA\/1s<\/li>\n<li>Degree of ingesting: A<\/li>\n<li>Temperature increase: &lt; 40K (120Hz)<\/li>\n<li>Noise: &lt; 35dB (120Hz, no charge, 10cm)<\/li>\n<\/ul>\n<p><strong>ULN2003APG<\/strong><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/07\/uln2003a_pinout.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-5725\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/07\/uln2003a_pinout.jpg\" sizes=\"(max-width: 225px) 100vw, 225px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/07\/uln2003a_pinout.jpg 500w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/07\/uln2003a_pinout-150x150.jpg 150w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/07\/uln2003a_pinout-300x300.jpg 300w\" alt=\"\" width=\"225\" height=\"225\" \/><\/a><\/p>\n<p><strong>Main specifications:<\/strong><\/p>\n<ul>\n<li>500 mA rated collector current (single output)<\/li>\n<li>50 V output (there is a version that supports 100 V output)<\/li>\n<li>Includes output return diodes<\/li>\n<li>Inputs compatible with TTL and 5-V CMOS logic<\/li>\n<\/ul>\n<hr \/>\n<h4>Male pins<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6308\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho.jpg\" sizes=\"(max-width: 316px) 100vw, 316px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho.jpg 1000w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho-300x300.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho-150x150.jpg 150w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho-768x768.jpg 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/pines-macho-820x820.jpg 820w\" alt=\"\" width=\"316\" height=\"316\" \/><\/a><\/p>\n<hr \/>\n<h4>A 1 Kohm resistor<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6309\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-958x1024.jpg\" sizes=\"(max-width: 356px) 100vw, 356px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-958x1024.jpg 958w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-281x300.jpg 281w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-768x821.jpg 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-1437x1536.jpg 1437w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-820x876.jpg 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5-1320x1411.jpg 1320w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/resistor-1k-ohm-14w-5.jpg 1600w\" alt=\"\" width=\"356\" height=\"380\" \/><\/a><\/p>\n<hr \/>\n<h4>A module rtc ds1307<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/rtc.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-6310\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/rtc.jpg\" sizes=\"(max-width: 373px) 100vw, 373px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/rtc.jpg 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/rtc-300x158.jpg 300w\" alt=\"\" width=\"373\" height=\"196\" \/><\/a><\/p>\n<p align=\"left\"><strong><span data-spm-anchor-id=\"a2g0o.detail.1000023.i0.54245680XxQwzC\">Description<\/span><\/strong><\/p>\n<p align=\"left\">The PSTN module is based on the high-precision, real-time DS1307 clock module.<\/p>\n<p align=\"left\">Through the I2C interface to communicate with singlechip, you can read year, month, day, week, hour, minute, second, you can read up to 2100.<\/p>\n<p align=\"left\">The Control interface is I2C.<\/p>\n<p align=\"left\">Recommended voltage: cc 5 V, the module direction is 0x68, the Control interface level is 5<br \/>\nV or 3.3 V. The DS1307 series real-time clock (RTC) is a low power full binary code (BCD) decimal code decimal time \/calendar.<br \/>\nPlus 56 bytes of NV SRAM. Address and data are transferred in series via an I2C, two-way bus.<br \/>\nThe clock\/calendar provides seconds, minutes, hours, day, date, month and year information. The end of the month date is automatically adjusted for months with less than 31 days, including year-to-year jump corrections. The clock works in 24 hours or 12 hour format with AM\/PM indicator. The DS1307<br \/>\nhas a built-in power sensing circuit that detects power failures and automatically switches to the backup supply.<br \/>\nThe timing operation continues while the part operates from the backup supply.<\/p>\n<div>\n<p align=\"left\"><strong>Features<\/strong><\/p>\n<p align=\"left\">VCC supply voltage specification: 4.5 x 5.5 V;<\/p>\n<p align=\"left\">Battery Voltage: 3.5V x 2.0; H<\/p>\n<p align=\"left\">Igh level input: 2.1 vvcc + 0.3 V;<\/p>\n<p align=\"left\"><span data-spm-anchor-id=\"a2g0o.detail.1000023.i1.54245680XxQwzC\">Low-level input:-0.3 x + 0.8 V;<\/span><\/p>\n<p align=\"left\">Control Interface: 4-pin (GND, VCC, SDA, SCL), GND for ground wire, VCC for power supply, SDA for I2C interface data cable, SCL for I2C interface clock cable;<\/p>\n<p align=\"left\">Real-time IC: DS1307Z; Independent synchronization: Through the I2C interface they communicate with MCU.<\/p>\n<p align=\"left\">Battery: CR1220 battery;<\/p>\n<p align=\"left\">Hole installed: 4m2 screw hole, diameter hole: 2.2mm, easy to install.<\/p>\n<hr \/>\n<\/div>\n<h4>A socket for the Arduino nano<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/zocalo.png\"><img loading=\"lazy\" class=\"alignnone wp-image-6311\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/zocalo.png\" sizes=\"(max-width: 380px) 100vw, 380px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/zocalo.png 594w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/zocalo-300x205.png 300w\" alt=\"\" width=\"380\" height=\"260\" \/><\/a><\/p>\n<hr \/>\n<p><strong>Printed circuit (pcb)<\/strong><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/02\/pcb-1.jpg\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-6275\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/02\/pcb-1.jpg\" sizes=\"(max-width: 350px) 100vw, 350px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/02\/pcb-1.jpg 350w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/02\/pcb-1-292x300.jpg 292w\" alt=\"\" width=\"350\" height=\"359\" \/><\/a><\/p>\n<p>Gerber file \u2013&gt;\u00a0<a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/02\/MULTIPLES-SERVOS-1.zip\">MULTIPLES SERVOS<\/a><\/p>\n<hr \/>\n<h4>STL files<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/alimentador.zip\">Feeder<\/a><\/p>\n<h4>Source<\/h4>\n<p>Remember to install the Adafruit RTClib.h library, and to avoid any incompatibility, I recommend installing the version in the image.<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/libreria.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-6313\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/libreria.png\" sizes=\"(max-width: 790px) 100vw, 790px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/libreria.png 790w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/libreria-300x170.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2021\/03\/libreria-768x436.png 768w\" alt=\"\" width=\"790\" height=\"448\" \/><\/a><\/p>\n<pre class=\"lang:arduino decode:true \" title=\"Source Code\">#include &lt;Wire.h&gt;\r\n#include \"RTClib.h\"\r\nbool estado = false;\r\nint diasSemana;\r\n\/\/ Pines para controlar el motor paso a paso\r\n#define IN1  2\r\n#define IN2  3\r\n#define IN3  4\r\n#define IN4  5\r\n\/\/ Secuencias del motor paso a paso\r\nint paso [4][4] =\r\n{\r\n  {1, 1, 0, 0},\r\n  {0, 1, 1, 0},\r\n  {0, 0, 1, 1},\r\n  {1, 0, 0, 1}\r\n};\r\n\/\/Elegimos el tipo de m\u00f3dulo RTC\r\nRTC_DS1307 rtc;\r\n\/\/RTC_DS3231 rtc;\r\nvoid setup() {\r\n  Serial.begin(9600);\r\n\/\/ Todos los pines como salida\r\n  pinMode(IN1, OUTPUT);\r\n  pinMode(IN2, OUTPUT);\r\n  pinMode(IN3, OUTPUT);\r\n  pinMode(IN4, OUTPUT);\r\n  delay(1000);\r\n\/\/Inicializamos el m\u00f3dulo rtc\r\n  if (!rtc.begin()) {\r\n    Serial.println(F(\"No se pudo encontrar el RTC\"));\r\n    while (1);\r\n  }\r\n\/\/Ajuste autom\u00e1tico de la fecha y hora, seg\u00fan la hora de tu pc\r\n  \/\/ rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));\r\n\/\/Ajuste manual de la fecha y hora\r\n rtc.adjust (DateTime (2021, 3, 6, 22, 59, 55));\r\n}\r\n\/\/ Comprobar si esta programado el encendido\r\nbool encendidoProgramado(DateTime date)\r\n{\r\n   diasSemana = date.dayOfTheWeek();\r\n  float hours = date.hour() + date.minute() \/ 60.0;\r\n  \/\/ Programamos la hora de activaci\u00f3n\r\n  bool horaActivacion = ((hours &gt;= 20.00 &amp;&amp; hours &lt; 23.50));\r\n  \/\/ Programamos los d\u00edas de la semana para la activaci\u00f3n, en este caso todos los d\u00edas de la semana\r\n  bool diaActtivacion = (diasSemana == 0 || diasSemana == 1 || diasSemana == 2 || diasSemana == 3 \r\n  || diasSemana == 4 || diasSemana == 5 || diasSemana == 6 ); \r\n  if (horaActivacion &amp;&amp; diaActtivacion)\r\n  {\r\n    Serial.println(\"Encendido programado\");\r\n    return true;\r\n  }\r\n  return false;\r\n}\r\nvoid loop() { \r\n\/\/Muestra la fecha y hora en el monitor serial\r\n  DateTime now = rtc.now();\r\n     Serial.print(\"Fecha: \");\r\n     Serial.print (now.day (), DEC);\r\n     Serial.print ('\/');\r\n     Serial.print (now.month (), DEC);\r\n     Serial.print ('\/');\r\n     Serial.print(now.year (), DEC);\r\n     Serial.print (\" Hora: \");\r\n     \/\/Serial.print (\"--\");\r\n     Serial.print (now.hour (), DEC);\r\n     Serial.print (':');\r\n     Serial.print (now.minute (), DEC);\r\n     Serial.print (':');\r\n     Serial.print (now.second (), DEC);\r\n     Serial.println ();     \r\n  if (estado == false &amp;&amp; encendidoProgramado(now))\r\n  {\r\nestado = true;\r\n\/\/Movemos el motor paso a paso algunos grados \r\n\r\n for (int m = 0; m &lt; 51; m++){\r\n    for (int p = 0; p &lt; 4; p++)\r\n    {\r\n      digitalWrite(IN1, paso[p][0]);\r\n      digitalWrite(IN2, paso[p][1]);\r\n      digitalWrite(IN3, paso[p][2]);\r\n      digitalWrite(IN4, paso[p][3]);\r\n      delay(2);\r\n         }\r\n   }  \r\n}\r\n  else if (estado == true &amp;&amp; !encendidoProgramado(now))\r\n  {\r\n    estado = false;\r\n    Serial.println(\"Tiempo cumplido\");\r\n  }\r\n  delay(1000);\r\n  }<\/pre>\n<hr \/>\n<div class=\"page-sidebar widget\" id=\"donation_buttons\"><form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\" target=\"_blank\" ><input type=\"hidden\" name=\"business\" value=\"donacion@rogerbit.com\"><input type=\"hidden\" name=\"bn\" value=\"mbjtechnolabs_SP\"><input type=\"hidden\" name=\"cmd\" value=\"_donations\"><input type=\"hidden\" name=\"item_name\" value=\"Ayuda a RogerBit.com\"><input type=\"hidden\" name=\"item_number\" value=\"www.rogerbit.com\"><input type=\"hidden\" class=\"set_donation_button_amount\" name=\"amount\" value=\"1\"><table ><tbody><tr><td><label for=\"rogerBit necesita de tu ayuda para seguir existiendo :-)\">rogerBit necesita de tu ayuda para seguir existiendo :-)<\/label><\/td><\/tr><\/tbody><\/table><table ><tbody><tr><td><input style=\"margin-top:10px;\" type=\"image\" name=\"submit\" border=\"0\" src=\"https:\/\/www.paypal.com\/en_US\/i\/btn\/btn_donateCC_LG.gif\" alt=\"PayPal - The safer, easier way to pay online\"><\/td><\/tr><\/tbody><\/table><input type=\"hidden\" name=\"currency_code\" value=\"USD\"><input type=\"hidden\" name=\"notify_url\" value=\"https:\/\/rogerbit.com\/wprb\/?Donation_Button&#038;action=ipn_handler\"><\/form><\/div>\n<hr \/>\n<p>You may be interested in projects in Arduino, pic, robotics, telecommunications,\u00a0<a href=\"http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1\">subscribe http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1<\/a>\u00a0videos with full source code and diagrams<\/p>\n<div id=\"ubm-banners-rotation-n2\" data-interval=\"4000\" class=\"ubm_banners_rotation\" style=\"overflow: hidden; width: 200px; height: 150px;\"><div id=\"3_ubm_banner\" class=\"ubm_rotating_banner\"><a href=\"https:\/\/bit.ly\/3aXRDAu\" target=\"_blank\" rel=\"dofollow\"><img src=\"https:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/useful_banner_manager_banners\/3-2-logo youtube.png\" width=\"100%\" height=\"100%\" alt=\"SUSCRIBETE A NUESTRO CANAL DE YOUTUBE, TUTORIALES GRATIS\" \/><\/a><\/div><\/div>\n<hr \/>\n<p><strong>RECOMMENDED PROJECT<\/strong><\/p>\n<p><iframe loading=\"lazy\" title=\"\u23f0 Reloj de tiempo real simple para Arduino - PCBWay.es\" width=\"1160\" height=\"653\" src=\"https:\/\/www.youtube.com\/embed\/IykpuUwwHME?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will see how to make an automatic fish feeder with arduino nano, a 28byj-48 stepper motor with its respective controller. In addition, a real-time PSTN or clock is included, ds1307 although it also serves the ds3231, which will allow us to configure the system to do the food download at the [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":6302,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[648],"tags":[530,1127,1133,45,767,1129,1132,181,950,595,1124,1126,1125,966,1128,1008,1130,514,613,969,31,986,1131,1114,687],"_links":{"self":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts\/6321"}],"collection":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/comments?post=6321"}],"version-history":[{"count":1,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts\/6321\/revisions"}],"predecessor-version":[{"id":6322,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts\/6321\/revisions\/6322"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/media\/6302"}],"wp:attachment":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/media?parent=6321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/categories?post=6321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/tags?post=6321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}