19 June 2016

Updates (To-Write List) / "Pentium D 820"

Seems like I haven't wrote about the Raspberry Pi 3 and the unused motherboard that I picked up from work. Well, I knew I haven't written about the latter, but definitely didn't know about the former.

The Raspberry Pi 3 (which I'll probably call "Pi3") will be replacing the Pi2 in the 2(DrivePi), but I haven't done all the testing that I need to do... I've only done a bit of light testing before I set it aside and kind of forgot about it. (I was reminded of it again with an article that there's better Bluetooth drivers in an updated Raspbian, but I still forgot soon after that.)

I found a couple unused boards at work and after moving building, I was able to take a better look at them, one of them being an ATX (before the +12, and 24-pin ATX connector) AMD board, and the other being an LGA 775 board. I left the AMD board, since two pre-64 bit machines (Ziggy and the Vaio) is more than enough, and procured the LGA 775 board.

I kinda played around with it, but I don't really remember doing much besides trying to figure out if a graphics card worked or not... Which made things a bit screwy, causing me to set it all aside until recently.

My work computer died (also LGA 775 btw), and so I salvaged parts from it, since it seemed like replacing the bad power supply with a 3rd party wasn't doable. With the tinkering I did yesterday, I eventually tried the Pentium 4 530 and it was just dead, so whatever killed the power supply also killed the CPU.

