Saturday, September 20, 2014

Manufacturing the FSR Endstop Controller

In previous posts, I talked about creating a circuit board that makes it easy to use FSRs (Force Sensitive Resistors) with delta 3D printers:

This project started when I wanted to learn how to create circuit boards, and I thought it would be nice to have FSRs on my delta printer. When I posted my progress on one of the forums, other forum members started to ask if they could buy one.

I was a little daunted by the prospect of building 50 circuit boards (which later became 100). Fortunately, I have a friend, Dave, who needed some money, and he was more than happy to assemble the circuit boards. I suggested that instead of paying him by the hour, I would let him have the profit. That worked out really well for both of us. But after programming and shipping out 100 boards, I was happy to be done.

(On a side not, I just realized I need to get a photo of the two of us so I can add it to this post. I’ll try to do that soon. We’re both model railroaders, and we work on a friend’s model railroad. His next get-together is October 4, so I’ll try to get a photograph then.)

Some people asked how they could get boards after the run of 100, and someone suggested that I contact one of the companies selling 3D printer products. I contacted Tridprinting.com for several reasons. First, I’d met the owner, Daniel, at a mini Maker Faire in Seattle, and he’s a nice guy. Second, I’ve always had a very good experience ordering supplies from him. And finally, he’s local, so I could meet with him in person and deliver boards in person. He said yes, he would definitely like to sell my circuit board. Cool! But then he told he how many. I was thing a small number and trying to figure out how to keep the price down.

We had sold the first 100 circuit boards direct for $10 each, so there was room for profit after the cost of supplies. I had been ordering these in batches of 50, so didn’t have the best discount. Ordering in larger batches reduces the cost of the parts. As it turned out, however, this was a small part of the total cost, especially for domestic manufacturing.

I contacted several companies here in the Northwest US to get quotes. The quotes were for the blank PCB, the parts, and assembly. Their quotes did not include flashing the program, testing, soldering on header pins, or packing into anti-static bags. I figured my friend Dave could help me with those tasks, until I saw the quotes. I was surprised (or perhaps shocked) at how much they charged for the PCBs as well as for assembly. They also had a pretty hefty setup fee for the circuit boards, and another setup fee for programming the pick-and-place machine. Since this board only has 15 parts on it, I didn’t expect the pick-and-place cost to be as high as it turned out to be. We would have to increase the price quite a bit if we went with domestic manufacturing, at least with the supplies I contacted.

Production in China

I’d been reading good things about Seeed Studio in China for open source hardware, so I contacted them for a quote. I first contacted them at the end of June, and they sent me a spreadsheet to fill out. They had some questions, and got back to me the next day with a quote. And their quote was way below (less than half) the quotes I got here in the US. And their quote include flashing, testing, and packing into anti-static bags. Wow, no wondering people have their products made in China. I wish I had a better option locally, but at the moment I don’t.

I sent Seeed an engineering sample of a built-up circuit board and a blank PCB to help ensure I got what I wanted. For some reason that I don’t remember, it took me until the end of July to send them payment. They required full payment up front, so I was sticking my neck out a little here. During the same time, I worked on a test plan. This was a simple one-page document that I sent them. I described what the circuit board does (what all the pins do), and described how to test the board. And that’s it.

I got an email from them on September 1 saying that they had finished production, and would be sending out the boards. It took about 10 days to get here to the US and through customs. It was held up in customs for a few days, and then arrived here. Yay! Here’s what I got:

OLYMPUS DIGITAL CAMERA

OLYMPUS DIGITAL CAMERA

Nice, very nice. I’m very happy with the results. They built these quickly, packaged them very nicely, they look great, and they work perfectly. What more could you ask.

Seeed’s Programming and Testing

I was curious about how Seeed went about programming and testing this board, so I asked them if they could provide me more information and photos. They sent me their test plan document, which was in Chinese, so I don’t know what it says. But it did include some photos. First, this is how they programmed the boards. The ISP programmer is connected at the top-right:

Seeed Programming

Here is a photo that shows the setup they used for testing, which makes use of a couple of Seeed’s circuit boards:

image

The bottom board is a Seeeduino, which is an Arduino clone, and the FSR circuit board is plugged into the I2C connector in order to receive power. I don’t know what the top-right board is called. However, they made a custom cable, shown below, that allows them to connect the LED to the endstop output of the board. This allows them to test all three FSR inputs to ensure that the light turns on or off when the FSR inputs are shorted.

image

So they did a nice job with the testing as well. Their solution was very simple, but effective. I don’t think they actually used the Arduino clone for anything other than power, though.

Wednesday, July 16, 2014

Updating the FSR Endstop Controller Firmware

The FSR Endstop Controller board is built so you can flash new firmware onto the board, and I’m providing pre-built hex files on Github, which you can find here: https://github.com/JohnSL/FSR_Endstop/tree/master/Hex%20Files

In this post I’ll describe how to download one of those hex files to your FSR board.

What you’ll need

Before you get started, you’ll need the following:

  • USB programmer. You can find more information about programmers on AVR Tutorial: Choosing a Programmer. I’m using a Pocket AVR Programmer. Both Sparkfun and Adafruit both have other programmers. In any event, you’ll need one that has a cable with a 6-pin connector
  • Arduino. I installed Arduino 1.0.5-r2. Even though you won’t be using this directly, you’ll be using the avrdude program included with the installation
  • Six-Pin Header

Adding the programming header

Solder in either a 2 by 3 pin header, or two rows of 3 pins as shown below. You’ll be connecting the programmer to these pins, and the board will also receive power from the programmer.

P5021907 Cropped_400

Connect the programmer

Plug your programmer into your computer, and then connect the cable between the programmer and the FSR board as shown. Note the direction of the cable coming away from the FSR board

WP_20140504_10_14_37_Pro_600_2

Also notice that the green power-on LED is on once the programmer is attached, as the FSR board receives power from the programmer.

Running avrdude

The final step is to send the new firmware to the board. The instructions below are for Windows. You can find more information about using avrdude here: Starting out with avrdude. First, locate where you have Arduino installed.  The avrdude program will be in a folder under that location: hardware\tools\avr\bin\avrdude.exe. Copy this full location.

Open a command prompt and navigate to the location where you’ve downloaded one of the hex files. Then run this command (all on one line):

C:\Users\John\Downloads\Arduino\arduino-1.0.5-r2\hardware\tools\avr\bin\avrdude.exe -p t861 -c usbtiny -U flash:w:"FSR_Detector 1.3.hex"

You’ll want to substitute your actual path to avrdude for the one here, and you’ll want to use the actual name of the hex file. You should see progress information from avrdude while it’s downloading and then verifying the firmware. While the firmware is downloading, the green LED on the FSR board will be dark. It will come back on once the firmware starts running again.

Monday, July 7, 2014

Pegasus Touch First Impressions

I backed the Kickstarter campaign for the Pegasus Touch SLA printer, which I got for $2,250. At that price, and given the samples they were showing, I thought it might be a good deal. Of course, with Kickstarter, you never know. And I’ve been seeing grumbles on the forum from other people who have received their printers (or perhaps not).

I received my box a few weeks ago and finally had a chance to set it up this past weekend. The packaging was good, and there were no issues with broken parts. The box included the printer, a 1/2 liter bottle of clear resin, and the power supply. That’s it. No manual.

I downloaded the manual and software and setup the machine on my desk. My desk isn’t near an Ethernet jack, so my desktop computer is connected via Wifi. No problem, the manual indicated that I could print without a network connection, using a USB thumb drive. So I fired up the machine. A splash screen appeared, and then the screen went blank after about 10 seconds, and just stayed that way. Even after 10 minutes, it was still blank.

OK, perhaps that meant I needed to update the firmware first. But how to do it. I checked the manual again, and the manual said that “Ethernet is the preferred interface but USB PC connection (requires microUSB cable, not supplied) and WiFi (requires dongle, not supplied) are also supported.” So, I connected the USB cable, and after some fiddling to get the drivers installed properly on Windows, the machine showed up in my devices list. And now RetinaCreate (their software package for talking to the printer) told me that the printer’s firmware needed to be updated. However, I couldn’t find a way to update it.

Finally, I moved the machine to another location where I could plug it into an Ethernet wall jack. It booted, and I was able to update the firmware. It turns out the manual isn’t correct, and you need a hard-wired Ethernet connection, at least to get started. I haven’t tried it without, so I’m not sure what does and doesn’t work. However, I was able to print—yay!

First Print

I loaded a model into RetinaCreate that I’ve been working on for a while to stress test the printer. This is a small caboose in HOn3, and it’s just under 7 cm long. You can find more details in my previous blog posts:

