Category Archives: Electronics Case

Pi Zero W + Joy Bonnet Case

When I first saw the Adafruit Joy Bonnet for the Raspberry Pi Zero I know I had to get one and try it out. ūüôā I liked the idea of having a small RetroPie rig I could keep in my pocket.

Raspberry Pi Zero W + Adafruit Game Bonnet in custom case by Bill Rainford @TinWhiskerzBlog @TheRainford
Raspberry Pi Zero W + Adafruit Game Bonnet in custom case by Bill Rainford @TinWhiskerzBlog @TheRainford (note the SD card for scale)

As if I needed another reason to buy it, the back of the bonnet (aka hat or phat) says “It’s Dangerous To Go Alone! Take This.” — which harkened many fond memories of playing The Legend of Zelda.

"It's dangerous to go alone! Take this."
“It’s dangerous to go alone! Take this.”

 

Why did you design your own case instead of using something out there already? 

From poking around online, on Thingiverse.com etc. I saw a couple of ¬†cases for the Joy Bonnet but didn’t see any I really liked. I did try printing this model which looked like it might be fun, bit I can see why the two ‘makes’ only show the prints and not the assembled unit. The fit and finish, even when printed on my well tuned printer was not what I wanted. I didn’t like how the top and bottom mated leaving a gap and didn’t like how the buttons felt/moved and tried post processing them by hand to improve things. I liked it in concept but not execution.

A while back I designed and built this RedHat Shadowman Sign and I was quite happy with how that case turned out so I decided to use similar techniques to build a case for this Pi Zero W + Joy Bonnet setup.

Completed Case
Completed Case

The Build Process

The first thing was to solder the headers onto the bonnet. I took the regular headers and installed them upside down — meaning the short end of the pins is what I wanted to preserve and the long ends went through the PCB and were clipped short after soldering. This worked great and was the perfect length for use with the low profile female headers on the bonnet.

"It's dangerous to go alone! Take this."
“It’s dangerous to go alone! Take this.”

On Adafruit.com I didn’t see any spacers of the correct height for this project ( The brass standoffs for Pi Hats they had were sized for full height headers) so I decided to print my own. You should be able to use an M2.5mm or #4-40 screw to secure the standoffs to the bonnet. I used #4-40 5/16″ long screws as that is what I had on hand and it worked out great.

3D Printed Spacers in place
3D Printed Spacers in place

With the standoffs in place I was able to assemble this rig and test things out. I installed the RetroPie OS (For Pi 0/1) image onto the 16GB class 10 micro USB card via ApplePi-Baker and used the HDMI and 2.5A micro USB power supply I had on my workbench.

Assembled electronics (Pi Zero W + Joy Bonnet + Micro SD card)
Assembled electronics (Pi Zero W + Joy Bonnet + Micro SD card)

Next up I designed a case using similar design details as I’ve used in the past. (2mm thick walls, tabs that can print in place without supports and chamfered holes for the screws etc.) This was also the first time I baked my name into the model as a designer — I hope folks don’t mind that too much, plus once assembled you’ll need see that again.

3D Printed Case Bottom with screws inserted
3D Printed Case Bottom with screws inserted

ASSEMBLY TIPS: Test fit your screws ahead of time and make sure your screw heads are flush with the bottom of the case. If you had some sagging, now is the time to clean that up with an X-acto knife or similar. I used 18-8 Stanless Steel #4-40 screws that were 3/8″ long to attach the Pi Zero W to the case.

Make sure your screws are flush with the underside of the case
Make sure your screws are flush with the underside of the case

Next up was designing a lid for the case and buttons that lined up with the buttons on the Joy Bonnet. I made two or three test prints of the lid and some buttons until I got a layout and movement that felt and looked right to me.

You’ll want 6 of the 5.5mm buttons and 2 of the 3mm buttons. They print in a couple of minutes so printing all the colors below was not too arduous a task. ¬†I also included STLs for buttons of a few other sizes I tested in case it is helpful to folks with printers that are tuned differently.

Printed Buttons
Printed Buttons

I test fit each button to make sure there were no bits or sags or anything that would impede button movement. Make sure they move smoothly.

