Tag Archives: 3D printing

Charging Station System Integration – Part III

Posted 15 April 2017

In my previous post on this subject, I described some IR homing tests with and without the overhead incandescent lights, and the development of a ‘sunshade’ to block out enough of the IR energy from the overhead lamps to allow Wall-E2 to successfully home in on the IR beam from the charging station.  At the conclusion of that post, I had made a couple of successful runs using a temporary cardboard sunshade, and thought that a permanent sunshade would be all that I needed.

However, after installing the sunshade (shown below), I discovered that the homing performance in the presence of overhead IR lamps was marginal when the robot’s offset distance from the wall was more than about 50 cm.

Sunshade, oblique view

Sunshade, side view

Sunshade, front view

Apparently the IR interference was causing the robot to not respond to the IR beam until too close to miss the outer lead-in rail.  This issue was explored in an earlier post, but I have repeated the relevant drawings here as well.

 

Tilted gate option. The tilt decreases the minimum required IR beam capture distance from about 1.7m to about 1.0m

Capture parameters for the robot approaching a charging station

When the robot is ‘cruising’ at more than about 50 cm from the tracked wall,  the IR interference from the overhead lamps prevents the robot from acquiring the charging station IR beam until too late to avoid the outer lead-in rail, even in the 13º tilted rail arrangement in the first drawing above.

 

So, what to do?  I am already running the IR LED at close to the upper limit of the normal operating current, so I can’t significantly increase the IR beam intensity – at least not directly.  I can’t really increase the size of the ‘sunshade’ dramatically without also significantly affecting the IR beam detection performance.  What I really needed was a way of increasing the IR beam intensity without increasing the LED current.  As it turns out, I spent over a decade as a research scientist at The Ohio State University ElectroScience Lab, where I helped design reflector antenna systems for spacecraft.  Spacecraft are power and weight limited, so anything that can be done to improve link margins without increasing weight and/or power is a good thing, and it turns out you can do just that by using well-designed reflector dishes to focus the microwave communications energy much like a flashlight. You get more power where you want it, but you don’t have to pay for it with more power input; the only ‘cost’ is the insignificant added weight of the reflector structure itself – almost free!  In any case, I needed something similar for my design, and I happened to have a small flashlight reflector hanging around from a previous project – maybe I could use that to focus and narrow the IR beam along the charging station centerline.

LED flashlight reflector

So, using my trusty PowerSpec PRO 3D printer and TinkerCad, I whipped up an experimental holder for the above reflector, as shown below

Experimental 3D-printed flashlight reflector holder

Reflector mounted on experimental holder

IR LED mounted on reflector

A couple of quick bench-top tests convinced me I was on the right track; At 1m separation between the IR LED/reflector combination and the robot, I was able to drive the robot’s phototransistors into saturation (i.e. an analog input reading of about 20 out of 1024 max), where before I was lucky to get it down to 100 or so.  However, this only happened when I got the LED positioned at the reflector focal point, which was tricky to do by hand, but not too bad for a first try!

Next, I tried incorporating the reflector idea into the current charging station IR LED/charging probe fixture, as shown in the following photo. This was much closer to what I wanted, but it still was too difficult to get the IR LED positioned correctly, and this was made even more difficult by the fact that I literally could not see what I was doing – it’s IR after all!

New reflector and old charging station fixture designs

However, the reflector focusing performance should be (mostly) the same for IR and visible wavelengths, so I should be able to use a visible-wavelength LED for initial testing, at least.  So, I set up a small white screen 15-20 cm away from the reflector, and used a regular visible LED to investigate focus point position effects.  As the following photos show, the reflector makes quite a difference in energy density.

Green visible LED, hand-positioned near the focal point

Pattern without the reflector

Next, I used my Canon PowerShot SX260HS digital camera as an IR visualizer so I could see the IR beam pattern. As shown below, the reflector does an excellent job of focusing the available IR energy into a tight beam

IR beam visualized using my Canon PowerShot SX260HS digital camera

IR LED, without reflector

Next, I made another version of the reflector holder, but this time with a way of mounting the LED more firmly at (or as near as I could eyeball) the reflector focal point.

Reflector holder modified for more accurate LED mounting

With this modification, I was able to get pretty good focusing without having to fiddle with the LED location, so I set up some range tests on the floor of my lab.  With LED overhead lighting (not incandescent), I was able to get excellent homing performance all the way out to 2m, as shown in the following photos and plots

Range testing the IR reflector in the lab. Distance 2m

IR Detector response vs orientation at 2m from reflector, in the lab

IR reflector beam pattern at 2m, visualized using digital CCD camera

After this, I decided to try my luck again out in our entry hallway, with the dreaded IR interference from the overhead lighting and/or sunlight.   I installed the lead-in rails in the ’tilted’ arrangement, and then performed a response vs orientation test with the robot situated about 2.5m from the IR LED/reflector assembly, in natural daylight illumination with the overhead incandescents OFF.  This produced the curves shown in the plot below.

Robot response vs orientation test setup, 2.5 m from tilted lead-in rails & LED/reflector assembly

IR detector response vs orientation test, 2.5 m from IR LED/Reflector assembly

In the above Excel plot, the individual detector response minimums can be clearly seen, with minimum values in the 200-300 range, and off-axis responses in the 800-1000 range.  This should be more than enough for successful IR homing.

