Abstract2actual
  • Home
  • Blog
  • Gallery
  • Buy stuff
  • Contact
  • About

Slicing with Cura

1/26/2017

0 Comments

 
Picture
A friend of mine wanted me to print him a Kylo Ren mask that he found online.  IT was designed by an engineer, Luke Daley, and the .stl files can be found here at My Mini Factory.   The problem I had was that I couldn't generate the GCode for such a complex file using Slic3r, my default open source slicing program.  I've been using Slic3r for three years and have never had any trouble with it.  I like the simplicity and the features, so, until now, I had no reason to use any other slicing program.

I'd read quite a bit about Cura, and have been wanting to try it out for quite a while, but I just never had time to mess with it.

Let me just say that I love Cura.  I've been using it for a few months now, and the more I use it, the more I wonder why it took me so long to come around to it..

Starting out was not all sunshine and roses.  First of all, none of my printers are popular commercial off the shelf printers.  Although my Airwolf3D v5.5 was commercially available, it isn't popular enough to have the configuration files readily available for the slicers.  My other two printers are custom builds, and so their configurations are also not publicly known.

The frist hurdle I had to overcome is that Cura couldn't understand where my print bed center was.  With Slic3r v1.0, you can enter not only the bed size in the printer settings, but there is also a 'Print Center' value that you can also enter.  This enables the Slicer to account for the extruder home position to be somewhere outside the print bed.  Cura does not have any such setting, so I just couldn't get the prints to consistently stay within the confines of the bed.  I searched and searched but couldn't find anyone who had a simple solution to this problem.  I wound up working around the problem by redefining the print bed size in the machine settings so that it was original bed size plus 2X the distance that my extruder home position was from X0 and Y0 (near left corner of the print bed).  This worked OK, but I had to be really careful when arranging parts in Cura to not exceed the actual bed area.

After a couple of months of this, it got really annoying, so I started searching online again for a solution.  I stumbled on this solution on the Ultimaker Community website.  To sum it up, you add a couple of lines to the start-gcode that moves the extruder to the front left corner of the print bed, then send a command that defines this is the new X,Y home position.    
           The start-gcode that I'm using on X3REX, my customized Prusa i3, is shown below:

​M140 S{print_bed_temperature} ;Set bed temp
M107; Fan off
;M190 S{print_bed_temperature} ;If you want to wait for the bed to come to temp
G21 ;set units to milimeters
G90 ;use absolute coordinates
M82; use absolute distances for extrusion
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0     ;move Z to min endstop
;#############################################################
;The line below moves the extruder up enough to clear the bed leveling screws
;#############################################################

G1 Z5 ; move Z up 5 because to clear the bed leveling screw on next move
M109 S{print_temperature} ;wait for extruder to come to temp
G1 F200 E3 ;extrude 3mm of feed stock
;##############################################################
;The 2 lines below are the lines that offset mechanical home to the correct starting position
;##############################################################

G1 X57.6 Y30.5 ; Move to front left corner of print bed to offset the print head
; 57.6 mm in the X axis and 30.5 mm in the Y axis from its mechanical home
G92 X0 Y0 E0; Set this coordinate to X0, Y0, Extruder0
G28 Z ; home Z, bring it back down to the bed surface to start printing
;Put printing message on LCD screen
M117 Printing...

Cura is a really nice piece of software.  A couple of things I love about it are the control you have over support material, because you can have greater or lesser adhesion with the part depending on your needs.  I also like the "Cut off object bottom" that lets you essentially sink the part below the bed surface so that you can start your print with a greater surface area if necessary.  The visual representation of your part on the bed is really nice.  And I like how it calculates build time and media consumption right on the screen.  
0 Comments

Raspberry Pi  Camera Telescope Adapter

10/16/2016

6 Comments

 
 A couple of years ago I created a universal adapter that lets you mount any mobile phone to a telescope.  Using that device, I connected my 41 Megapixel Nokia Lumia 1020 to an Orion Starblast reflector telescope and took some really spectacular shots of the moon and Jupiter.  The cost of all that equipment was around $800.
