Besides 3D printing, I have recently started a new hobby: flying a RC Quadrocopter. To be more precise, flying a Quadrocopter with “FPV” (if you’re interested in what lured me into this, watch this video on YouTube…)
Anyway, since I’m relatively new to flying radio controlled stuff, I still crash the thing more than I fly it. Recently things really went out of control and I crash landed my Quadrocopter in a forrest, 450m away from its start position.
About 4 hours search time later (on the next day), my brother in law (who was part of the little search party) found the crashed thing. Of course, since the (LiPo) batteries were (still) connected for about 24 hours, they were fully discharged (and thus damaged). Also the Quadrocopter’s props and frame were damaged. But on the bright side, we were able to recover all motors and the (rather expensive) electronics, including the FPV related stuff (AV transmitter, camera).
Although it might be possible to repair the broken original frame, I decided to rebuild the Quadrocopter from scratch. And of course, I printed all custom plastic parts on my MakerBot :)
There aren’t many parts needed for a Quadrocopter’s frame: It’s more or less just four arms with the motors attached to one end and a center plate on the other end, forming the typical X shape.
The center plate is also where most of the electronics are mounted: the Quadrocopter’s gyroscope controller (which stabilizes the whole thing when airborne), the battery pack and, of course, the RC receiver. The four ESCs (Electronic Speed Controllers), driving the brushless motors, are mounted directly on the arms (i.e. nearby the motors).
In my case, due to flying the whole thing with FPV, there is need for some additional electronic components: an AV transmitter, a camera and the OSD (On Screen Display), consisting of three separate PCBs. The OSD isn’t mandatory for FPV, but it’s quite handy to see the battery’s remaining capacity, the Quadcopter’s GPS position and height and such, overlaid in the transmitted video.
So here’s the design I came up with:
For the arms, I use 10x10mm wood profiles. It’s cheap, it’s light weight and it’s tough!
The four arms (each 25cm long) fit into the holes on the center plate. They are hold in place by M3x25mm bolts, for which I drilled a 3mm hole through each arm after inserting them into the center plate. The exact positions of the holes are already printed into one side of the center plate.
The motors are bolt to small platforms which are attached to the outer end of the four arms:
I used M3x20mm nylon bolts (not printed…) to secure the motor platforms.
The separate holders for the additional electronics (AV transmitter and OSD main PCB) are attached to their respective mounting places on the side and the back of the center plate. The RC receiver and the Gyroscope/Main controller are mounted on top of the platform with double-sided adhesive tape (the Gyro with additional rubber foam padding to reduce vibrations):
The FPV camera is mounted on the front of the center plate. Above it (on the left side in the following picture), the OSD’s GPS receiver is mounted on the top of the center plate (double-sided adhesive tape):
As mentioned before, the ESCs (which control the brushless motors) are mounted directly on the arms. So is the RC receivers additional antenna unit:
On the bottom side, you can see a x-shaped structure. This holds the third (and final) PCB of the OSD, containing the current measurement unit which allows the OSD to measure and display up to 50A current. The x-shaped holder and the velcro tape for later holding the battery pack are bolt down to the center plate with help of the four M3x25 bolts (see above).
Well, that’s about it, so far:
The feet in the above picture are currently simply four pieces of 6mm aluminum pipe. I plan to replace these by 6mm carbon rod, with nice, printed landing plates:
Unfortunately, these aren’t ready, yet. I’d like to build these with some kind of suspension in order to soften rough landings. But I’m still in process to design a simple, light weight and effective way to build this…
That leaves me with a last important question:
Will it blend fly?
The whole Quadrocopter, including the full FPV equipement, battery pack and preliminary feet weights only about 650 gramms, which is well under the theoretical maximum flying weight (including payload) of the original Gaui 330XS hardware.
Unfortunately, it’s raining outside, so I couldn’t test it in the wild. But I couldn’t resist to do a short hovering test in my living room. You must know, that my living room is rather small and stuffed with furniture, so it’s kind of hard to do test flights there, especially for a not-so-experienced pilot as myself.
But see for yourself:
Well, this looks promising!
So far I’m quite happy with the results of 3D printing structural parts for a Quadrocopter. The parts are quite sturdy, yet light weight. And if I’ll brake any part of the Quadrocopter in the future, the replacement is always just a quick print away!
My Z-Probe prototype used a standard sized servo. Of course, this kind of servo seems a little bit oversized for this use. Thus, I looked around for smaller alternatives.
I found some nice micro servos on ebay:
These servos not only are tiny, they are also cheap. I bought 3 of them for 4 Euros a piece.
I started to redesign the printed parts of the z-probe prototype. But compared to these micro servos, the mechanical construction was huge. Too huge!
After thinking about this for a while, I found a solution: Keep it simple!
Here’s what I came up with:
It’s basically just the servo with an opto endstop pcb glued to it…
Its smaller, it’s simpler, it’s adjustable and it works great.
Here’s a how to build the probe:
I also simplified the z-probe firmware, based on the latest G3Firmware. Since the firmware now natively supports servos (for the Unicorn pen plotter), I was able to reduce the code patches to just a few lines for the z-probe commands.
Unfortunately I wasn’t able to update my forked firmware repository on GITHub. I’m (still) really uncomfortable with using git! Each time, it’s a pain in the ass to merge new revisions from the remote repository with my forked repositories (locally and/or on GITHub). I’m pretty sure, that this is supposed to be easy, but there always are problems, errors or conflicts. And I’m still looking for a good tutorial for these hacker tasks…
Anyway, until I’m in the mood to check out git again, here are the few code changes necessary to support the z-probe in the newest firmware revision:
The ReplicatorG patch can be also simplified (no more EEPROM preferences for the Z-Probe). But I didn’t find time for this yet. For the time beeing, you can simply use the patched version from here.
Well, I still have 2 servos left…
I wonder what I can do with one of these and a slightly modified version of this thing, directly glued to the servo arm. I’m pretty sure it’ll work just as fine as that thing, only with 16 parts less…
In view of my upcoming 3D printing talk at the Macoun Developer Conference in Frankfurt/Main in a few weeks, I thought that my Makerbot could use a little bit refurbishment.
Since a while it rattles a lot during printing, so at least I wanted to remove the X/Y stages from the bot, in order to clean the rods and to tighten all bolts.
I also wanted to find a better solution for the heated build platform’s cables. Until now, they somehow dangled in the back of the Makerbot on their way up to the extruder controller board.
After removing the X/Y stage from the bot, I saw another problem which needed to be solved:
Not only the acrylic build surface looks like reaching its end of life (it’s still the very first one, which came with the Makerbot kit more than a year ago), the main problem is that the whole platform has far too much play. Although my heated build platform is rather heavy (6mm aluminum + 3 big power resistors), I remember that this was also a problem with the original, unheated, wooden build platform.
I decided to bolt the aluminum plate directly to the Y stage with one central screw:
In order to be able to easily remove the print stage, I got rid of the acrylic build platform (bolt to the aluminum plate before). Instead I tried three different “interface” sheets.
The first try was a aluminum cover for the build platform. I folded the cover out of .5mm aluminum sheet with Kapton tape as surface:
To cut a long story short: It didn’t work. The cover wasn’t easy to install and remove from the build platform and it was impossible to get a good, leveled surface.
Next, I tried a piece of transparent LDPE. I had some leftovers of this from building the second filament box. I attached the LDPE with some foldback clips to the heated build platform.
It worked relatively well. However, the LDPE degenerates rather quick:
Also I have the problem that there are only very few spots on the build platform where foldback clips can be used without blocking the build platform’s movement. Since LDPE heavily warps when heated, there just weren’t enough clips to hold it down to the flat aluminum.
Finally, I cut a sheet of thin glass (from a cheap picture frame) to 10x10cm. Like the aluminum sheet, I used Kapton tape as “interface” material for the ABS. So far, this build surface seems to work great. The glass is nicely flat and leveled and keeps it that way when heated. And two foldback clips are enough to securely attach the surface to the aluminum plate:
Now, with the aluminum platform bolt down to the y stage, I was able to use a piece of ribbon cable to connect the cables from the platform with the x stage:
There was a connector on one end of the ribbon cable (it used to be a part of an old PC’s RS232 access), I glued this end of the cable to the y stage. After soldering a compatible connector to the platform’s wires, I was able to connect the heated build platform in a way which allows easy removal if needed.
Up until half way, I glued the ribbon cable to the x stage’s edge. Then the cable runs inside the drag spring from the x stage to the outside of the Makerbot. I already had the drag spring installed about a year ago to guide the y stepper motor’s and the y end stops’ cables.
Here’s a short video of the ribbon cable during a print:
It works great!
After playing around with my Mendel for a while, I very much like the autohoming feature of it’s firmware.
When I browsed the current Makerbot firmware, I was surprised to find support for automatic homing, ready to use. As far as I know, this code is currently not used by ReplicatorG, right?
Anyway, having endstops installed for the X and Y stage, it’s no problem to autohome these stages with the current firmware.
Just send the G-Codes G28, G161 or G162 with information on the axis to the Makerbot:
G28 is the “normal” ‘return to home’ G-code, also used by the RepRap firmware. However, in the Makerbot firmware, there are two more variants of the homing functions:
G161 is ‘home negative’, which means, that the respective stages are moved in direction of the MIN endstop until they reach the end of the line. Currently, G28 and G161 are exactly the same in the Makerbot firmware.
G162 is ‘home positive’, which means, that the respective stages are moved in direction of the MAX endstop until they reach the end of the line.
Concerning the X and Y stage, you might use either of them to bring the Makerbot into a “well known position”. If you have installed all four MIN/MAX endstops for the X&Y stages, that is.
In case you have only one endstop per axis you should call G161 for those axes with a MIN endstop and G162 for those axes with a MAX endstop.
My Makerbot, for example, has only one endstop per axis: MAX on the X axis, MIN on the Y and Z axes. So in order to home my Makerbot, I’d send
G162 X
G161 Y Z
The Z-axis endstop isn’t as easy to install as the X/Y endstops. Depending on the build platform and/or extruder or frostruder you’re using, the Z-axis endstop needs to be adjusted for the correct height.
Quite a while ago, I already tried some possible solutions on my Makerbot. Back then, I designed the Z-stage endstop trigger (my very first published thing on Thingiverse!). I also designed a X-stage endstop trigger and an adjustable Z-stage endstop trigger. But since I wasn’t too happy with the results, I never published these.
I always thought, that the best way to do homing of the z-stage would be a probe as near as possible to the nozzle, sensing the actual build surface.
I also did some test on this back a year ago, but again the results weren’t too promising:
The main problem is, that the probe needs to be retractable during the print process. A year ago I tried to solve this with a manual retraction mechanism. But it didn’t work reliably. Also, adjusting the probe wasn’t very easy.
More than a year later, I learned a lot about electronics, microcontrollers and embedded systems programming…
So here’s what I came up with:
The Z-Probe
This new design contains a standard endstop PCB and a needle-like sensing-probe. The head of the sensor is motorized retractable with help of a standard servo.
The Z-Probe is designed to be mounted behind/under the extruder on the z-stage:
That way, the Z-Probe is able to sense the build platform only 1-2 cm from the nossle.
The servo, lowering and rising the sense-pin, is controlled by the extruder controller board. There are two digital pins on the extruder controller board v2.2, currently unused on a Makerbot (D9 and D10).
These pins are ready to use with a servo. Just plug the servo connector to the 3 pins of D9. Make sure to put the black wire (GND) on the pin marked with “-”:
Of course, some firmware/host software changes are needed in order to drive the Z-Probe.
The D9 and D10 pins are even PWM enabled. So usually it’s quite easy to add support for servos on an Arduino controller.
Unfortunately, since v2 of the extruder controller firmware Adam from Makerbot Inc. decided to move away from the Arduino IDE and API. The firmware is now “native AVR”, i.e. no more access to the Arduino libraries. Of course, there are several valid reasons to abandon the Arduino IDE, especially when projects grow and get more complex. But this also makes it harder to “hack” the software.
What’s even worse: The current firmware already uses the hardware timer of the ATMega, which ususally drives the PWM pins D9 and D10. So I needed quite a while to understand how to solve these problems.
I think, I’ve found a way to solve the problem with the timer. The current firmware uses this timer for a general software interrupt routine. So I hooked the servo driver for the z-probe into the same interrupt routine. So the servo PWM signal now is created by the CPU in software (and not by the hardware PWM driver). I tried some other ways around this timer conflict, but this was the only way both, the servo and the rest of the firmware, are working. I guess it’s not the best idea to mess around with one of the firmware’s central timers…
After solving these problems, I was able to extend the firmware with a new class “ZProbe”. This class handles the lowering and raising of the ZProbe hardware.
The upper and lower positions of the ZProbe are configurable in the extruder’s EEPROM preferences (well, they will be, as soon as I’ll find the bug which currently prevents the firmware to write new values to the preferences…).
In order to control the Z-Probe from within Replicator-G and -even more important- from within G-Code files, I added some new “M-Codes” to the GCode-Parser: M140, M141 and M142
M140 “Engage Z-Probe”: This M-Code lowers the Z-Probe into working position.
M141 “Disengage Z-Probe”: This M-Code raises the Z-Probe into parking position.
M142 “Adjust Z-Proble Angle”: This M-Code takes a S argument and moves the Z-Probe’s servo int the given angle (e.g. M142 S45 moves the servo to 45°). This code is intended for internal use only.
One thing to keep in mind is, that the zeroed Z-stage with engaged Z-Probe mustn’t be moved in X or Y direction. Since the Z-Probe pin touches the build surface in this case, moving the build platform could cause scratches in the build surface or -worse- damage of the Z-Probe itself. So always either disengage the Z-Probe or raise the Z-stage a little before moving the X/Y stage.
Here’s the G-Code for a complete autohome sequence on a Z-Probe equipped Makerbot:
G21 (Metric FTW)
G91 (relative positioning)
G0 Z7.0 (move up the z-stage for security)
M141 (Disengage Z-Probe)
G90 (Absolute Positioning)
G162 X (home positive)
G161 Y (home negative)
G92 X0 Y0 (Reset reference position)
G0 X-55.0 Y20.0 (Center ** Z-Probe-Pin **)
G92 X0 Y-25 (Reset reference position)
M140 (Engage Z-Probe)
G161 Z F500 (home negative [fast])
G92 Z0 (Reset reference position)
G0 Z2.0 (Back up z-stage 2mm)
G161 Z F25 (home negative [slow])
G92 Z0 (Reset reference position)
M141 (Disengage Z-Probe)
G1 F150 (Reset Z-speed)
G0 Z1 (backup Z for Y move)
G0 Y0 (center Y *** Nozzle ***)
G0 Z0 (return Z to zero)
Of course, this G-Code would need to be adjusted if the Makerbot has an other endstop configuration than mine. Also the ‘move to center’ distance is likely different on each Makerbot.
Here’s a video, showing my Makerbot while running the above G-Code:
As you can see, the Z-Probe just works, even if the height of the build platform was changed. No manual adjustmens needed. This is not only a nice feature for operators using differnt types of build platforms or surfaces, it also might be quite useful for people using the brand new Automated Build Platform.
You want?
First and frontmost: This is all still in a very early stage, both hardware and software.
The design is for use with a Futaba servo S148. That’s the servo I found in my junk box. I guess each servo has a different size. So the design might be more a draft for your own design. I plan to try the same thing with a smaller (and cheaper) “micro servo” in the future. I hope I’ll find the time to create a parametric OpenSCAD design until then.
Since it’s still a prototype, the servo is currently glued to the base plate with some hot glue.
Both, the new extruder firmware as well as the extended ReplicatorG host software, are available on GitHub. I forked both projects from Makerbot: