AMD Wraith Prism Cooler

The AMD Wriath Prism cooler is a really nice stock cooler, but it has one significant drawback.

AMD Wraith Prism Cooler (bottom)

You can see from the picture the outline left by the Ryzen CPU. You can also see all the uneven grooves in the cooler surface where the heat pipe itself is left to be the interface to the CPU. This unevenness allows for variation in the gap that heat sink compound has to fill. This leads to an uneven heat distribution and lowers the efficiency of the cooler.

Noctua NH-D15 (bottom)

Notice the smooth high polish surface of the Noctua NH-D15. This finish allows for a small amount of heat sink compound and a higher degree of surface mating area with the CPU. This leads to a higher thermal efficiency. Most, if not all, aftermarket coolers will have this high degree of finish.

In testing, the Wraith Prism cooler did indeed hold the CPU to 85C at full load when running Prime95. In general computing/gaming the stock Wraith Prism cooler is a good cooler. With a touch more work, it could have been even better.

Cooling Upgrade

Replaced the stock Ryzen Wraith Prism CPU cooler with the Noctua NH-D15. The Wraith is a nice stock cooler, but under load it tends to be noisy.

Installed NH-D15 next to the replaced Wraith Prism

As you can see there is a substantial difference in cooling area of the NH-D15 over the Wraith. The bigger fan size means less noise for sufficient air flow too keep the processor cool under load.

Installed In The Case

Because of the height of the RAM, the front fan had to be mounted higher. Luckily the Lian-Li case had enough clearance. Barely.


DIY – Router Repair

My faithful RT-N66U router died last night. Luckily I was only using it as an access point and wifi was all that was affected. The unit’s power was completely out. I feared that the wall adapter had gone bad. I noticed that the push-on/push-off power button was in the out/off position (see below).

RT-N66U Back View

Upon pressing the power button in the power would come on, but the power button would no longer lock into the in/on position. A wonderful piece of technology was at the mercy of one of its absolutely cheapest parts.

To repair it I decided to open it up and bypass the power switch altogether (I never used it in the first place). I’m sorry, I didn’t think to take any pictures, but I will endeavor to describe my process in the repair.

The RT-N66U has several screws on the bottom holding the top cover in place. Once removed you have to gently pry the top cover off. There are tabs around the front and sides holding the cover on.

How to open the RT-N66U

With the cover off, the board slips right out of position and is easily removed. To get to the underside of the power switch the metal RF shield on the bottom has to be removed. After removing the screws holding it, it pulls away without issue.

RT-N66U PCB Removed
RT-N66U PCB Bottom With Shield Removed

The power switch has 4 soldered pins. From the above picture, the top-most and bottom-most pins are attached to the metal frame surrounding the switch. The 3 center pins control the switch contacts. Using a continuity meter, I found that when the switch is on the out/off position it connects the top pin with the center pin and that this connection is to the ground leg of the power connector. When the switch is in its in/on position the center and bottom pin are connected. The bottom pin is connected to the positive leg of the power connector. This configuration means that we cannot simply bridge across the switch without removing the switch as the power would then be shorted.

Once the switch was removed it became a trivial matter of using a small piece of jumper wire between the center pin and the bottom pin to create and always-on connection. Now my faithful access point is back in action for hopefully many more years to come.

DIY Automation – The Garage – Part 2

The Garage Door Interface Electronics

For the garage door state detection I decided to go old school with a magnetic contact switch. I chose these for their simple implementation and ease in interfacing them to the RPI. Two per door will be used to detect when the door has reached its fully open and closed positions. The design includes the ability to actuate the existing garage door opener with a relay.

RPI interface to double door garage

P1 is the HAT header of the RPI. P2 & P3 are the door actuator relay outputs. P4-P7 are the door position switch inputs. When the magnet closes the switch on one of the inputs its corresponding RPI GPIO is pulled low to a logical 0. TOP corresponds to the top of the garage door and indicates that the door is in its full open position. Likewise BOT is the bottom of the door and indicates the door is in its full closed position.

The Input Circuit

Studying the input circuit surrounding P4, the diode D9 allows for the use of a door sensor that outputs voltage instead of a switch closure. If you use the magnetic switches it isn’t necessary. The resistor R9 act as a pull-up for the input to define a logical 1 since the magnetic switch does not provide a voltage. The LED D5 is strictly a visual indicator for the user to see when the input is being actuated. The resistor R5 is used to limit the amount of current that is sourced/sinked from the RPI’s gpio pin. It is primarily used as a buffer should the RPI gpio pin ever be accidentally put into output mode it won’t short against a closed external switch and damage the RPI.

The Actuation Circuit

Studying the output circuit surrounding P2, the relay K1 can be any general purpose 5 volt relay. The diode D3 is needed if the relay doesn’t come with one. It is used to short out the fly-back current produced by the relay coil when it is switched off. The fly-back current can at minimum cause the RPI to reset and at worst damage it. The resistor LED pair R3 & D1 are purely for visual indication that the relay is being actuated. Transistor Q1 is used to gate the relay since it cannot be driven directly from the RPI gpio without damaging the RPI. The transistor used can be any general purpose NPN or N channel FET. I used 2N3904 transistors because I had an ample supply of them in my personal inventory. The transistor needs to be sized to handle the current draw of the selected relay. In the case of a NPN type transistor the series resistor R1 is needed. In the case of an N channel FET, R1 would instead be attached to ground to bias the FET in the off state when the RPI gpio is an input. The RPI gpio’s are generally set to inputs whenever the RPI is reset. The last thing you want is the door inadvertently opening/closing in the case the RPI is power-cycled or reboot.

The Board So Far

Here we see the current board in all its glory. This is build with an original RPI Zero without the built in wifi, hence the TrendNet wifi adapter. Pay no attention to the ATTINY26. That was an experimental expansion that later proved to be unnecessary. I’ll discuss it more in an installment about the choice of temperature measurement and the radon abatement detection that was ultimately chosen but not yet added to the board.


The door interface is quite simple and easy to build. In the next part I’ll cover the code I wrote to turn the inputs into an MQTT message for the HAB system to digest.

DIY Automation – The Garage – Part 1

As an EE by degree and a Software Engineer by trade, I’ve always tinkered with making my own devices. With the rise of surface mount devices in the 1990s, my hobby became increasingly more difficult. You either had to create your own circuit boards or purchase surface mount adapters for the parts you wanted to use. Both avenues had a prohibitive cost involved for the hobbyist. With the advent of devices like the Arduino and Raspberry Pi the hobby of make it yourself electronics is once again thriving.

Having a desire to tinker and a penchant for laziness, I have embarked upon automating certain aspects of my home. First up is the garage. I want to know, at any given moment, the state of the garage doors, the temperature outside, and the state of our Radon abatement fan. I begin by breaking the problem into several areas. How to sense the position of the door. How to measure the outside temperature. How to know if the Radon abatement system is functional. What embedded device will this run on. How will the data be conveyed to the user.

Because of their widespread support and high-level capabilities, I decided to use Raspberry Pi Zero(s) as the embedded devices at the heart of each automation device. I intend to use its built-in wifi and wealth of gpio. There is also the cost. At $10 each, it has a phenomenal cost to benefit ratio. As it runs linux, I can also leverage my existing knowledge. This will also give me an opportunity to expand my understanding of python. I intend to write most of the code in python given the great amount of support the raspberry pi and IOT community has to offer.

For the front-end of the system I intend to use openHAB. The devices will communicate through an MQTT broker specifically mosquitto. More about them later.

In the next installment I’ll cover the basic device and the approach to detect the position and transition of the garage door.