​I wondered what I could do with a $5 Raspberry Pi Zero, a $15 Pi Camera, a $10 USB shield, and a discarded (as in free) old Tasco 45X refractor telescope.  I already had the other computing components, keyboard, mouse, HDMI monitor, and wireless NIC, so I am not counting the cost of those parts.  Add the cost of ABS media at $2 and we'll call this a $32 project.  Below is the picture I got.  It was much better than I expected.  Read on below the picture to see how to do it.
Picture
Raspberry Pi Camera moonshot
Using Sketchup, I designed the camera mount and computer bracket. The design consists of 6 different parts.  The design file is available on Thingiverse as thing 1831563
The camera mount is made up of a split ring that can be sized to the barrel of the eyepiece, a ring that slips over the split rings, and a plate, which sits inside the ring, holds the Pi camera.  I designed this in multiple parts for two reasons: primarily, I don't want to print support material; and I want to be able to use telescopes with different sized eyepieces.  I avoid support because it is messy and can be a pain in the rear to remove.
The computer bracket is a plate, some spacers, and a ring that clips on to the camera ring. I glued the plate onto the ring with a bit of acetone.
The Pi Zero is running a plain jane distribution of Raspbian Jessie.  I wrote a python script that allows me to preview, make some exposure adjustments, choose between images or video, and trigger the camera using the keyboard.  Having the ability to trigger the camera without touching the telescope is a HUGE benefit because the settling time for the scope is often 15 - 20 seconds.
This is a work in progress.  I will post the project on GitHub.  Ultimately I'd like to run this through a web interface so I can get rid of the monitor and keyboard.
Picture
Original Tasco rig
Picture
Meade rig with bigger eyepice
6 Comments

Programming the Adafruit PiTFT buttons

8/28/2016

0 Comments

 
After installing the Adafruit PiTFT display to my Raspberry-Pi, I wanted to use the buttons on the panel.  I searched high and low for examples of this, but couldn't find what I was looking for.  Ultimately I want to use one switch to port the display back and forth between the HDMI monitor and the TFT display and another switch to switch the wireless from a LAN configuration to an ad-hoc configuration.  I found a nice article that teaches the basics of using switches connected to the GPIO header here. https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and_switches/  This was really helpful in developing the script I wound up building.
​
I'm still having trouble figuring out how to call the framebuffer and network using a script, so I chose to takle something a little simpler, just to prove the concept of using the buttons to execute Pi commands.  The TFT has a backlight that can be turned on and off, and there's a program called OctoPiPanel that can pretty easily be called by a script, so these are what I chose to control.  I programmed the third switch to simply output a line of text to the terminal indicating that the switch had been pressed and what state the toggle was in.

I found a reference at https://github.com/jonaslorander/OctoPiPanel that showed me how to run OctoPiPanel.  Once I had it installed I had to get the Octoprint API key and copy it to the OctoPiPanel.cfg file.  Then I had to make OctoPiPanel executable.  From that point, I can launch OctoPiPanel from a command line which I will later tie to one of the switches.

The next step was to create a python script that monitors the buttons.  it uses RPi.GPIO to map the switches.  I added some logic to create a two state state engine, so I can essentially treat each switch as an on-off switch even though they are only momentary.  I mapped one switch to start and stop OctoPiPanel and another switch to toggle the LCD backlight.  Finally, I modified the startup script /etc/rc.local to call my monitoring script.
Now I can toggle the backlight and run OctoPiPanel at the press of a button.

I published my work on GitHub here:  https://github.com/TJEmsley/PiTFT-Button-Monitor
0 Comments

Raspberry Pi Display Upgrade

8/24/2016

0 Comments

 
Picture
I've been successfully using a Raspberry Pi as a host controller for my Airwolf3D v5.5 since April of last year.  See my previous blog post about setting that up.  I really like that setup, but I want this rig to be more portable, and lugging around a 14 inch flat screen isn't very helpful there.  My awesome girlfriend bought me an Adafruit 2.8 inch PiTFT touchscreen for my birthday last year, and I finally got the nerve to set it up.  The installation was fraught with failure.  Mostly because of my lack ​​of attention to detail, and in part due to the scattered nature of the instructions.  This project consisted of 3 phases: hardware assembly, software installation & configuration, and designing a new case.  I'm not going to count unit testing, redesign, or user acceptance because any project manager worth their salt knows that these things just magically get done.

