The PCBs arrived, and I have soldered them up:
I also rounded the corners of the switches a little bit, so that they better touch the ground.
One of the advantages of having the legs made out of PCB is that you can easily put things on them. Like, for example, switches that detect when the leg is touching the ground. I didn't include that in the original design, because I was a bit in a hurry, but that's not a problem, since I can make a separate set of legs easily.
It's a bit problematic to find the right kind of switch for this. For one, it has to be edge-mounted, but more importantly, it has to require very little strength. Regular "tactswitch" buttons are useless for that, but if you look around carefully, you will find something that is labeled "card detection switch" — those switches are supposed to detect when something, such as an SD card, is inserted into a slot. As such, they are rather sensitive, requiring very little force to be pressed. And they are usually in the correct orientation.
One such switch is the Panasonic ESE22MH27 that I happen to have in my drawer. A quick search for images reveals this footprint image:
So I quickly made a PCB with the footprint, and added some prototyping area to the leg, for good measure:
One annoyance is that I need 4 of those, but OSHPark makes them in batches of 3, so I need to order 6. At least I will have some extras to break.
I assembled a second PCB, this time without first breaking off all the bits of the legs, to see how it will look and feel. I actually had to break off one piece, to get to the USB port.
However, if I'm going to sell those, I think I will break all the bits off, and put it all in a bag. It will be smaller that way, and less fragile.
I still can't decide whether I want to ship with the battery holder and servo headers soldered or not. Having them soldered allows people to more easily assemble it, but makes the package thicker, and makes cable management tricky. If the headers are not soldered, they can cut the servo cables to the right length and solder them directly into the board, like I did with the first prototype:
On the other hand, since the battery holder has its cross-section roughly square anyways, the package has to be pretty thick to fit it no matter if it's soldered or not.
The PCBs from DirtyPCBs arrived today — pretty fast, I have to admit!
I got one of them assembled. The microcontroller worked first time, but I had to do several resolderings before I got the accelerometer to work. Seems like one of the pins in my gerbers is weird — probably another Fritzing bug. But no that I know it's there, I can scrap it a bit before soldering and it should be fine.
As you can see, everything fits neatly inside the hole of the battery holder, and around it. I decided to use a large, good quality speaker this time — maybe I can have it say the turret lines from Portal. Next up are the legs. Unfortunately that part still requires the use of hot glue.
I got the first four servos connected — since I don't want too long cables, I decided to cut them and solder them directly into the PCB, but you can as well solder male headers in there and plug the servos in. There is room for that.
I compiled a version of CircuitPython for Trinket M0 with adjusted pins, and the servos work nicely! Now I need to connect the remaining servos, and port the IK code I have to this.
Turns out that my simple yet brilliant idea for using the remaining board space for the mechanical parts of the legs is not so great after all. Most of the board houses noticed that people cram multiple designs into their boards, and started to demand extra payment for them. For example, at jlcpcb, you pay $2 for the first order, and $8 for every additional design on the same board, while ordering a separate PCB with that other design would cost you $5... Crazy stuff.
I decided that I won't be participating in that, and simply went to DirtyPCBs, who don't do such a thing. But they use white silkscreen with the yellow boards, which would look bad with the diagonal stripes that I added, so I ended up ordering black PCBs. Oh well.
Ultimately, I probably want to laser-cut the mechanical parts anyways, but I really wanted to test how this would work.
I decided to take all that I have learned in the recent years with all the versions of #Tote and other projects, and turn it into a robot kit to sell on Tindie. While the previous work focused on making it as simple as possible to build it yourself and possibly modify the design, this time I'm going to focus on optimizing for a kit. The design will be much more integrated, with all that can be done in advance already done. I'm going to optimize for the cost, ease of production, shipping, ease of assembly, robustness, and fun. Of course I still want to make it easy to hack and extend, but that is going to be a secondary concern.
Optimizing for cost and ease of production means that the development boards, as used in #SpiderWing and #D1 Mini Tote have to go — not only they add to cost, but also they increase the risks, because I don't have any guarantee they will still be available in two years in reasonable prices. So it has to be a single integrated circuit board, with a minimal amount of through-hole parts, with all the parts on one side, and fitting in either the 5x5cm or 10x10cm limit.
Optimizing for shipping means that it can't be sold assembled — the box would simply be too big. So the kit has to be flat, preferably less than 2cm. There is no chance I'm going to ship a battery, so it has to use a standard battery that is easy to get. And the servos are simply too heavy to ship, so that will need to be sourced separately too.
Ease of assembly means that everything has to be pre-soldered. Soldering is not hard, but requires specialized tools and people are afraid of it. It also means that it has to come pre-programmed, and that there needs to be a simple procedure for calibrating the legs. I would love to avoid glue if possible, but we will see how that works.
Robustness to mistakes is important, because I have limited time I can devote to support — ideally it should just work, and if it doesn't, there should be a simple procedure to follow to figure out what is wrong. The fear of having to support hundreds of people whose robots don't work is what stopped me from selling a Tote kit on Tindie so far, but now I decided to try my luck. It doesn't mean I can't try to make it as easy as possible for me.
Finally, it has to be fun out of the box, otherwise people will just assemble it, see that it works, and put it back into the drawer. If it's fun, there is a good chance of someone deciding to hack it. Because of that, it will ship programmed as a remote-controlled toy, possibly with several modes — walking, dancing, balancing, etc. But of course it's not just a toy, and it will be easy to program it and add custom behavior.