티스토리 뷰

Since 2017, I started to make new project with Arduino and describe why I started it in previous article. How easy to make it is and what I can make with Arduino. In addition, I had joined in Hackathon to support for people who are into developing with Arduino. I was shocked how tremendous easy it is. If I think something to make up solution, I can make up with Arduino and others. Okay, here is the result what I made during 1 and half month also, It is not the end of entire project because, this project will be interacted with other project which means, it should be integrated with the another. but I like to arrange current status and explain what it is. Even though it is a part of entire project, but it is possible to work independently. Defined command from the another project is poosible to be worked for Pet feeder. From now on. I start to describe about 'Pet Feeder'

# Pet Feeder

What does it means 'Pet Feeder'? yes, Feeding machine for pet. we used to go somewhere during holiday or vacation but if you live pet like dogs or cats together, how are you going to take of them? Or If you have unexpected business trip, how to deal with their feeding? Here is the answer for these people. This solution is automatically distributed for food of pet. In case of cat, they can mange their food even though we place a bunch of food in their plate however they can't manage in case of dogs. Not sure how many kind of pet you raise but this solution is to be much helpful in order to feed your lovely pet. I will describe how it has functionalities and how to work and how to co-work with 'Pet Manager'. Originally this solution is a part of 'Pet management' solution. A part from pet manager, there is pet manager which can detect and monitor their pet and send feeding command to pet feeder. In this article, it will focus on Pet Feeder.

Here is requirement what it needs.

  • Feeding by Pet Manager.(Infrared LED)
  • Feeding by Bluetooth command
  • Feeding by Switch
  • a mount of food will be distributed according to feeding command.
There is 3 method how to interact with Pet manager. Not sure which kind of pet manager attached, therefore Pet feeder provides several ways to receive commands.
Here is specification for this project.
  • Arduino Uno board 
  • Bluetooth HC-06(slave mode)
  • IR Receiver
  • LED
  • Switch
  • Register 10K and 330
  • I2C connector 
  • EV3 brick
  • EV3 Large motor

I am sure you can understand what it is and what it has functionalities. What I felt about this project during making it, Arduino provides a lot of libraries to use peripheral devices also, many people followed up and made reference codes in their blog. All people can make it and make up environment for this kind of solutions. In other word, dreams come true if you put your effort in 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 high quality solution, you can use raspberry pi with linux operating system. No more IoT solution untouchable. 

# How to work

Basically, Pet feeder consists of two parts which are Arduino and EV3. Arduino is hardware platform to make IoT solution and EV3 is set of lego blocks. Arduino has a bunch of libraries but it's difficult to make shape of solution. I mean, if you make some project, it should be covered to show up. LEGO is the best item to make shape of solution. you can assemble with lego blocks for your solutions. I also made mechanical part for Pet feeder, how to feed and how to control it. EV3, It will be worked according to mindstorm program like labview and well controlled with motors and sensors. I decided to make up feeder with Lego blocks with the proper mechanical way.

http://hero-space.tistory.com/50

I was thinking the mechanical ways to controll and choose one thing to feed. In this article, I thought SG-90 is good for this project, but I changed my mind and used Lego. Refer to the below article, I realized the way how to communication between EV3 and arduino.

http://hero-space.tistory.com/51

I2C method is simple way and Arduino provides this method to communicate. If you want to communicate with Arduino from EV3, you need to install I2C brick module in your mindstorm, you can find a way how to get it and install in this article.

Here is the article how to control switch as interrupt mode. Bluetooth and Infrared signal should be detected as falling mechanism. But switch is to be covered with Gpio pin if you setup Interrupt mode.

http://hero-space.tistory.com/49

I stuck in difficulty when I use Infrared receiver in order to make up this solution because I used cheaper photo transistor to receive signal from IR LED but which was not worked correctly, I am not sure what problem it was, I doubt it had voltage issue. Anyway I changed IR receiver which is using gpio pin and make up pull-up circuit to put correct voltage.

IR-Receiver-AX-1838H

Arduino provides sample codes and modify in own project. According to sending command, it will be decoded and show the result what message you receive.

#include 
int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  delay(100);
}

In case of bluetooth, I used HC-06 slave model.

This module is communicated via softwareSerial library which is the simple way to communication on Arduino. Once I made up circuit and tested it with the sample code. you don't have to set baud rate for BT module and have to register with your mater bluetooth device like 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.

#include 
 
SoftwareSerial BTSerial(2, 3); //Connect HC-06. Use your (TX, RX) settings
 
void setup()  
{
  Serial.begin(9600);
  Serial.println("Hello!");
 
  BTSerial.begin(9600);  // set the data rate for the BT port
}
 
void loop()
{
  // BT –> Data –> Serial
  if (BTSerial.available()) {
    Serial.write(BTSerial.read());
  }
  // Serial –> Data –> BT
  if (Serial.available()) {
    BTSerial.write(Serial.read());
  }
}

The upper code is the sample code and I made own in order to work correctly. In addition, I developed Mobile application to send Bluetoo control. 'App Inventor 2' is much more powerful tool for making mobile application. Here is design what I like to show, there is buttons, lable, list picker, notifier and bluetooth client.

Here is block design how to connect the app to arduino via bluetooth. Each module is running always, it will be worked according to each condition.

Okay, I have done to explain all about Pet feeder and assemble it with EV3 block and make up rigid shape.

If it is assembled, it can be modified and recharged because I designed the shape it is possible.

EV3 Recharge part

Arduino Connection part

Here is pet feeder mechanical part how to distribute.

# Result

You can get the codes regarding arduino and EV3.

Code https://github.com/Namsulee/PetFeeder

Here is the result how to work according to command using IR, Bluetooth and switch. I hope the solution is helpful for people who love their pet and contribute all of the world. Let's see the movie !!



'Technology > Arduino' 카테고리의 다른 글

Develop for battery charger  (0) 2018.02.11
Pressure Module Control  (0) 2018.01.29
WIFI + WebServer + Arduino + LED control  (0) 2017.01.31
EV3 + Arduino connection via I2C  (0) 2017.01.22
Actuator control - SG90  (0) 2017.01.15
댓글