Problem: Windows, and many Windows apps that use serial (COM) ports, have various problems accessing “high” numbered COM ports. I cannot find an authoritative or quantatative definition of “high” (and it may depend on your app), but I have seen apps start failing after COM8, COM9, COM15… anything in the 20s is asking for trouble. If you are a developer and routinely plug in different “serial” devices (including USB gadgets with virtual COM support, Bluetooth dongles, Arduinos etc.) Windows will happily assign a new port number to each one until something breaks and you go hunting for this post.
Depending on the application, the “s**t-the-bed” breakover often depends on a hardcoded number (e.g. only supports up to COM8), or going to double digits, etc.
Solution1: Some apps may let you enter the COM port number in a special way that lets higher-number COM ports be used. A common example I have seen is the form: \.\\COM25
(that is, precede the port name with a backslash, dot, and two more backslashes). If the app uses backslashes as an escape character, try doubling the backslashes, e.g. \\.\\\\COM37
Why this form? Why only some applications? Why does the number where this form becomes necessary differ between applications? (avrdude.exe requires it for COM10 and higher; pyserial will work without it up to at least COM15 or so, but not COM25. Of course, this all may just depend on the phase of the moon and your results may vary.) Beats the hell outta me. If anyone knows what this is all about, please post in the comments!
Solution2: Clean out those rusty, dusty old unused COM port numbers (you know, for that silly dongle you plugged in exactly once years ago and never touched again) so you can recover those “working” low COM port numbers for new devices. Trouble is Windows will not show it in Device Manager unless the device is plugged in, which is a problem if the thing got lost or broke long ago. To see the hidden allocations and remove them:
1. Open a command prompt as Administrator. (Start->Run, type cmd). Or, right-click Start->Programs->Accessories->Command Prompt and choose “Run as administrator”
2. At the command prompt type set devmgr_show_nonpresent_devices=1
3. At the command prompt type start devmgmt.msc to start Device Manager. For this to work you MUST start it from this command prompt – don’t mouseclick your way into it or try to use an already open copy.
4. When device manager opens, select View -> Show hidden devices
Now when you expand the COM ports section, every COM port ever allocated will be shown (all the ones for nonexistent devices will be grayed out). Now you can right-click all the defunct ones and uninstall them.
NOTE: Without the magic incantations above, you will still have a View -> Show hidden devices option, but it won’t actually show the nonexistent COM port eating devices.
Everyone and his brother has built LED cubes before, and while they are unmitigatedly awesome, I wanted to try something a little different. As far as I can tell, nobody has made an LED buckyball before!
Completed ball running some cheesy visualizations
And of course, the requirements for such a large, sparse shape are a little different. In a typical LED cube design, the leads of the LEDs themselves form the structural members and support base of the cube – the lead lengths more-or-less set the size and density of the cube, and since it sits on a large surface area, there’s plenty of room to bring out plenty of signals and drive them from a single many-pinned microcontroller (usually via Charlieplexing). In a large, sparse hollow sphere, the wiring for Charlieplexed LEDs would get unwieldly pretty fast. So instead, I used a bussed approach where each LED sits with its own tiny microcontroller on a serial bus, with a unique address programmed into each one. Such addressable “smart pixel” LED nodes have been around for a while and available off-the-shelf, but for various reasons (outlined below), I opted to design my own open source (GPL) version, dubbed das Blinkenlichten, and used these for the project. These nodes sit on a 3-wire (power, data, gnd) bus and speak over a self-clocking bit protocol. The ball contains 90 such nodes; one for each of the 60 junctions of the buckyball, plus 30 more in the “long” beams of the ball (more on that later too).
Sidebar: Addressable RGB LED nodes
Addressable “smart pixels” or RGB LED nodes have been around for a while; in the hobbyist community, BlinkM is probably the most well-known. However, at close to $13 a pop, a deployment of any significant number of these adds up very fast. In addition, the code was/is very much proprietary – not only closed source with dire warning against reverse-engineering, but only allowed for noncommercial applications at that. As of late 2004, there was really not much in the way of very inexpensive nodes or open-source designs to pick up and build on one’s own. Add to that patentissues surrounding many of these products (including pretty much all I2C-based designs), and the situation for open blinky hardware was bleak indeed. So I rolled my own that was dirt-cheap, minimal wire count and GPL’ed. By happy coincidence, it also avoids all the RGB LED control patents that I am aware of. Luckily, as of late 2011 there are many more inexpensive, open-source and even microcontrollerless (shift-register based) blinkies available in single or strips, so go nuts!
Buckyballs:
In real life, buckyballs are spherical molecules composed entirely of carbon. The LED ball models the most well-known of these molecules, carbon-60 (buckminsterfullerene), consisting of 60 carbon atoms. These atoms are arranged such that their bonds form 12 polygons and 20 hexagons, with one carbon atom at each vertex. The stitching, and often coloring, of soccer balls (footballs outside the US) mimics this structure.
Construction details:
I wanted the ball to consist of basically nothing but light – i.e. a bare minimum of visible wiring, electronics or any other opaque portions. Thus the light from the tiny LEDs would have to be well diffused throughout the entire structure. Playing around, I found that hot-glue sticks make almost perfect LED diffusers, and wasted no time cleaning out the local art&craft store’s supply for the ball’s structural elements. In retrospect, this was not the ideal solution: despite anything you might hear about the buckyball being a magically strong shape, it’s still not enough to hold the weight of 90 hot-glue sticks and electronics without sagging into more of a pear shape. In the end I had to add some internal “guy wires” (monofilament fishing line) to help it hold a spherical shape. As you can see, it’s still not perfect, so I’ll have some adjusting to do!
The ball consists of 12 pentagonal sections totaling 60 sticks, and 20 hexagonal sections formed by connecting 3 sticks between each neighboring trio of pentagons.
To create the physical ball, I needed some kind of scaffolding to hold the ball in shape during various stages of (in)completion, and ideally serve as a construction guide. For this, I bought a cheap inflatable soccer ball on eBay, blew it up, and assembled the ball around it in pieces. The markings on this ball (a promotional item for a foul-tasting yet inexplicitly popular domestic beer) are not 100% faithful to a real C60 molecule; the pentagonal sections are a bit small, resulting in the spokes between them (forming the hexagons) being a bit longer than the pentagon segments. I’ll just refer to these as the “long” sticks from now on.
First, I assembled all the Blinkenlichten boards with a 5mm LED. Each board is about 10mm square and can sit flush against the end of a glue stick with only the solder tabs sticking out. Each of the 60 sticks forming the pentagons are end-lit, with the LED node installed by drilling a hole in one end the diameter of the LED and shoving it in. The remaining 30 “long” sticks (to form the hexagonal sections) have a hole drilled in its middle and the LED inserted perpendicular to the stick. I’ve found that using a drill bit a tiny bit smaller than the LED itself works well: the drilling action heats up the stick enough to partially melt the inner walls of the hole; quickly shoving in the LED after this allows the walls to stretch slightly to accommodate it, then glues it tightly in place.
Template for cutting pentagon sticks to size/shape
"Long" (hexagonal) sticks with the LED perpendicular
I first built the required number of pentagonal sections, with the length of each side matching that printed on the soccer ball. To do this, I made two simple templates in Inkscape and printed them out. One consists of two lines intersecting at 108 degrees (the interior angle of a pentagon), indicating the length to cut each stick to and the angle to cut the end at so that the 5 sticks will sit flush against each other when assembled. The other is a template for laying up the pentagon itself. A box cutter knife made short work of cutting the sticks to the right size and shape. With all the sticks cut to shape, I used more hot glue (for its intended purpose this time) to assemble the sticks into pentagons, being sure to fill in any gaps where the sticks mated.
Stack of assembled pentagons
With all 12 pentagons assembled, I wired their power, data and ground terminals together using 3 runs of color-coded magnet wire. I made a complete ring with each – although this was not strictly necessary, it provides two parallel current paths between any two points around the pentagon. Not a bad idea since the ones nearest where the power/data cable will plug in will be passing a lot of current. To avoid any surprises later, I quickly clipped the Arduino (running a simple test loop) to each assembled pentagon to make sure they were working. Finally, I tacked the wires together and onto the backside of each pentagon with hot glue. While I had the magnet wire handy, I took this opportunity to solder lengths of wire to each of the 30 “long” sticks as well.
Testing the pre-assembled segments to avoid surprises later
With the pentagons assembled and wired, I began assembling them onto on the inflated beach ball, adding the “long” sticks in between as needed. For this I just kind of winged it to avoid tolerance stack-up, marking and cutting one stick at a time for a good fit. After cutting to length, I cut a V-shaped notch in both ends of each stick so that they would mesh well with the pentagon corners they attached to. These were similarly glued into place, squeezing in extra hot glue to fill in any voids.
Sections being assembled on the beachball
Ball structurally completed, but not wired up
Finally! The buckyball looks like a buckyball. The beach ball was deflated and removed. By this stage each pentagon was already bussed together, so wiring consisted of using all the pre-wired “long” sticks to bridge neighboring pentagons together, folding or trimming any excess magnet wire and tacking it to the back of each stick (i.e. the inside surface of the ball.) After a final electrical test with the whole ball assembled, I sealed in all the LED boards and solder points with (you guessed it) more hot glue, made a hanger out of metal rod and cut two pieces of plexiglass to serve as the top and bottom supports for the rod. Bends in the hanging rod prevent the ball from sliding free of the rod or stretching out of shape.
Making endcaps for the top/bottom, which will support its weight when the hanging rod is passed through.
Completed ball running some cheesy visualizations
Electronics & Programming:
After some brief forays writing effects code in Processing and C (to run directly on the Arduino), I decided to write the visual effects script in Python for the most flexibility. The effects script outputs serial data to an Arduino (for the blog cred, yo), which serves as the bridge between the PC and the RGB LED array. Commands are sent as 3-byte packets to the Arduino consisting of a sync byte (0×55) followed by the Blinkenlichten address and command bytes. The Arduino clocks these out to the ball in the native Blinkenlichten single-wire format (not to be confused with Dallas 1-Wire(R) Protocol). See the Blinkenlichten page(s) for a full description of this protocol, but it basically consists of bits encoded as the ratio of ON-time to OFF-time on the wire (if the high “half” of the bit is longer than the low half, it is decoded as a 1 and vice versa), endcapped by a START (high for longer than the maximum bit ON-time) and END (low for longer than the maximum bit OFF-time) condition. Special commands exist for address discovery, address grouping, low-power mode and a couple other handy features.
Obviously, with 90 tiny microcontrollers and 270 unique LED dice potentially drawing power at the same time, there’s no way an Arduino / USB port can supply sufficient power on its own. A small perfboard mates the Arduino (running off the USB supply) to a 5V/4A wall wart for power to the ball electronics. The USB and wall-wart power are *not* bridged together (although the grounds are). Even at 4A (claimed) output capability, the wall wart struggles to keep the ball lit at full tilt – currently (hah!) it takes on a reddish hue if all the LEDs are going near full brightness, because the power supply output drops below the 4V or so it takes to light the blue LEDs. Also, the “3-wire” cable through my window now consists of 5 strands of rainbow wire (power and ground doubled up) because it was getting a tad warm with only one power and one ground strand.
Arduino supplies the data, while a 5V/4A wall-wart (black cable) supplies the power. The flat rainbow wire, is the perfect shape for sneaking around a closed window and to the ball outside.
When I assembled the Blinkenlichten nodes, I just programmed them serially and threw the finished ones in a box. Needless to say, by the time nodes were pulled from this box and the ball assembled, the node IDs are in no particular order. To make things easier on myself, I numbered all the locations in a logical way by writing them on the beachball with marker, then map the “human-readable” number to the actual node ID at that location in software. If you noticed various numbers scrawled on the beachball, this is what they are for (red: pentagon locations, black: “long” stick locations, green: actual node ID at that spot, in hexadecimal).
As of this writing, the effects script has only a tiny handful of effects I could throw together quickly – one pays homage the well-known “snake” games of yore, a couple others simulate paint splotches or crystal growth in various ways, and one just fades the primary colors in and out. Obviously, many of these require the software to have knowledge of the physical structure and relationships of the LED array. For this, the script includes a “neighbor table” consisting of a 2D list of each (human-readable) node number’s immediate neighbors. A couple more tables identify other relationships, such as which nodes are in the same pentagon or hexagon section. The script makes (or will make ;-) extensive use of das Blinkenlichten’s address-grouping features to run high-speed complementary effects on different logical groups with a minimum of bus traffic.
There are several dozen of this model of monitor at my work since last year or so; the other day I found one on top of the dead electronics plunder pile recycling bin, looking brand new. Googling the model # and terms such as “problems” or “repair” or “won’t turn on” revealed pages of discussion on the badcaps.net forums: it seems this model of monitor is yet another victim of the bad capacitor plague that somehow continues to sweep the electronics world. Upon opening the monitor, this suspicion was confirmed by several visibly bulging capacitors in the low-voltage section of the power supply.
Probable Symptoms:
Monitor won’t turn on, no apparent power, black screen
Blinking power LED
Turns on but shuts itself off without warning*
Note: This power supply board (or very similar model) appears to be used in a variety of monitors from different manufacturers. Depending on which one you have, your symptoms may differ to what I have observed on the AL2216W. In particular, the monitor may simply not turn on (too-low logic voltage or software-controlled shutdown), may blink its power LED to indicate a fault, or may turn on for a few seconds and switch off again. In my case, the monitor showed absolutely no external signs of life (power LED dark and no response to the power switch), but a very brief flash of the backlight could be seen just as the unit was unplugged, confirming it did indeed have power but “chose” not to switch on (likely as a safety feature).
Obligatory Butt Covering Warnings
This is a wall-powered electronic gadget. Opening it and poking around inside carries a small, but non-zero, risk of electric shock even when unplugged. (There is a 100K bleeder resistor across the mains filter cap, but this could fail.) For your safety, wait at least one full minute after unplug to go near the supply board, and use a screwdriver with an insulated handle to short across the leads of the filter cap to be sure it is discharged. If you see a fat spark and blinding flash of light, the safety bleeder resistor has probably failed, and you might want to reconsider poking around in here.
(Opening it and poking around inside while it’s plugged in carries a guarantee of electric shock, just FYI.)
Disassembly
This is fairly straightforward. Pop off the plastic cover hiding the screws that attach the base. Unscrew them and any other visible screws, then carefully pry at the seam where the two halves of the monitor “shell” come together. Once inside, more screws. Note that to get the final metal shields off, the backlight connectors and the ribbon cable to the button panel must be disconnected, then the scew-in posts for the video connectors and two screws concealed in the mains cord socket must be removed.
What’s inside?
Surprisingly little, it turns out. There is one large power supply board (made by Delta Electronics, Inc.) and a much smaller display controller board (marked A220Z1-Z01-H-S6) with only two highly-integrated Realtek ICs and some discrete components. My educated guess is that the controller boards are very unlikely to fail, so start by looking at the Delta board.
Fault Finding
By all accounts, bad capacitors are usually the underlying cause of these problems. Due either to being under-rated or a sordid tale of corporate espionage (see Wikipedia link above), the capacitors will gradually vaporize their electrolyte (and sometimes not so gradually, with a bang) until they can no longer perform their capacitorly duties, causing the monitor to go haywire.
First, inspect all the electrolytic (“tin-can”) capacitors for visible problems. Their tops normally have a score pattern on them, but should otherwise be flat. They should not bulge upward, even a little. Visible bulging, ruptured tops or signs of leakage (e.g. brown goo around the top or seams) are sure signs they need replacing. Note that failed or failing caps will not always show visible signs.
On the Delta DAC-19M010 board, things are divided up into 3 logical sections: the bottom half is a switching power supply that steps your 120/240V wall power down to a 13.8V and 5V rail. Roughly speaking, everything to the left of the large center transformer is its primary (high-voltage) side, and everything to the right is the low-voltage secondary side (the high side may also be marked off by cutouts and/or a line on the underside of the board). The upper half of the board (more or less) is the backlight inverter, with another large transformer to step this low voltage up to the 1kV or so needed to feed the CCFL backlights.
I’m sure you noticed the large, high voltage cap on the high side, right near where the power cord plugs in. You did short it, right? This is the one that can make your skeleton glow even if the monitor is unplugged. Luckily, consensus from the internet is that this filter cap on the primary side rarely fails, so unless it is showing visible signs you can probably leave it alone.
There are seven electrolytic caps on the low-voltage side, all of which should be replaced if you even slightly suspect a capacitor problem. (Technically, the topmost one connects to the backlight inverter, but you should change it anyway.) On my monitor, the 13.8V rail read a tad high (14.x) and the 5V rail showed only 4.1V. There is likely an undervoltage lockout circuit on the controller that prevents operation at this voltage, although there may have been significant voltage ripple due to the bad caps that was resetting or otherwise fouling up the logic directly.
Collateral Damage
With the caps replaced, it’s a good idea to check for any obvious collateral damage. There are several surface-mount fuses (denoted Fxxx) on the bottom of the board which might have been affected (zero-ohm resistors may have been stuffed in place of some fuses; check these too). After you triple-check that the mains filter cap is discharged, also check the through-hole fusible resistor to the immediate left (high voltage side) of the switching transformer. There is also a surface-mount fuse on the controller board near the power entry connector.
Cap List
Here are suitable replacement parts currently available on Digikey. Be careful when removing the old ones, as some of them are near very brittle powdered-core inductors and tacked down with some kind of glue. Note, one of the parts below has a higher voltage rating than the original (this is OK).
* Note, if the screen’s backlight cuts out (often after a couple seconds) but the monitor appears to remain powered, the fault is most likely in the backlights or backlight inverter section of the power supply board, not the low-voltage section. You can confirm whether the entire system or only the backlight has shut off by holding a strong flashlight directly against the screen while a valid video signal is present – if you can see the image around the edges of the flashlight, the low-voltage supply and controller board are probably OK. Replacing C204 MAY solve it, but otherwise, fixing backlight issues is a whole different animal, which I don’t cover here. You MAY be able to identify a single dud tube by unplugging one at a time (WITH THE MONITOR UNPLUGGED!!!) and testing the monitor, but this is not 100% reliable (some inverter circuits will detect a single “open” (e.g. unplugged) tube and shut down anyway).
The Mosquino board is intended to operate from very low-power sources, such as RF, vibration energy harvesting and small thermal gradients (e.g. body heat). Although the ATMega and the rest of the circuit can be put to sleep at < <1uA once they have reached legal operating voltage, many semiconductor circuits fail this test with too-low or slowly rising power supplies. For example, the datasheet for the MCP1703 voltage regulator shown claims a quiescent current of a couple uA (in regulation), but it actually peaks out at over 100uA just below its regulation voltage, and that's not considering any other circuitry living downstream. So, as a key part of this balanced breakfast, this is a simple UVLO (undervoltage lockout) circuit that will hopefully become standard in the next Mosquino rev. It should be guaranteed to draw <10uA over the full (0.0 ~ 11V) range, and in practice probably much lower.
The active ingredient is simply a micropower comparator with a fixed reference and some positive feedback added to generate hysteresis. While deceptively simple, the math to cleanly resolve the desired on/off thresholds into a set of resistor values gets a little icky, so this post is mostly a note to myself so I never have to derive it again :-) (Yeah, I hate math and chose a career as an electronic engineer. Go figure.)
Operation
Two voltage thresholds, a “turn-on” threshold (Vh) and a lower “turn-off” threshold (Vl), determined by 3 resistor values, are defined by the user. (A reference voltage lower than either of these, Vref, is either provided by the user or comes for free with your comparator.) When a trickle of power is available, the input voltage charges up from zero until the higher, turn-on, thresold is reached, and this is then connected to the rest of the circuit (CPU, etc.). The circuit will be Doing Stuff, in some cases drawing more power than what’s coming in. In this case, the voltage at the input cap will begin to fall as power is consumed. The circuit gets cut off when the input voltage reaches the lower, turn-off threshold.
The feedback resistor, R3, is effectively placed in parallel with either R1 or R2 depending on the comparator’s state, which has the effect of pulling the compared voltage (+ terminal of the comparator) up or down slightly. This makes the divided Vcc appear lower than it really is until the comparator turns on, and higher than it really is until the comparator turns off again (see the equivalent circuits above).
Choosing these thresholds
The thresholds should be chosen such that the chosen power supply can actually (and reliably) charge up to the turn-on threshold, ideally in a reasonable amount of time. The turn-off threshold should be low enough (far enough from the turn-on threshold) that the turn-on current surge and any startup tasks don’t drag the supply all the way down to it and immediately turn your circuit off again. Needless to say, both should be within the circuit’s legal operating voltage range.
Setting the resistor values
R1 and R2 are a voltage divider; their ratio sets the comparison voltage between 0 and Vcc. For our purposes let’s also consider R3 this way, so we are really computing a relative relationship between R1, R2 and R3 that makes your Vh and Vl work. An approximately infinite number of actual resistances would work as long as the ratios between them are correct; we can worry about actual resistance values later. To make things simple we’ll define R3 = 1 and compute R1 and R2 relative to it. Here’s the math you need to do so (you can read the derivation below if interested).
You should now have values (probably small decimal numbers < 1) for R1 and R2. Now let's choose real values for them. For a low-power application, you want to use large resistor values to minimize wasted current through them. But, the comparator's + input pin will have some amount of leakage / bias current, so this limits how large of resistors you can use (bias current sunk or sourced by the pin will affect its voltage and thus the overall setpoint accuracy). For decent accuracy, you want the current into the node containing the input pin to be at least 10x (ideally 100x) of the leakage current. For the LTC1540, the bias current is around 1nA, which is about as close to sweet f-all as you can get. In practice, the contribution of R3 in this application will be the weakest (highest resistance value) of the three by far, and so R1/R2 will be much lower. You can probably choose a value for R3 on the order of 15-30M ohms. In fact, a quick survey at Digikey says these are your only readily available standard values in that range; you might have to put two 15Ms in series. Beyond that point, you have to start worrying about truly silly stuff like the resistance of the PCB itself (especially on a humid day) goofing up your setpoints, so again, don't go too crazy. Now, multiply your ratio values for R1 and R2 by that value, and choose the closest standard value that is available for each.
Optional, but recommended: Check the actual Vh and Vl you will get from choosing the standard values:
Notes for the LTC1540-based circuit above:
The part is guaranteed to operate correctly down to 2V, and in most cases will behave well below that. In my tests, it operated great down to about 1.4V. Below that, a spurious HIGH pulse on the output occurs from about 0.8 ~ 1.4V. For best results in the UVLO circuit shown above, be sure the FET it drives has a threshold voltage of at least 2V to guarantee the false signal will not be seen downstream.
If that part is not available, a couple parts with similar specs exist (e.g. MAX9117-9210 series), but they are not pin-compatible.
Really! Just busy with some real-life stuff, namely wedding related and home renovations. I haven’t forgotten about this pick & place stuff! Lately I’ve been spending most of my project time on getting Mosquino toward an official 1.0 release. The rev2 boards just came in, so once all the parts are in I should have one ready to test soon. Here they are!
As usual, click for fullsize. Clockwise from the bottom-left are a bistable display shield, microSD shield, low power boost board (as low as 0.6V to 3.3V), Peltier shield (thermal to electricity, ~20mV to 4.1V), vibration energy harvesting shield, a stackable LiPol / thinfilm battery power shield, and of course the Mosquino mainboard itself. You may have seen early versions of some of these on the Mosquino page already, but these implement bug fixes and the latest/finalized Mosquino pinout. Can’t wait to get playing with these!
(And no, purple is not the official / final color – The PCBs were made via Laen’s sweet batch PCB service; he likes to experiment with the colors from time to time. It’s not a ripoff of Lilypad…although the Peltier board can potentially harvest from typical bodyheat gradients (>=2degC), which is an interesting development for wearable computing projects to say the least!)
Typical frog in a hot pot scenario; when I joined Comcast the modem lease was like $1.50 a month, and I didn’t even think about it. As of recently it’s now crept up to $7.00 a month, which kind of made me sit up in shock. How much do those things actually cost, anyway?
Answer: $16 on eBay!
Ditching the leased Comcast cable modem in favor of your own is a surprisingly simple process. In my experience, Comcast won’t even try to (intentionally) stonewall your request or tell you it can’t be done in order to keep the revenue. Unfortunately, their techs are not exactly the brightest lights in the harbor, so you might have to train them a little on how to do it. Here’s how…
Step 1: Buy the modem
Go to your favorite new or used equipment source and buy the modem. Make sure your purchase includes any necessary power cord (wall wart); if not, buy that too. Theoretically, any DOCSIS 2 or later modem will work with most cable Internet packages, but to be sure, check this list for modems tested and approved by Comcast for compatibility. Extremely fast or fancy internet packages might have special requirements. Personally, I just searched eBay for the exact model # of my existing leased modem, and bought that one. My total cost was about $21 for the modem and a 12V wall adapter.
Step 2: Plug in the modem
Before you go connecting anything, turn the new modem over and copy down the “HFC MAC” number printed on the bottom to someplace more convenient. Note, there may be several different numbers printed on the modem; the “HFC MAC” is what you want. Technically the “number” is in hexadecimal, so it can also include the letters A-F. Double- and triple-check that you copied it correctly!
Disconnect your leased modem and plug the new one in its place. Verify that the lights come on and blink just as with your old one. (It will still ‘see’ a modem signal when connected, even if it’s not activated yet.) Once it’s lighting and blinking, power-cycle your wireless router (or whatever attaches to the modem Ethernet cable) to make sure it picks up a fresh IP address from the new modem. Just to be safe, reboot your computer(s) after this to make sure the newly rebooted router gives them a fresh address too. Now your modem, wireless router and computer will be “connected” to one another as far as your home network is concerned, although they won’t be able to reach the Internet through the new modem yet.
Step 3: Activate the modem
The one and only piece of information you (and Comcast) will need for this is the “HFC MAC” number you wrote down earlier. Call the Customer Service # on your Comcast bill, and say to them:
“Hi, I’d like to use my own modem and return my leased modem.” When I did this, the main customer service gave me a separate phone # dedicated to handling this request. Call that # and repeat the request.
The Comcast person on the phone will ask for the number from your modem. Not all of them are smart or well-trained, so they may not know which number, nor tell you the correct number to provide. Whatever they say (or don’t), give the “HFC MAC” you copied earlier. Now, this is important! Have the Comcast person input the number and then recite the number back to you, to make SURE they input it correctly. This is important!
Before you hang up, start accessing Web sites and see if they start working. If the Comcast person input the # correctly, your Internet should start working again almost immediately. If not, login to your wireless router’s status page (consult its manual for how to do this) and make sure it obtained an IP address, gateway IP and DNS servers from the modem. This information may be listed under a section titled “DHCP” (a protocol for devices to request and assign IP addresses.) Try powercycling the router again while the modem is activated to make sure it gets an address.
Step 4: Return the old modem
Hopefully, everything is working now! The last thing to do is to pack up the old modem and its wall plug in a box and return it to Comcast. If it came in an official Comcast box (e.g. “self-install kit”) and you still have that box, use that box – but if not, my experience is they aren’t that picky (I used a shoe box). There is a brick-and-mortar Comcast service/payment center by my house, so I just returned it in person. If this is not an option, ask the Comcast person how to return it by mail. My experience at the Comcast payment center was very positive – just handed the modem over, they scanned a barcode on the bottom and it was automatically credited to my account. They handed back a receipt with my name/account # and the modem details on it and I was on my way. My next bill had a partial refund for the part of the month I was no longer leasing the modem. Done and done!
If all does not go well…
If your new modem isn’t delivering the Internet goods after activation, the Comcast person (billing department) will transfer you to a separate department (tech support), who have the power to ‘ping’ your modem and make sure it is visible on their end. ‘Your’ modem in this case is defined as the modem matching the HFC MAC # linked to your account, which is why it’s very important that the billing person has input the correct #, and input it correctly, BEFORE this point. Otherwise they can ‘ping’ all day and not get any result because their system is looking for the wrong damn modem! The Tech Support person has the power to ping but NOT the power to add or correct MAC #s on your account, so this sucks. Likewise, the billing department has the power to enter MAC #s, but NOT to ping the modem! If this magic number entry gets cocked up somehow, it will take a 3-way conference call between you, tech support and billing to sort it out, and not all Comcastic techs know how to pull this off with all those complicated phone buttons. I spent two hours bouncing between departments because the barely-English-speaking billing person miskeyed the # the first time.
For the insanely bored or curious…
“MAC” number stands for Medium Access Control number, which is a globally unique number (burned into the device by the manufacturer) that identifies YOUR device among the millions of others out there just like it. The “medium” referred to is the physical cable. Since your block’s local cable segment is a shared resource, this number is necessary to identify you as a paying customer and route the right bits to and from YOUR specific modem. The difference between the separate “HFC” and “CPE” MAC #s is that the HFC number (I’m told this stands for “Hybrid Fiber-Coax”, i.e. residential cable networks) is the one that’s visible on the coax (cable) side of the modem that your ISP sees, and the other (“Customer-Provided Equipment”) is the Ethernet-side number that’s visible to your equipment (e.g. wireless router). Don’t tell Comcast that number by mistake; they can’t see it on the cable end.
Despite the impact of work, wedding planning and Super Metroid fan-hacks (not necessarily in that order ;-) on my freetime, my scheme to design a DIY-able open pick & place system is starting to come along. So far, there is a proper vacuum placement head, a rough idea of what the software architecture might look like, and this. For those who saw the last post, you probably guessed what it was leading up to.
This is a simple proof-of-concept of a SMT tape-and-reel part feeder design. The main parts are a stepper motor and feed sprocket to advance the tape, two walls with guide slots, and a simple slider mechanism to allow the feeder to accept tapes of varying width. Please note that it does not (yet) include any mechanism for peeling and disposing of the tape covering. Suggestions and innovations in this area (as well as all others) are welcome!
All the parts were cut on a CNC mill – design files and G-code are available here. The .cb files included can be opened with the free version of CamBam. More photos / video and design details are available below.
The Tape Standard
The geometry of the standardized tape that holds SMT parts is documented in EIA-481-2-A, which until very recently was only available at a price too high for mortals (or from your favorite ‘alternative’ source, wink nudge). It appears that EIA disbanded at the end of 2010 and the documents are now public. Regardless, here are the parts of interest to us building a DIY tape-and-reel feeder:
Pitch (distance between sprocket holes): 4mm
Sprocket hole diameter: 1.5mm
Center of sprocket hole to edge of tape: 1.75mm
Center of sprocket hole to edge of component wells: min. 0.75mm??? (seemingly not specified; varies between manufacturers)
On opposite side of tape – ending edge of component wells to edge of tape: 0.6mm min.
Tape thickness: 0.2 ~ 0.4mm, not including covering.
The standard tape widths are 8/12/16/24/32/44/56 mm. For tapes 32mm and wider, a row of slightly elongated (same pitch) sprocket holes is added to the other side. According to various sources, the standard also says the pitch between part wells should be a multiple of 4mm and “Pin 1″ (if any) should generally be on the sprocket side and facing forward. A longer explanation of the part orientation rules is that the part should be a) widthwise (its longer dimension, if any, across the tape); b) Pin 1 toward the round sprocket holes (unless this conflicts with the first rule); c) Pin 1 facing in the direction of travel (unless this conflicts with the first 2 rules). How religiously any given vendor adheres to these rules is anybody’s guess. There is also no rule saying the ‘well’ or pocket holding each part has to remotely match the size of the part (except to prevent it being able to flip over or rotate 90 degrees during shipping), so visual positioning correction is occasionally needed for parts from particularly lazy vendors.
Feeder Design Points
With these things in mind, the shown test-design uses the following dimensions, which seem to work well with varying size tape samples I fed through it:
Sprocket thickness of 0.7874mm (.031″) – this is a ‘standard’ stock thickness in the US, so it was an easy first test. I sunk the sprocket so that it lies flush with the inside wall. With these values, the depth of the tape track is cut to 2.14376mm (0.0844 inches) to put the edge of the tape flush with the track when on the sprocket, forcing it to stay straight despite all the feed force being delivered on one side. For the ‘outside’ (non-driven side) wall, the track is cut to a depth of 1mm (0.039 inches). The width of the slot is 0.79375mm (0.03125″), as this is the closest (commonly available in the US) milling bit width that will accommodate both plastic and the slightly thicker paper tapes. To assist loading tape, a wider ‘mouth’ is cut on the input side of both sides’ slot, tapering to the slot width to guide the tape in. In reality, the mouth you see in the photos is not really large enough to be useful (it looked a lot bigger on my monitor!…). Also, the mouth on the non-drive side in the photos is on the wrong side since I completely forgot to account for this half being flipped over :p These are corrected in the downloadable files.
With the sprocket as designed, the tape track radius is 13.6mm (0.536″), and the track makes a 180 degree pass around the sprocket to eject the spent tape at the bottom of the same end it comes in on. In hand-testing some tape around the sprocket, I found it does not always sit flush against the sprocket throughout the entire 180 degrees, so the tape track is widened a bit around the sprocket to accommodate. The ~31mm sprocket diameter / number of teeth (22) was chosen purely for convenience on my part, as this is the tallest that would comfortably fit on the homebrew CNC mill I’m using for testing. In practice, a larger diameter is advisable so as not to limit the size of parts (deepness or length of the ‘wells’ vs. sprocket diameter and bend radius) that can be fed. Also, the reels themselves will be much taller than this anyway. Just keep in mind that as sprocket diameter goes up, so will the required motor torque to advance the sprocket one step, and the linear distance per step. At some point some form of gear reduction will be necessary vs. simply tacking the sprocket directly to the motor shaft.
To handle a wide (pun intended) variety of tape widths, a trio of smooth nylon PCB standoffs (0.250″ dia) are sunk and bolted into the drive side to act as sliding rails for the halves to be pulled apart to the desired width. A rubber band around both halves keeps them tensioned and in contact with the tape edges when loaded. This could definitely stand improvement, but it works for now.
Despite being a quick ‘n dirty test piece, the action of this feeder (by hand) is surprisingly smooth. The nylon spacers are pretty slippery, and the Delrin also provides a smooth, low-friction surface when machined. With the motor is a different story; these tin-can motors are 7.5deg/step and the driver board I’m using right now doesn’t really support microstepping low-current motors.
This is a free (open source) Python script for creating feeder sprockets for e.g. perforated tape or film advance. I wrote it for myself to generate SMD tape-and-reel feed sprockets, but it might also be useful for making replacement sprockets for 8/16/35mm film, microfilm and paper-tape systems whose original reader hardware no longer exists or is difficult to find replacement parts for. The output is a .DXF template suitable for laser cutting, 3D printing or CNC machining. “Documentation” below, but it should be pretty self-explanatory. It should work with any modern version of Python (tested on 2.6).
Sprocket design goals / differences from other sprocket types
The drive sprocket’s dimensions are specified mainly by the number of teeth, width (or diameter) of the sprocket holes, and the pitch (distance between sprocket hole centers). The tape is usually advanced either tangentally to the sprocket, or partially wrapped around the sprocket. Thus the distance between the outside edges of any two teeth at any point, either tangent to the sprocket or along the circumference of the sprocket, should never exceed the distance between the outer edges of any two sprocket holes (the taper of the teeth is computed to counteract the radial splay of the teeth). Additionally, a landing area (flank) is cut at the base of the teeth matching the thickness of the tape, giving it a place to ‘catch’ when pressed against the sprocket’s inner diameter. Unlike e.g. roller chain sprockets or spur gears, no undercut (cuts below the inner diameter) is provided for rollers or a mating gear’s teeth, and no special geometry is needed along the sides of the teeth.
Some Terminology:
Pitch: The center-to-center distance between sprocket holes, and thus the sprocket teeth.
Tooth Face: The tapered portion of the tooth. In this application, the tooth taper is calculated to smoothly slide into the sprocket holes as the sprocket rotates.
Tooth Flank: The ‘upright’ (or slightly concave) base of the tooth. In this application, it should be the same height as (or slightly taller than) the tape thickness so that the tape sprockets rest fully within the flank.
Tooth Land: This is the surface left if the tip of the tooth has been blunted or “cut off”. This might be done to fit the sprocket into a particular diameter. I’m an EE; I don’t know what other dis/advantages pointy vs. blunted teeth would have in this application.
Basic usage:
Fill in all the values called for in ‘Basic Parameters’. Aside from angles, which are in degrees, use any unit of measurement you prefer (inch/mm/etc.), as long as it is consistent; output will be in the same units. If you desire a specific tooth taper angle, enter it, otherwise just press “Compute / auto angle” to suggest an angle and generate the sprocket.
Mostly, the pitch and sprocket hole width are dictated by the tape to be fed, and also drive the important diameters. You can get closer to a desired sprocket diameter by adjusting the number of teeth. The important diameters are:
Inner diameter: This is the diameter at the base of the teeth, where the bottom of the tape rests.
“Design diameter”: This is the most important diameter as far as the program is concerned, and is fully dictated by the pitch and number of teeth. The design diameter is the diameter at the top of the tooth flanks, which is the top of the tape. You could also think of this as the outside diameter of the tape if wrapped around the sprocket.
Outer diameter: This is the diameter at the tips of the teeth. By playing with the tooth angle and cutting off the tips (tooth length %), there is some leeway to constrain the outer diameter to fit the available space.
Note that the angle auto-suggest feature is currently broken (will return incorrect results). It will (usually) calculate an angle that will allow the tape to *wrap around* the sprocket at any radius from the base of the teeth, but what you really want is the tape to fit at an arbitrary angle across the teeth (specifically, the outer edges of whatever teeth it intersects while tangent to the sprocket should not exceed the outsides of the sprocket holes). For now you might have to cut a few gears and experiment, or just set the angle arbitrarily high.
Extra Options:
If you will be cutting out the sprocket on a CNC mill, outside pocketing will leave some material at the base of each tooth flank due to the diameter of the round cutter. Enabling ‘Remove cutter leftovers’ and entering the cutter diameter will add DXF points (drill hits) near the tooth edges to remove this material. Users of other fabrication methods can probably ignore this option.
If designing a sprocket in one measurement system for use in another, you can optionally select a unit conversion to be applied when writing out the DXF file. E.g. if your tape is specced in mm but your CAD/CAM software expects inches, select ‘mm to inches’ before saving the DXF.
CAVEATS:
I wrote this to solve a very specific need for one of my own projects; so very little time and debugging went into it. There is no idiot-checking. Expect errors or bizarre output if you leave necessary fields blank, mix & match units (inch/mm) arbitrarily, enter a negative number of teeth or any other physically impossible geometry. Even if you do everything correctly, there is no guarantee the output will be correct or meet your needs. Please check the results very carefully before you lay out any $$$ to have anything professionally made by a fabrication service!
Right now the arc between teeth is output as a straight line, not an arc or series of tiny lines approximating one. This should not be a huge problem for a reasonable number of teeth, but something to be aware of.
Other notes:
“Auto angle” calculation is only done if the angle field is blank: if there is a number there (including a previous auto-calculation), it will be left alone. If you have changed any parameters and want to redo “auto angle”, please delete the contents of this box.
The sprocket image shown in the program window is not to scale – it is automatically scaled to fit inside the window. It is not unusual for the sprocket to appear to change size dramatically when parameters are modified.
Square Pegs and Round Holes:
Unless you have some fancy software sweeping the sprocket teeth into 3D, you are probably making a flat gear out of flat stock, and it will have flat edges. If the sprocket holes are round, the tooth edges will contact somewhere earlier than the outside diameter of the hole, and so may need to be tweaked – especially if the material is thick relative to the holes. (See the diagram below for an exaggerated example.) Use this formula to calculate the effective tooth width that will exactly fit the hole:
w = sqrt(d^2 – t^2)
where d is the sprocket hole diameter and t is the stock thickness.
My page that tells you your IP address is up and running again, after a PHP configuration change by my web host knocked it out. Anyway, enjoy the glory of finding out your external IP address without getting socked by porn popups!
An aquarium air pump can be used as an inexpensive source of low vacuum with a small amount of tweaking. Supplies needed are:
The air pump
Screwdriver (usually) to open the air pump
Hose barb (your favorite size) for vacuum inlet
Drill
Glue (e.g. RTV/caulk, epoxy, etc.)
Of course, you could convert one by sealing up the whole thing in a big Tupperware container and punching a port through, but this method is more robust and compact.
Have a gander at the pictures below. The internals shown are pretty typical, and diabolically simple: AC wall power flows through a U-shaped electromagnet, which wiggles a small permanent magnet between the poles rapidly back and forth to pump a rubber bellows. The bellows draws air directly from the inside of the case and forces it through the output port, drawing new air into the case through some small holes or dust filter on the case somewhere. Thus, “reversing” the pump requires simply drilling your own hose barb into the case and sealing up the original vent (plus any other air leakage paths). The converted pump can be used as a vacuum pump by plugging the new port into your vacuum-needing device and letting the original port vent to atmosphere, and can still function normally as a positive-pressure pump as needed.
Common air leakage paths are around the AC cord entry, around the output port and where the screws / rubber feet go (the screws may be hiding under the rubber feet anyway). Probably the easiest thing to do is just run a nice fat bead of RTV around the entire seam between the halves of the case before putting it back together.
The pump shown pulls about 5 inches mercury (~127mmHg); most are probably in that ballpark. If your needs fall somewhere above this but well below a “real” vacuum pump (or even a disembodied fridge compressor), it might be possible to beef up the vacuum or flowrate a bit by putting 2 in series or parallel.
Some “standards”:
In the US at least (don’t know about elsewhere), the common size pumps (for 10 ~ other double digits gallon fish tanks) generally take 3/16″ flex tubing, and unmarked tubing in the fish supplies section of your local pet store is probably this size. Larger pumps with e.g. 1/4″ ports are available for large tanks, but if it doesn’t say what size tubing to use, you can probably assume 3/16. This refers to the tubing inner diameter (or the pump port’s outer diameter); the tubing outer diameter can vary significantly and is often not specced. Since you will be adding your own port, you can really make it any size you want, but sticking with 3/16 means you will have plentiful local sources of matching hose barbs, tee fittings and other parts at most any pet store.
This is a quick follow up to the pick & place head article, in which I actually build the darn thing :-) As in, not just fit-test the parts together and take a picture, but actually pick and place some stuff with it. I’ve been busy/lazy, so not too much to show in terms of software yet (the video you see below is running a ‘dumb’ g-code placement script). The parts listhas been updated will be updated in the next couple days, along with new CamBam/DXF files.
Live test of the head as currently designed. This is bolted to my ghetto homebrew CNC mill, which is kinda slow. On a more built-for-purpose (or less ghetto) machine, performance should be much better.
The webcam’s weird eyeball-shaped case has been removed, revealing a rectangular board with sanely-spaced mounting holes in its corners. Also, a proper solenoid valve has been bolted to the head and hooked up to a reversed aquarium pump for suction. The rubber nozzles are from a sacrificial el-cheapo SMD vacuum pen ($3USD ,eBay), which comes with three sizes that fit on a standard 16-gauge needle.
Otherwise, it’s pretty much as described in the previous post.
A little bit of guts. This board holds a transistor to drive the 12VDC solenoid valve from a parallel port pin, Pololu microstepping motor driver (Allegro A4983) and 5V regulator. At the top you can make out a simple pressure sensor conditioning circuit that isn’t hooked up yet.
For my pick and place project, I picked up a pair of too-good-to-be-true webcams: the Cubeternet no-name UVC webcam. For this project, there is a lot to like: 2MP resolution (claimed, at least), built-in LED ring, cross-platform UVC interface, hand-adjustable focus and a legitimate glass (no polycarbonate) lens…for $16! Alas, my review of this cam is currently mixed, since one of the cameras failed after being plugged in for more than a few minutes. This particular camera – the first I tested – became warm to the touch soon after plugging in; I assumed this was normal operation and that the cam’s solid metal “eyeball” enclosure was the heatsink for a voltage regulator screwed into it. Turns out this is not normal at all; the 2nd camera does not get even slightly warm after running overnight. Now, what to do with a broken webcam? Take it apart!
Opening the case reveals solid components, but an unfortunately typical “Chinese toy” construction with hand-bent and soldered leads everywhere, a couple stray solder balls and liberal application of hot glue (yes, really) to hold everything in place. If you’ve ever taken apart a cheap electronic toy for soundbending, you probably know what I’m talking about. Of the identifiable ICs, there are:
Controller:
Vimicro
0342PL
TS0340B
(Integrated USB2.0 UVC camera controller in 44-pin TQFP; its manufacturer denotes it as VC0342. This is driven by a 12MHz crystal oscillator.)
EEPROM:
Turbo IC, Inc.
TU24C64CSF
29830628
(64-Kbit I2C EEPROM in SOIC-8. Contains USB descriptor strings referencing “Vimicro Corp. Venus USB2.0 Camera” and “Sirius USB2.0 Camera (Audio)”. The remainder of the data most likely consists of imager-specific register initialization values. Here is a dump of the EEPROM contents in ASCII HEX format, or in raw format.)
Voltage regulator:
Kingbor 6206A
0947/33
(Ho-hum, 3.3V 3-terminal regulator.)
Imager:
QM20MMS
4TS28CPT30
Typical “big glass plate” CMOS image sensor; this is the partnumber silkscreened on the bottom of it, but the Google turns up very little information and certainly no datasheets. An user on a Chinese message board says it is a 2MP imager made by Micron.
Misc:
There are six very bright LEDs hand-soldered into the board and bent into position; an electret microphone is also glued into the case. A handful of what appear to be discrete transistors/FETs deliver power to the LEDs and may serve a purpose switching/sequencing power to the imager.
In the images of the controller side, you can see a big solder blob dangling precariously off one of the FETs onto the PCB. While it’s not clear if this one was the culprit, this blob or one of a couple similar ones are the most likely cause of failure. Despite all this, the lens assembly is all glass as claimed, and seems to be of much higher quality relative to the rest of the guts. The minimum focus distance is well below 1 inch. On another bright side (no pun intended), the LEDs are bright as hell, adjustable via an analog thumbwheel on the USB cable, and holes in the four corners of the square board can allow easy attachment to the placement head. The untimely death of one of the cameras is certainly discouraging, and given the internals can’t be cleanly written off as a fluke. Still, even assuming a 50% failure rate, doubling up on these cams is still a good bit cheaper than the nearest name-brand equivalent.
Quick ‘n dirty (but working!) image segmenter for randomly-strewn part identification. About 1 page worth of scripting takes an image of objects on background, determines which part is the background, determines the outside contour of each object and numbers each as a separate object. Now that it’s known where to look for one specific object, the task of identifying that object (or just matching it to another just like it) becomes a whole lot simpler. Combined with the auto-aligner, this reduces a “naive” (bruteforce cross-correlation between needle and haystack images) image matcher to only having to scan against 4 orientations (90-degree rotations) to find which has Pin 1 in the right place (and whether it’s the same part, etc.) Hopefully as I dig deeper into opencv, there is a less-naive algorithm builtin for this that does not rely on contrast/color historgrams: most electronic parts basically consist of a flat black body and shiny reflective metal leads (i.e. appearing the same color as your light source and/or the background, and/or whatever happens to be nearby at the moment). Edge-based stuff still seems like a better approach, though I would welcome being proven wrong if it means not having to write the identifier from scratch myself :-)
Steps in brief:
The first image was taken using the actual webcam that will be attached to the pick n place head, looking at a handful of representative parts on a piece of white paper. This image was dumbly processed using a Sobel edge-detector (it’s builtin to Gimp and I was feeling lazy), Gaussian blur to expand the soon-to-be-resulting mask around the part a little and close any gaps in the edge-detection result, and finally threshold the result to produce the second image. The goal in these steps is to produce a closed-form contour blob for each part that’s at least as wide as the part, while minimizing stray blobs from random noise / dirt specs / etc. (internal, fully-enclosed blobs/noise due to part features/markings is OK). Finally, opencv’s FindContours function is run (mode=CV_RETR_EXTERNAL) on the resulting image, returning a vector that contains a polygonal approximation of each external contour found. Each discrete (non-touching) contour blob is returned separately, that is, every part in the frame is now effectively tagged and numbered!
There are a couple noise points identified in the image above. Better-chosen constants for the initial image operations (threshold, blur radius, …) may help, but I’ll probably end up having it measure the area of the blobs and throw away any that’s too small to possibly contain a valid part. Switching to a more advanced edge-detector, e.g. Canny, may help too. In any case, the full image matcher should figure it out eventually :-)
Code Demo – basically ripped straight from the pyopencv examples Segmentation example – requires Python (2.6) and opencv 2.1.0 / pyopencv.
This weekend I got some parts in and put together a preliminary placement head for my open-source pick ‘n place project. My requirements are that it be buildable with off-the-shelf parts (ideally same-source, to save on shipping) and no special equipment, allow +/-180 degree rotation while maintaining an undisturbed vacuum, and support interchanging of the “tools” (vacuum needles). All that’s really needed to build this are the discrete parts shown, a bit of drillable plastic (e.g. Delrin) for the base material, and a drill. A drill press would be handy (a CNC mill *really* handy, and not such an out-there thing to have considering you are probably retrofitting this onto one).
This head consists of a hollow rotary shaft with a Luer lock fitting on one end, right-angle flexible tubing barb on the other end, and a large toothbelt (notched belt, timing belt) gear in between. The shaft is held in place but allowed to rotate by a pair of bearings, and the rotation is provided by a small stepper motor at the other end of the toothbelt. The gear ratio is approximately 5.2:1, providing a rotational resolution of about 0.35 degrees/step with a common 200 step/rev stepper motor (if no microstepping is used). Finally, just to the left of it is a 1024×768 Webcam with manually adjustable focus and a ring of built-in LEDs for lighting. The webcam mounting is definitely not ideal, given the camera’s weird eyeball-like shape. Tentative plan is to lash it down with some string, align it nicely with respect to the CNC table, then backfill the opening the camera’s butt sits in with epoxy.
The hardest part was finding a combination of parts that would all fit together nicely. Currently, the fits are mostly exact to “pretty damn good”, but a bit of adhesive is needed to join them permanently.
Parts List
Unless otherwise noted, all of these parts were sourced from Small Parts Inc. in the US due to the large selection and an actually competent parametric search engine, which was a great help in finding combinations of mutually-fittable parts. Accordingly, measures are in Imperial unless noted otherwise (that’s just how they come here).
Partnumber
Desc.
3002DSTNTG18
Nice Ball Bearing 3002DS, .250″ bore x .6875″ OD x .250″ width
Timing Belt Pulley Delrin, 0.0816 Pitch, 40DP, .350″ Diameter, 1/8″ Bore, For up to 1/4″ Wide Belt, 14 teeth
40DP-70/S-01
Timing Belt Pulley Delrin, 0.0816 Pitch, 40DP, 1.806″ Diameter, 1/4″ Bore, For up to 1/4″ Wide Belt, 70 teeth
TB188-090-01
Timing Belt Urethane/Polyester, Single-Sided, 0.0816″ Pitch, 0.1875″ Wide x 7.3440″ Long, 90 Teeth
LCX-LC005
Male Luer Lock to tubing adapter, .145″ OD hose barb (mates well enough with .152″ ID steel tubing)
F1-EL001
Elbow Connector , Classic Barbs for 3/32″ ID Tubing, .145″ OD
HSTA-08-24-10
1.5″ aluminum standoffs, 8-32 thread
B00137UP68 (Optional)
11ga Steel Tubing, .120″OD, .094″ID (for mating 2mm shaft stepper motors, if used, to the 1/8″ pulley
Misc. Parts
2x 2″ x 4.5″, 1/4″ thick pieces of Delrin or similar
4x 1/2″, #4-40 bolts and nuts (assuming 2 bolts for stepper motor)
4x 1/2″, #8-32 bolts for standoffs
1x Webcam, manual focus, hi-res and builtin lighting strongly recommended
1x 3mm shaft stepper motor*
1x Method of attaching to your mill – a bit of aluminum angle bracket, or a dovetail, etc., depending on your mill.
1x 3-way air solenoid valve
1x Vacuum source (see here for a cheap one)
Air tubing and appropriate couplings to your solenoid valve. The head’s air path terminates in a 3/32″ hose barb, so you’ll want a 3/32″ to (whatever) barb adapter, or a 3/32 that screws directly into your solenoid. Those using metric are on your own :-) but will probably have an easier time of it anyway.
* The timing pulleys and stepper motors only come in a handful of diameters (imperial for the pulleys and usually metric for the small motors), so a 3mm (.118″) motor onto a .125″ ID pulley was the closest I could come up with in a reasonable amount of effort. Any small, el-cheapo permanent magnet (“tin can”) stepper motor should work here, but sourcing it may be annoying. Off-the-shelf 3mm-shaft motors I found are Jameco’s ValuePro 42BY48H08, Anaheim Automation’s TSM42 series, and Portescap’s 42/44 series e.g. 42×048 and 42S100. This surplus stepper is also worth a look, but you’ll have to remove a pre-attached plastic(?) gearhead. Beware, many of these smaller motors are 7.5deg/step, so even with the gear reduction, you will probably want to look at microstepping them to ensure adequate rotational resolution. Also, most of the companies selling them have no online click-and-buy ordering; you’ll have to phone up a salesdouche at the least, hope that you are worth their time to buy One Lousy Motor, and possibly haggle (“Request a Quote”). How companies that don’t know what their product costs stay in business is beyond me, but that’s a rant for another day.
If you want to skip that hassle, I’ve taken an alternative approach and simply bodged a surplus 2mm-shaft motor up to a 3mm shaft by gluing a short piece of thicker steel tubing onto the existing shaft (see partlist).
Design Files CamBam drawings with machining operations for the top and bottom plates. The machining ops assume 1/4″ thick plastic, 1/8″ endmill for most cuts, and .166″ (#19) drill for the #8-32 bolt holes into the standoffs. It’s designed for the Cubeternet webcam (or equivalent eyeball-cam) and a stepper motor with 42mm center-to-center mounting holes. You can get the free CamBam at http://www.cambam.co.uk/.
Note, I made some small improvements to these files after the above prototype was carved, so what you see in the file will not match it exactly. In particular, the standoffs were moved to more optimal places and a feature has been added allowing the motor to be slid to remove any slack in the belt.
Assembly
The assembly should be pretty self-explanatory. One bearing on each of the Delrin plates (inset the ball bearing if you can; otherwise gluing it down should be fine). The hollow shaft goes thru the bearings, Luer adapter and hose barb go on either end (use adhesive, just don’t clog the air path with it). The motor shaft center should sit just a hair (50-100 mils?) over 1.75″ from the hollow shaft. On mine, an online calculator produced the 1.75 figure, but the belt turned out to be a bit loose once built this way. If possible, make an elongated hole for one of the motor screws so the motor position can be adjusted to tension the belt. You could probably also insert a peg somewhere in the belt path to push it inward and take up the slack. With the camera focus set such that the largest part you will ever populate can fit in-frame, find the resulting camera height (distance from part) and set the depth of the shaft so that the camera is “in focus” maybe an inch or two above the placement position (i.e. with the needle touching the board). This will allow the head to focus on parts without touching the needle down.
For my build, I used instant glue to attach the Luer adapter to the needle shaft, and hot-melt glue to tack down the large pulley and hose barb. None of these parts should be seeing significant force; if they are, you’re Doing It Wrong and the hot glue should hopefully break loose before something more important does. Using a non-permanent adhesive for the hose barb and pulley also allows this assembly to be disassembled later if needed. The shaft itself is free-floating and the large pulley rests against the ball bearing due to gravity. This will prevent damage due to crashing the needle into the table or too-tall part, but if you experience problems with the shaft riding up on its own, try adding a bit of extra weight or put a dab of adhesive where the shaft passes through the lower bearing.
Suggested “v2″ improvements
–Move air valve (if/when one is specified) onto head to minimize air volume between valve and head. Needed? (may be beneficial for reversed aquarium pumps or other weak vacuum sources)
–Bump detect: rather than firmly adhere the shaft into the bearing, allow it to float up and down, normally resting by gravity with the large pulley against the ball bearing. Place a contact switch just above the pulley: if the head/part contacts the surface with more than minimal force (enough to lift the shaft), contact switch is triggered. This could be used to halt the machine if a bump was not expected. If the switch’s trigger position is reliable enough, it could be used intentionally to automatically determine component heights.
–Probe function: There is a conductive metal path from the needlepoint all the way up to and including the bearing outer race, so it would be easy to touch a contact here and use the needle to probe for any conductive objects (e.g. find the tabletop if it is metal, or some capacitive shenanigans for PCBs/etc.). Useful?
So, there’s some really cool, empowering stuff going down these days with regard to manufacturing. Cartesian machines (i.e. CNC mills) are relatively simple to build from off-the-shelf parts; there are a bajillion people doing this and plenty of ready-made open-source designs available. More recently, hobbyists have gotten in on designing open-source rapid prototypers (3D printers); as a result, designs have now crossed the sub-$1000 threshold off-the-shelf, and you can even build a GPL’ed 3D printer that can almost replicate itself!
One thing that I haven’t seen cross the blood-brain barrier of proprietary commercial systems is pick-and-place machines that can assemble electronics. These things are badass; full of automated win and articulating robotic arms, but they’re also damned expensive: the crap ones start at >$10k and use literally a fishing-lure-and-weight type arrangement to peel back the tape covering tape-and-reel parts, so you have to keep resetting the weights. Those with more advanced / less manual feeders scale skyward from there. And of course, the software end of these things, especially machine vision algorithms to place parts more accurately, is some serious $ecret $auce. So… let’s change this!
Most of the “big stuff” is straightforward: The PCB layout software generates a list of coordinates for each part. A small vacuum needle mounted on a Cartesian head picks up each part from a known location, rotates it 90/180/etc. degrees as needed, and sets it down at its coordinates. It does not even need to be 100% accurate: surface tension of the solder during reflow will pull most minorly misaligned parts back into place.
The big barriers are:
1) Low cost / self-manufacturable feed mechanisms:
Electronic parts are packaged in several different ways, most commonly tape-and-reel, plastic tubes, or in trays. Each has a different, maybe cumbersome, way of knowing the location of the next part in the package and freeing the part from the package. Picking up stuff and putting it down is easy compared to dealing with the wide variety of tape and tube sizes reliably. Oh, and if your board uses 50 unique parts, you need 50 feeders. Hence the emphasis on making them cheap and mass-self-produceable, e.g. by CNC or casting or 3D printing.
and/or…
2) Machine Vision
For larger parts, once the first part is successfully picked (e.g. by human intervention), it is enough to know how many parts per inch of tape, advance the tape a known amount per pick, then just grab blindly for the part and plant it at its destination coordinates. But for smaller and finer parts, this is not accurate enough: the parts can be slightly off-center or crooked in their tape wells, and this becomes significant as the part size decreases. Professional machines use a set of cameras and image processing algorithms to recognize the part, find its dead center and correct any rotational error. In theory, a suitably good vision system would allow you to peel back the tape and just sprinkle the parts on the table, forgoing feed mechanisms entirely at the expense of some small manual labor. Actually programming this algorithm on the other hand…
Another nice thing to have would be:
3) Automatic needle swapping. Many more advanced CNC mills are able to spit out their current tool, e.g. a specific size drill bit (in a known location in a tool rack) and pick up a different tool. It would be nice for the pick and place machine to be able to change to smaller and larger needles/suction cups to handle large and small parts seamlessly. If not, placements can be sorted, e.g. smallest to largest, so that the needle only has to be manually changed a couple times.
I’ve made some very initial feasibility-study stabs at building such a machine, and begun building a bit of hardware. I created a separate page for this project with more detailed specs/documentation and progress so far: Pick and Place Project
I picked up an old “Veo Stingray” camera from surplus dealer AllElectronics. These things are pretty junk by modern standards (320×240 resolution, unsightly rounded “looking through a tube” image), but it does have the variable (manual) focus I needed for an imaging project, and the price was right. As for drivers… the company that makes this thing seems to have evaporated, and the particular variant (USB product ID 808B) seems to have never been heard of by anyone, even though there are some identical cameras with slightly different internal hardware (and different Product ID) floating around. They all are (were?) manufactured by Xirlink.
This particular variant can be identifed by USB VID 0545 (Xirlink), Product ID 808B.
Here is a solution that might work (but see update above first): This camera and several IBM PC Cameras use the same or similar chipsets (Sunplus SPCA5xx)…with a small tweak, the IBM camera driver can also be tricked into supporting the ’808B’ Stingray (maybe others?) by adding its VID/PID to the driver .INF file. Kinda like slipping your cuckoo egg into another nest.
This file includes the IBM driver and tweaked .INF. The following devices are supported:
Linux?
It looks like several open-source driver projects may support the Veo Stingray, IBM PC Cameras and similar SPCA50xx variants (not to mention the classic Dakota Digitals). Note, if your exact ID is not listed as supported, you may be able to get it working with a tweak similar to the above. Have a look at:
So there we are, minding our own business, when an angry demon springs to life in the basement. He is on a rampage, pounding against the walls with all his might, THUMP THUMP THUMP THUMP BANG BANG BANG. We race downstairs. Turns out it is only the Sears Kenmore front-loading washing machine’s internals beating themselves to death during the final spin.
After ruling out an unbalanced load (even fully empty, BOOM BOOM BOOM), I lookup the symptoms online. After a few thousand pages of angry ex-customers’ rants, without even lifting a wrench, there is no doubt what the failure is.
All available evidence confirms that this machine is DESIGNED TO FAIL EVERY FIVE YEARS*. The fuse is an innocent-looking metal bracket on the back of the spinning clothes basket known as a spider; its purpose is to support the basket on the drive shaft leading back to the motor. This spider, an uncoated pot-metal part made of a brittle Al+Fe alloy, is fully exposed to and tumbles its way through all the detergent, bleach, dirty laundry water, etc. After a few short years of this, it corrodes through and shatters during the spin cycle! Of course, you can’t buy just this part; you have to plunk down for the entire basket/etc. assembly at $200 a pop**. Guess who now has a nice spare stainless steel basket laying around to turn compost in, heh.
My brief description does not do this problem justice, but there is an excellent video from a former Kenmore owner detailing this spider issue and several other, likely intentional, design flaws.
So, you probably guessed what I did next – took it apart. The insides of the plastic wash tub are a bitch to get at (nondestructively); the whole thing has to be carefully unhooked from a pair of shocks and large springs, liberated from half a dozen hard-to-reach hoses and tubes with fiddly retaining clips, and the glued-on rubber seal cut away from the front of the machine. There are also cinderblock weights (yes, really!) on the tub which ought to be removed unless Hulk Hogan is helping you lift it out. On mine, the bearing surfaces were also so rusted, it took beating the living hell out of the shaft with a big hammer to separate the assembly from the tub.
Here is what I found inside:
One rotted, broken-ass spider. Surprised? Also note all the "used to be spider" white crud packed in beneath the bearing.
One rusted-out shaft for a rotted, broken ass-spider.
One reaction vessel washtub for a rotted, broken-ass spider. Yuck, my clothes were in there? The white crap looking like crushed concrete at the bottom is corroded bits of spider that haven’t yet ground away at the pump impeller while making their way to the city’s sewer. You can also see where the grease has begun leaking out from the cheap rubber lip seal that’s supposed to be keeping water out of the bearings.
One rusted-out hole for a rusted-out driveshaft to grind slide into. "That’s not my mating surface, baby!"
All this because Sears/Kenmore*** could have easily solved this with $1 worth of engine paint (etc.) to coat this fiddly metal bracket, but chose not to. Also, like in the video above, my outer tub has a nice deep gouge line where the screws in the wildly-flailing basket tore it up. Luckily we were home when it went, and our catlike reflexes caught it before they could carve all the way through.
** and if you want to save the hassle of retaining clips patwanging across your basement and the Hulk sneaking looks up your skirt, and have the new part installed by an authorized repairman… there’s a reason they have those commercials with the repairman playing Solitaire all day because no support calls come in… it really is cheaper to buy a new machine. ($75 diagnostic visit + $450-$700 repair quotes vs. $500-600 for current units.)
***technically, Sears/Kenmore just buy the appliances from other OEMs and put their names on them. This particular model (417.42142100) is made by Electrolux; others are rebadged Frigidaire or Whirlpool units. Unfortunately, all seem to share a similar design, right down to the fail timer.