Next test fit the lid to make sure it snaps into the case properly and is not bowed. If it is bowed make sure your print was clean and file the tabs and/or clean out the pockets/mortises (where the tabs lock into) until you have a nice clean fit.

Also make sure to remove the button on the D-pad before trying to fit the case lid.

I also filed to top of each button so they have a nice smooth feel when in use.

Test fit all of your buttons ahead of time. Place them into the lid as shown and snap the case on while oriented this way.
Test fit all of your buttons ahead of time. Place them into the lid as shown and snap the case on while oriented this way.

Additional Design Notes:

The area of the lid under the D-pad button is very thin — 1mm — so that the D-pad button can slide cleanly over it. ( I don’t like the cases that leave the metal and plastic guts of the D-pad exposed)

The front wall of the case (where the USB and HDMI ports are exposed) are 0.5mm thinner than the rest of the case so that the USB and HDMI cables fit securely into the ports. The two PCBs are pressed up against the interior of this wall and help maintain case rigidity on par with the rest of the case which is a full 2mm thick.

I printed the A,B,X and Y buttons in old school Non-USA SNES colors and I am happy with the results.

Completed case ready for playing games
Completed case ready for playing games

Print Details

Printed on a Lulzbot TAZ 6 printer using ColorFabb nGen Red, Dark Blue, Light Green, Yellow and Black filament at 230 degrees C. I’ve found nGen to have minimal warping and got away with not having to print a brim. The only part that needed supports was the case bottom this way the top of the port opening was nice and clean/straight. When removing the support material be careful not to clip out the vertical support between the two USB ports as I did on one of my cases.

You can find the models for the above case on Thingiverse here.

If you make a print of this case for yourself or remix it please be sure to comment here or on Thingiverse as I’d love to see what folks do with this project.

Happy Retro Gaming!

Take care,
-Bill Rainford
@TinWhiskerzBlog

 

Advertisements

LED Bridge Lamp Power Supply

Next up in my series on building my own interpretation of Janis’ LED Bridge Lamp I wanted to share out my re-mix of his power supply cover/case.

3/4 view of completed power supply and case
3/4 view of completed power supply and case

In the original case, from the photos and models on Thingiverse it looked like Janis cut off the front of the case to attach the various plugs and switches. I also couldn’t find the exact same switch and plug so I decided to re-mix my over version.

Test print this sample to make sure it properly fits around your power supply. If it doesn't fit you can scale and re-print until you get it right.
Test print this sample to make sure it properly fits around your power supply. If it doesn’t fit you can scale and re-print until you get it right.

I started off with Janis’ solid bottom of the PSU cover. I bought the same 5V/20A power supply from AliExpress and printed the bottom. It fit great. I then imported his model into SketchUp and copied the outline/profile of his case. I extruded it 2mm and printed it as a test sample. This is useful for folks trying to scale the case up or down to get that tight friction fit — change your settings then print that test piece until you get the size you want — then use the same settings for the actual parts.

1jDEJGwmRMOCfFt+w2%ULg_thumb_194c9
Printed parts ready to go.

I extruded that test print model to be 80mm tall — this forms the majority of the cover. I also added a depth stop at 40mm and a carefully laid out two holes to receive the screws that secure the custom faceplate. This long extruded part with a stop gives me a positive depth stop and a reasonable amount of space in the enclosure to house all the wires, connections and backs of the connectors.

I also designed a separate faceplate with nice form fitting cutouts for the plugs, power inlet and switch. Print the cover face down as shown below:

Underside of Faceplate
Underside of Faceplate

The face of the above cover also has a nice recessed ‘5V’ to let potential users know what voltage we are outputting with this unit. The 110V/220V power inlet is secured with two M3 x 10mm screws and 2 nuts on each screw. The power button snaps into place with tabs. The metal barrel jacks are secured via a lock washer and nut that threads onto the barrel/body of the outlet. Make sure the PSU unit’s slide switch is set to the 110V or 220V input voltage you plan to provide.

All wires soldered in place and covered with heat shrink tubing
All wires soldered in place and covered with heat shrink tubing

All of the output port wires were 6″ long 22 gauge wire. The power inlet hot and neutral are routed through the power switch and the ground goes from the inlet to the ground on the PSU unit. I also used heat shrink tubing on each connection to protect the connections.

Attaching all the wires to the appropriate terminals
Attaching all the wires to the appropriate terminals

ÔŅľ

Route the wires through the extruded cover and attach them to the proper terminals, then slide the cover down until you hit the depth stop.

Testing the power supply. Notice plug inserted into a jack being tested with my multi-meter
Testing the power supply. Notice plug inserted into a jack being tested with my multi-meter

Now test your PSU using a multi-meter. I inserted an appropriately sized barrel top plug without its protective jacket to make it easier to attach the multi-meter probes. The output was exactly what I expected — a tiny bit above 5V. If you are under 5V you can adjust the output using a trim potentiometer on the PSU board to the right of the screw terminals. With the testing complete it was time to gently bend the wires and secure the faceplate with two M3 x 6mm machine screws.

Completed power supply with power on
Completed power supply with power on

With the PSU assembled and powered on it’s time to get back to working on the bridge lamp itself.

Side view of completed power supply case in black PLA
Side view of completed power supply case in black PLA

The Gray printed PSU cover from earlier in this post will live in my cubicle at work and power the main LED Bridge lamp I am making, but the secondary (smaller) LED bridge lamp I am making for home would look better in black PLA — as I think that will blend better with my black metal¬†MakerBench.

Completed power supply in black PLA
Completed power supply in black PLA

If you’d like to make one of these PSU covers based on my remix you can find the models on Thingiverse here.

The inlets, outlets and supplies I used can be found here:

5V / 20A power supply

Copper DC Socket Jack

Panel Mounted Inlet Socket

Red Rocker Button Switch

DC Power Barrel Tip Plugs

Metric Machine Screws

If you build your own version of this project, please leave a comment or send me a note.

Take care,
-Bill
@TheRainford
@TinWhiskerzBlog

Trinket Powered LED RedHat Sign

My day job is working as a software developer for Redhat which is the world’s largest Open-Source software company. It’s a fun place to work with a vibrant culture — kinda like a geek summer camp at times — as many of us like to decorate our cubes with various nerdy projects, toys, artwork etc. I love to design and build things — check out my long running woodworking blog here for some of my designs and work with wood. As an engineer I also love to tinker with tech.

Early in 2016 I bought a Lulzbot TAZ6 for home and have been having fun getting involved in the Open-Source 3D printing, electronics and maker world. I also setup and run a 3D printing lab at work in the office.

A few months ago I designed and 3D printed a small Redhat logo which you can find on Thingiverse here.

Since then I have embarked on a more audacious building campaign to build my own interpretation of Janis’ LED Bridge Lamp. I want my bridge lamp to span from one wall of my cube to my bookcase ¬†and incorporate some fun additions that I will reveal in upcoming posts.

On the road to this large design/print/build project I wanted to make neat mini billboard with the Redhat Shadowman logo that lights up and had some simple animations. The result of that work can be seen here:

Redhat Logo Sign Animated Rainbow Color
Redhat Logo Sign Animated Rainbow Color

I tripled the size of my original Redhat Shadowman logo in the x and y dimensions and printed the background in clear Colorfabb nGen filament. The letters, fedora and case are in black and red nGen filament. Every 2.01mm of z-axis height I would pause the print, swap, purge and resume the print which resulted in a nice 3 color print for the logo.

Remove supports so you can add the trinket
Remove supports so you can add the trinket

I designed the case so that it can be printed without any supports. Use a pair of nippers to remove the small bit of supports I added to the model (see photo above) which will allow you to easily access the USB port on the Adafruit Trinket which controls the LED strip.

The 3 color sign has 4 holes that snap nicely onto posts located on the inside of the bezel of the case. I don’t know why so many designers make the holes and posts the exact same size — it makes for unnecessary fussing with the print. I made my posts a few tenths of a millimeter narrower so I could snap on the logo without any fussing.

Back of case with negative image of Redhat logo
Back of case with negative image of Redhat logo

The back of the case also has a nice negative image of the Redhat Shadowman logo. The back also snaps nicely into the front section for clean lines and no need for additional hardware. nGen has enough flex in it that you can bend the case if you need to open it again in the future.

