Author Archives: bob

Why Kickstarter Products Fail

Posted by bob in Hackaday - (Comments Off on Why Kickstarter Products Fail)

It seems every week we report on Kickstarter campaigns that fail in extraordinary fashion. And yet there are templates for their failure; stories that are told and retold. These stereotypical faceplants can be avoided. And they are of course not limited to Kickstarter, but apply to all Crowd Funding platforms. Let me list the many failure modes of crowdfunding a product. Learn from these tropes and maybe we can break out of this cycle of despair.

Read the full article at Hackaday: Why Kickstarter Products Fail

Tools of the Trade – Component Placing

Posted by bob in Hackaday - (Comments Off on Tools of the Trade – Component Placing)

Recently we started a series on the components used to assemble a circuit board. The first issue was on dispensing solder paste. Moving down the assembly line, with the paste already on the board, the next step is getting the components onto the PCB. We’re just going to address SMT components in this issue, because the through hole assembly doesn’t take place until after the SMT components have gone through the process to affix them to the board.

Read the full article at Hackaday: Tools of the Trade – Component Placing

Which Wireless Tech is Right for You?

Posted by bob in Hackaday - (Comments Off on Which Wireless Tech is Right for You?)

It seems these days all the electronics projects are wireless in some form. Whether you choose WiFi, Bluetooth Classic, Bluetooth Low Energy, ZigBee, Z-Wave, Thread, NFC, RFID, Cell, IR, or even semaphore or carrier pigeon depends a lot on the constraints of your project. There are a lot of variables to consider, so here is a guide to help you navigate the choices and come to a conclusion about which to use in your project.

We can really quickly reduce options down to the appropriate tech with just a few questions.

Read the full article at Hackaday: Which Wireless Tech is Right for You?

Searching For USB Power Supplies That Won’t Explode

Posted by bob in Hackaday - (Comments Off on Searching For USB Power Supplies That Won’t Explode)

USB power supplies are super cheap and omnipresent. They are the Tribble of my household. But they’re not all created equal, and some of them may even be dangerous. I had to source USB power supplies for a product, and it wasn’t easy. But the upside is that I got to tear them all apart and check out their designs.

Read the full article at Hackaday: Searching For USB Power Supplies That Won’t Explode

How to Know When an Accelerator is Not Right For Your Startup

Posted by bob in Hackaday - (Comments Off on How to Know When an Accelerator is Not Right For Your Startup)

A few weeks ago we ran an article on the benefits of accelerator programs. While I agreed with almost everything in it, the article still bothered me, and I wanted to start a discussion about when an accelerator is not appropriate. So many startups are regularly asked “have you thought about Kickstarter? Shark Tank? Are you raising money? YCombinator?” These questions are constantly ingrained into people’s brains and they come to think those are the only options.

The reality is that there are lots of ways to build a company, and Kickstarter, Shark Tank, angel investors, and accelerators are all new within the last few years, and they aren’t right for many people. So let’s look at when an accelerator is right for you.

Read the full article at Hackaday: How to Know When an Accelerator is Not Right For Your Startup

 

Tools of the Trade – Solder Paste Dispensing

Posted by bob in Hackaday - (Comments Off on Tools of the Trade – Solder Paste Dispensing)

The general process of circuit board assembly goes like this: You order your PCBs. You also order your components. For surface mount components, you apply solder paste to the pads, put the components on top, and then heat the board up so the solder paste flows and makes a bond. Then for through hole components you put the leads through the holes, and solder them with an iron or a solder wave or dip. Then you do an inspection for defects, program any microcontrollers, and finally test the completed board to make sure everything runs.

The tricky part is in volumes. If you’re only doing a few boards, it’s usually easiest to assemble them by hand. In the thousands you usually outsource. But new tools, and cheap hacked tools, have made it easier to automate small batches, and scale up into the thousands before outsourcing assembly.

In this new series which we’re calling Tools of the Trade we’ll be covering a variety of tools used for building products, and we’re starting with circuit board assembly. Let’s investigate our tools of the trade: solder paste dispensing.

Read the full article at Hackaday: Tools of the Trade – Solder Paste Dispensing

I am a writer for Hackaday.com!

Posted by bob in Hackaday - (Comments Off on I am a writer for Hackaday.com!)