I found out that the CPU that came with the board is a Pentium D 820 (and that I didn't kill it with trying that video card), and left it in there. While I can upgrade the motherboard with the last of the Pentium D line (965), it probably wouldn't be worth the money. I might grab another Pentium D 945 for it, but I think it's already bad enough that I've a Pentium 4 630 floating around. I will more than likely upgrade the ram from the 2 GB that I had in the Dell before the upgrade to the maximum of 4GB.

I also procured an unused case, which isn't really well built, but it will do for the motherboard and some spare components for now.

The other thing I did yesterday was upgrade the BIOS for that motherboard, since it had a custom splash screen (not sure if the BIOS options were any different), and that the reason for the updated BIOS was a problem that I was having. While the BIOS has it's own upgrade utility, it required a floppy drive, and while I did have one free from my work computer that died, it was really more of a matter of formatting a floppy disk properly and transferring the files onto it.

I did a lot of stuff and eventually gave into just using the Intel that I built for my parents to do what I needed to do, finding the floppy I was trying to use was bad. I was successful with another floppy disk (there's a lot...) and didn't have any problems updating the BIOS, though every time the writing progress paused for a second, my heart also stopped for a second.

So now the mobo has the latest BIOS without that custom splash screen. I'm not sure what I'm going to call it, but for now I'll just refer to it as "Pentium D 820". I'll eventually write it to the machine reference page, but probably not until I give it a name of some sort. I'll also get it a better heatsink/fan unit, but that'll be later as well.

Triela Tinkering

A bit ago, I remembered that I had stuffed a hard drive caddy for Triela into my wish list and decided to get it to increase the storage space on Triela (Windows needing it more than Manjaro though).

Not really too much to write about, though Triela was extremely confused when I had the SSD and her original drive, since both had a boot flag, so I had to use a different drive, though it gave me the entirety of 500GB, since I wouldn't be stuck with the original partition scheme.

She still gets a bit confused on boot, even though the storage drive doesn't have a boot flag, but it's usually remedied by a hard reset or two. I played with the boot order earlier today and found the other drive, so maybe that might help? Too early to tell, sadly.

I think it was a couple or so weeks ago when the stock battery died completely... I was just doing my thing, and all of a sudden, Triela turns off without any warning. I found the battery to be really hot, so I removed it and set it aside while I turned her back on.

I knew the battery wasn't doing well, since I had lost about 60% of the original capacity, but I guess the combination of things that I had done when I used her last was the nail in the coffin.

That time that I speak of is when I used Triela to print off some stationary with the old Scan/Fax/Copy machine that I was able to get my parents because it was supposedly broken (I found the problem and fixed it). Anyway, I spent a lot more time than I needed to while on battery because CUPS didn't have any Brother drivers, but I was still able to print just fine without Manjaro shutting Triela down because of a low battery.

It's not that I ran the battery somewhat close, it's the fact that I didn't bother to plug Triela in after that. For the amount of time that I left her unplugged before I used her again, I'm sure the battery was too deeply discharged to charge again, thus what happened.

As the battery cooled down in my room, it left a smell, so I knew it was shot. Luckily there's a recycle box at work, so I just took it with me the next morning and deposited it in there.

I used Triela for a few weeks until recently when I decided to order the cheaper of the replacement batteries I found.

Though I wasn't too consciously familiar with Triela's stock battery weight, I still noticed a slight difference, since the new battery has 6 cells while the original had 5 (I did a bit of calculating because a reviewer said taht the replacement battery holds a longer charge than their original... Duh!).

The new battery came with 60% charge and said to utilise the charge until 7% before putting it on the charger; doing this a couple times to "exercise" the battery. I booted Triela into Manjaro and was somewhat awestruck (for lack of a better word) that I had about an hour and fifteen minutes with 60% charge.

I used her again earlier today (as I  previously stated) to get into Windows for a log in event for the game I play, having to download about 600Mb of patches along with a new launcher (that failed to install correctly the first time...). I think I shut Triela down at about 20% battery, which isn't bad from what I'm used to.

From now on though, I'll definitely take better care of the battery instead of just utilising it when it's not convenient to stay plugged in. Unless I replace the storage drive with an SSD, there's really nothing more I can do to Triela to make her better.

Snap Packages

The article I read is: Linux App Distribution Gets a Little Easier with "Snap".

I actually read a different article, but I realised I had things to write about it.

I read the other article yesterday, after a bit of apathy about Snap, and figured I'd give it a try since it was available on Arch (remember that Manjaro is based off of Arch).

I installed it and poked a bit with it, but decided to not do much more with it. Why? Because the packages that I would be installing from it could be counted on one hand.

Once there are a lot more packages, I'll most likely start using it, but I'll just hold off for now.

Soundcard Switchbox Version 3

I originally planned to write this once I was finished, but I kept losing motivation with how long this would be, along with having other things I wanted to work on instead, and the stress of a few things happening recently.

I think I mentioned at some point about this project being in the works, though I don't think I really stated any details (perhaps vaguely about the PCB design?).

Originally, I had found some switching, low-signal relays on Mouser (EC2-5TNU) that I designed the original board around. The relay has two coils, one to change the contacts from the "reset" position to the "set" position, and another to bring it back to the "reset" position. I briefly considered the single-coil version, where the polarity across the coil determined if the contacts moved to the set or reset positions, but I decided it would be a bit more of a hassle to route the traces.

Screenshot of the PCB design from EAGLE. Red lines are traces on top of the board, blue lines are traces on the bottom of the board, and white lines are silk-screened lines.

It's fairly organised and only has one audio trace that had to be transferred to the opposite side of the board (I try to keep the use of vias minimal). The spot in the bottom right corner of the board would be a header on the bottom side that would be for the SPDT (On) - Off - (On) toggle switch, and the positive and negative input.

When I was actually able to allocate money to work on this project, I purchased the relays, but stopped when I looked at the board again. The board size is 99.1 by 25.4 millimetres (3.9 by 1.0 inches), which would fit just fine inside the project box, but would cost me about 20 USD for a set of three. It was a bit annoying that I had just purchased the relays, but I decided to redesign the board smaller.

I happened upon a newer version of the relays that I purchased, which was slightly shorter in length, slightly wider, about two-thirds of the height, and also a bit cheaper. For a bit, I tried to mentally figure out how to reduce the size of the PCB by rotating the relays 90 degrees, but figured that the traces would be a horrible mess, so I decided a single-coil version would be better.

I decided that the newer version of the relays (EA2-5SNJ) would be a bit easier to work with because of the wider footprint. The only drawback was that the legs for the dual-coil version would still be present, even though it is a single-coil. While the legs aren't connected to anything at all, it would still be extra holes to add to the board that I would have to avoid, but it wasn't bad, considering there wouldn't be any traces that I'd have to dodge along with it.

Screenshot of the design from EAGLE.

It turned out to be much better than I had expected, though it was frustrating to try to figure out how I wanted to arrange the audio I/O vias. I ended up having to change the grouping from one input to one section of the inputs. In other words, with the first version, I had the input sections from Linux grouped together (i.e. tip, ring, and sleeve of the "peach" cable would be close to each other), but with the second version, I had put the input sections together (i.e. the tip from Linux and Windows, as well as the tip output are grouped together). It was really the only way to keep the routing simple while keeping the board size small.

Marking the audio I/O vias took a bit of time to figure out as well, since I wanted to try to ensure that it was fairly easy to understand, while keeping it minimal because of the very limited space. "W" is for "Windows (input)", "T" is for "Tip (output)", "L" is for "Linux (input)", "R" is for "Ring (output)", "S" is for "Sleeve (output)", "P" is for "Peach", "B" is for "Black", and "G" is for "Green". The "S+" and "R+" signify what wire needs to be positive to change the relay... In other words with "S+" being positive and "R+" being negative, the relay would shift to the set position. (There's a bit to this that I'll talk about later... Unless you've looked at the datasheet for EA2-5SNJ closely enough.)

Now that I was pleased with a smaller board (50.9 by 23.0 millimetres [2.0 by 0.9 inches]) that's about half of the cost of the first version, I sent the design off to OSH Park to get made while I ordered the EA2-5SNJ from Mouser.

The usual views of the PCBs.

A bit of a shame that the silk-screen outline of the relay got broken up by the vias, but it wasn't a major deal, it was mainly just to make it easy to tell which side of the board the relays were to sit on, though in technicality, it doesn't matter. (Again, more on this in a bit.)

Once I had the boards, I soldered the relays to the board, which wasn't really too hard to do, though I took a bit of time, because I wanted it to look nice for the photos.

Relays soldered nicely to the board.

Next, I began working on the box, forgetting about the grooves on the inside that need to be shaved off for the jacks to properly fit. I first did the side where the power input would be, and it didn't turn out very easily, but I had shaven more than enough, since the jack would sit relatively close to the lid.

Picture was actually taken after the entire shaving was complete.

Next, I shaved the backside, starting from the opposite side from where the power would be, and it took quite a bit of time; I started making mistakes not long after I was halfway done.

I started from the left side of the picture and worked my way right. As you can see, there was problems with controlling the depth of the blade.

I did what I could to keep the problem minimal, and thought it would be fine as I drilled the holes for the power jack and the toggle switch.

Top 3/4 view and bottom 3/4 view without lid.

I actually drilled a bit too close to the screw post, but I played with a jack and it would be fine, just a bit awkward to mount the jack. I then drilled the holes for the I/O jacks. and those mistakes came back to become a problem.

Rear view, rear 3/4 view, and inside 3/4 view. I scored some lines to try to keep the holes relatively aligned and decently spaced. Pictures were actually taken after the next set of pictures.

My heart dropped when I heard the snap and found that the crack, and I was ready to throw the box to the (carpeted) floor and spend my time with something else for the day, but I decided to play with the jacks a bit to see how bad the crack would be once the box would be complete.

Rear and rear 3/4 view.

It didn't actually look too horrible, even though it was obvious it's not supposed to be there, so I continued working with the box, since I wasn't in the mood to shave all the grooves again. I then figured out a colour scheme for the wires before removing the nuts and soldering the wires to the jacks.

Wires soldered to the jacks, in the order specified on the sheet that they lay on.

Next was to mount the jacks to the box.

Inside and rear views of the box with the jacks mounted.

It's probably quite easy to tell now that the top row of jacks (outputs) look slightly off compared with the bottom row, and it's because I divided the length of the box (probably the interior between the screw posts) before I had figured out the spacing of jacks for the bottom row. Moving on, the wires were slowly soldered to the PCB as I double-checked the order to ensure I didn't end up soldering any wires wrong.

Wires soldered to the PCB.

I then soldered the wires to the power jack, mounted the jack, soldered the wires to the DPDT (On) - Off - (On) toggle switch, soldered the remaining wires to the PCB.

Inside view of the mounted power jack. Inside view of the wires, with the switch unmounted. View of the bottom of the switch, showing the logic. Wires from the switch soldered to the PCB.

The switch is then mounted to the box and the wires tucked to be somewhat out of the way.

A bit hard to see the toggle bottom, since it's black.

Then it came time to figure out how to put the rest of the wires and the PCB into the box. It didn't quite turn out like I had envisioned, but I did make it work after playing with it a bit.

Wasn't how I intended it to be, but worked just fine.

Next, I attached the lid and the labels.

Front 3/4 view, rear 3/4 view, and bottom view. Bottom label is so the lid doesn't fly away if the box needed to be opened for any reason.

With the box finished, I checked with a multimeter that everything was correct, and found that the Linux and Windows inputs were swapped. (I think after soldering the jacks to the PCB, I had did the same to ensure they were right). I opened the box up and found nothing wrong, but eventually realised that I actually flopped the "S+" and "R+" silk-screens. Why? Because the datasheet for the relay shows the bottom view of the relay, and I had soldered the relays to the top of the PCB.

Because of how the board is designed, the relays could also be soldered to the bottom of the board as well, taking care to not confuse the set/reset polarity.

There was a couple things I could do: (1) leave the wires from the switch alone and flop all the labels or (2) leave the labels alone and flop the wires from the switch. I opted for the latter, seeing that it would be more efficient. I also took a couple minutes to fix the drawing in EAGLE.

Screenshot of the fixed design from EAGLE.

I then made the power connector with a right-angle mono cable, an old motherboard header plug, and some wires with the corresponding socket connectors. I spliced the wires to the ends of the mono cable (which only has the mono plug on one side) and applied heat shrink tubing accordingly, following with inserting the ends into the plug in the proper position and orientation.

Wire ends soldered to the cable with heat shrink tubing applied, other cable for reference to which wires are which. Heat shrink tubing applied to enhance appearance. Ends plugged into plug correctly.

After that, I routed the cable inside Melty and plugged it into the remaining USB header.

Views of the cable routing.

I realised a couple days ago or so that I could have also pulled the 5 volts I needed off of one of the 4-pin Molex connectors instead of the USB header. While I would be able to hide the end of the cable under the cover next to the power supply (where the cable comes up from in the last image), I don't have a need for that USB header at the moment, so it will stay as it is now.

The next day I made custom-length cables to connect between the sound outputs of the motherboard/sound card and the switch box, and I used a bit of blue Loctite to try to keep the covers from coming undone, but it ended up destroying the plastic of the plug, which I found out when I moved the cables after taking the image of them.


I was really upset again that it happened and tossed them aside as I looked for something cheap online that would take care of the length I needed without being too excessive in length. Though what I found was 6 feet in length, it was much cheaper than the length that was closer to what I was looking for, so it became what I ordered (one end is a right-angle plug while the other end is straight). I got the cables in the middle of the week and used zip ties to code them accordingly.

Cables fresh out of the bag, and newly coded.

Without saying, I connected the cables, but the only thing that's not obvious is the way I connected the cables. The cables for the motherboard's sound card (Linux) has the right-angle connectors connected to the motherboard while the straight plugs are connected to the switch box, and the cables for the sound card are connected the opposite way - the right-angle connectors are connected to the switch box while the straight plugs are connected to the sound card.

I didn't take any pictures afterwards, since I was still a bit upset with the Loctite destroying the plastic of the plugs. While typing this, I checked the cables that I made and they seem to be solid (I didn't check for possible shorts), but considering what's done is done, I'll just use them for something else.

The switch box works fine and it's a bit funny that even with holding an ear against the box, it's hard to hear the relays because of how loud the switch is. I may remake the switch box again, taking all the things I've learned with this one as a precaution, though it won't look/function much differently.

I had also thought of another switch box design where the box would be inside Melty, though instead of one cable running in/out, it would be six instead. The other problem would be making a proper 5.25" mount for it as well.


Things I've learned:
  • Take breaks more often when doing repetitive tasks to ensure less mistakes (shaving the grooves off).
  • Allow a bit of slippage when drilling holes (power input jack hole).
  • Check the board design against the data sheet more often.
  • Be very careful with Loctite and plastics.

Raspberry Pi NAS

The article I read is: Raspberry Pi as a NAS (Network Attached Storage).

Well, it's not really an article, but did somehow end up in my Google Play Newsstand feed.

One thing that irks me is that if you're planning on making a low-power NAS that's decent, then the Banana Pi would be the better option because of the SATA port and gigabit LAN (both the Raspberry Pi 3 and the Banana Pi have Wifi, though the instructable utilises LAN, as it's probably the Raspberry Pi 2). The main drawback would probably have to be that with the Banana Pi can only support up to 2TB drives connected to the SATA port.

Now if you happened to have an unused Raspberry Pi laying around, then yes, it would make sense to utilise it to make a low-powered NAS, given that the read/write speeds are going to be much lower because of the USB 2.0 and/or 10/100 LAN.

My other irk is that NAS consumption really depends on the brand and type. Yes NAS units can easily draw over 10 watts when spinning a 3.5 inch hard drive (for a one-disk unit), but some (if not most) NAS units have a standby mode, where it spins down the hard drive(s) and waits for activity.

What's a bit interesting it that the person used a serial connection to access the Raspberry Pi. The main advantage would be that if you're setting a static IP address, then you will still have access to it without having to reopen an SSH line to it, but if you're not, then why bother spending more money on the cable?

With the CFS, I didn't bother with Samba, though I could have and have made it a bit easier to mount in Windows, but considering how rarely I'm using Windows these days, it's not worth any of the hassle (if it is at all).

Not sure what NAS units the person is thinking of, but my Synology NAS is neither fire nor water proof/resistant (might be a bit water resistant as long as it doesn't run toward any vents).

Again, while it's not a bad idea in general, it only seems worth doing if you already have a Raspberry Pi (and maybe an external hard drive) that aren't in use.