-
Workshop Preparations
02/29/2016 at 11:48 • 4 commentsSince my workshop was accepted, I started preparing for it. First of all, I went and ordered all the required parts from Aliexpress, since you can never tell how long it will take them to reach here. I split the order into many small packages, so even if some of them don't arrive on time, I will be able to replace them with the parts from my personal stock.
Second, since I needed to order the printed circuit boards, I decided to redesign them a little bit, both to include the Jolly Wrencher logo, and to include some of the improvements that I came up with since the last iteration. More on that later.
Once the boards and parts are here, I will need to build and test one prototype, and then pre-assemble all the boards. I think that at the least I will have to do all the soldering -- because I really don't think I will be able to teach people to solder during the workshop, and I don't want injuries.
While building the prototype, I will make the photographs illustrating all the steps, and upload them here as the instructions. Then I will have them printed for the workshops.
Finally, there will be some changes in the software. I already did some preliminary experiments, and I think that I can make the whole thing much easier to experiment with.
-
Mechanical Improvements
02/29/2016 at 22:57 • 0 commentsWhile I'm still waiting for the parts, let's talk about the improvements I made in the mechanical design. It's not that much, but I think they make a nicer looking and slightly more capable robot.
First of all, the positions of the servo horns on the PCB have been changed, to provide more room for the electronics, make it easier to adjust the servo positions, and hold the horns themselves in a more stable manner.
Second, I'm no longer using the screws that come with the servos -- they are supposed to be used for attaching the servos themselves, not the horns, and thus are too big. I have two big bags of really small screws that will fit the horns perfectly and not even stick out.
Third, and this is the only change that actual impact on the gaits, the leg order and shape changed. They now have longer coxa -- because this is the only dimension that doesn't affect the servo strength), and are mirrored compared to the original Tote, allowing for more travel. This should make Tote slightly faster.
And finally, almost all components are on the bottom side of the PCB, so that the top can be used for any additional sensors or payload you want (it does make sense to move the battery there, though).
-
What's on the PCB?
03/02/2016 at 09:14 • 3 commentsTime to talk a little bit about the new printed circuit board and what will be there available on it. Let's take a look at the bottom of it (note that this image is mirrored -- that is, it's as if the board was transparent and you are looking from the top):
The two rows of pads in the middle are for the Arduino Pro Mini module, with ATmega328p on it, running at 8Mhz. There are also some additional pads for the I²C and analog-only pins.
The two rows of 3-pin headers running along the Pro Mini are servo sockets. Since the servo plugs are relatively bulky, I had to put them close to the center of the board, so that the moving legs don't collide with them. This is pretty much the same as with regular Tote.
The 4×2 header below the Pro Mini is for an ESP-01 module. I decided to give up on controlling this robot with a TV remote, and instead will go for WiFi, mostly because that makes it easier to use it for more advanced stuff. If you want, you can still connect IR sensor to one of the free pins, and add the code for it, but by default the control will be through the esp8266 chip.
Below that the 8×3 header breaks out all the free pins from the Arduino, so that you can connect your own things to them. Each pin also has a 3.3V power and ground pins next to it, because sensors are likely to need that. The pins A6 and A7 are analog-only, and the pins 03 and 02 have interrupts. Also, pin 13 has a build-in LED on the Pro Mini.
The 3-pin headers on both sides of the robots break out the I²C bus and the serial interface for the ESP8266. The I²C bus is used for internal communication and has pullup resistors to 3.3V, but you can also connect your own hardware to that, as long as the addresses don't clash. The serial is mostly for debugging purposes (it can't be used for flashing the esp, because of the pullups on the I²C line). The I²C line and power are also broken out on the 6-pin header in the lower right corner.
In the upper right corner there is a battery plug, and a voltage divider connected to the A7 analog pin. If populated, it can be used to monitor the battery voltage -- but then of course you can't use A7 for your own sensors. The ESP8266 also has the possibility of monitoring its own power voltage, so I will see how well that works, and if it's better, I will leave that unpopulated.
The circle on the left side of the board is a place for a capacitor, to protect against brownouts. Next to it are the two resistors acting as I²C pullups.
And that's it. It's not very complex -- to be honest, the PCB is mostly to just keep all the things together and act as the robot's body.
-
Prototyping and Controller Code
03/06/2016 at 19:42 • 0 commentsWith the addition of ESP8266, Tote will now have two processors on board, and it makes sense to split the responsibilities for them a little bit. The ATmega328p on the Pro Mini is relatively slow (8Mhz) and weak, but has a lot of inputs and outputs, which makes it perfect as the servo controller, and generally as the spinal cord of the robot, controlling low-level reflexes. The ESP8266 is much stronger and faster (it has to be to handle WiFi), and so it could handle higher-level functions.
Because the time is precious, I started to work on the code for the Pro Mini already. I made a prototype using one of the older boards, but with the new leg configuration, and with some cables for connecting the ESP8266 to it:
Now I'm copy-pasting bits and pieces of the original Tote code, and adding some I²C communication on top of that. Basically, the ESP8266 will be sending coordinates for the legs to the Pro Mini, and it will handle leg inverse kinematics.
-
PCBs Arrived
03/10/2016 at 09:35 • 0 commentsThe printed circuit boards for this version of Tote just arrived! I will build a prototype with one of them later and test it, but so far they look good:
-
Mistakes and Workarounds
03/10/2016 at 20:26 • 0 commentsSo... the PCBs arrived, and they are mostly fine... Mostly.
Turns out that I somehow managed to delete the trace that connected the power supply to the servos on the left side with the power supply of the servos on the right side. Which means that servos on one side don't get any power. A quick soldering of a jumper wire solved the problem -- but I will have to do it for every of the 10 boards. Sigh.
But otherwise it all seems to be fine.
Oh, except for the battery placement. It will have to go on the top of the robot (obscuring the Jolly Wrencher logo), because the ESP8266 on the bottom takes too much space on the bottom.
Here's the PCB with everything soldered to it and with one servo attached:
-
Updated PCB
03/11/2016 at 10:29 • 0 commentsI fixed the PCB, and updated the link in the bill of materials to point to the new version. I also ordered the updated boards -- if they arrive before the workshop, we will use them. Otherwise there will be this additional jumper wire on all of them...
-
First Prototype
03/11/2016 at 18:07 • 0 commentsThe prototype unit is more or less ready. In the end I took the legs from one of my other Totes, so I have no step-by-step drawings. I will do rendered images instead -- they should be much cleaner and easier to follow then too.
On the software side, I have the Arduino code that does leg inverse kinematics pretty much ready (just need some trimming for the servos positions), and a basic Python code for the ESP8266:
from machine import I2C, Pin import ustruct class Robot: I2C_ADDRESS = 0x09 def __init__(self): self.i2c = I2C(sda=Pin(0), scl=Pin(2)) def leg_move_to(self, leg, x, y, z): data = ustruct.pack("Bbbbb", 4 * leg, 1, x, y, z) while True: try: self.i2c.writeto(self.I2C_ADDRESS, data) except OSError: pass else: break
This lets you move each of the legs to any position. So far so good. Next I will try to actually make it walk, but I doubt I will have any time for that in the following week, which is full of travelling for me.
-
Parts Trickling In
03/19/2016 at 22:57 • 0 commentsIt has been over three weeks since I ordered the parts for 10 kits, and they have started to trickle in slowly. I'm putting them all in one box for now. If you ever wondered how a box of 40 servos looks like:
One of the packages with 40 servos is held by customs -- they requested clarification of what it is and how much it costs, and since I've been traveling the whole last week, I will be only able to send it to them on Monday. One more package is still on the way -- with 12 servos per robot, ten kits makes 120 servos.
In the mean time I learned that in the end we will need 25 kits, so I quickly ordered additional parts, with some faster shipping. Fortunately they are cheaper in bulk, so that actually evens out the shipping costs. Next time I'm doing it, I'm going to order 300 servos instead of 120 -- due to the magic of bulk orders, the price is roughly the same.
Same goes for the printed circuit boards. At DirtyPCBs, whether you order 20 or 30 boards, the price is the same...
-
LiPo Chargers
03/26/2016 at 21:03 • 0 commentsThe conference is nearing, and I'm still waiting for the parts. I really hope that they will arrive on time. I'm not quite panicking yet, but soon I will probably start.
While waiting for the parts, I still need to write the remaining code for the ESP8266 (and possibly improve the code for the Arduino). Today I didn't even have enough concentration to do that, so instead I started soldering things. I still don't have all the parts to solder the PCBs, but I started with the LiPo chargers. The batteries I got have JST plugs on them, which easily plug into standard 2.54mm headers. But sooner or later someone will plug them in reverse, and if you do that with a cheap LiPo charger, you could have a fire. So I soldered proper JST sockets to all ten chargers (that's how many I have, as that was the initial count for the workshop, you will have to share).
I can already tell that soldering the remainder of the kits is going to be a full-time job. Hopefully the parts will arrive next week, so I have a weekend to do that.