This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:make_treat_dispenser [2020/09/28 15:51] vizycam |
wiki:make_treat_dispenser [2022/03/08 10:28] vizycam [Testing] |
||
---|---|---|---|
Line 1: | Line 1: | ||
======How to make a treat dispenser====== | ======How to make a treat dispenser====== | ||
- | {{wiki:treat.mp4|800x10|loop,autoplay}} | ||
- | You can make a treat dispenser for your pet out of some fairly basic ingredients, the main ingredients being cardboard and a solenoid. Here's what you will need: | + | {{wiki:treat.mp4|680x10|loop,autoplay}} |
+ | |||
+ | |||
+ | You can make a treat dispenser for your pet out of some fairly basic ingredients, the main ingredients being cardboard and a solenoid. It's pretty fun, and after you're done you can say "I made a robot to feed my precious <insert pet's name>, what did you do today?" | ||
+ | |||
+ | |||
+ | Here's what you will need: | ||
* Some corrugated cardboard -- it can be used/recycled | * Some corrugated cardboard -- it can be used/recycled | ||
Line 14: | Line 19: | ||
- | We'll start by making a box. We're making a gravity-fed treat dispenser, so we need a fair amount of height to keep things moving along and not getting clogged. Our box is 7"x7" on the base and 8" high. | + | ===== Making the box ===== |
- | Cut out five 8"x7" rectangles. We'll use four of the rectangles for the sides of the box and save one for later. | + | We'll start by making a box. We're making a gravity-fed treat dispenser, so we need a fair amount of height to keep things moving along and not get clogged. Our box is 7"x7" on the base and 8" high. |
+ | |||
+ | |||
+ | Cut out five 8"x7" rectangles. We'll use four of the rectangles for the sides of the box. Save the extra for later. | ||
Line 29: | Line 37: | ||
- | [{{wiki:p1000602_result.jpg}}] | + | [{{wiki:p1000601_result.jpg}}] |
Line 35: | Line 43: | ||
- | [{{wiki:p1000601_result.jpg}}] | + | [{{wiki:p1000602_result.jpg}}] |
Line 45: | Line 53: | ||
[{{wiki:p1000613_result.jpg}}] | [{{wiki:p1000613_result.jpg}}] | ||
+ | |||
+ | |||
+ | ===== Making the funnel/value assembly ===== | ||
Line 65: | Line 76: | ||
+ | [{{wiki:p1000624_result.jpg}}] | ||
+ | |||
+ | |||
+ | [{{wiki:p1000625_result.jpg}}] | ||
+ | |||
+ | |||
+ | [{{wiki:p1000627_result.jpg}}] | ||
Next, add a structural member below the shutter to keep the shutter oriented correctly. | Next, add a structural member below the shutter to keep the shutter oriented correctly. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000628_result.jpg}}] | ||
+ | |||
+ | |||
+ | [{{wiki:p1000629_result.jpg}}] | ||
This structural member will require some extra gussets to strengthen it. | This structural member will require some extra gussets to strengthen it. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000631_result.jpg}}] | ||
Next attach the solenoid to the cardboard using some machine screws, cable ties, or some double-sided foam tape. Test the motion of the solenoid and shutter by hand. | Next attach the solenoid to the cardboard using some machine screws, cable ties, or some double-sided foam tape. Test the motion of the solenoid and shutter by hand. | ||
+ | |||
+ | [{{wiki:p1000633_result.jpg}}] | ||
+ | |||
+ | |||
+ | {{wiki:shutter_600_2.mp4|640x10|loop,autoplay}} | ||
We now need to assemble a chute. Cut a 4"x10" piece of cardboard. Then cut the cardboard down the middle length-wise, but only cut through the first ply of cardboard. | We now need to assemble a chute. Cut a 4"x10" piece of cardboard. Then cut the cardboard down the middle length-wise, but only cut through the first ply of cardboard. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000637_result.jpg}}] | ||
+ | |||
+ | |||
+ | [{{wiki:p1000638_result.jpg}}] | ||
Fold the cardboard into a right-angle and glue a right triangle with 2" legs to the end. Let this dry. | Fold the cardboard into a right-angle and glue a right triangle with 2" legs to the end. Let this dry. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000641_result.jpg}}] | ||
The funnel/valve assembly fits into a "track" in the box. Slide the funnel/valve assembly in the box and mark where you want to place the track. | The funnel/valve assembly fits into a "track" in the box. Slide the funnel/valve assembly in the box and mark where you want to place the track. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000646_result.jpg}}] | ||
Cut out some strips of cardboard and glue them to the inside of the box to make the track for the valve assembly. | Cut out some strips of cardboard and glue them to the inside of the box to make the track for the valve assembly. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000647_result.jpg}}] | ||
Next, cut a triangle to fit the chute in the funnel/valve assembly. | Next, cut a triangle to fit the chute in the funnel/valve assembly. | ||
+ | |||
+ | [{{wiki:p1000642_result.jpg}}] | ||
Line 96: | Line 145: | ||
+ | [{{wiki:p1000643_result.jpg}}] | ||
Line 101: | Line 151: | ||
+ | [{{wiki:p1000653_result.jpg}}] | ||
+ | |||
+ | |||
+ | ===== Final assembly ===== | ||
Putting everything together is relatively easy. Slide the funnel/valve assembly into the box with the chute inserted and then push the chute through the triangle hole in the box before completely sliding the funnel/valve assembly into the box. | Putting everything together is relatively easy. Slide the funnel/valve assembly into the box with the chute inserted and then push the chute through the triangle hole in the box before completely sliding the funnel/valve assembly into the box. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000649_result.jpg}}] | ||
+ | |||
+ | |||
+ | [{{wiki:p1000651_result.jpg}}] | ||
Line 109: | Line 169: | ||
+ | [{{wiki:p1000657_result.jpg}}] | ||
+ | |||
+ | |||
+ | Then attach the extension cord to pins 2 (12V) and 4 (B0) on Vizy's terminal block. | ||
+ | |||
+ | |||
+ | [{{wiki:p1000667_result.jpg}}] | ||
+ | |||
+ | |||
+ | And don't forget to plug the terminal block into Vizy. | ||
+ | |||
+ | |||
+ | ===== Testing ===== | ||
- | Then attach the extension cord to pins 2 and 4 on Vizy's terminal block. | + | Test the treat dispenser with the [[wiki:pet_companion|Pet Companion application]] by clicking on ''Dispense treat''. |
- | Test the treat dispenser with some simple Python. Just type into a Python instance (you can bring up a Python instance by pointing your browser to ''http://vizy.local/python'' | + | Or you can punch in some simple lines of Python. Just type into a Python instance (you can bring up a Python instance by pointing your browser to ''http://vizy.local/python'' or by selecting **Python** in the [[wiki:vizy_editor#the-settings-menu|Settings Menu]].) |
<Code:python> | <Code:python> | ||
- | import vizy | + | import vizy.vizypowerboard as vpb |
- | power = vizy.VizyPowerBoard() | + | power = vpb.VizyPowerBoard() |
- | power.vcc12(1) | + | power.vcc12(True) |
power.io_set_mode(vizy.IO_MODE_HIGH_CURRENT) | power.io_set_mode(vizy.IO_MODE_HIGH_CURRENT) | ||
</Code> | </Code> | ||
- | You can then turn trigger the solenoid with: | + | You can then trigger the solenoid (open shutter) with: |
<Code:python> | <Code:python> | ||
- | power.io_write_bits(1) | + | power.io_set_bit(0) |
</Code> | </Code> | ||
- | then turn off with: | + | and turn off (close shutter) with: |
<Code:python> | <Code:python> | ||
- | power.io_write_bits(0) | + | power.io_reset_bit(0) |
</Code> | </Code> | ||
Line 139: | Line 212: | ||
- | + | {{wiki:treat.mp4|800x10|loop,autoplay}} | |
- | power.io_write_bits(0) | + | |