Using OpenSCAD to teach Computational Thinking

I am using the OpenSCAD parametric 3D design tool to teach students about programming concepts such as conditional execution, encapsulation of code, and iteration. Students are motivated by building visual objects, and if you have access to a 3D printer the students are very motivated to get their part printed.

Here are some documents I share with educators to be used to learn/teach about OpenSCAD and 3D printing:
Outline of the class

3D printing vocabulary

Using OpenSCAD
OpenSCAD-Examples

Student Assignment

Fixing the problem where gparted (parted) won’t see a partition due to a mac partition table

I purchased an external HD that was “mac compatable” but I used it with a linux system and used fdisk to put two partitions on it.

Later on, I wanted to use gparted to easily resize one of the partitions, but it refused to see any partitions at all on the disk.

fdisk could still see them just fine, but reported “Partition type: mac”

It turns out that the problem was that the disk originally came with a mac partition table in addition to (right after) the regular MBR Master Boot Record.

I noticed that the first partition didn’t actually start until 63 sectors into the disk (at the beginning of the 2nd cylinder).

Device Boot Start End Blocks Id System
/dev/sdb1 63 1171893554 585946746 83 Linux

So I used DD to copy the first cylinder to a file:

sudo dd bs=512 count=62 if=/dev/sdb of=firstCyl.bin
62+0 records in
62+0 records out
31744 bytes (32 kB) copied, 0.000715733 s, 44.4 MB/s

Looking at that bin file in an editor, I saw the string “Apple_partition_map” which is a dead givaway of what the problem was.

So, I wrote out all zeros to the first cylinder:

sudo dd bs=512 count=62 if=/dev/zero of=/dev/sdb
62+0 records in
62+0 records out
31744 bytes (32 kB) copied, 0.00165608 s, 19.2 MB/s

And then I copied the first sector (512 bytes) back from the firstCyl.bin file I had made:

summetj@constantine:~$ sudo dd bs=512 count=1 if=firstCyl.bin of=/dev/sdb
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00183878 s, 278 kB/s

And it worked! Now gparted is no longer confused by the apple (mac) partition table that I zeroed out, and sees my partition.

MakerGear Hot End Molex Connectors

mg_plus_hot_end

I recently replaced a MakerGear hot end with a different model (MG Plus) but wanted to maintain the same connectors (used for the resistive heater and the thermocouple). The MakerGear connectors had a positive locking clip, while the JST connector that came with the MG Plus thermocouple was only friction fit.

FYI – The MakerGear hot end and Prussa Mendel kit I have use the following Molex Micro Fit 3.0 Family parts:

  • The female connector (with the bump) is a Molex 0436450200 (DigiKey part number WM1845-ND).
  • The male connector (with the hook that catches the bump) is a Molex 0436400201 Digi-Key part number WM1855-ND
  • You will also need the associated female and male crimp connectors for the internal contacts: Molex 43030-001 tin 20-24 guage wire (DigiKey part: WM1837CT-ND CONN TERM FEMALE 20-24AWG TIN) and Molex 43031-007 tin 20-24 gauge wire male terminal (DigiKey Part: WM1841-ND WM1841-ND CONN TERM MALE 20-24AWG TIN)
    ( You might want to get the crimp connectors for smaller wire (higher gauge numbers) depending upon what wires your thermocouple uses, but I got 20-24 gauge for use on power connections and just soldered my thermocouple wires into them.)

The cartridge heater on the MG Plus nozzle came with enough wire to reach all the way down to my RAMPS board so I ended up only using the molex connectors for the thermocouple, and running the resistive heater wire all the way down. This left me with a set of wires going to my hot end terminating with a molex, and I eventually plan on using this for an “always on” fan for cooling the top of the hot end (as opposed to the “under RAMPS control” fan for layer cooling).

dyndns.org (dyn) ddclient configuration fix

I have been using ddclient to update my dynamic dns records for various servers and laptops for many years now. Around a month ago they all stopped updating the DNS server. I eventually tracked the error down to a line in the configuration file:

server=members.dyndns.org