I used the Adafruit site as a reference but it's not exactly intuitive, as both the simple automagic installation and detailed installation instructions run together, so I wasn't really sure where to start.  I chose to follow the detailed instructions, just so I'd understand what was going on.  My first attempt was successful, but in trying to figure out how to get the desktop to boot to the new display, I blew everything up and had to re-image the micro SD.  Fortunately, I keep a copy of the last known good image on my laptop, so it only took 5 minutes to get the Pi back to its original state.  Installing the display software the second time was easier, but I accidentally clicked a link for the capacitive touch display instead of the resistive touch display and set the wrong configuration settings.  Third time's a charm, but I still couldn't get the desktop (X windows) to boot to the new display.  Thank Google for helping me eventually find it, buried in the instructions that I was looking at on the Adafruit site.  It was listed under "extras" in the installation instructions.  Ultimately, here is how I got this to work:
Hardware assembly part 1
Solder the tactile switches onto the PiTFT module
Software installation & configuration
​NOTE: Start with a raspberry pi that has a working install of Raspbian with network access.  Mine had the latest Octopi image.
Open a terminal window and execute the commands in bold text below:
Make sure it the Pi is up to date
    sudo apt-get update
Download the kernel
    curl -SLs https://apt.adafruit.com/add-pin | sudo bash
install the kernel
    sudo apt-get install raspberrypi-bootloader
Edit /boot/config.txt file to add device tree overlay
    sudo nano /boot/config.txt
    and add these lines at the end of the file
        [pi1]
        ​device_tree=bcm2708-rpi-b-plus.dtb
        ​[pi2]
        ​device_tree=bcm2709-rpi-2-b.dtb
        ​[all]
        ​dtparam=spi=on
        ​dtparam=i2c1=on
        ​dtparam=i2c_arm=on
        ​dtoverlay=pitft28r,rotate=90,speed=32000000,fps=20
    Save the file and exit

    sudo shutdown -h now
    Now install the TFT on the Pi and power it back on.  There won’t be anything on the TFT display yet, but we will test it now.
    Open a terminal window and run these three commands
    sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
    export FRAMEBUFFER=/dev/fb1
    startx
If you did everything right, you should see the Pi desktop on the little display now.  :)

​Now we have to send the display back to the HDMI monitor to finish the work so open a terminal window in the little display and execute the following commands
    export FRAMEBUFFER=/dev/fb0
    startx
The desktop should now appear on your regular monitor
Now we’ll add support for the touchscreen  Open a terminal window and edit the module list
    sudo nano /etc/modules
        Add the following line at the end of the file
        stmpe-ts
    Save the file and and exit
Reboot by entering the following command
    sudo reboot
After the Pi reboots, check to make sure that the modules installed.  Open a terminal window and enter the following command
    dmesg
Somewhere in that message, you should see the below lines
Picture
Create a calibration configuration file
    sudo mkdir /etc/X11/xorg.conf.d
    sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
    enter the following lines
        Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "stmpe-ts"
        Option  "Calibration"   "3800 200 200 3800"
        Option  "SwapAxes"      "1"
        EndSection
    Save the file and exit
Try sending the desktop  to the new TFT again
    FRAMEBUFFER=/dev/fb1 startx
If you did it right, the display will show up on the new TFT :)
Send the desktop back to the big monitor so we can finish the work
    FRAMEBUFFER=/dev/fb0 startx
Make the it so startx defaults to the TFT by editing the ~/.profile
    sudo nano ~/.profile
    Add this line near the top of the file
        export FRAMEBUFFER=/dev/fb1
    Save and exit the file
Enable booting X windows (the desktop) to the TFT by moving a file and editing it.
    sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
    sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf
       Add the following lines
        Section "Device"
        Identifier "Adafruit PiTFT"
        Driver "fbdev"
        Option "fbdev" "/dev/fb1"
        EndSection
    Save the file and exit
If you want to use the left tactile switch as power off/on, edit the /etc modules file
    sudo nano /etc/modules
    Add the following line at the end of the file
        rpi_power_switch
    Save the file and exit
Create or edit the adafruit config file
    sudo nano /etc/modprobe.d/adafruit.conf
    add this line to the end of the file
        options rpi_power_switch gpio_pin=23 mode=0
    Save the file and exit
Make the switch active by running the following command
    sudo modprobe rpi_power_switch
If you press the left most switch on the display board, the pi should shut down.
Press the button again and the pi should boot to the TFT display

NOTE: ​If you ever want to run the display on the HDMI just open a terminal and enter the following
    FRAMEBUFFER=/dev/fb0 startx

Design and print the case

I desighed the case in Sketchup and made it available on Thingiverse as thing 1737249.
I printed the body on my Airwolf3D v5.5 and the covers on X3REX, my modified Prusa i3.
The design resolves the problem I've had with the micro SD slot on the Pi.  It's a springloaded slot, but the catch on the spring no longer works, so the card will not stay seated.  THe clip on the left side of the case not only holds the case together, it keeps the card in the slot.  I designed and printed the case, and found that the fit wasn't quite right, so with a few tweaks I fixed the alignment problems and re-printed.  v2 of the case came out just right.  I still have to work on the mast for the camera.  I want it to fold down and out of the way while the unit is in transport.

Hardware assembly part 2
Install the Pi and TFT in the case. 
Raspberry Pi TFT case.  #Abstract2Actual 3 days, 6 hours, 27 minutes
0 Comments

Goodbye Kapton Tape

8/24/2016

0 Comments

 
I've said goodbye to Kapton tape after having used on my heated printbeds for the last 3 years.  I have to admit, it works really well for keeping ABS parts stuck to the bed, but it isn't cheap and after a while it tears or buckles.  These tears and buckles cause the surface to look crappy.

I peeled off the tape on X3REX, my modified Prusa i3, then coated the glass with ABS dissolved in acetone.  I set the bed temp to 100 C, put an enclosure around the printer, and added a 4mm brim to the slicing profile.  The results were great.  The bottom surface was really clean and smooth, no warping, and once the bed cooled, the parts just fell off the glass.  With Kapton tape, I usually had to pry the parts off which can damage parts or hands trying to do the prying.  I also peeled the tape off of my Airwolf3D v5.5 and had good results there too.

The parts I printed were of uniform thickness, so I may be jumping to conclusions about the effectiveness of this method, as parts with varying thickness have more of a tendency to warp.   I'll let you know if things change.

Kapton tape works great, and I think it's especially helpful when you first get into printing since you have less warping to deal with.  But once you get the basics down, I believe you can do without this expensive consumable.  
0 Comments

Jazzy's Hammer

8/7/2016

0 Comments

 
Eight year old Jossilyn created a toy hammer for her sister Jasmine.  Using SketchUp, she designed it by first creating a cylinder, then adding a rectangular shaped handle.  One of the things I love about SketchUp is that you can design something without worrying about details like dimensions.  Jossilyn's original design was a hammer that was over four meters in diameter, with a handle that was something like 11 meters long.
Picture
Picture
Jossilyn can focus on design, having only to ensure that the proportions look correct.  She doesn't need to measure anything, and free of that burden, she can simply design.  She put a lot of thought into her design, and although you may not see it very clearly here, she thought to rotate the handle about 90 degrees so that it would be easier to hold.  You can download the design file from Thingiverse.

After I got the file, I simply used the SketchUp scale tool to reduce it to 10% of the original size.  I also separated the handle from the hammer head so that it could be printed without support.
Print time for this was 6 and a half hours.  I sliced it with .4mm layer height, and printed it on my modified Prusa i3, X3REX.  
I did two other things with this print, that I haven't done before.  First, I removed the Capton tape from the heatbed and printed directly on the glass.  The tape was buckling and torn, causing annoying textures on the surface touching the printbed. I coated the glass surface with a lot of "goo", which is simply ABS dissolved in acetone, to hold the parts to the printbed.  I also put a cardboard enclosure around the printer to prevent warping and layer separation.  There was only a little warping on the handle, about .2mm on either end.  I saw a few separated layers, but it was negligible.  The parts came off the bed really easily.
​
Best of all, Jasmine loved the toy that her sister created for her!
0 Comments

Octoprint time lapse on Z axis change

8/4/2016

