What are we doing?
We’re making a CuPID control unit. A networked monitor, controller, and otherwise omnipotent member of our new IoT. You can read a blog post about it here or here, check out the details here, and some of the software and other hardware.
Here’s what we need to make our CuPID, numbered in the picture as below. Not pictured are power supply filter capacitor(s), which are typically installed as here.
- CuPID control board PCB
- Shielded RJ45 jack (3)
- DS2483 i2C 1Wire chip
- Surface mount fuse and fuse holder
- Through-hole PCB Mount Female USB A (2)
- SMT USB Micro
- 2-pin 3.5mm pitch male/female pair (2)
- Extrashort male USB A connector (2)
- Extra-extralong Raspberry Pi 2×13 stacking header
- WiFi dongle
- Short SD Card holder
- For SPI indicator board option : box header
Let’s put this guy together. First, we put on the surface mount components and do a short reflow. The DS2483 and USB micro ports are pretty small.
We could probably get away with doing them by hand, but we put on some paste and let another Pi run a reflow on them, as we did previously. These SMD USB micros are a pain to get right, but fortunately we didn’t connect the data lines on the board, so you can add on plenty of paste and not worry about having to go one-to-one, as long as we get our high and low power terminals. Before placing them, you’ll want to flip them over and take a quick blade to the short plastic posts on the underside. When we make a board again, we’ll create recesses for these. On the other hand, we may go with USB mini since we can get a through-hole version and it’s a bit more robust. Although USB micro is the ‘standard of the future’ on the roadmap, USB mini is just as easy to find and is rated for more connections.
Next, place the DS2483 on the board, taking care to orient the chip as shown in the figure, using the plus to indicate the proper direction. After placing, we run a short reflow and go.
We test afterward with our voltmeter to make sure we got it right.
Next, we put on the surface-mount replaceable fuse. We’ve found these get a bit melty if we’re not super-careful on the reflow profile, so we do them by hand. It’s pretty easy with the large pads as long as we tin both sides.
Next we put in all of our through-hole components. I prefer to mount all of them and do some marathon soldering rather than doing them one by one. The shield/mount posts on the USB connectors need to be flattened prior to insertion:
We place our parts and do our soldering:
Now that the board is done, it’s time to mount it to a Pi.
Marrying the Pi
Now that we’ve prepared our board, let’s get it ready for mounting on the Pi. We need to connect the USB ports and connect the header. First, we take our super-short USB connectors and solder a couple paired wires. We crimp female pins and mount into connectors:
Now we mount our superlong header. This is similar to the ones that Adafruit sell … except it’s much longer. In addition to allowing us to mount a board on top of the Pi, it extends far enough to allow us to attach a ribbon connector on top of that! This is great for anything you want to put on top, like a touch-screen. You can see how much bigger it is here:
Before we mount it, we throw a couple pieces of thick double-sided tape to the ethernet and to the audio jack to give the board a bit of stick and cushion. We mount the CuPID board, solder our headers, and plug in our USB connectors:
Put it in a box
Now that we’ve got the business end of our CuPID complete, let’s put it in a box to protect it. We really like the line of WC cases from Polycase. They’re water-tight (until we put holes in them), durable, and reasonably priced. They have flanges, panel mounts, and optional back panels. They’re fairly easy to mill, and when your design is complete you can have them CNC machine and label them for you, at pretty decent prices even at rather small quantities. Once we absolutely nail down our openings, we’ll definitely go this route. For the moment, we mill them by hand. For prototyping, we CAD up our openings as best we can estimate them, print them in real size, and compare them with the boards, components, and previously iterated enclosures. When we find one we like, we tape it to the enclosure, run a razor blade over the lines to score the plastic, remove the stencil, and then mill out the openings. We take a first pass with a 1/4″ or 3/8″ bit to remove material, and then go back with something small like a 1/32″ mill to reduce the radius on the corners. We sometimes go back with a file to sharpen them up.
After the cutouts are complete, we install standoffs on both the bottom of the board and also on the bottom of the enclosure. On the bottom of the board, we use male/female 2.5mm threaded 6mm long standoffs, which keep the board at a consistent height and solid footing. These are not in the parts list above, as we recently added them. Their installation with a couple nylon nuts are shown below.
To keep the boards in position, in particular to reinforce it against pushes on the inputs when cables and/or power is connected, we put some 2.5mm thread, 8mm length standoffs in the bottom of the enclosure. From the backside, we insert a couple brass 2.5mm screws. We countersink them to keep the bottom flush, and if needed, thin layer of silicone will keep this waterproof.
Once we clean out the enclosure, insert our SD Card in our low-profile connector, and plug in our WiFi, we slip it into the cutouts. Almost done.
Let it be seen!
At this point, we have a couple options for indicators. We can go with an indicator board we made specifically to fit in this enclosure, as we reflowed and demonstrated previously. It mounts to the internal panel mounts with standoffs and connects with an 6-conductor IDC and box connector, and has 4RGBs and 4 single-color (R,G,B,Y) LEDs. Best of all, it uses only one SPI port, employing a couple shift registers.
Alternatively, we can throw a nice little touchscreen on top. We’re working on that write-up currently, but the result is here: