Thursday, March 27, 2014

Testing Motors and Pipes for Automated Pet Feeder

Tim and I worked on the automated pet feeder yesternight.  We tested the motor to see if it could push dog food through the pipe.  In all the tests, we used the 8" long, 1" diameter auger that I bought at the hardware store and a 17 volt DC motor that I found on the hack rack at the Milwaukee Makerspace.

Small Pipe
We started out using a pipe with a 1.5" inside diameter.  First, we hooked up a 5v power supply to the motor.  It did not have enough power to push the food through the tube.  Pieces would get stuck on the lip of the hole.  We tried reversing the power so the auger went backwards, then had it turn forward.  This did not help.

Next, we hooked up a 9v power supply.  Pieces still got stuck on the lip.  The motor could not push the pieces through.

Big Pipe
For the next test we used a T shaped pipe with a 2" inside diameter.  This was the pipe and wood stand that we were going to use for the other pet feeder project.  The 5v power supply did a bit better in this pipe, but the food still got stuck.  The motor was not able to push it through.

The 9v power supply faired much better.  It was able to push the food through most of the time but it still got stuck.  Again, we reversed the spin on the motor and it seemed to work better.  One downside to using a 9v power supply with this motor is that it spins so fast it will fill up the bowl in about five seconds.

Solution Ideas
We think the final solution should use the 2" ID T PVC with the 9v power supply.  In order to make sure the food is always pushed through the pipe, a raspberry pi will be used to spin the auger forwards and backwards.  The RPi will also control how long the motor operates.

One other problem is getting the RPi to control the power flow from the 9v PSU.  The current idea is to use a DC to DC relay.  The 9v PSU will plug in to the relay.  The RPi would turn the relay on and off allowing the PSU to power the motor.

The next step is to test the RPi with a relay and a motor.  A python program is needed to make the motor spin both directions for a specific amount of time.


Sunday, March 23, 2014

Automated Pet Food Dispenser -- 2

Tim and I started working on a different version of the automated pet food dispenser.  Originally, I was trying to duplicate a design I saw on Instructables.  Long-story-short, I could not get the 3D printed pieces to mate with the PVC T.  I tried grinding off some surface area of the various pieces but they just got ruined.

So, we switched gears and are going to make a more traditional project based on something I saw on YouTube.  This is actually better because Tim and I can work on it together.  The former project was something I was mostly doing alone at the Milwaukee Makerspace.  We can work on this project together at home.

The first step was to get a new motor.  I found a small 17 volt DC motor on the hack rack at the Makerspace. It seems to be a good choice for this project. I wanted a motor that would not spin too fast but also had enough torque to push the food through if it got stuck.  I can get both torque and slow speed by putting only 5 or 7 volts DC into the motor.

I'm not exactly sure how we will power the motor. One idea would be to use a common AC to DC power supply. I  have one that provides 5v and one that provides 12v. The 5v PSU spins the auger at the right speed.  Not sure if it has enough torque. The PSU would plug in to a timer that would turn it on for a enough time to fill the bowl once a day or so.

The other idea is to connect the motor to an Arduino or Raspberry Pi. The advantage of this is that the device can provide power for a specific time on a specific schedule. It could change the direction of the motor if needed. Plus, we could have it detect when more food is needed in the future. The disadvantage of this idea is the cost of the device as well as the fact that the device can provide, at most, 5v of power.  If more power is needed, the microcontroller have to control another source of power.

Another main piece of the pet feeder is the Auger that will move food along the pipe to the bowl. I bought a 8 inch long, 1 inch diameter Auger drill bit for wood at the local hardware store. One problem is that the auger has a sharp tip.  We'll try to keep the tip inside the tube so the dog does not stick himself trying to get more food.

Someone suggested that I find an old refrigerator with an ice maker.  That would have a motor and auger powerful enough to move the dog food.  I'll keep my eyes out for one but for now, these parts will have to do.

Delivery Tube
We are thinking about using a PVC tube to deliver the food into the bowl.  I had some extra PVC pipe with a 1.5" inside diameter.  We cut it to a length of 8" with a pipe cutter.  Then, we used a reciprocating saw to cut a 2" long hole in the middle of the pipe.  When the whole feeder is done, dog food will drop through the hole and on top of the auger.  The auger, powered by the motor, will move the food through the tube and into the bowl.

The final thing to report for this blog post was the adapter we made to connect the auger to the motor. The shaft of the motor is much smaller than the shaft of the auger.  Also, the shaft on the auger is a hexagon while the shaft on the motor is D shaped.  To make a connector, I needed help from Tom G. and Charles at the Makerspace.

