July 19, 2013
Converting CAD files to STL using FreeCAD on the Command Line
I'm working on a client project where we are receiving hundreds of CAD submissions. We need to sort, filter, and rank these submissions in order to ease analysis. Ultimately, these submissions will be 3D printed. I needed an automated way to convert the files from STEP or IGS CAD format to STL on the command line.
I discovered that the venerable FreeCAD has a Python-based command line interpreter. After a few bumps, I was able to drive it to create a simple tool to convert my files.
First, I had to add the dynamic library loading path of FreeCAD to my OSX command line environment:
$ export DYLD_FALLBACK_LIBRARY_PATH=\ /Applications/FreeCAD.app/Contents/Frameworks/lib:\ $DYLD_FALLBACK_LIBRARY_PATH
Next, I wrote this little script. I figured out the syntax by first recording some macros in FreeCAD.
#!/Applications/FreeCAD.app/Contents/MacOS/FreeCADCmd import FreeCAD import Part import Mesh import sys in_fn, out_fn = sys.argv, sys.argv Part.open(in_fn) o = [ FreeCAD.getDocument("Unnamed").findObjects() ] Mesh.export(o, out_fn)
It's used like this: step_stl.py input.step output.stl
I am fairly certain that the input file could be any input format understood by FreeCAD. Enjoy!
February 14, 2012
XBee Pulse I/O
What is an XBee Pulse I/O?
A Fully Populated XBee Pulse I/O Board
The XBee Pulse I/O is a simple, general purpose electronic design which can be used for many automation and monitoring tasks. It includes up to two relays which may be driven through a one-shot pulse generator, simulating pressing and releasing a button, or it may be connected and controlled directly by the XBee’s digital output pins. There are also two powered digital inputs which can be used with closure sensors or leak detectors. It’s open-source hardware: use our design, improve it, sell it to your friends, or give it as a gift to win over your enemies.
The project is a collaboration between myself and my friend Andy Warner.
The XBee Pulse I/O is open-source hardware.
Where is the XBee Pulse I/O Used?
The XBee Pulse I/O is used in automation projects such as the XBee Garage Door project; a project which connects an automatic garage door lift to a mobile phone for remote monitoring and control using iDigi.
Where can I get an XBee Pulse I/O?
At present, there are three options for obtaining an XBee Pulse I/O board.
The first is to obtain a blank XBee Pulse I/O PCB and components and solder a board together yourself. This option is good if you want to use the XBee Pulse I/O in a permanent installation.
The second option is to build a simpler XBee Pulse I/O for prototyping purposes on a boardboard. To build this design you order a smaller set of components from somebody such as Digi-Key.
The third option is to obtain the design files used to create the XBee Pulse I/O PCB and make one yourself: either by fabricating the board using your own method or ordering one from a manufacturer of your choice. This option is for advanced users or users who which to modify the XBee Pulse I/O design for their own purposes.
Ordering a Blank PCB and Components from Digi-Key
You order a manufactured board from BatchPCB here:
The bill-of-materials for the board can be found below. Please note that if you are building a breadboard design, these is likely not the component list you want, unless you'll be be building a PCB version later. The breadboard BOM can be found an additional section further down.
The all important assembly instructions can be found at Make: Projects XBee Pulse I/O Single Port Assembly Instructions.
Breadboarding a Simple, Prototype XBee Pulse I/O
The breadboard version of the XBee Pulse I/O has a reduced bill-of-materials and eliminates several of the components used to make the design more robust. Namely the breadboard design does not include a power-on protection circuit to keep the timer from triggering at power on and does not contain protection diodes on the sensor inputs.
The bill-of-materials for the breadboard can be found below.
Complete, step-by-step assembly instructions are available from Make: Projects.
Obtaining the Design Files for the XBee Pulse I/O
The CadSoft EAGLE PCB files are available for download here:
The Dual Channel XBee Pulse I/O
For users who wants an XBee Pulse I/O with two relays and two digital inputs, here are the relavant links:
February 1, 2012
XBee Garage Door
The XBee Garage Door is an automation project which allows you to connect your automatic garage door lift to your mobile telephone via an Android or a mobile web application. This project was featured in Make Magazine Vol. 30 in the article "12,000-mile .
The XBee Garage Door project uses a Digi XBee to communicate and attaches to the door using a hardware design called the XBee Pulse I/O—a general purpose, open-source hardware design for simple automation projects.
There are four components to making your own XBee Garage Door:
- An Breadboarded or populated printed circuit board (PCB) XBee Pulse I/O
- A door-closure sensor and length of wire to connect to your existing automatic garage door lift button
- A ConnectPort X gateway running the XIG application or a computer running the XIG with an XBee module attached
- Using the Android or Web application to monitor and control your door remotely
Building Your Own XBee Pulse I/O Board
You can build your own your XBee Pulse I/O from a prepared PCB or by breadboarding your own. Complete instructions are available on the XBee Pulse I/O page.
Attaching the Sensors and Garage Door Lift
Installing the XBee Pulse I/O into your garage is easy. Follow these simple steps:
- Affix the free end of the door closure sensor to the bottom of your garage door
- Attach lead wires to the other half of the sensor; attach it to the wall opposite the sensor when the door is in the fully closed position.
- Connect this sensor to input 1 of the XBee Pulse I/O PCB, or between XBee pin AD1 and ground on the PCB.
- Attach two wires in parallel to the button used to open your garage door
- Attach the other side of these two wires to the pulsed output of the XBee Pulse I/O or between the normally open and common terminals of the relay on your breadboard.
- Power the XBee Pulse I/O with 4.5v-9v power.
- You're done installing!
Obtaining the XIG and Using a Gateway
Obtain a Digi ConnectPort X2 gateway from someplace such as SparkFun or order a second XBee Series 2 module and attach it to your computer using a USB or serial adapter such as the SparkFun XBee Explorer USB.
Download and install the XBee Internet Gateway from the XIG site on Google Code and follow the documentation to get the XIG running on your Digi ConnectPort gateway or PC.
Using the Android or Web Application
Next follow these steps:
- Create a free developer account on iDigi, the iDigi webservice will be used to connect your gateway and make it securely accessible from anywhere. This will make it so not just anybody can control your garage door.
- Add your gateway to the iDigi Device List by using the "plus" button, selecting "Add Manually" and then choosing your Digi ConnectPort gateway (found on a sticker on the gateway) or XIG-on-a-PC's MAC address (found in the UI)
- Start the Android or navigate to the web application
- Select your gateways device id as it is specified from the iDigi device list
- Select the XBee address which is installed in the XBee Pulse I/O attache to your garage door lift
- Voila! you can now monitor and control your garage door from anywhere!
January 19, 2006
Konica Minolta to Quit Camera Business
The BBC is reporting today that Konica Minolta is to quit the camera business. This leaves me in the position I was before 2004: a man with a bunch of good quality Minolta-mount lenses without a digital body.
Next year it will be time again to change camera systems. But to what? Portions of the Nikon and Canon systems look really appealing. I love the focus adjustment capability on a lot of the Nikon lenses, but I appeciate the UI and body shape of the Canons. Choices choices...
What are your oppinions?
May 5, 2005
I was faced with the problem of exporting my contacts from Outlook to vCard format for use with my iPod. The iPod gives you the rudimentary ability to browse vCards with it's thumbwheel. It's actually pretty slick.
The problem is that Outlook doesn't support exporting blocks of contacts as vCards. Stupid software. Luckily, somebody has written a freeware tool to do just this: enter Outport.
It worked just perfectly for my iPod!