After seeing these positive responses, I ran some homing tests starting from this same general position.  In each run, the robot started off tracking the right-hand wall at about 50 cm offset.  One run was in daylight with the overhead lights OFF, and another was in daylight with the overhead lights ON.  As can be seen in the videos below.

Both of the above test runs were successful.  The robot started homing on the IR beam almost immediately, and was successfully captured by the lead-in rails.

So, it is clear the reflector idea is a winner – it allows the robot to detect and home in on the IR beam from far enough away to not miss the capture aperture, even in the presence of IR interference from daylight and/or overhead incandescent lighting.

Next step – reprint the IR LED reflector holder with the charging probe holder included (I managed to leave it out of the model the last time), and verify that the robot will indeed connect and start charging.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PowerSpec 3D PRO Build Plate LED Lamps

Posted 03 April 2017

In the year or so since I started printing with my trusty PowerSpec 3D PRO (Microcenter clone of the FlashForge Creator PRO), I have struggled to see what was happening in the first few layers of problem prints.  The extruder/feed motor assembly is so big that it blocks most of the sight line to the build surface.  What is left is a very shallow viewing angle, which is mostly shadowed by the print assembly.  Over time, I have found that hanging one of my goose-neck LED bench lamps over the top edge of the cabinet on either the left or the right side gave me a much better view – the restricted viewing angle was unchanged, but a lot more light was thrown on the subject, literally.  However, this was an inelegant solution to say the least, as the lamp was apt to fall off the printer at the most inopportune times.

As usual, I kept thinking of ways to improve this situation, and finally came up with the idea of seeing if I could find some small LED work lights that I could permanently attach to the printer.  After some Googling around, I came up with a 2-lamp LED Auxiliary Light Kit (p/n DRL-CW3-SM-9) offered by superbrightleds.com for $24.95/pair – nice!

DRL-NW3-SM 12-24V 9W Auxiliary LED Light Kit (2 lamps)

After some fiddling around and some goofs, I arrived at an arrangement I liked.  The lamps are mounted at the top of the cabinet and are pointed down so they illuminate the entire build surface, but are physically offset enough so the plastic top closure assembly can still be removed and put back on without problems (this was one of the goofs – the first arrangement I tried made removing/replacing this piece very tedious).  The shots below show the setup.

To power the lamps, I used a ‘Mean Well’ APC-25-1050 24VDC constant-current LED driver supply from ledsupply.com.  This is an incredibly cheap switch-mode power supply that delivers 1.05A constant current, with an output voltage from 12-24V.  This matched well with the 12-24V input spec for the LED auxiliary lamp, so I was in good shape.   I had a couple of these hanging around from a previous project where I converted a crappy Lowe’s LED clip-lamp to a robust high-power LED lamp, so I got a two-fer (didn’t have to research/buy a power supply, and used up some of my excess stock – yay!).

For control, I decided to use individual power switches, mounted at the rear left & right of the cabinet.  I had some small SPDT power switches available, so I printed up a nice little housing with integrated zip-tie anchor points for cable strain relief, and then ran a common power run down the back center of the cabinet to the power supply mounted on the back of the cabinet, below the right filament spool.

The following photos show the arrangement, and the build plate illumination during the first few layers of a test print.  Enjoy

Old vs New. Hanging bench lamp in foreground, new permanently mounted LED lamp in background

New LED lamps in action. Note the build plate illumination.

View from back of printer showing both LED lamps and ON/OFF switches

Mean Well APC-25-1050 1A constant-current LED power supply mounted at rear bottom of the cabinet

Build plate illumination with both LED lamps ON

Test print with both LED lamps ON

Test print with both LEDs OFF

View from top during test print, both LED lamps ON

 

 

Coffee pot filter holder handle repair with CFPETG

Posted 2 April 2017

No, this is not an April Fools prank – but an actual geek-type 3D printer project using 3DXTECH’s carbon fiber impregnated PETG filament.

A day or so ago I was preparing my morning coffee as usual, when I discovered the little plastic ‘milk pail handle’ handle on the coffee filter holder had somehow gotten broken, as shown in the following photos

broken handle – note the missing tip on the left side

broken handle in action (or in this case, INaction)

