Month: December 2021

Artesyn (Dell) Hot-Plug PSU Manipulation Through PMBus Phase I

For a while now I’ve wanted to create a PSU backplane and ATX rail generation for my computer using modular power supplies. Used server supplies are cheap and efficient.

Step one would be able to control them and read data from them with a microcontroller. So, I soldered the necessary wires directly to one of the PSUs I have laying around and plugged into a proto board.

I decided to use an ESP32 here since power usage isn’t an issue and I have a bunch of boards laying around. I was going to use an STM32, and my choice of a controller may still change as there’s no need for WiFi.

https://github.com/fdimitri/ESPPSUControl

As it stands I was able to find datasheets for the power supply, and get some communication going. I’m able to read all the documented registers, mostly properly.. though it doesn’t let me write to many of them when it should. There’s still a lot of work to do, but the basic PMBus interface is there and written from scratch. Refactor of initial code is incoming.

I need to add a few external transistors to pull some lines off the PSU low to power it on, right now it’s just jumper wires since I wasn’t too worried about the physical.

Next up is a PCB design using a CE connector that takes two of these things, then it’s back to work on software. I think I’m going to go standard 1oz copper and just make some bus bars to handle the current.

I’ll also need to design a pluggable card that provides ATX voltages since the PSU only does +12v and +12vsb. I’d like to have some digital control there (PMBus VRMs), but I may use cheap switching regulators in the first POC.

Should the blog go all Oracle Free Tier or stay on GCP..? Part 1!

I do want to try out Oracle Free Tier, which I just signed up for. Apparently on ARM Ampere instances you get 4 CPUs and 24GB of RAM, considerably more resources than either AWS or GCP gives you.

The blog would be a good practical use case for it, however it’s a bit light in its requirements. I could just make it general web and also host some services, including some Ruby stuff.

I think I’m going to have to start the migration and using Oracle Linux, then try to make a use for all that extra RAM and what I think is probably some more actual available processing power. Maybe compare page load times, among other things. It also appears to be easier to get an IPv6 Prefix through Oracle’s interface.. and on top of that, I also get two “micro” AMD-based instances to run as well.

Please, Cloud Providers, keep throwing free stuff around and at me so I don’t have to co-lo my own server somewhere. It would also help to have at least a passing familiarity with all of the major offering’s user interfaces.

I think I’ve convinced myself! The Blog is the first thing that shall go! It’s not very important, and it’s not particularly well written — and certainly not read, so it seems like it would be great test fodder to me.

IoT Sensors, Arduino, and ESP32s

This is now an on-going project, however I didn’t have a blog when I started it. So I get to play with WordPress now, and write a middling post about what I started!

One night I had an itch to write something in C since I haven’t done so in quite a while and wanted to do something. I ordered some ESP8266s and ESP32s knowing that they were supported in Arduino which would make my life a little easier staying away from platform-specific things as much as possible. I went to MicroCenter and picked up a few sensors since I’d need some kind of input, and I had some OLED SPI screens laying around.

Now that I had some hardware, I wasn’t sure exactly what I wanted to do. I spent a day working with a BME280 Temp/Humidity/Barometric Pressure sensor and an ePaper display. Not having used ePaper before or realizing exactly how annoyingly and excruciatingly slow it was, I decided to switch over to the much smaller monochrome OLEDs I had.

ESP32 wired through SPI to an OLED 64×64 screen, BME280 sensor and HTU31D sensor

So I had working WiFi, sensor readings that displayed on a screen, all wired up to a prototyping board. Not very useful as it was. Years ago I probably would’ve written something custom to move data from A to B, but since I worked with Solace at my last job I decided to go in a similar direction; I’d use MQTT to transmit the data.

It’s a simple formula and apparently a very common one. It makes sense. I fired up my Solace VM, wrote the little bit of code I needed to use the Arduino MQTT library I’d found and used a web browser to see that I was in fact sending the messages.

My messaging protocol built on top of MQTT is extremely simple, text-based and human readable. JSON was an option, but I didn’t want to waste the ESP8266’s meager RAM resources on anything I didn’t actually need. Aside from that JSON isn’t easy to WRITE, so I would’ve had to spend effort on writing a tool to send messages TO the microcontroller.

Source is available at https://github.com/fdimitri/ESPMQTTSensor. I don’t believe there’s anything particularly clever in there, or particularly bad. It took about 5 days to get this far, but it’s about to go further!

In addition to that, there is an extremely small Ruby program which receives the MQTT messages and pops them into MySQL, which I then took a few minutes in Grafana to make a dashboard:

Grafana Dash

Now that there are sensors, I’ll be able to make a thermostat module with adjustable hysteresis.