0 Comments

 
I printed a bunch of bulldog collars for a guy in Switzerland. This batch took about 8 hours to print on my Airwolf3d v5.5 printer.  Using my Octopi host controller, I took a time lapse video using the option to take a frame on each layer change rather than at timed intervals.  I hadn't tried this method before now, but I'll definitely do again because it looks so cool.  The result is a 10 second video where the printed parts appear to be rising up out of the print bed.
0 Comments

July 17th, 2016

7/17/2016

1 Comment

 
Picture
I use Octoprint, a free and open source solution, to to control my Airwolf3d V5.5 printer.  Recently I visited the Octoprint website to update my software and was presented with the opportunity to donate to this excellent project.  Because I use it regularly, and I'm really happy with it, I decided to support the project.

I really use two pieces of Octoprint, OctoPi, on my Raspberry Pi to actually control the printer, and OctoDroid, on my Nvidia Shield tablet to monitor it remotely.  It is a really nice solution!

If you use Octoprint, or any of its components, and you love it, like I do, you can contribute monthly to the project on Patreon here, or make a one time PayPal contribution here.  I'm sure Gina Häußge, the creator and main developer, would appreciate anything you can do.

1 Comment

Save, Spend, Give

7/16/2016

0 Comments

 
In teaching the girls to manage their money following the Dave Ramsey & Rachel Cruze Smart Money Smart Kids method, Sonya came up with the idea to use Mason jars for banks.  She wanted the jars mounted on the wall, and for each jar to have its own label. I designed these three piece brackets around standard quart Mason jars.  The ring fits around the neck of the jar, and slides in to the bracket.  The labels simply slide into a slot on top of the bracket.
The design has one drawback, namely that once the jar is mounted to the wall, you cannot take the jar out to remove the contents.  But if you're trying to teach a kid to save money, that might not necessarily be a bad thing.  The back of the jars are flush against the wall.  I considered a design that would incorporate a screw mounted jar, but the jars I have are not round, rather they are slightly flattened on 
Picture
Wall Mounted Mason Jars
four sides.  A bracket that allowed you to screw the jar in and out would not have been flush against the wall like these are.
The most challenging part of this design was shaping the bracket so that Icould snap the ring into it while having a close fit.  The first model worked when I snapped it together, but when I tried to put it together with the jar in the ring, the bracket edge got hung up on the side of the jar.  So I reshaped the bracket with a little bit of round taper towards the middle of the bracket.  We really like how they turned out.  
You can download the files from Thingiverse and print them yourself.  Or you can order the set HERE.

I printed one of these on my Airwolf3d V5.5, and the other two on my X3REX modified Prusa i3. in both cases, I used .3mm layers with 45% infill.  Since the pieces are all flat with no overhang, there is no support necessary.
0 Comments

Created some brackets

6/22/2016

0 Comments

 
I recently needed to make the bathroom a little neater.  Some things in the shower were just in the way, namely Sonya's razor and her Olay ProX face scrubber.  3D printer to the rescue
The main issue with the razor really wasn't that it was in the way as much as that while it was lying flat, it stayed wet and the blades eventually got rust on them.  A hanger could definitely resolve that problem.  I designed a two part bracket in 
and mounted it to the wall using a waterproof 3M Command strip.
The success of this bracket compelled me to modify it slightly and create another mount for her Olay ProX exfoliatior.
The angle of the razor bracket is 15 degrees in the Z axis, but I probably could have gotten away with 12.  The ProX exfoliator has a 10 degree angle in the X axis and a 5 degree angle in the Z axis.  Printing in two pieces provided the necessary structural integrity, and allowed me to print without supports.
By the way,if you haven't tried razors from Harry's, you don't know what you're missing.  Good shave, great price, delivered right to your door.
0 Comments
<<Previous
Forward>>
    View my profile on LinkedIn

    TJ Emsley

    Lifetime tinkerer.

    Archives

    October 2022
    January 2021
    November 2020
    October 2020
    September 2020
    February 2018
    January 2018
    January 2017
    October 2016
    August 2016
    July 2016
    June 2016
    May 2015
    April 2015
    March 2015
    February 2015
    December 2014
    October 2014
    August 2014
    July 2014
    May 2014
    April 2014
    March 2014
    November 2013
    October 2013

    Categories

    All
    3d Design
    3d Printing
    Open Source

    RSS Feed




Proudly powered by Weebly