PiStation Redesign

Sunday, May 12 2013 @ 06:08 PM

Over the past few days I've done a bit of work redesigning the frame for the PiStation. Everything now fits together very nicely with plenty of space for circuit boards and cabling while still leaving access to the Raspberry Pi GPIO pins. This post is a run down of the new design.

Front View

The first thing I needed to do was move the the button row to the bottom of the front panel to allow space for the PCB the buttons are mounted on. You can see how it all fits together in the image on the right (all held together with sticky tape for the moment).

I added mounting stubs for the button PCB so it can be glued or screwed in place to keep the button action firm. Use some small screws would be the best option, using glue would make it difficult to modify or repair at a later date if the need arises.

Back View

The new layout is not as wide as my original design so fitting the boards in was going to be even more problematic. One option would have been to increase the depth of the unit but that would have made the full unit too large. What I decided to do was mount the boards vertically and rather than use a simple piece of MDF as the base I designed a printable base with slots to hold the PCBs in place.

Board Mounts

As you can see from the image to the left this makes a nice compact layout with everything fitting in neatly. Not exactly what I had envisioned when I started the project but it still looks quiet good. From the front it reminds me vaguely of the original Macintosh.

Components

There are now a total of four printed components (seen in the image to the right) and the total print time is about 5 hours on my small Solidoodle 2.

All the parts can simply be glued together, I just used normal off the shelf superglue. Depending on the quality of your printer you may have to do a bit of post processing on the parts so everything fits together well, I had to sand down all the edges for a tight fit.

Assembly

The mounting holes for the buttons and LCD screen are deliberately tight so don't be surprised if it is a tight fit. Use mild sanding with a fine grain sandpaper to expand the holes just enough to allow the parts to fit. With the LCD in particular the tight fit is required to keep it in place.

Now the hardware is sorted out it's time to do some work on the supporting software and configuration. I'll be building a few more of these over the next few weeks (I think I'll use a different color of plastic though, white shows any blemishes far too easily). If you want to build one of your own the OpenSCAD files for it are in the projects GitHub repository. I've tried to make them as parametric as possible so modifying the files to suit your requirements should be relatively simple.

Now I need to update the project page, add the printable components to Thingiverse and do some general cleanup of the GitHub repository. It seems like documentation and general maintanence takes just as long as designing and building the project itself :)


PiStation Updates

Monday, May 06 2013 @ 09:38 PM

Despite a very hectic weekend where I didn't get a lot of time to spend on the project I've managed to make some progress on the PiStation.

First up was testing the button circuit and making sure I could read the button state from the GPIO (oh, and making sure I didn't let the smoke out of the Pi with the circuit either). I put the circuit together using a set of breadboard cables I got from Adafruit. Not as neat as I normally like but certainly quick and easy to do.

To test it I wrote a simple Python program using the RPi.GPIO library. All it does is periodically poll the status of the IO pins the buttons are connected to and display them on screen.

Everything worked as planned so I put the circuit onto a bit of strip board ready for mounting in the final assembly. There is a bit more work to do on some software to make it easy to integrate but the hardware works as designed so I'm happy with that.

While I had a hot soldering iron I decided to modify the power board with the changes I had planned earlier. Although my original idea was to use two 22 Ohm resistors to help distribute the heat across a number of components there was no way I could modify my existing board to fit both of them in so I wound up using a single 10 Ohm, 5W wire wound resistor.

Space is still at a premium but I managed to modify the original board to incorporate the new changes. As you can see in the image I had to mount the resistor vertically to fit it in, this is probably beneficial as the heat it generates won't be transferred to the PCB and there is plenty of airflow around it.

I also took the opportunity to add a heatsink to the regulator chip itself so that should help cool it down as well. I haven't had the chance to test this over any length of time, all I've been able to do so far is power it up and ensure that I still get the required 5V output from the circuit.

The next step is to revisit the layout of the front panel and the enclosure. Now I have the actual working boards that need to be fitted in to it (and after seeing how my original design worked in reality) I can come up with something a little bit better. The general shape will remain the same but the size of the front panel and the way I layout the PCBs in the rest of the enclosure are going to go through a bit of a revision.

That's a job for tomorrow night though.


7805 Voltage Regulators

Tuesday, April 30 2013 @ 07:24 PM

As I mentioned on the PiStation project page I was having problems with the power supply module - it was overheating quite badly. Turns out this is a relatively common problem with linear voltage regulators (especially if you are using a relatively high input voltage, over 9V for example).

Regulator Circuit

The basic linear regulator circuit is very straightforward (you can see it in the schematic to the left). Normally all you need to add a few capacitors on the input and output end to provide some filtering and that's it. I've used this circuit a number of times without any problems but only to provide a very low current (around 100mA to 150mA). In this situation there is no overheating issues, the regulator gets warm but certainly doesn't start to fail.

The trouble is how a linear regulator works, essentially all the excess energy is dissipated as heat. It's fairly easy to calculate how much power needs to be discarded, simply use the following formula:

P = (Vin - Vout) * C

Where Vin is the input voltage, Vout is the output voltage and C is the current drawn by the target circuit. For a small circuit drawing 100mA this comes to (12 - 5) * 0.1 or 0.7 Watt.

The Raspberry Pi (and whatever you plug into the USB ports) pulls around 450mA which is a significant difference. The result is now (12 - 5) * 0.45 or 3.15W which is a big increase. A normal 7805 regulator in a TO-220 case simply can't dissipate that much heat.

One solution is to add a heat sink to the regulator to help it radiate away the heat, the other is to reduce the input voltage. This puts me between a rock and a hard place - I don't really want to add a large heat sink to the PiStation as that would increase the size and dropping the input voltage is a problem as well because the LCD requires a 12V supply.

There is another way to drop the input voltage to the regulator though - use a resistor to create a voltage drop from the raw input voltage to the input provided to the regulator. If we can drop the input voltage to 7.5V the amount of power the regulator needs to radiate drops to 1.125W which is a lot easier to handle.

Resistor Types

To get the required voltage drop at the 450mA current we can use a 10 Ohm resistor (R = V / I = 4.5 / 0.45 = 10 Ohm). The resistor is also going to need to radiate away that energy (P = V * I = 4.5 * 0.45 = 2.025W) so we can use a normal quarter watt resistor, we'll have to use a wirewound resistor that can handle the power required. If you look at the image to the right the type of resistors we are talking about are the top two. They are not exactly common for hobbiest digital projects.

Of course I don't have any available and it will be a few days before I can pick some up from the local Jaycar This means that this whole post is purely theoretical for the moment until I can prototype up the new design. In the meantime I'm going to move forward with the button interface and supporting software and just drive the Pi from a USB cable for the moment.


Introducing the PiStation

Monday, April 29 2013 @ 08:57 PM

The Prototype

I'd like to introduce you to the PiStation, this is my weekend project which turned out to take a bit longer to finish than I had anticipated (isn't that always the way?). On the plus side I at least have a working prototype and only a few rough edges to sort out.

Basically this is a simple case for a Raspberry Pi that includes some buttons for input and an LCD screen for audio and video output. It leaves the Pi accessable so you can use it as a nice portable base station for hardware hacking.

Behind the Curtain

Have a look at the project page for more information. There you'll find links to the GitHub repository, an image gallery and any project updates.

On that page I've listed the main issues I need to sort out before this project can be called complete, there are not a lot and all of them are relatively minor. Once that's done there are a lot of things you can do with this. I'm looking forward to being able to play with it.


Fritzing Parts Updates

Saturday, April 27 2013 @ 09:15 PM

As promised I've added a bunch of new parts to my Fritzing parts library. Most of these are parts from Microchip but there are a handful of others that I've been meaning to add for a while now.

Of particular interest are the 28 pin DIP versions of the PIC32 (a MIPS based CPU) as well as the ARM based LPC1114FN28 from NXP. Both of these can be used on a breadboard without needing a module or a development kit which makes them very well suited for hobby level projects. I have samples of both of these chips and I'm experimenting with using them in my competition entry.

In the meantime I'm partway through a little weekender project which I'll write about tomorrow. I'm very happy with the way it's shaping up so far - I can't wait to show it off.