I’m now a writer for the popular web site Hackaday.com. I’ll be writing regular pieces about startups and technology and being a badass engineer and hacking stuff together. I’ll be posting links to my articles here as well. I won’t post all my articles here, just the ones that are all me, called Original Content. The other kind of stories we do at Hackaday are called Dailies, and those are articles writing up things that other people do. Here I want to link to the things I do.

PCB Design Guidelines to Minimize RF Transmissions

Posted by bob in Hackaday - (Comments Off on PCB Design Guidelines to Minimize RF Transmissions)

There are certain design guidelines for PCBs that don’t make a lot of sense, and practices that seem excessive and unnecessary. Often these are motivated by the black magic that is RF transmission. This is either an unfortunate and unintended consequence of electronic circuits, or a magical and useful feature of them, and a lot of design time goes into reducing or removing these effects or tuning them.

You’re wondering how important this is for your projects and whether you should worry about unintentional radiated emissions. On the Baddeley scale of importance:

  • Pffffft – You’re building a one-off project that uses battery power and a single microcontroller with a few GPIO. Basically all your Arduino projects and around-the-house fun.
  • Meh – You’re building a one-off that plugs into a wall or has an intentional radio on board — a run-of-the-mill IoT thingamajig. Or you’re selling a product that is battery powered but doesn’t intentionally transmit anything.
  • Yeeeaaaaahhhhhhh – You’re selling a product that is wall powered.
  • YES – You’re selling a product that is an intentional transmitter, or has a lot of fast signals, or is manufactured in large volumes.
  • SMH – You’re the manufacturer of a neon sign that is taking out all wireless signals within a few blocks.

Read the full article at Hackaday: PCB Design Guidelines to Minimize RF Transmissions

Creating an Automated Optical Inspector for $50

Posted by bob in Uncategorized - (Comments Off on Creating an Automated Optical Inspector for $50)

In the world of electronics assembly, parts are really small, quantities are really large, and equipment is really expensive. The process of putting all the components onto circuit boards thousands of times per hour with really high accuracy is challenging, but tools are getting easier and cheaper every day.

At my job (Quietyme), we’re doing our own circuit board assembly. We had to purchase some equipment, like a pick and place, which for $5000 automates the process of taking the small components off of reels and putting the components on the circuit board. We also have a stencil screenprinter and a reflow oven (toaster oven). Total investment so far has been under $6000.

The most recent tool to add to our arsenal is an Automated Optical Inspector. The purpose of the AOI is to examine the circuit board to find defects in the assembly process. Sometimes a component doesn’t solder on correctly, or there is a bridge where there shouldn’t be. These need to be found and fixed before they are programmed and used. We had been doing it manually with just visual inspection, but that was tedious and not very accurate, especially after the 100th board.

I had been reading into OpenCV and decided I’d give it a shot. The idea was to take a regular webcam, point it at the circuit board, do some image analysis to figure out if there were parts that didn’t match a “good” board, and highlight those so that a full inspection by a human wouldn’t be necessary. After a little bit of playing, I realized it could work. I designed a holder and laser cut it out of acrylic, then glued it together. It was pretty slick. With the threaded rod I could raise the camera up until the PCB occupied the entire field of view, so no pixels were wasted. I wanted consistent even bright light, so I added a bunch of white LED strips. I immediately noticed a problem with hot spots, so I added a layer of acrylic with a diffuser (a piece of paper glued to it).  Finally, I glued the bottom of the enclosure to the base. The PCB was designed for the enclosure, so it was a perfect holder that would consistently keep it in the same place.

aoi

The camera is a 720p Microsoft LifeCam that I had laying around. In the next version I’ll upgrade to a better camera. The LED strips are just 12V white LEDs.

Now the software. I used the OpenCV CV2 python library, and ran it both on my main dev computer (Linux Mint), and my test laptop (Win XP (shut up)). The older computer was definitely slower, and setting up OpenCV in windows is a pain, but I made it work.

The first step is to get the video stream from the camera and display it. Fairly simple. Then I experimented with diffing against a known good board. The idea was that by subtracting the video from a good image, only the differences would be visible. This is good in theory, but it didn’t work at all in practice:

diff