The circuit design is quite simple/straightforward:

Redhat Logo Sign -- Circuit Diagram -- Adafruit Trinket 5V + NeoPixels
Redhat Logo Sign — Circuit Diagram — Adafruit Trinket 5V + NeoPixels

Basically you are driving 10 NeoPixel RGB leds via an Adafruit Trinket 5V tiny arduino. I included the JST connection below in case I ever want to re-purpose bits from this project and because these LEDs were from the start of a new roll, so I figured I might as well use the cabling it came with in this case.

Completed circuit
Completed circuit

I used some 3M double sided tape to keep the wires secured and some M3 x 6mm screws to keep the Trinket mounted to the back of the case. The LED strip comes with some adhesive tape on the back to keep the strip in place. I find that tape on the strip to be a little fussy so make sure you clean/alcohol the inside of the case and firmly press/rub the strip to make sure it is well adhered.

Redhat Logo Sign in white
Redhat Logo Sign in white

The animations for this little prototype sign are pretty straight forward. The system comes up, does a wipe to make the sign glow white. After ~30 seconds it wipes to dark and then cuts over to 30 seconds of a pleasing rainbow animation. Then the loop repeats over and over again.

You can find the source code for this project on my GitHub account here. The animations could be easily augmented. You can create your own or re-use some of the animations from my earlier Adafruit Feather BLE + NeoPixel ring lamp.

Note that he regulator on a Trinket is only 500 milliamps so I make sure to limit the maximum brightness of the LED strip to make sure I don’t overload the system when the background is set to white.

If you’d like to download the STL models for the ¬†Redhat Logo sign and case you can find them on Thingiverse here. If you build your own version of this project, I’d love to hear about it via a comment or contact page note.

Take care,
-Bill Rainford
@TinWhiskerzBlog
@TheRainford

Adabot Solder Dispenser

I had a bunch of solder floating around on my bench and figured I’d print out a solder dispenser and lo and behold I came across a new model for an Adabot Solder Dispenser and finally had a reason to print out my own little Adabot. Adabot is the main character in Adafruit’s Circuit Playground series of videos that teach kids and the young at heart about the basics of electronics through a mix of animation and cute muppet style puppetry.

Adabot Solder Dispenser
Adabot Solder Dispenser

I always wonder what the ‘official’ color of Adabot is supposed to be as in some Adafruit material it looks like he’s teal. In others, like the puppet, it looks like he’s a light blue. If anyone has the official answer, let me know. I printed mine from light blue n-Gen filament and in the featured image at the top of the page it looks blue, when washed out with a little more light it looks more teal (like the image immediately above) so I am going to call that a win.

Printing in light blue n-gen filament
Printing in light blue n-gen filament

After printing out all the parts I painted the antenna/ears and ring around the eyes with testers blue acrylic and the pupils with testers black acrylic paint. Assembly was straight forward with the eyes and mouth glued in place with CA glue and the ears glued to the ear connector pins. I inserted the pin and then glued the ear to the connector pins/studs.

In assembling this project I did run into a problem with the ear connectors (seen below)

Broken ear connectors (blue) and one that is 20% longer in the Z direction (white)
Broken ear connectors (blue) and one that is 20% longer in the Z direction (white)

I tried printing them at 20% fill and 85% fill and both times the pins cracked off when trying to insert them per the video instructions. I just don’t think there is enough clearance in there or enough give in the pins to make it work. The holes would need to have a relief chamfer in there to work. I thought about filing down the tabs on the pins, but figured that would make them even more likely to snap off. Since I already had the head printed I decided to instead extrude another set of ear connector pins that were 20% longer in the Z axis. (I first tried 25% but they were too long) . I also gently filed the ear holes on the head with a mill file ¬†(only a pass or two) to make sure they were nice and flat so the ears would line up perfectly with the head. Once glued to the connectors the ears have the right amount of tension on them and can be rotated if you like.

Solder dispenser loaded up
Solder dispenser loaded up