So, since I hate defective products like this, and since I happened to have a 3D printer and some CF-PETG handy, I decided to see if I could 3D print a replacement.  Designing the replacement in TinkerCad turned out to be pretty straightforward, using a rectangular cross-section for the handle rather than the original circular design.  The two retainer tips are cylinder sections (actually they are the ends of the same cylinder – with the middle removed along with the center of the disk making up the handle.  The TinkerCad design is shown in the following screenshots

Finished design

exploded view

After the usual 2-3 tries to get the printing parameters tuned up (seems they change slightly for every job), I got a very good print, as shown in the following photo

Broken handle and CF-PETG replacement. I only went through about 4 iterations over a few hours to get this right

When installed on the coffee pot filter holder, it seemed to work very well – it allows me to pick up the holder by the ‘milk pail handle’ and it also stows away just like the original – yay!!

Replacement handle in action – lifting the filter holder as intended

Replacement handle in stowed position

B3DP (Before 3D Printers), it would basically have been impossible to repair this part.  Now, that’s not really a disaster, as it is perfectly feasible to use the holder forever without the little ‘milk pail handle’ but if you are a guy like me who hates defective equipment, this would have been a burr under my saddle every time I used the coffee pot.  I might have been able to find a replacement part somewhere, at some exorbitant cost (probably more than the entire coffee brewer) with a 6 week delivery lag time, but that would just be a choice between two bad options; deal with a broken system every day, or just buy another brewer because of the failure of some 10-cent part 🙁

However, with my new 3D printer super power, the cost to repair is a few pennies of filament and a few hours of my time in my lab, which I love to do anyway – such a deal! 😉

Stay tuned!

Frank

 

Printing with 3DXTech Carbon-Fiber PETG – Solved!

A couple of months ago, I got some 3DXTech carbon fiber PETG filament to play with, and I have been having mixed success printing with it on my PowerSpec 3D PRO (FlashForge Creator PRO clone) dual-extruder machine.  My first few prints were pretty nice, but lately I’ve been having problems.  The prints turn out messy and stringy, with almost no strength – as if the layers aren’t fusing at all. I can easily snap pieces apart, where before they were quite robust.

In an effort to troubleshoot the problem, I have done the following:

  • Replaced both nozzles with 3DxTech hardened steel models
  • Re-leveled the build plate
  • Gone through the excellent XYZFABS PETG printing tips here.
  • Set the z-axis offset to 0.02mm in S3D gcode
  • Set the filament feed multiplier to 0.88 as recommended
  • Set the extruder temp to 220, bed temp to 100

With the above settings, I tried a 20mm cal cube, but it started ‘air-printing’ after about 15mm from the base (filament under feeding?).

  • Set the filament feed multiplier to 1.20 and tried again.  This time I got a nicer print, but it still failed at 15mm with a feed jam and obvious gear tooth wear on the filament – clearly over-feeding.
  • Set feed multiplier back to 1.10 and tried again.  This time it started ‘air-printing’ at about 4mm up.
  • Changed extruder temp to 230 and tried again.  This time it failed to adhere 1st layer to print bed.  This caused a ‘blob’ on the extruder tip, which resulted in sidewalls that were over-printed and ragged.
  • Changed print multiplier to 1.00 and tried again.  This time the print didn’t adhere to the print bed at all
  • Changed z-axis offset back to 0.00.  This resulted in an almost perfect print.  Sidewalls were very nice, and although there was some ‘globbing’ during bridging on the top, the final top layer was almost perfect.

So, the final settings for a good print are: Feed multiplier = 1.00, Bed temp = 100, extruder temp 230, z-axis offset 0.00, unused extruder temp set to 25 (can’t set to 0, as this gets overwritten by printer), as shown below in the S3D process settings screenshots

23 March Update:

Last night I printed a second 20mm cal cube using the same settings as above, and this time the bottom layers did not print correctly (sides and top did OK).  So I tried again this morning, with the following change:

  • Changed z-axis offset from 0.00 to +0.01mm, and changed the unused extruder temp from 25 to 75 (this last settings change is an attempt to fool the printer into showing percentage completion as normal. With an unused extruder setting of 25, the top line of the display shows ‘heating’ continuously)

With the above changes, I got an essentially perfect cal cube print, *and* the top line of the display showed percentage completion instead of just ‘heating’ (the right extruder temp display showed 75/75, so that pretty much confirms my theory about the printer having to match actual and requested temps in order to progress to the ‘percentage completion’ display mode)

Essentially perfect 20mm cal cube print with 3DXTech Carbon Fiber PETG filament

Unfortunately, when I tried to print the TinkerCad model shown below (it’s the front right wheel bumper for my robot), I could not get a decent print no matter what I did.  Either the first layer wouldn’t adhere, or the filament feed failed partway through the print, or the finished print was way to fragile for use.  I finally had to give up on the 3DXTech filament entirely and print the bumper using ABS (which printed perfectly the first time!).  This was very disappointing to me, as I had previously successfully printed two of these wheelguards using the 3DXTech filament – so I’m not sure what changed to make it difficult/impossible to do it now 🙁

Right wheel guard for Wall-E2 (blue material is support). Printed perfectly the first time with ABS, but not with 3DXTech Carbon Fiber

ABS with ABS support printed perfectly on the first try

Frank

25 March Update:

Yesterday I did what I should have done when I first started having problems with the filament, namely shooting off an email to 3DXTECH.  I quickly got a response back from Matt Howlett, the company’s founder, with a what looks like their stock reply for people having problems.  Most of the stuff in the list I had already covered, but there were a couple I hadn’t tried, and one of them was raising the extruder temp from 230 to 240-245.

So, I reloaded the carbon fiber PETG on my printer, and printed a 20 mm cal cube with Matt’s recommended settings, except for a bed temp of 90 vs 65 (because I have a PEI bed and don’t want to use hairspray, and print speed of 3000mm/min vs 4000.  This time the cal cube printed perfectly, and I could not damage the finished cube with finger pressure like I could before.

Next, I tried a full print of my right wheel guard model for Wall-E2.  To simplify things, I used the carbon fiber PETG filament for both the model and the support material (I was having trouble before getting the support material to stick at the bed temperature I was using for the carbon fiber PETG material), and lo-and-behold, this print also turned out perfectly, as shown in the following shots.

Just starting the print

About 1/4 the way through, printing nicely

About 2/3 of the way. Note how well both the model and the support area adhered to the bed

Finished print!

Finished product – and quite strong.

When I made this one change, all of a sudden I was getting almost perfect prints!  Now I feel like an idiot for going through all this wailing and gnashing of teeth when all I needed to do was raise the extruder temp 10 deg!  Now I have been forced to ‘eat my hat’ (and my complaints to 3DXTECH!) – OOPS!!  However, since I am now back to being able to make strong carbon fiber prints, I’m more than willing to accept the trade-off! ;-))))

Stay tuned,

Frank

 

 

 

Twisted Heart 3D Print Using Magenta PETG

A little over a year ago, in December 2015, I printed a ‘twisted heart’ vase for my wife, using  Gyrobot’s ‘Twisted_Heart_Vase_Hollow_-_Hi_Res.stl’ file from Thingiverse (http://www.thingiverse.com/thing:42570/#files).  At the time, I had been 3D printing for about a year using a Printrbot Simple Metal and I had just purchased some bright Magenta PETG 3D filament.  As usual I printed several versions to get the one I (actually, my wife) wanted, and wound up with a small 30% scale model that my wife used as her daily pill cup.

As it happens, this model wound up in the hands of a grand-daughter, so my wife asked me to print her a new one.  “Piece of cake” I thought; after all, I have a better printer – a dual extruder PowerSpec 3DPRO (FlashForge 3D Creator Pro knockoff) with enclosed build space and a heated print bed with PEI, the top-of-the-line Simplify3D plater/slicer, and plenty of PETG magenta filament remaining – what could go wrong? 😉

So, I tracked down the print file I used last time, threw it into S3D, scaled it down to 30%, and voila – NOTHING – WTF!!??  After some experimentation, I found that any time I scaled the print below 50%, the sidewalls disappeared – ugh!  After some due-diligence Googling, I finally gave up and posted to the S3D support forum, and in very short order I had a couple of replies. Turns out the answer was that the sidewall thickness was getting scaled with everything else, and once it got below about 1/2 extruder thickness – it got rounded down to zero thickness – duh!  Fortunately, poster Brian had the answer – tell S3D to make the object a solid model, and then set the infill to 0% and the sidewalls to 1 perimeter width – yay!

So, this got me to the point where I could actually slice the model and send it off to the printer, where I discovered an entirely different set of problems.  I don’t remember having any real problems with my old trusty Printrbot, but I sure was having them with the PowerSpec.  The PETG filament was sometimes refusing to stick to my PEI print bed surface, and when it did stick, it had a tendency to stick to itself and ball up in to a huge blob after several to many layers.  When it didn’t do any of these bad things, I would get ugly inclusions and/or voids in the sidewalls – not the kind of thing I wanted to show my wife – yuk!!

So, back to Google, looking for advice on printing with PETG.  Fortunately, after just a short hunt I came across a very detailed treatment for PETG printing by ‘Jules’ at XYZFabs.  The good news – it was very detailed and thorough, so it was very likely to cover my problem; the bad news – it was very detailed and thorough, and so required a lot of concentrated study to follow.

In my case, the problem resolution was to do the following, as suggested in the above article

  • Modified the Z-axis calibration in S3D’s G-code section to move the extruder another 0.02mm away from the print bed, to accommodate PETG’s enhanced stickiness.
  • Enabled the ‘wiping’ feature, and confirmed that I had ‘retraction’ enabled
  • Set the extrusion multiplier to 0.88 to significantly under-extrude.  Before reading this article, I had had other occasions to over-extrude slightly with others filaments, but this was the first time I had a reason to under-extrude.
  • Switched back from ‘high resolution’ (0.1mm layer height) to ‘medium’ (0.2mm layer height).  Not sure this was really necessary, but it seemed that the theme for PETG was ‘keep the layer separation as high as possible without actually air-printing’, so…
  • Slowed the print speeds down slightly.  Again, not sure this was absolutely necessary, but the combination of this and all the above were definitely going in the right direction.

As a result of these changes, print quality improved dramatically, to the point where my next 30% scale print was a ‘winner’  – one that I could proudly present to my wife and accept my reward (“well, it’s not as good as the one I had before, but I guess it’ll have to do”) ;-).  Hey, after almost 50 years of marriage, that’s about as good as it gets!!

I have included some photos of some of the failed versions, and a couple of the successful one.

The twisted-heart menagerie. The successful print is shown on the far right

Successful 30% scale twisted heart print, using magenta PETG

Successful 30% scale twisted heart print, using magenta PETG

I have also included screenshots from my S3D setup for the successful print.

Frank

 

3D Printer Filament De-Humidifier Bin

Posted 11 January 2017

I’ve had at least one 3D printer in my home laboratory for well over 2 years now, and having the ability to print up arbitrary 3D shapes has been a complete creative game-changer for me.  Now when I have an idea about something I want to build or try, I don’t have to spend days in my shop trying to fabricate something out of wood or sheet metal – I can design it in TinkerCad and print it on my 3D printer.  Moreover (and this is where it gets really cool!), I don’t have to get it right the first time – I can make an unlimited number of versions of the idea, improving and/or changing it as I go.  Each iteration takes a few hours at most, and costs just a few pennies in terms of power and filament usage – what a deal!

Anyway, I have accumulated a number of rolls of different filaments, all of which degrade in greater or lesser degree over time due to moisture absorption (hygroscopic tendency).  I

haven’t worried too much about this up to now, mostly because my lab is in an air-conditioned house in the midwest, where humidity levels are low to begin with.  However, I recently started seeing some printing problems that led me to believe that I may need to address this issue.  In my typically over-the-top fashion, I decided that if I was going to work this problem, I needed a way to monitor the actual temperature & humidity in whatever arrangement I tried.

First, as usual, I did some web research, and found a solution implemented by the folks at the Taulman specialty 3D filament fabrication house.  Their solution was a 5-gallon plastic bucket with some air-holes, a 40-60 Watt lightbulb, and a wooden dowel.  This allowed them to combine a dehumidifier with a filament delivery system.  I fabricated one of these myself, but wasn’t particularly happy with the results.  While it worked fine, there was only room for two rolls of filament at a time, while I have literally dozens of rolls of different filaments.  In addition, I had no way of knowing what the actual temperature and relative humidity were inside the bucket – for all I knew, it could be doing nothing but wasting 40 watts of electricity!

So, I decided to combine my pile of 3D filaments, my 3D printing super-powers, and my Electrical Engineering Mad Scientist background to come up with a better solution to the filament drying problem.

Temperature/Humidity Sensors

The DIY/Robotics/Hobbyist market has spawned all sorts of new capabilities, so I was not at all surprised to find that temperature/humidity sensors were cheap and readily available.  I started with the cheaper DHT11  (I figured I would kill at least one sensor before getting it right), but later moved on to the DH22.  The DH11 humidity measurement range stops at 20% on the low end, and since I am trying to obtain humidities at or below that value, I decided to blow out my sensor budget from around $5/unit to around $10 – a real budget-breaker (not)!

DHT11 Temp/Humidity sensor, shown here from Adafruit.  20-80% RH range with +/- 5% accuracy

DHT22 Temp/Humidity sensor, shown here from Adafruit.  O-100% RH range with +/- 2.5% accuracy

Arduino Uno Controller

In order to effectively use the RH sensors, I needed a controller of some sort.  Happily for me, there was already a DHT11/22 library available for the wonderful Arduino line of controllers, and I happened to have several Arduino Uno’s lying around waiting for something to do.  Connecting up the sensor, and getting a program working was a matter of just a few lines, most of which had already been written in the form of an example program

8-Character LCD Display

When I first started this project, I thought it would be adequate to simply connect the arduino to my PC to readout the data.  This worked, but turned out to be cumbersome;  I had to have a physical connection to the controller, which was located inside the dehumidifier bin.  Later I tried a Wixel connection, which also worked, but still meant that I had to bring up a serial port app on my PC to find out what my dehumidifier bin was doing.  What I really wanted was a completely self-contained system, so I could simply look at some sort of display on or in the bin and tell whether or not things were working.  After doing a bit more web research, I found the Sparkfun ‘Basic 8-character LCD display’ for all of $4.95 (plus shipping).  In addition, this display (plus a number of others with different character arrangements) were easily integrated into an Arduino program by means of the built-in ‘LiquidCrystal’ Library – nice!!

So now I had all the pieces – a sensor (DHT22), a controller (Arduino Uno), and a display for readout (Sparkfun 8×2 LCD).  Now what I needed was a nice, custom-made box to house them, and just coincidentally I had 3D printer and LOTS of filament hanging around just waiting for a project! ;-).  As usual, I went through several iterations (you would think that it would be pretty hard to screw up a simple box design, but I’m highly creative when it comes to finding new ways!).  When I was finished, I had a nice little box with enough room for everything, a recessed lid, and appropriately placed holes for the power connector, the USB connector, and the sensor cable, as shown below

To complete the project, all I had to do was drill some holes in a handy transparent storage bin, load it up with filament rolls and a 40-watt trouble light, and set the sensor box inside where the readout would be visible from the outside.  The whole thing was installed on a shelf over my workbench, so I can simply walk up to the bin and see the readout from eye level – neat!

Now all I have to do is wait a day or so to see where the system stabilizes, and make whatever airflow adjustments are necessary.  For anyone who cares, I have included below the Arduino sketch for the project.

15 January 2017 Update: After 24 hours, the system stabilized to around 85º F (29.4C) and about 26%, which I thought wasn’t enough better than room environment to make a difference, so I closed off about half of the air-holes.  After another 24 hours or so, the system re-stabilized at about 90º F (32.2C) and 21% humidity – much nicer!

17 February 2017 Cleanup: Here is the code to display temperature & humidity on the LCD display, and also make the data available at the serial port.



// DHT Temperature & Humidity Sensor
// DHT Temperature & Humidity Sensor
// Unified Sensor Library Example
// Written by Tony DiCola for Adafruit Industries
// Released under an MIT license.

// Depends on the following Arduino libraries:
// - Adafruit Unified Sensor Library: https://github.com/adafruit/Adafruit_Sensor
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library

#include<LiquidCrystal.h> // include the LCD library code:
#include<Adafruit_Sensor.h>
#include<DHT.h>
#include<DHT_U.h>