This is way too busy to think about and try to analyze to find poorly placed components. It wasn’t going to work.

The next idea was to mask out anything we didn’t care about. There are unpopulated components on this board, and we don’t care about the silkscreen or the outside edges. There’s no point showing them to the user. So I created a black and white mask:

mask

 

This mask is displayed over the top of the video stream, so that the operator only has to look at the unmasked parts to evaluate the board. Like so (note that this is an intentionally sabotaged PCB which has bridges, tombstones, and misaligned components that I put in to test the pattern matching):

output2

Great! Now the work is already a lot simpler. From here I wrote a quick routine that would zoom in on the Zigbee chip to digitally and show a 4x zoomed chip to look for bridges. So no pattern matching yet and we’ve already significantly improved the inspection process and reduced eye strain.

The next step was adding in the pattern matching. The idea is to use the OpenCV template matching feature to identify components that are correctly soldered and use those as a template, then when the video stream sees those templates matched it’ll draw a black box over the component indicating that it doesn’t need to be examined. So the above image after pattern matching should look like this:

output3

Bam! Now we’ve gone from having to inspect a full board to just having to check over a few components! In reality it ends up not matching perfectly so we usually see a few extra components that are just fine, but it’s better than having the threshold too low and accidentally blocking out bad joints.

So how does the setup process work? By drawing boxes! In the python application, just drag a box around the component you want to use as a good template, and it will create an image and store it and use it as a template from then on. I started by first looking over the entire video stream for each template, with the idea that a capacitor in one place might look like a capacitor somewhere else. This was a dumb idea and slowed down the system to unusable. Then I got the idea to save the image coordinates as the filename, and only look within a certain bit of slop within that area for that template. That got me back up to near real time processing of the feed. It also allowed me to have multiple good templates for a single component to bump up the likelihood of matching without sacrificing the threshold of matching.  So it ends up working pretty well. Here are some examples of component templates:

template_example

 

So to summarize, I’ve put a few hours of time (<20), a webcam, and some hardware into this, and I’ve got a functional AOI to add to our assembly line. It’s really only useful for small circuit boards, and a single camera that doesn’t move definitely has limitations, but it’s really a testament to the awesomeness of OpenCV for making this so easy.

It should be noted that a cheap AOI can be had for $20k, and the ones used in some factories sell for over $100k. Mine is by no means competitive with theirs, and couldn’t find nearly as many types of faults on as large a board. They move the camera around and look at solder quality using colored lights and blah blah blah. But for the price of a webcam, some acrylic, an LED strip, and a few hours of time, this is a pretty big step.

Want the code? Here ya go: AOI Python code

Side project – Mallards Fast Pitch

Posted by bob in Building | Personal Projects - (Comments Off on Side project – Mallards Fast Pitch)

My hackerspace Sector67 was approached this winter with a problem; the local minor league baseball stadium (Madison Mallards) fast pitch sign was old and no longer working, and they wanted some help fixing it up. In exchange for our expertise, they promised significant advertising and publicity, and they would have us be special guests at a ‘maker’ day during the season.

For the impatient, here’s the finished product:

final_close

We took them up on the offer and had a field trip to the stadium to see what was already there. There are two main parts to this project. First, there’s the sign itself. Second, there’s the press box, where the radar gun and the sign controller sit. The previous method was to have the person running the scoreboard watch the radar gun and type the speed onto a controller. There was no accounting for the angle of the radar gun, and it required a person to act as the middle man. They wanted to automate this part of the process. With the sign, they wanted it to work again. After seeing their existing setup, it didn’t take long for us to decide they needed an upgrade and we would start from scratch.

The sign in right field. Doesn't look very big from this shot, but it's legible from the far side of the stands.

The sign in right field. Doesn’t look very big from this shot, but it’s legible from the far side of the stands.

Up close you can see it's a bunch of incandescent bulbs. They're not even covered! I wouldn't want to run into that sign while catching a ball.

Up close you can see it’s a bunch of incandescent bulbs. They’re not even covered! I wouldn’t want to run into that sign while catching a ball.

The electronics controlling the sign. This is basic and ancient stuff here.

The electronics controlling the sign. This is basic and ancient stuff here.

Up in the press box, this is what controls the sign.

Up in the press box, this is what controls the sign.