We found a round aluminum rod on the hack rack and cut a small piece off using the horizontal bandsaw.  

Next, Tom helped drill a small hole through the entire piece and then a slightly bigger hold about 1.25" into one end.  We used the lathe to make sure the hold was perfectly centered and straight.

Finally, we drilled small holes on each end of the connector, and threaded each hole.  Inserting small taps into the holes when the shafts are inserted into the connector will secure the shafts in the connector.  Here is a picture of the connector.

The next step is to put the auger and motor into the tube and see if the motor has enough power with 5 volts of electricity to push dog food through.

Sunday, March 16, 2014

Flashed Debian Linux onto Beaglebone Black

I continued working on upgrading the Linux distribution on my Beaglebone Black this weekend.  I flashed a version of Angrstrom to the eMMC.  Then, I flashed Debian Linux to the eMMC.  Finally, I did some minor setup work on Debian.

First, I tried flashing the Angstrom distribution onto the eMMC of the BBB.  To do this, I inserted a with the Angstrom image on it into the SD slot on the BBB.  Then, I held down the boot button on the BBB while I plugged in to the USB cable from my Ubuntu PC.  The BBB started installing the new image into the eMMC.  After about an hour, all four LEDs on the BBB lit up signaling that the install was complete.  I unplugged the USB cord from the BBB, removed the SD card, and reconnected the USB cable.  The BBB powered up and the Ubuntu PC recognized it as an external hard drive.
microSD card

Next, I connected to the BBB by typing
sudo ssh
at a terminal prompt.  I typed
lsb_release -a
at the BBB terminal prompt.  It reported that I was running AngstroGNU/Linux v2012.12.  I wanted to install a version of Angstrom from 2013.  To make a long story short, the image of Angstrom on the SD card was the 2012.12 version.  So, the flash process probably worked all along but was not flashing the version I thought.  Doh!

Now that I figure out what was happening, I decided to install a version of Debian Linux.  There are two ways to run Debian on the BBB.  One way is to install a bootable version of Debian on the microSD card.  Then, if you power on the BBB while holding down the boot button, it will load the OS on the SD card rather than the OS on the eMMC.  This might be safer than flashing the eMMC but it would mean that I could not reboot the BBB remotely or count on it coming up correctly if it lost power.

The second option for installing Debian on the BBB is to flash the eMMC with an image of Debian Linux.  This is the option I chose and this is what I will describe below.

Searching the internet for help simply made me confused.  There are a few websites that talk about doing this but the information is written for Linux experts (which I am not).  Here are the steps I followed to get Debian Linux installed on my BeagleBone Black.

(I did this entire process on my Linux laptop.  You could also do this on a Windows PC but some steps are different.  I will also mention how to do this on a Windows PC, if applicable.)

Step 1: Download the latest image.
The latest Debian and Angstrom images can be found at  I clicked on the link named Debian (BeagleBone Black - 2GB eMMC.  This is the image file that will flash the eMMC.  The file was downloaded to my downloads folder in my home drive.

Step 2: Unpack the image.
The downloaded file is in a compressed format that is not usable as it is.  The file must be uncompressed.  In Linux, this is done with the unxz command.  In Windows, you would need a program like 7zip to uncompress the image.  Since I am using Linux, I typed
unxz BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img.xz 
at the terminal prompt.  The unxz program creates an image file in the same location that the xz was in and deletes the xz file.

Step 3: Copy the image to the SD card
The next step is to put the image onto a miniSD card.  Insert the miniSD card into your PCs SD slot.  Linux has a command called dd to write an image to a disk.  In Windows, use a program called Win32 Disk Imager to do the same thing.  Again, since I am using Linux, I typed
sudo dd if=./BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img of=/dev/mmcblk0
to write the image to the SD card.  It took awhile to write the image to the SD card.  I do not know exactly how much time but it was more than fifteen minutes.

dd is the program that writes the image.  On my computer, mmcblk0 is the name of the SD card device.  The device name may be different on your computer.  Type lsblk at a terminal prompt in Ubuntu to see a list of your devices.

Step 4: Flash the eMMC on the BBB.
This is probably the easiest part of the whole process.  Make sure the power is off on the BeagleBone microSD card out of the PC and insert it into the microSD slot on the BBB.  Then, hold down the boot button on the BBB while applying power.  I held the button down until all of the LEDs were on solid.  Then, I stopped pressing the button.  The BBB started flashing Debian onto the eMMC.  After about ten minutes, all four LEDs came on solid and stayed on.  That is the signal that the process is complete.  I unplugged power from the BBB and removed the SD card.

Step 5: Verify that the flash worked.
I connected the BBB to my Linux PC with the USB cable.  This provides power to the BBB and it booted up.  The Linux PC saw the BBB as a connected storage device.  I connected to the BBB with ssh by typing
sudo ssh
at a terminal prompt.  I typed
lsb_release -a
at the BBB terminal prompt.  It reported that I was running Debian GNU/Linux 7.4 (Wheezy).  Perfecto!

Update Linux
As a final step, I update Linux on the Beaglebone Black.  I connected the BBB to an Ethernet cable to get it on the internet.  Then, I plugged in a 5V power supply.  When it booted, I used ssh to connect to it over my home network.  I ran the following two commands to make sure it had all the latest updates.
sudo apt-get upgrade

sudo apt-get update

Next time, I will setup a user account for myself and install Avahi.

Friday, March 14, 2014

Updated Angstrom Distro on BeagleBone Black

I worked on my BeagleBone Black at the Milwaukee Makerspace tonight.  My goal was to update the Angstrom distribution to the 2013-09-04 version.  The first thing I did was plug the BBB into my Linux laptop via the USB cable.  I tried connecting to it through the browser but Chrome did not see it at the default IP address.   Hmmm......

Looking at the board a bit closer, I noticed that the LED signifying activity on the SD card was flashing as well as the CPU activity LED, and the eMMC LED.  Hmmm.....

The SD card had the Angstrom distribution on it.  It looked like the BBB was updating the distribution files on the eMMC.  I thought that I had to hold down the Boot button while applying power to start the update process but I had not done that.  I decided to wait 45 minutes or so and see what happened.

About an hour later, all four LEDs were lit up.  That means that the upgrade process completed successfully.  I unplugged the power, removed the SD card, and replugged the BBB to the USB cable.  This time, when it powered up, the Linux saw the BBB as an external drive.  I was able to use ssh to login to the BBB.

I need to figure out how to know what version of the Angstrom distribution is on the BBB.

Next step is to download the Ubuntu image to boot off of the SD card.

Friday, March 7, 2014

Miscellaneous 3D Printing

While at the Makerspace, I 3D printed a couple of objects (or at least attempted to).  The Makerbot was being very temperamental tonight.  I had to take it apart to remove a piece of filament that was stuck on the filament input from a previous print.  It also kept losing connection to the PC.  I would reboot the PC and it would print for a few minutes and then just stop.  Also, the computer in the 3D printing area would not write to an SD card.  I had to use my trusty Linux laptop to write the gcode for the prints to an SD card.  Finally, I think there was something wrong with the filament.  It just would not extrude consistently.  I did get stuff printed but the pieces were rough.

The first thing I printed is a small piece to hold a 3.5mm hard drive for an Xbox 360 S.  I am hoping to find a cheap or free hard drive that we can install in my son's Xbox.  (If you have one you don't want anymore, let me know.)  This piece would hold the drive in place.  I found the design for the hard drive case on Thingiverse.

The next thing I tried to print was a small case for a Raspberry Pi.  I found this design on Thingiverse as well.  For some reason, it did not turn out at all like it was supposed to.  The picture below shows how the print is supposed to look.

This is what actually printed.  I did not get any errors and the printer says the job finished completely. Not sure what happened.  The actual print did not have any walls.  Oh well.  I'll try a different design next time.

#raspberrypi, #3dprinting, #xbox360, #milwaukeemakerspace, #makerbot

HESA Instructables Published

I finally published my Instructable for the Home Environmental Sensor Array.  The Instructable is here.

The Instructable could use more pictures and more details.  I could probably write a short book about making the HESA if I did it right.  Hopefully, the details that are there along with my blog notes will help someone make progress on their maker project.

I did enter it in the springtime contest.  It will be helpful when the rains come in the spring.

#HESA, #sensor, #waterdetector, #instructable

Lighted Tardis is Basically Finished

I finally got the lighted Tardis finished (mostly).  Tonight, I 3D printed some windows with glow-in-the-dark filament on the Makerbot at the Milwaukee Makerspace.  I also printed the top of the lamp.  Next, I used super glue to attach the windows and top piece to the rest of  Tardis.  Finally, I super glued the battery holder piece to the bottom of the Tardis.  I still have to attach the papers saying "Police Box" to the sides.

Overall, I think it turned out well.

#tardis, #3dprinting