// initialize the library with the numbers of the interface pins
//01/07/17 gfp: my setup is:
//LCD pin name RS EN DB4 DB5 DB6 DB7
//Arduino pin # 7 6 5 4 3 2
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

#define DHTPIN 8 // Pin which is connected to the DHT sensor.

// Uncomment the type of sensor in use:
//#define DHTTYPE DHT11 // DHT 11
#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)

// See guide for details on sensor wiring and usage:
// https://learn.adafruit.com/dht/overview

DHT_Unified dht(DHTPIN, DHTTYPE);

uint32_t delayMS;
double tempF = 0; //holds temperature returned from DHT22
double RelHumPct = 0; //holds relative humidity returned from DHT22

void setup() {
Serial.begin(115200);

// Initialize Temp/Humidity sensor.
dht.begin();
Serial.println("DHTxx Unified Sensor Example");

// Print temperature sensor details.
sensor_t sensor;
dht.temperature().getSensor(&sensor);
Serial.println("------------------------------------");
Serial.println("Temperature");
Serial.print("Sensor: "); Serial.println(sensor.name);
Serial.print("Driver Ver: "); Serial.println(sensor.version);
Serial.print("Unique ID: "); Serial.println(sensor.sensor_id);
Serial.print("Max Value: "); Serial.print(sensor.max_value); Serial.println(" *C");
Serial.print("Min Value: "); Serial.print(sensor.min_value); Serial.println(" *C");
Serial.print("Resolution: "); Serial.print(sensor.resolution); Serial.println(" *C");
Serial.println("------------------------------------");
// Print humidity sensor details.
dht.humidity().getSensor(&sensor);
Serial.println("------------------------------------");
Serial.println("Humidity");
Serial.print("Sensor: "); Serial.println(sensor.name);
Serial.print("Driver Ver: "); Serial.println(sensor.version);
Serial.print("Unique ID: "); Serial.println(sensor.sensor_id);
Serial.print("Max Value: "); Serial.print(sensor.max_value); Serial.println("%");
Serial.print("Min Value: "); Serial.print(sensor.min_value); Serial.println("%");
Serial.print("Resolution: "); Serial.print(sensor.resolution); Serial.println("%");
Serial.println("------------------------------------");
// Set delay between sensor readings based on sensor details.
delayMS = sensor.min_delay / 1000;

// set up the LCD's number of columns and rows:
//lcd.begin(16, 2);
lcd.begin(8, 2);

// Print a message to the LCD.
//lcd.print("hello, world!");
//String str = "Temp: ";
//str += "43";
//lcd.print(str);
}

void loop()
{
// Delay between measurements.
delay(delayMS);

// Get temperature event and print its value.
sensors_event_t event;
dht.temperature().getEvent(&event);
if (isnan(event.temperature))
{
Serial.println("Error reading temperature!");
}
else //good data
{
//12/07/16 temp is in C - convert to F
tempF = event.temperature * (9.0 / 5.0) + 32;
Serial.print("Temp/Humidity: ");
Serial.print(tempF);
Serial.print(" F\t");
}

// Get humidity event and print its value.
dht.humidity().getEvent(&event);
if (isnan(event.relative_humidity))
{
Serial.println("Error reading humidity!");
}
else //good data
{
RelHumPct = event.relative_humidity;
//Serial.print(event.relative_humidity);
Serial.print(RelHumPct);
Serial.println(" %");
}

//// set the LCD cursor to column 0, line 1
//// (note: line 1 is the second row, since counting begins with 0):
//lcd.setCursor(0, 1);

//// print the number of seconds since reset:
//lcd.print(millis() / 1000);

//set the LCD cursor to column 0, line 0 (1st line)
lcd.setCursor(0, 0);
String str = "T: ";
str += String(tempF,1);
lcd.print(str);

//set the LCD cursor to column 0, line 1 (2nd line)
lcd.setCursor(0, 1);
str = "RH:";
str += String(RelHumPct,0);
lcd.print(str);
}

Frank

 

Wall-E2 Charging Station Design, Part VI

Posted 09 Jan 2017

It’s been a while since I have posted on my evil plan to set my wall-following robot free to roam the house terrorizing cats, all without the need for charging assistance from mere humans ;-).  I have made a lot of progress – but unfortunately not all of it has been positive :-(.

Charging Platform:

I was able to complete and print the final design for the fixed part of the charging platform, as shown in the following images

The idea was that the robot would be captured by the lead-in rails and roll over the charging platform to a stop – thereby connecting to the platform via the contact array.  The status LEDs would be visible to a person standing behind the robot.  Unfortunately, when I got everything all hooked up, the beryllium-copper finger-stock fingers proved too stiff to allow connection across the contact array; a couple of fingers were just a bit higher than the others, and the robot wound up suspended from these, and not making contact with the others – BUMMER!!

So, it was (literally and figuratively) back to the drawing board on the whole charging station idea – what to do?

TE Connectivity Flexible Contacts:

When I first thought of the idea of a charging station with flexible contacts and an under-robot contact array, I did a fair bit of web research on flexible contacts, and wound up with the idea of using individual fingers from a length of beryllium-copper finger stock, which is readily available on eBay.  Now that this option has been ruled out, it was back to the web again for more research.  This time I found a company called TE Connectivity, and they have a line of flexible contacts for use in connecting PCBs to cases in mobile devices, among other things, as shown in the following images.  They have a huge variety of contacts, so I was able to find four good possibilities with uncompressed heights between 3 and 4mm.  Even better, The TE connectivity folks let me order samples – yay!!

 

I practically wet my pants when I found these, as I think they are the answer to my prayers; otherwise I would probably have to abandon the entire charging platform/contact array idea.

Automatic 5V Charging Connector Mating Option

When I installed the new battery pack in Wall-E2, I also re-installed the 5V power jack that came with the original kit.  I figured that I could use this jack to manually charge the batteries until I got the human-free option working.  While waiting for the connector fingers from TE to arrive, I started thinking that I just might be able to work up a way to have Wall-E automatically drive itself onto the mating 5V plug to charge, then back off of it when finished.  I had not pursued this in the past, as I thought it would be too hard to get the plug and jack lined up with any consistency, but now I was reconsidering it as possibly the only remaining option.  And, since I have a 3D printer sitting on my workbench, I started experimenting with coupling ideas.  The first challenge was to design and fabricate a ‘capture basket for the 5V jack, so that the initial alignment wouldn’t have to be perfect.  After the normal half-dozen or so failed designs (have I mentioned how much I love the ability to do short turn-around design/fabrication cycles?), I had a design that I thought would work, as shown in the following photos.

The ‘capture basket’ fits very snugly over the 5V power jack, and is designed such that the slanted sidewalls mate up seamlessly with the lip of the jack – no flat spots or corners to impede the plug on its way in.  I was a little bit worried about the granularity inherent in FDM prints, but this turned out to be a non-issue, as shown below.

After getting the capture basket designed and fabricated, it was time to work on the other end – the plug probe. I already had a tentative design for a part that would serve as a stop for the robot while also providing a mount for the IR beacon LED, so I decided to add the plug/probe to this fixture, as shown below

I was able to simply add a block of plastic onto the side of the original stop/IR LED holder to accommodate the plug/probe assembly. The probe was fabricated from NinjaFlex to allow for some flexibility as the plug mates with the jack.  As the following video clip shows, this arrangement seems to work quite well!

 

So, now I have what appears to be a viable alternative to the contact-finger/contact array strategy.  The jack/plug alternative has a significant drawback in that I can’t bring the battery charging status signals out for off-robot display.  If necessary that can be accommodated by constructing some sort of on-robot status LED strip (not sure where I would put it, but…), but it would certainly fulfill the primary requirement of allowing the robot to feed itself, and there’s no real need to keep those puny humans informed, anyway ;-).

Stay tuned!

Frank

 

 

Wall-E2 Charging Station Design, Part III

Posted 12/05/16

I’ve been making some progress with the planned charging station lead-in rails.  These rails (shown in yellow in the image below) are intended to guide the robot into the charging station, lining it up properly with the charging station so the contacts on the bottom of the robot will properly mate with the corresponding contacts on the top of the charging station platform.

1/2-scale robot chassis on the 1/2-scale charging station model

1/2-scale robot chassis on the 1/2-scale charging station model

These rails are too big to print in one piece on my PowerSpec PRO 3D printer, so I had to devise a way to print them in sections, which could then be plugged together to form the complete rail.  To do this, I designed a coupling geometry consisting of a ‘puzzle-piece’ connector and a slide-fit arrangement, as shown below:

Lead-in rail angle coupling design

Lead-in rail angle coupling design

Lead-in rail straight coupling design

Lead-in rail straight coupling design

After going through several iterations ‘on paper’, I printed out a 1/2 scale model to verify that I could indeed connect the pieces to make a whole lead-in rail, as shown below:

Half-size capture basket rail

Half-size capture basket rail

Half- and Full-size capture basket rails

Half- and Full-size capture basket rails

Full-size capture basket rails

Full-size capture basket rails

Now that I had the capture rails fabricated, it was time to find out whether or not the capture system would actually work.  I used double-sided tape to affix the two rails to one section of the heavy plastic desk-chair runner system in my lab/office, at the proper spacing to just pass the robot, assuming it was properly aligned with the capture gap, and then ran some tests, as shown in the attached video clip.

In the video clip, the first two trials were conducted with the ‘stock’ wheel guards with right-angle corners, and the remaining ones were conducted after filing a small bevel into the front corners to (hopefully) alleviate the sticking problem

 

Front wheel guard with filed bevel on outboard corner

After seeing that the filed bevel seemed to improve performance, I decided I would go ahead and redo the wheel guards to provide a more pronounced bevel.  Thanks to TinkerCad and my trusty 3D printer, this was a piece of cake.

Redesigned wheelguard to incorporate bevel on outboard corner

After changing out the wheel guards, I ran some more tests with my taped-down capture basket, but soon discovered yet another ‘capture failure mode’, as shown in the following image.

Robot stuck in capture basket

As you can see in the image, the rear part of the front wheel guard and the front part of the opposite wheel guard is just the right shape and spacing to form a stable lockup configuration.  To address this little problem, I decided to remove the rear portion of the front wheel guard on each side, but left the two rear wheel guards intact.  Then I ran some more capture basket tests, with very encouraging results.

 

So, at this point I’m pretty happy with the capture basket lead-in rail design (3 failures in 14 tries), and with the robot wheel guards.  Next, I’ll need to fabricate a full-scale charging platform for the robot to stop on, and also work on the new charging/battery setup in the robot itself.  Stay tuned!

Frank

 

Evolution of a ‘Thank You’ Present

Posted January 22, 2016

As I have noted in previous posts, one of the really cool things about current 3D printing technology is the way it allows me to rapidly iterate through design options to arrive at an ‘optimum’ (where the definition of ‘optimum’ can be somewhat arbitrary) solution.

In this particular case, my wife Jo Anne was planning a trip to Florida to do some serious dressage training.  When Jo is in Florida she stays at the house of our good friends Mike and Pauline Hall, and she wanted some sort of ‘Thank You’ present for them.  She had seen something on the inet about filling a small round plastic globe with candy and putting it on top of an inverted plastic cup, and this struck a resonance; she knew that Pauline Hall was a retired ‘Martian’ – the term used by long time dedicated Mars employees to describe themselves, and the most famous Mars product is ‘M & M’ candies.  So, she commissioned me to create a customized M&M candy stand, with the words “Mars” and “Hall” inscribed somehow.

As I have learned through previous design/print iterations, the fastest way to get from idea to finished product is to simply start building prototypes; it doesn’t take long, is incredibly cheap, and the process usually rapidly converges to a very good (if not necessarily ‘optimum’) solution.  As I do in many of my designs, I first created a model in TinkerCad and then printed it at half (50%) scale.  Jo Anne was able to look at the half-scale model and see right away whether or not I was on the right track.  In this case she liked the first model, so I printed a full-scale one, and thought I was done.  Unfortunately, I had forgotten about the inscribed “Mars” and “Pauline” text, so I was assuredly NOT done!  So, I simply had my wife write the text on the full-scale model with a Sharpie, and partied on.

Next was a full-scale model with the text cut out of the material, but this turned out to be a disaster; I had used ‘support’ structures to keep the text edges sharp, but the support material got so well attached to the main body that I couldn’t get it off (In the past I have tried dissolvable support material, but with very limited success).  So, I suggested that we try a two-color model, with the body in red and the text in white, and Jo agreed.

Next was a half-scale two-color model to prove the concept, followed by a full-scale ‘finished’ product.  Unfortunately, a “time-saving” modification I had made to the text portion of the design caused the text to ‘run’, and I had to make another print to get a real ‘finished’ item.

In the end I got something that looked very good, and is now a completely unique gift for the Halls; it may not be super expensive or jewel-encrusted or anything, but it is something that says “Thank You” in a uniquely Paynter-ish way 😉

The image below shows the evolution of the design from plastic cup through the half-scale models to the final product on the left, shown in front of the PowerSpec 3D printer used for the work.

Hall present design evolution, shown in front of my PowerSpec dual-extruder 3D printer

Hall present design evolution, shown in front of my PowerSpec dual-extruder 3D printer

 

New Front Wheel Guards for Wall-E2

Posted 12/25/15

So, it’s Christmas day and I’m on a Southwest flight from Columbus, OH to Kansas City (via Chicago) to play in a bridge tournament.  On the way, I’m taking the opportunity to work on my latest blog post – describing Wall-E2’s new front wheel guard design.

The impetus for a front wheel guard comes from Wall-E2’s tendency to re-enact the ‘Tractor-tipping’ scene from the ‘Cars’ movie.  On occasion Wall-E2 encounters an obstacle like a chair leg with one front wheel or the other at just the right orientation so that it is able to climb up the leg with it’s 4-wheel drive, and, when it achieves a high enough angle, it’s relatively high CG does the rest.  So, after the novelty wore off, I decided it was time to do something about the situation.  After discussing options with my grandson Danny in a Skype session, we decided that two small wheel guards would probably work better than one big one, so that was the design direction we took.

In the year or so I have been working with TinkerCad and my 3D printing setup, I have learned that it is usually much faster and more effective to rapidly ‘evolve’ a design rather than trying to get it right the first time.  A complete design-print-evaluate cycle only takes about 30 minutes, with negligible material cost – so why not!?

In the case of the front wheel guard, the design evolution went through about a half-dozen iterations, (not counting the initial one done ‘on the fly’ with Danny during the Skype session using my pocket knife and a section of a cardboard box).  The ‘Evolution of a modern wheel guard’ is shown in the following photo, proceeding from ‘proto-guard’ on the left to ‘fully modern wheel guard’ on the right.

Side view of guard installation with wheel removed for better visibility

Bumper evolution from ‘slime-mold’ to ‘fully evolved’ versions

The ‘finished’ (as if anything is ever ‘finished’ on Wall-E2) wheel guard is shown at the far right in the above photo, and the following shots show the installed result.

Side view of guard installation with wheel removed for better visibility

Side view of guard installation with wheel removed for better visibility

'Fully Evolved' wheel guard installed on left front wheel

‘Fully Evolved’ wheel guard installed on left front wheel

Both wheel guards installed

Both wheel guards installed

I haven’t had a chance to try the new wheel guards out in practice, but I am quite confident they’ll do the job, and end Wall-E2’s short stint as a ‘Tractor-Tipping’ mimic! ;-).

Stay Tuned,

Frank