It’s not like I had made up a random server name…this server had been working successfully for several years. And it is the server recommended by the ddclient automatic configuration script generator on the dyndns.org website even now. [https://account.dyn.com/tools/clientconfig.html] However, at least for me on Ubuntu 10.04 and ddclient 3.8.0 it had stopped working.

I changed it over to:

server=members.dyndns.com

And this fixed the problem.

Ubuntu probing all bluetooth serial connections for modems?

I use a scribbler robot with an IPRE fluke for my classes. On Ubuntu, I have a funky situation where the fluke does not work correctly the very first time I connect to it. Dan Walker, of BetterBots has captured all of the bluetooth data and says that Ubuntu is sending “AT+GCAP” data (AT command for a modem to “Request Complete Capabilities List”) to the fluke when first connected. This command gets the fluke into an unstable state and make it not work until rebooted (a possible problem with the fluke…but really, should custom hardware have to anticipate receiving random AT commands?)

The extra data doesn’t happen on subsequent connections to the same /dev/rfcomm* port until the laptop is rebooted. We suspect that the network manager may be the culprit. (I stay logged in until rebooting, so perhaps if a user logged out that would also trigger the network manager to re-probe?)

Thanks to Doug Harms for the solution…this is the ModemManager service probing all bluetooth serial ports. To disable it you can issue the following command (all on one line…):

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service
/usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service.disabled

Disconnecting a lead & oakum seal on a cast iron drain pipe

If you have cast iron drain (waste) pipes they are likely joined with a lead & Oakum seal. Oakum is a hemp material coated in tar, it is placed into the joint to seal it (Oakum expands when it gets wet to seal the joint). The Oakum is held in place (and the pipe joint is given some strength) by casting a bead of lead about 1″ thick around the pipe inside the hub/socket. In this picture the cast iron pipe hub is on the left.

It is possible to remove the lead and oakum. After you have gotten all the lead out and cleaned up the hub, you can place a donut (also known as a compression joint seal) in the hub of the cast iron pipe to adapt it to PVC. (Note that donuts are only usable on non-pressurized pipes, such as waste/drain lines.)

I have manually cleaned out a lead & oakum cast iron joint. It sucks. My recommendation is to cut the pipe somewhere other than at the lead & oakum joint and then use a Flexible Coupling to join it to your PVC. Yes, this introduces discontinuities in the waste water flow, and gunk may collect and build up at these edges, possibly leading to plugged pipes in the future….but that is small price to pay for avoiding having to manually unseal a lead & Oakum joint. For the gory details of how to manually disconnect and clean out a lead & Oakum joint, read on…
Continue reading

Why you shouldn’t mix iron and water

Just because the black iron pipe is near the plumbing section at the hardware store doesn’t mean that you should substitute it for a bronze pipe nipple that attaches to a gate valve for a dishwasher. Iron and water don’t mix. Well, actually, they do mix very well, leading to rust and a leaking pipe, and rotting wood. Below is a picture of the before (incorrect iron pipe) and after (shiny new bronze pipe nipple). Click to zoom into the corroded mess that used to be the bottom of the pipe….
Rusted black iron pipe (top) and correct bronze hose nipple (bottom)

As it turns out, I could have actually re-used the dishwasher connector hose, but that corrosion looked so bad I just bought an entire new kit.

Of course, if I had seen this gem BEFORE finding the leak and having to move the dishwasher, I probably would have double-checked all of the water fittings at that point. Click to zoom in on the sacrificial-vice-grips-as-pipe-anchor in all it’s glory. (I actually couldn’t find a good practical reason to replace this….as it’s a righteous hack…but a hack it is…)

vice grips holding a pipe

A progression of DSL modems

Over the years I’ve used a lot of modems to connect to the Internet, starting with a 300 baud cartridge modem for a Commodore 64! In fact, I think hit all the major speed upgrades (300, 1200, 2400 9600, 14.4K, 28.8k, 33.6K, 56.2K) for analog POTS modems excluding the original 110 and a random 4800 bps in the middle. (I mean really, who didn’t wait for the 9600 baud modem?) The most impressive speed upgrade was from 300 baud to 1200 baud (four times faster! Now text would appear faster than I could read it!)

However, this post is about my more “modern” networking equipment over the last eleven years. Primarily DSL modems, with this one oddball thrown in: Continue reading

Shill bidding on Ebay? You be the judge…

Shill bidding is when somebody places a bid on an auction solely to drive up the price of the item, without intending to purchase the item. Typically shill bids are placed by the seller or a confederate of the seller to increase the profit from the auction.

In an effort to combat shill bidding, online auction sites such as Ebay typically disallow anonymous bidding, but it can still happen. To combat shill bidding on a personal level, it helps to make your bid at the last minute (so shill bidders can’t react to your bid) and to never increase your initial bid. (You should always bid the maximum you are willing to pay.)

Posted below is the complete bidding history for a laptop computer which I believe exhibits shill bidding. The shill bidding appeared to use two different accounts (one with zero feedback, and another account that was more established) in an attempt to disguise what was going on. Continue reading