Category Archives: 3D Printer

Things involving 3-D printing

Upgrading the ANET A8 with Ramps 1.4

It was bound to happen. My Anet A8 kicked the bucket, well not entirely. While printing a new top plate for my F550 Flamewheel (the original snapped when it went into free fall on the first flight due to improperly secured propellers), the z-axis driver stopped working. Reviewing my options, it seemed all was lost. This made me sad as I had spent a considerable amount of time upgrading it to work the way that I wanted. I had added the mosfet to the heated bed, soldered directly to the bed to eliminate the high current going through the plastic connector (which had already started to melt by that point), added an inductive z-probe to do auto leveling, and printed a few upgrades specific to the model. This left me faced with a choice, get a drop in replacement and hope that one of the drivers didn’t die again, or swap the anet v1.0 mainboard for a RAMPS 1.4 board. I chose not to take the easy route and bought the RAMPS 1.4 board.

When the package came with the RAMPS board in it, I was excited. It was a month that I was without my printer and I had an itch that I needed to scratch. I decided to dive right in and start rebuilding the printer. While I had done some research on the board, I was unprepared for the lack of documentation that was included. The packaging contained an Arduino Mega, the RAMPS board, 5 A4988 stepper motor drivers, a USB A to B cable, and a cd-r containing a host of documentation that was not relevant to what I had purchased. I consider myself somewhat handy and can usually figure these things out, so I started by looking at the RAMPS board. One thing that stood out immediately was that this was not going to be a simple plug and play operation. The connectors on the Ramps board are just pins used with Dupont connectors. All of my connectors from the Anet A8 were JST connectors. This was not an issue for the X, Y or Extruder motor. It was a problem with the Z motors, end stops, thermistors, and z-probe (added on in place of the z end stop, I’m lazy and like auto-leveling).

Back to Amazon to purchase some necessary supplies.  Connectorsterminal crimpers,  and jumpers (which were unnecessary, I failed to search in the RAMPS board box hard enough).

Thankfully, swapping the ends was pretty straightforward after watching some YouTube videos on the crimping process, and wasting multiple fittings before doing so.

After getting the board all wired up, and Marlin firmware tweaked, there are many guides on setting up Marlin for the Anet A8, it was time to test the printing.  The first few attempts lead to the nozzle smashing into the heated build plate, because the sensor was not registering.  My fault entirely as I had it wired as a z-max, not a z-min.  Oops.

Changing the settings in the Ramps firmware and re-flashing the board lead to the Ramps board functioning.  Finally, I could test the printer again.

 

Doesn’t it just pop?

 

Squirrel Camera!

This morning I awoke and discovered that our local neighborhood squirrels have been attacking our pumpkins that have been on the porch.  Not that it is a major concern, squirrels need to eat also, but this lead me to today’s project.  Today I decided to create the squirrel cam.  Most of the functionality was already widely available, the only major thing was putting it all together.  Most of the parts for this were just laying around not being used, but I’m running out of Raspberry Pi’s to use in these projects.  Between replacing multiple machines with one, running the 3-D printer off another, RetroPie/Kodi setups, I only have a Pi Zero W remaining.  I think I’ll have to find a way to rectify this at some point.  Anyway, back to the squirrel camera.

Items Needed

  1.  3D printer
  2.  PLA Filament
  3.  Raspberry Pi
  4.  USB Power Bank
  5.  Webcam (case will mount a Logitech C310 or C270)

My first attempt at making this work involved only printing the webcam mount. This failed almost immediately when I attempted to put it on the tripod plate.  The screw hole immediately stripped out and would not stay attached.  With that, I then moved onto Plan B.  A bit more involved than simply printing a mount, I was able to take the mount STL files, and using TinkerCAD, remix it with a snap together “Simple Raspberry Pi 3” case, to create a case with a built in mount. Admittedly, my remix could have been done better, but I was in a rush after being frustrated by the stripped screw hole. Fair warning, the case requires a bit of clean up and has a lot of support structures, but it fits and does the job, so it is a partial win.  At some point I’ll redo it so it is prettier, and prints with less support, but for now, it’ll do.

Case
I made this myself

Next up was getting the software installed to the micro SD card.  Raspbian Stretch Lite was my choice to use.  Burn the image to the micro SD card in whatever way you want.  Since we are going to be running the Pi headless, we need to enable SSH access before we boot the Pi.   With all versions of Raspbian since Nov. 2016, ssh access is disabled by default.  The way to enable it, without a display, is to create a file in the boot partition named “ssh” without quotes.  This will allow us to access the pi over the network and proceed with the rest of the configuration.

Once we are connected to the network with the Pi, we will update the OS, and then install all the needed software.  This Pi will be running a program called motion, which will take pictures automatically when enough pixels change in the image.  Ideally, this won’t cause unwanted images to be taken since I decided it will also be a Twitter bot, tweeting the images whenever a photo is taken.

Up next, we will install motion.  I followed a very straightforward guide, located here.  I followed along until the part where it describes adding network storage to the mix as the sd card available to me was large enough to not worry about that.

Next was deciding on how to post the photos that were taken to Twitter.  This created an issue as I have never tried to run a Twitter bot before.  A little bit of research later,  and I found an easy to run twitter bot here.  I love Github.

One key thing I found with the bot though is that the starting tweet number has to be set.  It didn’t want to default to 1 on the initial run, causing errors whenever I tried to start it.

Following the instructions in the readme file, I set up Twitter API access, plugged in the required information, ran the script once with the –tweetnumber variable set to 1 and success!  The pi tweeted on its own.  Next up, configuring cron jobs to run the script at regular intervals.

For this,  I chose to have the script run every 5 minutes.  Many walkthroughs exist for setting up cronjobs so this will not be covered.  Lastly, we put it all together and set it up.  The Squirrel cam is tweeting at @TLPorchCam

Things I want to change:

Make the squirrel cam tweet the most recent image if it hasn’t been posted previously.  The bot I used just picks randomly from the folder, without regard to the most recent.  I guess eventually the pictures will get posted, but it isn’t the most effective way in my mind.

 

UPDATE:  Success!  I have squirrel pictures.  58-20171222123131

Squirrel
This is what I do with days off from work!