Previous posts for this project:

 

 

Introduction

 

Next to the persistence in OpenHAB, I've also been working on a first prototype for the food dispenser this week.

I created a valve in a piece of PVC pipe and controlled it with a servo motor. After initial testing, I made some additional improvements.

 

Here we go.

 

Valve

 

The first step was to create a valve which would fit inside the PVC pipe. My trusty 3D printer came in handy as usual.

photo 1.JPGphoto 4.JPG

I cleaned the print and glued a piece of one of the servo arms which I had cut to only leave the center part.

If this approach works out, I'll print that little bit as part of the valve.

 

Assembly

 

After drilling some holes in the PVC pipe, I was able to fit the valve and attach it to the servo.

I attached the servo temporarily (with some electrical tape) for this demo. Again, if everything works out, I'll print a bracket to better attach it.

photo 3.JPGphoto (4).JPG

 

Test

 

Using some simple Arduino code, I made the dispenser open and close every second.

Later on, the dispenser will only open based on a trigger coming from OpenHAB.

 

#include <Servo.h>

Servo myservo;
int pos = 132;

void setup() {
  myservo.attach(9);
}

void loop() {
  myservo.write(132);
  delay (1000);
  myservo.write(42);
  delay (1000);
}













 

The code being executed:

 

Finally, I loaded the dispenser with peanuts (because cat food would not be a tasty reward should this test be successful) to test if it would actually dispense anything.

 

photo (5).JPG

 

Prototype #1 seems to be working! I'll have to perform some long duration tests to confirm this is a viable solution, but first ... I'll have some peanuts.

 

Any tips regarding alternatives are obviously welcome, as this was the first idea that came to mind.

 

Improvements

 

Because the first test was successful, I continued with the two improvements mentioned above:

  • hold servo with proper bracket instead of tape
  • incorporate servo arm into valve piece

 

These are the models I came up with:

dispenser 2.PNGring.PNG

 

Unfortunately, the servo holder print failed around the end, due to the print coming loose from the heated bed.

I cleaned up the print to try it anyway, as it could at least validate the idea works ... and it does.

photo 1.JPGphoto 2.JPG

 

I'll be attempting this print again later on, as the idea behind it seems to work.

 

That's enough 3D printing for today, see you next time!