Software apps and online services
Since 2017, I started to make new project with Arduino and describe why I started it in a previous article: How easy it is to make it is and what I can make with Arduino. In addition, I had joined in a Hackathon to support people who are into developing with Arduino. I was shocked by how tremendously easy it is. If I think of something to make as a possible solution, I can make it with Arduino and other parts. Okay, here is the result of what I made in 1 and half months. Also, this is not the end of entire project because this project will be interacted with other project which means it should be integrated with the others. But I like to arrange the current status and explain what it is. Even though it is a part of an entire project, it is possible to work independently. The defined commands from the other project are possible to be worked into the Pet Feeder. From now on I start to describe this project: "Pet Feeder".
What does "Pet Feeder" mean? Yes, a feeding machine for pets. We used to go somewhere during holiday or vacation, but if you live a pet like dogs or cats, how are you going to take of them? Or if you have an unexpected business trip, how would you deal with their feeding? Here is the answer for these people. This solution automatically distributes for food of pet. In the case of cats, they can manage their food, even though we place a bunch of food in their plate; however, in the case of dogs, they can't manage as well. I won't know how many kinds of pets you raise, but this solution is to be very helpful for feeding your lovely pet. I will describe its functionalities and how to work it and how to co-work with "Pet Manager". Originally, this solution was a part of a "Pet Management" solution. Pet Manager can detect and monitor pets and send feeding command to the Pet Feeder. This article, however, will focus on Pet Feeder.
Here are the requirements:
- Feeding by Pet Manager (Infrared LED) or
- Feeding by Bluetooth command or
- Feeding by Switch.
- A mount of food to be distributed according to feeding command.
There are 3 methods for interacting with Pet Manager. If you are unsure which kind of method you want to use, Pet Feeder provides several ways to receive commands. Here is specification for this project:
- Arduino Uno board
- Bluetooth HC-06(slave mode)
- IR Receiver
- Register 10K and 330
- I2C connector
- EV3 brick
- EV3 Large motor
I am sure you can understand what each is and its functionalities. What I felt about this project while making it, Arduino provides a lot of libraries to use peripheral devices. Also, many people followed up and made reference codes in their blog. Anyone can make it and make up environments for this kind of solution. In other words, dreams come true if you put effort into it. Absolutely, this project has a limit to make high quality solutions, but I don't think your solution should be high quality. If you need a high quality solution, you can use a Raspberry Pi with Linux operating system. No IoT solution is untouchable.
Basically, Pet Feeder consists of two parts: Arduino and EV3. Arduino is a hardware platform to make IoT solutions, and EV3 is a set of LEGO blocks. Arduino has a bunch of libraries but it's difficult to shape the solutions. I mean, if you make some project, it should be covered up or encased. LEGO is the best item to give shape to a solution. You can assemble with LEGO blocks for your solutions. I also made mechanical parts for the Pet Feeder, how to feed and how to control it. EV3 will be worked according to the Mindstorm programs like Labview and well-controlled with motors and sensors. I decided to make the feeder with LEGO blocks with the proper mechanics.
I was thinking of the mechanics to control this project and chose one thing to feed. I thought SG-90 would be good for this project, but I changed my mind and used LEGO. Refer to the below article. I realized how to initiate communication between EV3 and Arduino.
I2C method is a simple way, and Arduino provides this method to communicate. If you want to communicate with Arduino from EV3, you need to install an I2C brick module in your Mindstorm, you can find how to get it and install in this article.
Here is the article for how to control a switch in interrupt mode. Bluetooth and infrared signals should be detected as falling mechanism. But the switch is to be covered with GPIO pins if you setup interrupt mode. http://hero-space.tistory.com/49
I encountered difficulty when using an infrared receiver in order to make this solution, because I used a cheaper photo transistor to receive signals from the IR LED which was not working correctly. I am not sure what the problem was. I doubt it had any voltage issue. Anyway, I changed the IR receiver, which uses GPIO pins and made a pull-up circuit to put the correct voltage.
Arduino provides sample codes which I modified in own project. According to the sending command, it will be decoded and show the result in a message you receive.
In case of Bluetooth, I used HC-06 as a slave model.
This module is communicates via software, a serial library, which is the simplest way to communicate for the Arduino. I made the circuit and tested it with the sample code. You don't have to set the baud rate for the BT module, and only have to register your master Bluetooth device, like a mobile phone, before connecting this Bluetooth module. If you register HC-06 BT once using '1234' password, you don't have to register again before removing the device.
The upper code is the sample code I made my own in order to work correctly. In addition, I developed a mobile application to allow Bluetooth control. "App Inventor 2" is a very powerful tool for making mobile applications. Here you can see the design; there are buttons, labels, list pickers, notifiers and Bluetooth client.
Here is the block design for connecting the app to the Arduino via Bluetooth. Each module is running always; it will be utilized according to each condition.
Okay, I have explained all about the Pet Feeder, and here assembled it with EV3 blocks and gave it a rigid shape.
While assembled, it can be modified and recharged because I designed the shape to allow it to be possible.
Here is Pet Feeder's mechanical parts showing distribution.
Here is the result and how to work this according to command using IR, Bluetooth and switch. I hope this solution is helpful for people who love their pet. Watch the video!