Here is what I got after 5 hours (using 50 micron layers):

OLYMPUS DIGITAL CAMERA

You can click on the image to see a larger version. Below I’ll describe more about what I learned. But first, here is what the 3D model looks like in Solidworks:

Full Body

And finally, here is what I had in RetinaCreate:

Retina Full Body

In case you caught that I had clear resin, the picture above is after spray painting the model with light gray, which makes it a lot easier to see what the surface looks like. Also, I hand-modified some of the supports after using the automatic support generation feature.

What I learned

First, I learned that this printer has a lot of potential for creating small models. Until I printed this model, I wasn’t sure it would live up to the task. Sure, the printed part will need some sanding to smooth out the curved surfaces, but so do models from Shapeways.

I also learned a lot about working with SLA printers, which is very different from working with FFF printers. The model is printed upside down, and that meant that uncured resin got trapped in various parts where I didn’t want any resin. As an example, look at the floorboards at the end of the caboose. In the printed model, they didn’t turn out very well. A lot of resin got trapped under (or above when printing) the floorboards, so there was a lot of goopy resin still in there when I took it out of the printer. The floorboards also didn’t cure very well. That may mean I need more support, or it could be a result of the goopy resin above.

As it turns out, the orientation I used was completely wrong. I’d always wondered why SLA printers tended to print parts at strange angles. Well, now I know—it’s to allow the uncured resin to drain out of the part as it prints, so you don’t end up with partially cured goop. Using clear resin probably doesn’t help, as any trapped resin can still receive some light. I really want to get some tinted resin to see what difference that will make, because the laser doesn’t travel very far into opaque resins.

After printing this part, I discovered that RetinaCreate has a button called Find Optimal Rotation that only appears when you have the object selected. I had not noticed that. Here is what it looks like when I use that option:

Optimal Angle

That’s a very different. I’m not convinced this is the optimal angle, but I’m going to give it a try.

Saturday, July 5, 2014

Building the Manual Pick and Place Machine

In my previous post (Building the FSR Circuit Boards)  I showed how we assembly our circuit boards, using a manual pick and place machine that I designed and built. You can also find videos on that post. In this post I’ll walk through building the machine.

You can find all the 3D files here: http://www.thingiverse.com/thing:385567

Bill of Materials

  • 3/4 inch aluminum tube. I purchased a 6 foot length from Lowes for about $20 (http://www.lowes.com/pd_215691-37672-11388_0__?productId=3053575&Ntt=)
  • M3 x 12 screws (9)
  • M3 x 20 screws (4)
  • M8 x 30 bolts (12)
  • M8 x 50 bolts (3)
  • M8 nuts (10)
  • M8 washers (12)
  • 608 bearings (18)
  • LM8UU bearings (2)
  • Spring (1). I used a 2-1/8 inch long by 7/16 in diameter compression spring (with 0.032” diameter wire): http://www.acehardware.com/product/index.jsp?productId=1291844
  • 8 mm diameter aluminum tube (I purchased this from a hobby shop)
  • Luer adapter: http://www.amazon.com/gp/product/B000P7LRK0/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1
  • Tetra Wisper 20 Air Pump: http://www.amazon.com/gp/product/B000N34MK8/ref=wms_ohs_product?ie=UTF8&psc=1
  • Tubing for the vacuum pump (available at pet stores)
  • Suction Headers: http://www.amazon.com/gp/product/B00AFX1Y8O/ref=oh_details_o08_s00_i00?ie=UTF8&psc=1
  • Assembly

    You'll need to modify the Tetra air pump to convert it into a vacuum pump. There is a nice article and video on how to do this here:

    http://www.instructables.com/id/Circuit-Board-Lab-POV-Business-Card/step5/Build-an-SMD-Vacuum-Pick-and-Place-Tool/

    http://www.autofixinfo.com/YqWuuHoWaXvahY/DIY-manual-SMT-pick-and-place-tool-for-$20.html

    Modifying the pump only take a few minutes.

    Building the X/Y Assembly

    Start by printing four of the Y Post parts, and then cut two pieces of aluminum tube about 18 inches long. You can make them longer, but I wouldn't go much shorter. A length of 18 inches will give you about 11 inches of movement along the X (left/right).

    Next cut two pieces of aluminum tube about 12 inches long (or longer). Using 12 inches will allow movement of about 7 inches along Y. Print two sets of Y Carriage, Bottom Rollers, and Bottom Roller Clamp parts. Use the M8 x 30 bolts and washers to mount the 608 bearings to the Y Carriage. The washers go between the bearings and the part, and the M8 bolts are self-threading. Add the 608 bearings, washers, and bolts to the Bottom Rollers parts.

    Place each Y Carriage assembly around one X assembly and then use the Bottom Roller Clamp with some M3 x 20 screws to clamp each Y Carriage assembly to the aluminum tube of the X assembly. This picture should help:

    OLYMPUS DIGITAL CAMERA

    The bottom roller clamps don’t need to be really tight. They’re to keep the top rollers in place when you lean your hand on the carriage.

    Now insert the two Y tubes into the holes of the Y Carriage and then mount to a piece of plywood. It's best to screw down one side first, with the screws centered in the slots so you have some room for adjustment. Then attach the other side, ensuring the assembly moves smoothly from left to right.

    Building the Pen Holder

    Print the Pen Holder and LM8 Cap parts. The 8mm aluminum tube slides through two LM8UU bearings. The tube will need to slide up and down smoothly, as well as rotate. I found I needed to sand the tube down a little to get just the right fit. Do this slowly, testing the fit frequently.

    Insert the 8mm tube into the two LM8UU bearings, and then clamp them in place using the LM8 Cap part, held in place by four M3 x 12 screws. At this point you’ll still be able to remove the tube.

    OLYMPUS DIGITAL CAMERA

    Insert two M8 x 50 bolts, as shown through the three holes. Add an M8 nut to the back of each bolt and tighten. Next add one 608 bearing to each bolt, along with an M8 washer, and put it up against the square tube, as shown here:

    OLYMPUS DIGITAL CAMERA

    Add another 608 bearing to each bolt, followed by an M8 nut. Hand tighten each of the three nuts evenly, ensuring that the assembly slides smoothly without any slop.

    Building the Pen

    Print the Pen to Tube and Spring Stop parts. Add the spring, then the spring stop (which has a slot on the bottom for the spring). Use an M3 x 12 screw to clamp the spring stop in place. Apply some pipe tape to the tapered part of the Pen to Tube part and then push it into the aluminum tube. Finally, push the air hose onto the nib. When you’re finished, it should look like this:

    OLYMPUS DIGITAL CAMERA

    Print out the Lock to Tube Adapter and Pen to Tube parts. Carefully push the Luer adapter into the Lock to Tube Adapter at the larger-diameter end. It should look like this (when you also have a needle in place):

    OLYMPUS DIGITAL CAMERA

    In the photo above, I’ve also added some pipe tape to the tapered part to help create a tight air seal. You’ll want to push this into the tube after the tube is in place. When you’re done, it should look like this:

    OLYMPUS DIGITAL CAMERA

    Optional USB Microscope

    I initially installed a USB microscope in order to help with placement, but I found it to be more confusing them helpful. The problem is that it’s looking at the part from an angle, so it’s actually harder to line up parts with the microscope than with your eyes (stereo vision really helps). My friend uses a pair of Optivisors and found they work really well. I’m near-sighted, so I just take off my glasses. But if you do want to install a USB microscope, I purchased this one:

    http://www.amazon.com/gp/product/B009N8JL9Q/ref=oh_details_o00_s00_i01?ie=UTF8&psc=1

    And the parts you’ll need to mount this microscope are Camera Cap Top and Camera Cap.

    Building the FSR Circuit Boards

    My friend and I have been busy building the FSR Endstop Controller circuit boards (you can find the entire discussion on the Delta Robot 3D discussion here: https://groups.google.com/forum/#!topic/deltabot/2Nvtv4aicKk%5B1-25-false%5D).

    Most of the work involved in building these circuit boards is placing the tiny parts onto the circuit board. The smallest parts are 0603 surface mounted devices, which means they’re 0.06” by 0.03” in size. For the first few boards I built, I dumped the parts onto the table, and then used tweezers to put them in place, under a microscope. But it was very time consuming to flip over components if there were upside down or no their side. And I also had to check the polarity of the LEDs carefully.

    I did some research into pick and place machines and then ran into a manual pick and place machine: http://vpapanik.blogspot.com/2012/11/low-budget-manual-pick-place.html. I really like what he’d done, but it was mostly made out of wood, and I don’t have much in the way of word-working skills or tools. I also ran into a nice manual machine that was $199 so I checked out their web site. They were out of stock, so I sent them an email. After about a month I got an email that they were in stock again, but now the price was $399: SteadyHands PnP. By this time I’d already built my own machine for about $50.

    I decided to make a machine similar to vpapanik’s machine, but using 3D printed parts. Here are some photos of my finished machine:

    OLYMPUS DIGITAL CAMERA

    You can find information on building this manual pick and place machine here: Building the Manual Pick and Place Machine.

    OLYMPUS DIGITAL CAMERA

    OLYMPUS DIGITAL CAMERA

    The process of assembling the circuit boards begins with adding solder paste to the circuit board. I created a solder paste stencil and jig, as I described in my post Auto Adjust FSR End Stop Detector. This time I created a stencil that allowed me to add paste to four boards at a time.

    Once the solder paste is applied, the next step is to place the components onto the solder paste. This is where my manual pick and place machine enters the picture. This video shows placing a few parts with my manual pick and place machine:

    My Manual Pick and Place Machine in operation

    After placing all the parts on the circuit board, the board needs to be baked in a reflow oven to melt the solder. This video provides a short introduction to using a reflow oven I purchased off of eBay. I paid $200 for this oven, and it had a flaw—inside they use masking tape in an area that gets rather hot, and causes the masking tape to off gas, producing a terrible smell. I found instruction information and instructions about this here:  T962A SMD Reflow Oven Fix/Hack.

    Using a T-962 reflow oven to melt the solder paste and finish the boards

    In my previous blog post, I wrote about creating a programmer to upload the firmware to these boards. This video shows using this programmer:

    Programming the circuit boards

    Finally, here is a longer video showing me placing the other parts on the circuit board:

    Longer video of the pick and place machine

    Sunday, May 11, 2014

    Building a Headerless Programmer

    In my previous post, I talked about a circuit board that uses force-sensitive resistors as end stop detectors. This board has an Atmel ATTiny861 microcontroller that needs to be programmed. For the first few boards that I made, I soldered headers in place. This works just fine, but I wanted to see if I could use pogo pins that I purchased form Sparkfun to create a programmer that doesn’t require the header pins.

    For this project I needed six pogo pins, one 2x3 pin header, and some ribbon cable that I pulled apart so I could have six wires, each with a different color. I 3D printed parts to build the jig, which are shown below using “clear” PLA filament.

    First I soldered the wires to the 2x3 pin header, and then pushed it into place. Next I soldered the wires to the bottom of the pogo pins, after I’d inserted the pogo pins into the 1.6mm holes in the jig:

    OLYMPUS DIGITAL CAMERA

    I was concerned about the possibility of shorts, so I added short pieces of heat-shrink tubing to the very end. Since building this, I read somewhere that these pogo pins will fit directly into a female header—that would have been a lot easier.

    Here is what the jig looks like when finished. You can see the six pogo pins sticking out the top, and the programmer cable hooked up to the 3x2 pin header:

    OLYMPUS DIGITAL CAMERA

    Finally, this is what it looks like in use. I hold the board in place (there are two alignment pins) while I click the button the upload the program to the board.

    OLYMPUS DIGITAL CAMERA

    While this works very well, it was more work to build than I would have liked. As I mentioned, using a 3x2 pin female header would have been al lot easier, and I’ll use that approach if I build another programmer.

    Sunday, May 4, 2014

    Auto Adjust FSR End Stop Detector

    I really like using FSRs (force-sensitive resistors) for detecting when the nozzle of the 3D printer touches the print bed. They can be very sensitive, and therefore very precise. What I didn’t like was how difficult it was to get them just right. Wouldn’t it be great if you could plug them into a tiny circuit board and just have them work?

    I decided to see if I could build a circuit board that would make it really easy and reliable to use FSRs. Here are the goals I set:

    • Automatically adjust to the weight of the print bed without requiring any configuration or adjustment—they should just work
    • Have an LED for each FSR to show when that FSR “triggers”
    • Connect directly to the end stop pins on most 3D printer boards
    • Be self powered from the end stop
    • Make it open source: https://github.com/JohnSL/FSR_Endstop

    Designing the Circuit Board

    With the help of my friend Stephen, we designed a circuit board in CadSoft Eagle (that means we designed the circuit together, and then I watched and ask questions as he designed the circuit board in Eagle). It took him about an hour to design the following circuit board:

    Rev 1

    We then created a set of Gerber files and sent them off to OSH Park to have some actual PCBs made. I ordered 12 PCBs and the total charge was about $26, including shipping. That’s a really great deal. The lead time to get these was about two weeks. By the way, there’s a small design flaw in this circuit board if you want to see if you can find it (click on the image to enlarge it). I’ll describe the flaw later.

    This circuit board uses an Atmel ATTiny461 microcontroller, which is in the same family as most Arduino boards. What that meant is I could use a standard Arduino to write some firmware to test out my ideas while I waited for the circuit boards arrived. This is where being a software developer by day really helps. It didn’t take me very long to write and test some code. I only tested a single FSR because, at this point, I’d sold my 3DR “Simple” Delta printer to a person at work, and I haven’t finished designing my next delta. I have two other 3D printers, so I wasn’t really using my delta anyway.

    Soldering Parts in Place

    Two weeks later, I got the circuit boards in the mail, and they’re really nice! The next step was to learn how to solder the tiny SMD (surface mound device) components onto the board. Many of the components are what’s know as 0603s, which means they’re 0.06 inches by 0.03 inches (or 1/16 by 1/32). That’s really tiny, and smaller than I can see well without some magnification. I have a microscope that I first got to inspect the injection molds that I was milling, so I decided to use that for soldering the parts on.

    Hand soldering SMDs turned out to be a lot easier than I expected. The key to success it to use flux (I used liquid flux) and a small soldering iron tip. My tip is nothing special, being about 0.05” in diameter at the end.

    After applying the flux, I would add just a dab of solder to the very end of the tip, and then touch it briefly to the end of the part to be soldered while holding the part down with the tip of some tweezers. Here is what my hand-soldered board looked like when I was almost finished:

    OLYMPUS DIGITAL CAMERA

    On the right side, near the bottom, I have two black diodes soldered in place. These diodes form a bridge rectifier, which allows me to provide power to the entire board from the two pins below labeled +/- that come from the end stop connector on the printer board. Most printer boards have three wires: signal, 5V and ground. However there is no standard for the order of 5V and ground, so using a bridge rectifier allows using either polarity of connection, at the slight loss of some voltage. In other words, this means everything runs at about 4V instead of the input 5V, which is no problem for this microcontroller, as it can operate down to about 1.8V.

    The diodes, however, drove me crazy. Most of the SMDs have metal pads on the bottom that warp around to the ends, making them easy to solder. These diodes, on the other hand, only have metal pads on the bottom. I somehow managed to solder two in place. However there wasn’t enough clearance for me to solder the other two in place. Fortunately, the Garage at work has a hot air solder rework station, so I was able to use it, along with some solder paste, to solder the other two diodes in place. For those of you familiar with circuits, you’re probably wondering why we didn’t use a bridge rectifier chip, which would have been much easier to solder in place. The answer is that my friend Stephen had all these components on hand, so we used what he had. I’ve since changed the design to use a single chip instead of four diodes, but I haven’t ordered test boards yet.

    Programming and Testing the Circuit Board

    After I finished the first circuit board, it was time to program and test the circuit board. Programming turned out to be a little more difficult than I expected because I ran into an issue with uploading the firmware. But first, I’ll describe the setup. Stephen included a programming header in the design (at the bottom left in the photo above) so I could hook this board up to a USB programmer. I used the Pocket AVR Programmer from Sparkfun because this was my first experience programming the chip on a custom circuit board, and this programmer looked good.

    WP_20140504_10_14_37_Pro_600

    I chose to write my code using Arduino, so I needed to a way to target the ATTiny861 microcontroller. Fortunately, someone already figured out how to do this, so I used the ATTinyCore on GitHub to setup my environment so I could write code for this chip. then I could just upload the code and be done, or at least so I thought.

    I kept getting validation errors. Sometimes uploading would succeed, but only rarely. After trying lots of things, and searching the web, I downloaded WinAVR because something I read gave me the ide it might be helpful. This download include a newer copy of a program called avrdude that is used by Arduino to upload firmware. I turned out verbose reporting in Arduino, found the call to avrdude and then tried this with the newer version of avrdude—it worked perfectly every time. Copying this newer version of avrdude on top of the old version in the Arduino folder fixed the problem. Now I can successfully upload changes every single time. I have no idea why I had problems with the older version, but I found something that work. If anyone knows more, please send me a note.

    Now it was time to test on a printer, rather than at my workbench. I asked one of my fellow Garage members if I could try it on his printer. So Dave brought his printer in last Thursday and we gave it a try using my very first circuit board. And it work really well. Here is a video of my very first test:

    Very first test of the FSR Endstop Detector circuit board on a Kossel Mini

    When you watch the video, notice that the number of FSRs being triggered varies from one to three, depending on where the nozzle touches the surface. Also, you can’t see it in the video, but there is a fourth LED that is green and is on most of the time. I had originally planned to have five LEDs: three for the FSR triggers, one for the combined trigger, and one for power on. But I forgot to include the power on LED. Part way through writing the firmware, I suddenly realized I could change the output LED to be on most of the time, and turn off only when triggered. So now I don’t need that extra LED.

    Making more Boards

    After my experience trying to solder the first circuit board by hand, I decided to try another approach. In a moment of weakness, I purchased a very cheap ($200) reflow oven from eBay. This oven was less than half the cost of a good one, and after I clicked the buy button I did some research and found lots of negative reviews. Woops. In any event, it was on the way, so I decided to give it a try.

    For my first attempt, I used the syringe needle that came with the tube of solder paste to dab solder onto the pads. The syringe was a lot bigger than the pads, so I had problems getting just the right amount of solder paste to stick. Once I had all the parts placed, I put the board in the oven and set it to profile 1. After about 8 minutes, I pulled the board out and much of the solder had not melted. Hmmm, not what I expected. I then checked the solder paste I was using carefully and noticed it was lead-free solder, which melts at a higher temperature. I changed to profile 3 and tried again—this time it came out perfect.

    WP_20140427_19_33_11_600

    WP_20140427_19_33_23_Cropped

    The main problem I have with this reflow oven is the smell. From what I’ve read, they use a lot of masking tape inside, and this gets hot enough during use to off gas quite badly. I’m either going to build a hood and exhaust the fumes to the outside, or do what one blogger suggested and replace the masking tape with Kapton tape.

    Using a Solder Stencil

    I had read about using solder paste with a stencil and it sounded a lot easier than using the syringe to apply paste, so I thought I’d give it a try. Eagle already had all the for a solder stencil, and you can output this as an EPS file (Encapsulated PostScript), which is a file format that Corel Draw can easily read. I opened the file in Corel and then changed the pads so they would have a hairline black outline and no fill. Then I cut a stencil from some 5mil Mylar, and I also cut a jig for holding the circuit board in place:

    OLYMPUS DIGITAL CAMERA

    The jig is made from 1/16” thick museum board, which is basically poster board. I scored a line on the left side to show where the edge of the Mylar stencil should be attach, and I’ve taped the stencil to the museum board.

    I spread some solder paste onto the left side and then used a palette knife to scrape the paste through the holes. Here is the result:

    OLYMPUS DIGITAL CAMERA

    Or zoomed into a small part of this board:

    OLYMPUS DIGITAL CAMERA

    In this picture you can see the small “mounds” of solder paste that were applied with this method. I’m really amazed at how well this worked. It’s much easier and faster than applying paste by hand, and the results are a lot more consistent. Next, here is the same area with parts place, ready to put into the oven:

    OLYMPUS DIGITAL CAMERA

    And after about 10 minutes in the oven, everything is soldered in place:

    OLYMPUS DIGITAL CAMERA

    The Design Flaw

    Here is nearly finished circuit board:

    OLYMPUS DIGITAL CAMERA

    Isn’t that beautiful! All that’s left is to solder header in place for the three FSRs, for the end stop, and for programming. And, fix the design flaw.

    So what is the design flaw? You can see it here:

    OLYMPUS DIGITAL CAMERA

    In the very middle of this photo, there is a trace missing. LED4 and R4 are supposed to be connected, but they’re not. Fortunately, this is very easy to fix by adding a blob of solder to bridge the two devices.

    Availability and Future Plans

    I’ve made the design files and source code open source, and you can find them on Github: https://github.com/JohnSL/FSR_Endstop

    As I mentioned above, I changed the design to replace the four diodes with a single bridge rectifier chip, which makes hand-soldering much easier. I will be ordering some of these boards soon for testing. Once I’ve verified that everything works well, I’ll upload the Gerber files, which you can then use to order circuit boards directly from OSH Park or anywhere else you choose.