@cbenson Sorry I am late on responding to this one as well:
As for a hat for RPI, to me that really depends on what your goals are:
That it you could go extremely basic. That is if you are wanting the RX/TX pins to drive servos, you can simply add level shifters for those two pins. You could decide if they are bidirectional or unidirectional.
You could put on power management to feed through the power pins. I have done that and did not notice any issues, butā¦
It was not clear to me earlier when I was playing with RPI hats and first ROS stuff, if powering the RPI through the expansion connector was considered safe or not or if it bypassed some of the power circuitry of the RPIā¦
I also hacked it by using an external BEC which converted the 12v to 5v, which I then wired into the power port of a powered USB Hub. This was a real hack, but I then plugged the RPI into the HUB twice, once as the source and once as a output. The output one plugged into itās power port. This worked on cheap hub, but some others not who would not power up the destination ports until it received USB signalā¦ Another option was to have a connector on the hat that you plug in a cable which then plugged into the RPI power port.
Or you could go whole hog and do something like I did maybe 4-5 years ago and add a nice micro-controller to it with lots of features.
This one has a T3.6 and has on it about that many years of dust It was on my desk as using it to do some MTP testing.
This was one I used on RPI and/or Odroid and/or UP boardā¦
This was setup for Bioloid AX servos and it had my normal board building, that you can not leave any square tenth of an inch unused It was setup to convert the 3.3v outputs to 5v for servosā¦
I used a barrel connector which I connected either wallwart or had connector to 3S lipo.
I was using a Pololu DC-DC converter which could fee through to RPI through 20 pin connector. Plus the double row of pins below the RPI connector (at top in this picture) was a set of jumpers to use shunts to decide which pins to connect from the teensy to the RPI, and lots of IO pins with 3 pin headersā¦
The larger transistor toward bottom left was to allow me to be able to switch servo power on and off. Resistor divider circuit to detect battery voltageā¦
Plus a simple sound circuit and one Noepixelā¦ Some of the boards I had setup to be able to extend that Neopixel to more than just one.
Note: I probably still have an earlier t3.2 version sitting around here as well. And I know at one point was working on T4.x versionā¦
For most things this board was probably overkill.
When I was experimenting with this, it was unclear if you were better off with using the
Serial pins on expansion or sticking with USBā¦ Issues with at least earlier RPI boards that only one of the two uarts was really a UART and by default it was assigned to BTā¦
Also unclear how much of the work you are wanting to put on the HAT. For example if EM=0 was the main way to talk to the servos, I would probably have my own higher level communication, that said move all of these servos to this position over time X and I would let the hat take care of all of the outputs and inputs from servos and free up the RPI to do other things. If not doing that than again maybe just go direct from RPI pins to level shifersā¦
Also unclear if your main goal is for something like ROS2 and you are adding reasonable computing power, if you want the board to be tightly coupled/dependent on a host like an RPI or if you wish to make it run independent and for example maybe have ethernet stack which then allows you to directly have this device source and listen to ROS topicsā¦
Not sure if this helps you or not, but good luck!