The only drawback to my fix for the ears is that the connectors are now in the box cavity rather than wedged inside the holes for the ear connectors. So if I were to do this again I’d make sure the space in the pins was horizontal as in the pin on the right in the photo above as the way I have it the pin on the left puts a little pressure on the bottom reel of solder. But I can just use two of the green reels and be fine.

Adabot Solder Dispenser
Adabot Solder Dispenser

It was a fun little project and a nice addition to my bench. I think I am going to velcro it to my shelf so when I pull on the solder the friction doesn’t have me dragging the head all over the desk. If you’d like to build your old Adabot Solder Dispenser you can find the plans for here here on the Adafruit learning system.

-Bill Rainford
@TheRainford
@TinWhiskerzBlog

 

 

Adafruit Feather BLE + NeoPixel Lamp

Like any red blooded engineer I like nice designs, shiny objects and blinking lights. One of the projects that burrowed its way into my subconscious and helped push me over the edge into buying a 3D printer earlier this year was the¬†Adafruit Feather BLE + NeoPixel lamp with 3D printed Voronoi Shade that plays some animations by the Ruiz Brothers over at Adafruit. It’s a great addition to any office desk or maker workbench. After playing with the sample code which simply played a short animation when you pressed a button in the app I decided to augment the code to continuously play animations and add a few more to the mix.

Feather BLE light paired with iOS app
Feather BLE light paired with iOS app

You can view detailed step/by step instructions on printing this lamp  here on the Adafruit Learning System.  What follows in this post is a description of what changes/modifications I made to the build and additional functionality I added into the software running on the Bluefruit Feather.

Check out this video showing what I did with the software for this project here:

Software Revision Highlights:

  • Currently selected animation will loop continuously without interruption (Original sample plays 1 animation and stops until another button is pressed)
  • Cleaned up animation library/methods, fixed some issues with Adafruit sample code and finished off some incomplete methods
  • Added additional animations to the up, down, left and right buttons in the Adafruit Bluetooth application

You can find the source code for the demo used in the video here on GitHub.

3D Print complete, not gather up the required electronics
3D Print complete, now gather up the required electronics

Notes on Building This Project: 
I printed the base out of ABS filament and the Voronoi shade from light blue translucent PLA filament. I chose not to glue the shade onto the top ring of the base as I like to be able to show off the electronics. I friction fit the clear disk into the bottom of the lampshade so it stays securely as one piece. I also omitted the battery as I only plan to run the lamp in an office setting wherein I have access to plenty of USB ports.

Solder and assemble the light
Solder and assemble the light

BIG NOTE: As this caused me some headaches and wasted time. In the Adafruit Learning System write-up for this lamp, make sure to follow the Fritzing circuit diagram here and NOT from the step by step photograph here. The photograph shows one of the blue wires going into ‘BAT’ and not the expected ‘3V’. You should be powering the NeoPixels off the 3V pin. ¬†

Flash the firmware and test the rig before final assembly of the case.
Flash the firmware and test the rig before final assembly of the case.

Once I finished all the soldering I fit the board, wires and ring into the bottom half of the base and flashed the firmware onto the device and made sure it lit up and worked as expected.

Lid screwed in place to help secure the NeoPixel ring
Lid screwed in place to help secure the NeoPixel ring

Next up I screwed on the top half of the base and started working on the animations I wanted to use and assigned them to various buttons in the Adafruit ‘Bluefruit’ application.

Running animations
Running animations

Last up was testing the completed lamp. It lights up a dark room more that I expected which is nice and is clearly visible in a well lit room. Some of the animations in the above video are far better in person as the DSLR tends to blend a lot of the mixed colors into shades of white — you’ll have to see it in person by building your own.

Red alert, incoming message
Red alert, incoming message

With the above lamp completed you can also tie it into the IfThisThenThat (IFTTT.com) ecosystem via Adafruit IO.¬†¬†IFTTT allows Internet of Things (IoT) devices to react to a surprisingly large amount of interesting stimuli — if you get a certain type of email, if your phone shows up on your home wifi network, if an IoT sensor gets a certain reading your device and react to that message and carry out your desired task — its an incredible system and will be the focus of my next post, stay tuned.

-Bill
@TinWhiskerzBlog

P.S. If you build your own variant of this project, please leave a comment and share your thoughts and modifications.