This is the radar gun. They have to charge up the battery (the handle) before every game. This is a pain.

This is the radar gun. They have to charge up the battery (the handle) before every game. This is a pain.

The stadium let us borrow the radar gun, the only part of the process we intended to keep. Reverse engineering it wasn’t too bad. We were able to find a manual and figure out that the three pins coming out into the handle were two for the battery and one for a serial signal. Once we connected to this signal, it was trivial to decipher it (9600 baud ASCII text). We designed a 3D printed part that would take the place of the handle and supply power to the radar gun as well as grab the serial signal.

3d_printed

Yes, those are nails. They worked perfect.

After that was the box to replace the controller. This box would read in the serial signal, compensate for the angle, and send out a signal to the sign. At first we played with XBee for a wireless transfer. This ended up being so unreliable and so difficult to get set up that we decided to give up. Besides, long term support is important for this kind of a project, and something wireless is a lot more difficult to diagnose and debug than wired. So we went with RS485, which is perfect for long distances, and there was already a pre-existing cable from the previous sign. I threw in a screen and some buttons for good measure (to let the user adjust the angle), and a switch to turn it all on, and we were good to go. Now the only thing a user has to do is flip the switch to turn it on, then push the power button on the radar gun, and it works.

The view from the press box. The radar gun captures every pitch, the controller box is mounted on the wall, and the previous controller is wrapped up on the desk.

The view from the press box. The radar gun captures every pitch, the controller box is mounted on the wall, and the previous controller is wrapped up on the desk.

The controller box. There's a screen, buttons, and power switch. The cables are for power in, power/serial to the radar gun, and RS485 out to the sign.

The controller box. There’s a screen, buttons, and power switch. The cables are for power in, power/serial to the radar gun, and RS485 out to the sign.

Inside the controller. An arduino with LCD/button shield, a RS485 breakout, and wires.

Inside the controller. An arduino with LCD/button shield, a RS485 breakout, and wires.

Next was coming up with a sign. We’ve used the P10 red LED modules before on the bar bike, so we had some experience. For this one we purchased the outdoor waterproof ones. We also got power supplies and a controller card. There is some code on the web for controlling these guys directly, but it’s a lot of work and I didn’t have the time or inclination to figure it out. So we went with the controller card. I should note that the prices for these parts is ridiculously cheap. The LED modules are $6.50, the power supplies are $8, and the controller card was $50. So we had all the major components for the sign for just a few hundred dollars, and that’s because we ordered extras of everything in case of failures. We designed and cut an enclosure and attached the modules to the frame, then wired everything up. The wiring is simple; power up each column, data across each row. Two power supplies power two columns each.

Behind the sign. Two power supplies, one laptop, a controller card and hub, and a laptop. The sign is 6 rows and 4 columns, giving us a resolution of 128x96

Behind the sign. Two power supplies, one laptop, a controller card and hub, and a laptop. The sign is 6 rows and 4 columns, giving us a resolution of 128×96

Getting the controller card working was tricky, though. There is no documentation on the protocol, so I tried sniffing the packets being sent to it, but couldn’t make sense of them. There was no API, and after repeatedly pressing the Chinese company for resources, they sent some sample code and a dll, but it would only work on windows. We were trying to avoid Windows and go with a cheap (and low power) linux PC or Raspberry Pi, but in the interest of time, we ended up bailing on that and just getting a very old and cheap Windows XP laptop. Fortunately, it had a serial port, so we could hook a RS485 to RS232 converter to it and we were able to communicate quickly with the press box.

The controller card comes with some windows software for setting up the sign and displaying content, but it was difficult to get it to show real time data. What we ended up doing was writing a python script which would monitor the serial port and upon receiving a speed would write that speed to a file. One of the options in the other software for controlling the sign (called LEDSHOWT9), was to display the contents of a file, and update every N seconds. So we picked that option. Now every few seconds LEDSHOWT9 will look at the file, and take the contents (either the speed or a blank), and show that on the sign. Tada! It’s a hack, but it works. If inclined, maybe I’ll write up something better and do animations or something. But probably not.

Here’s the final product.

Clearly visible during the day from the stands. Pretty font, works automatically. Complete success.

Clearly visible during the day from the stands. Pretty font, works automatically. Complete success.