<< return to Vizycam.com

User Tools

Site Tools


wiki:make_treat_dispenser

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:make_treat_dispenser [2020/09/28 16:03]
vizycam
wiki:make_treat_dispenser [2022/03/08 12:01]
vizycam
Line 2: Line 2:
  
  
-{{wiki:​treat.mp4|800x10|loop,​autoplay}}+{{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. ​ Here's what you will need:+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
  * Sharp X-acto knife  * Sharp X-acto knife
  * White glue  * White glue
- * 12V solenoid (like [[https://​www.amazon.com/​Tulead-Solenoid-Electronic-Actuator-Electromagnet/​dp/​B07VC5JKYG|this one]])+ * 12V solenoid (like [[https://​www.amazon.com/​Tulead-Solenoid-Electronic-Actuator-Electromagnet/​dp/​B07VC5JKYG|this one]].  If you use a different solenoid, make sure that it doesn'​t consume more than 1.75A @ 12V!)
  * A jar  * A jar
  * Some patch wire  * Some patch wire
Line 16: 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 ===== 
 + 
 + 
 +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 and save one for later. ​+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 31: Line 37:
  
  
-[{{wiki:p1000602_result.jpg}}]+[{{wiki:p1000601_result.jpg}}]
  
  
Line 37: Line 43:
  
  
-[{{wiki:p1000601_result.jpg}}]+[{{wiki:p1000602_result.jpg}}]
  
  
Line 47: Line 53:
  
 [{{wiki:​p1000613_result.jpg}}] [{{wiki:​p1000613_result.jpg}}]
 +
 +
 +===== Making the funnel/​value assembly =====
  
  
Line 79: Line 88:
  
  
-[{{wiki:p1000629_result.jpg}}]+[{{wiki:p1000628_result.jpg}}]
  
  
-[{{wiki:p1000630_result.jpg}}]+[{{wiki:p1000629_result.jpg}}]
  
  
Line 101: Line 110:
  
 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 119: Line 145:
  
  
 +[{{wiki:​p1000643_result.jpg}}]
  
  
Line 124: 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 132: Line 169:
  
  
 +[{{wiki:​p1000657_result.jpg}}]
  
-Then attach the extension cord to pins 2 and 4 on Vizy's terminal block.  ​ 
  
 +Then attach the extension cord to pins 1 (ground) and 2 (12V) on Vizy's terminal block. ​ (We recommend these pins because the solenoid'​s operating current may exceed Vizy's maximum I/O current of 1000mA, whereas the 12V signal can switch up to 4A. You can verify that the solenoid you're using consumes less than 1000mA with an ammeter and then you can use one of the I/O signals to switch the solenoid if you wish.  If you're using a larger solenoid that consumes more than than 1.75A @ 12V, it will likely cause Vizy's 12V power supply to brown-out and reset Vizy.)
  
-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''​+ 
 +[{{wiki:​image_771.jpg?​640}}] 
 + 
 + 
 +And don't forget to plug the terminal block into Vizy.  
 + 
 + 
 +===== Testing ===== 
 + 
 +Test the treat dispenser with the [[wiki:​pet_companion|Pet Companion application]] by clicking on ''​Dispense treat''​. ​  
 + 
 + 
 +Or you can type 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 +from Vizy import ​VizyPowerBoard 
-power = vizy.VizyPowerBoard(+power = VizyPowerBoard()
-power.vcc12(1) +
-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.vcc12(True)
 </​Code>​ </​Code>​
  
-then turn off with:+and turn off (close shutter) ​with:
  
 <​Code:​python>​ <​Code:​python>​
-power.io_write_bits(0)+power.vcc12(False)
 </​Code>​ </​Code>​
  
Line 162: Line 210:
  
  
- +{{wiki:​treat.mp4|800x10|loop,​autoplay}}
-power.io_write_bits(0)+
            
wiki/make_treat_dispenser.txt · Last modified: 2022/03/08 12:01 by vizycam