Post series about creation of AuxPower1U device

AuxPower1U: Mistakes were made

This is a post 11 in the series (previous: Main Controller PCB).


With AuxPower1U being an actual physical object, I can see there were some mistakes. Most of them I worked around for and they’re already fixed in the repository for potential future version. But some of them will remain as a design choice.

First one has nothing to do with electronics but with my aluminium plate (aka “heat sink”). I planned for tapping holes so I can screw power supplies directly. Unfortunately, my model actually swapped diameter and radius and thus I got holes much bigger than I wanted. Classic error. So I used just screws and washers to get over that. But that actually made me think - do I really want to make all those tapping holes? Answer is no - longer screw and nut are good enough.

With that out of way, next portion are the PCB errors that were fixed courtesy of PCBWay respinning my desing. While the first revision board could be fixed using bodge wires, and I did so for firmware development, errors were big enough that I really needed a new PCB.

Current monitoring was the bigest miss here. I used my trusty ZXCT1009 - something I used many times ago. So, of course, I forgot to include ground resistor which made its readings go wild. Connecting resistor via bodge wire fixed that error. But, only when testing at 30V released the magic smoke, I checked the data sheet more closely. Yes, ZXCT1009 is limited to 20V. This never came up as most of my designs stick to 12V at most. But it became problem now.

However, finding a chip that goes up to 60V proved to be a difficult task. There actually are not too many simple chips that go that high and I didn’t want something that has more than 3 pins. Well, I think I found my new favorite current monitor - HV7801.

While HV7801 has more than 3 pins, it still comes in SOT-23 package and requires no external components. It actually occupies less PCB realestate than ZXCT1009. Downside is that its gain is fixed to 5x thus requiring me to use 1.024V ADC range. With ZXCT1009 it’s much easier to get resistor dividers than are nicely “rounded” for ADC and fit almost any range. With HV7801 you get what you get. Despite all of this, if I need current measurement that doesn’t need to be precise and I have 12-bit ADC, this chip is awesome.

Speaking of current measurement, I used 0.1Ω 3W resistor at first. It’s the same resistor I used in many other projects and it was always an overkill. What I temporarily forgot is that my low voltage ranges (e.g., 15V) will need to pass a lot of current. Thus, my trusty 0.1Ω resistor was getting way more heat than appropriate. After actually running the numbers, I decided to go with 0.025Ω 3W. Still gives nice figures for microcontroller calculations while producing way less heat.

Unfortunately, since my MCP9701A temperature sensor outputs around 800 mA at the room temperature, usage of HV7801 also meant I have to switch ADC ranges every time I measure the current. MCP9701A at 1.024V ADC range would only allow measurement up to 32°C. Even its 9700A brother (that I didn’t have in stock) would only allow up to 62°C. Switching to 2.048V just for temperature measurement is not the end of the world but it does mean slower measurement and it probably has implications for precision too.

One other case of “the forgotten resistor” is a pull-up for output MOSFETs. Early in the design phase I decided that resetting the board should not bring outputs down. Idea behind it is that, even if my board misbehaves, current will flow. There are merits on starting the system with all devices off but, since this would control power to my wireless, I decided it should fail-closed. And for that you need pull-ups. That I have forgotten.

Since we’re talking about resistors, I also had to increased ones used for LEDs. Those things were just too bright. While this means absolutely nothing once box it closed, it meant a lot during debugging since I could actually look at the PCB without burning my retinas. See, high-efficiency LEDs are not always good. :)

Speaking of debugging, I originally had my ICSP (i.e., debugging) lines shared with UART. This was necessary as I didn’t have enough pins and had to make some share functionality. Later in the project I added an I²C extender and thus aleviated the issue. However, I forgot to decouple UART lines from ICSP thus making the debugging of UART communication impossible. Solution was simple enough - just move those lines.

With all these errors, you can see why revision B was needed. While many of errors could be sorted by bodging wire here and there, and indeed they were for the purpose of firmware development, it was just too many to ever trust that board. Revision B saved the day.

AuxFanControler, a New Revision

As part of my AuxPower1U project, I already build a stand-alone 4-channel fan controller. And it works perfectly even now. But I did notice some issues when trying to use it as part of other projects.

The first issue was it belonging to AuxPower1U Git repository. There was nothing wrong with that but, since I used it for other projects too, it seemed right for it to get own repo. And its own repo it got. While I will keep it compatible with AuxPower1U, each can change separately.

The second issue was its dimensions. Even though I would argue you cannot get 4-channel fan controller with those connectors in much less space, reality was that vertical mounting was impossible in 1U chassis. Not only that its sideway power entry made wire routing particularly bad in vertical scenarios but it also meant that total height was cutting it close for even 2U case. Reducing the PCB height was an obvious choice and while trying to figure out the layout, I decided to drop one fan connector. This allowed me to reduce size from 69x15mm to more reasonable 42x15mm. Just barely fitting 1U if we ignore sideway cable entry. And ignore it we can because I also adjusted connector to allow for mounting either vertical or horizontal connector. Yes, you will have one footprint unpopulated but that’s a small price to pay.

A third, minor issue was that board was hard to mount. For this I intentionally left back front side empty and with a bit wider side margins. This allows one to create slot in plastic and thus keep the board embedded with friction alone or, if needed, with just a touch of plastic. How that mounting looks like you can see on example of the new AuxPower1U board (that I’ll cover a bit later due to scheduling carfufle). Board sits between 2 fans and goes nowhere once slotted in.

Illustration

I got PCBs from PCBWay and it arrived quite quickly. More importantly, its edges arrived cleanly cut. This is not something one notices unless they deal with some other PCB providers. I love OSHPark but them leaving tabs in place drives me crazy. Every time I get their boards, I have to spend minute or so per board filing those tabs down and it’s never fully straight edge. With PCBWay at least that task is of my back.

Also, compared to OSHPark they have way wider color selection. You can chose green, red, yellow, blue, white, or black for the same price. This allows you to distinguish boards at a glance. For this order I opted for the yellow soldermask which is not my favorite when it comes to reading slikscreen but it is rather nice otherwise. If silkscreen legibility is at premium, either red or blue are better choice. But that is the beauty of choice. You can find what works for you in any particular scenario.

Premium colors like purple, matte black, and matte green do come at a greate cost. However, they do ocassionally get a discount so its worth checking them out from time to time. For example, purple is going to be available at standard $5 price in September so you might want to check it out. Speaking of discounts, 3D printed TPU will be heavily discounted in September too so you might want to check it out. As somebody who printed TPU, I can only recommend you get somebody else to do it. :)

Illustration

Soldering this PCB was a bit more difficult as compared to the revision A because components were a bit more pushed together. But that’s just relatively speaking - I am still using rather generous pad size so it should be easily doable.

Profile is similar to before but with a bit more agressive curve between 60-70 °C. This is something I plan to make configurable eventually but I don’t really have reason to do so right now.

Startup sequence is still powering fan at a time with a quick spin-up to 100% before settling down. Firmware itself still behaves as if it has 4 channels which makes firmware the same between revision A and B.

It’s just a small update but form factor change alone will allow me to use it in way more places that require stand-alone fan control.

New case for AuxPower1U

My AuxPower1U project was over and all was great. But, one thing always annoyed me - the plastic enclosure. Don’t get me wrong, it is a nice enough enclosure when mounted. But, since power supplies do weight a lot, chasis flexes if unsupported. Not a big issue but not something I like. So, when I ran into a Cheval PF19AL1UD1, I immediately started eyeing an upgrade.

Illustration

It is a 1U case, a slightly longer than Bud PRM-14460 - 200 vs 240mm. It has ventilated sides in addition to vented top and bottom plate. And it features internal box design with rack mounting being a separate element. While this might be excellent for some projects, I had a few issues with it.

The first issue was it’s box construction with rack mounting being a separate element. Since I needed to drill the front, this was annoyance. Thus I decided to simply omit front extrusion when mounting it. That way I only needed to drill one set of the front holes. As this change made top and bottom flimsy, I had to redesign aluminium plate mounting to stiffen it a bit. Once buttons are mounted, there should be no play.

Another issue I had was with vented top and bottom. While usually a great feature, they were killing my air flow setup. At the end, I just covered them from the inside with a wide duct tape so that air is forced over power supplies.

As luck would have it, all mounting solutions I did for the previous case would not fit this one. Aluminium plate couldn’t rely on central bosses because there were none. Also mounting controller and fans had to change too because there is now no real place to screw it. Mind you, mounting options are probably even better now - there are enough M3 holes available.

In the end, it took a few hours of reacquainting oneself with FreeCAD to get everything in place. And I believe it was worth it. Metal case just feels much better than the plastic one it does offer way more space because there are no protrusions in the middle the plastic case needs.

That said, it is more compliated to work with than the plastic. First of all, drilling is much more work. And, since there will be live AC power in it, grounding case properly is a concern. With powder coated case this means a lot of scraping to expose metal. Nothing too difficult but important not to forget.

But drilling and grounding is a problem for the future me.