Close
0%
0%

Wee Bug

Fluffbug but smaller

Similar projects worth following

While digging through my drawers, I stumbled upon a bag of sub-micro servos I bought a few years ago from HobbyKing for the #Pony Bot, but never used in the end, because they had wrong connectors. Turns out there are HK-282A servos with 1.25mm-pitch JST connectors and HK-282AS, with 1mm-pitch unidentified connectors. In any case, the Pony Bot is on hold indefinitely for now, until I can find the energy to actually program a gait for it, so I thought that maybe I can use those tiny servos for something else: make a tiny version of the #Fluffbug robot. That would also have the advantage of not needing to write a new gait code, since the one already written for Fluffbug should work.

So I went ahead and started to design a Fluffbug, but with everything smaller.

  • Not All Batteries are Created Equal

    deʃhipu6 days ago 0 comments

    With the new PCB in version 6.0 I switched to the bigger 16340 battery that I originally used in #Fluffbug, thinking that the extra weight is not so great, and extra capacity will be useful. Also those batteries are much easier to find, since they are commonly used in vapers. And incidentally, with version 6.0 I started to have problems with power. The robot would work on a fully charged battery for maybe half a minute, and then the servos would get all shaky, and soon the protection circuit would kick in and shut the power down.

    I initially thought the shaky servos are because those small 2g servos come in two versions: 3.7V and 5V, and maybe I got the 5V ones this time. So I made a PCB version 6.1 where I added a boost converter to give the servos consistent 5V voltage. It didn't make any difference, though, the servos were still shaky. I tried added capacitors everywhere I could, but that didn't solve the issue.

    On a hunch, I made a professional adapter out of a paperclip, and inserted the previous 14250 battery. Suddenly all the power problems went away, the servos are no longer shaky (both with the boost converter and without). Interesting. So I went looking for a 16340 battery from a different batch, and lo and behold, the power problems are also gone. It was the battery all along.

    Turns out that you really have to be careful where you get your batteries, because they differ not only in capacity (by the way, don't believe in what they print on them, a battery with that capacity would need to be four times bigger with this chemistry), but also in their C-rating, which is basically how much current you can draw from it at once.

    You need to somehow find a "reputable" source for your batteries, which is a bit of a problem, because obviously this is a lemon market. Out of curiosity, I also tried a battery removed from a vaper that I found on a sidewalk. Turns out that it performs really well, despite being a no-name thing. I guess the manufacturer of those devices found a trusted source.

    So if you really want to save on the battery, check your sidewalk for a free one. You will also save the environment from being poisoned with toxic lithium.

  • Add Some Fluff

    deʃhipu10/24/2023 at 14:33 0 comments

    I intentionally make my robots minimal in terms of additional aesthetics, to make them easier to make and customize for others. But sometimes you just want to have some fun, so when I saw this bunny-shaped ipods case, I knew what I need to do:

    It's just the right say to fit the Wee Bug's body inside, minus the battery. I just had to dremel two large holes in the bottom for the legs, and replace the battery holder with a more traditional pouch lipo battery.

    I also glued some small magnets to the lid and the case, to make the lid stay closed more firmly. As the microcontroller, this time I used a Waveshare RP2040 Zero board, so I have a bunch of extra pins at the bottom, that are not used by the servos. I added some wires to them, to potentially make use of them later. I think I will need at least one pin for an infrared remote control sensor, because that board doesn't have wifi for control. I have some sensors that look like small black eyes, so that should work pretty well. In the mean time I used a single goggly eye, just for some added character.

    While obviously this is a custom job, I think that ipod cases are a standardized and common enough thing for other people to be able to do similar things with them. It's a bit of shame that I couldn't keep the standard and replaceable battery.

  • Balancing

    deʃhipu10/14/2023 at 19:10 0 comments

    I had some time for coding at the hackerspace this week, so I wrote simple code for balancing to test the accelerometer. It goes something like this:

    import robot
    import time
    import lis3dh
    import busio
    import board
    
    
    i2c = busio.I2C(sda=board.D4, scl=board.D5, frequency=600000)
    accel = lis3dh.LIS3DH(i2c)
    height=20
    
    tilt = 0
    while True:
        x, y, z = accel.get()
        if x > 500:
            tilt = min(tilt + 20, tilt + 1)
        if x < -500:
            tilt = max(tilt - 20, tilt - 1)
        for leg in robot.LEGS:
            if leg.left:
                leg.move(0, height - tilt)
            else:
                leg.move(0, height + tilt)
        time.sleep(0.05)

    Even for simple code like this, the effect is pretty cool:

     Of course to make it useful, it has to also work in the other axis, and be integrated with the walking algorithm and others. I have some ideas about how to do it, though, so stay tuned.

  • A Display

    deʃhipu10/13/2023 at 20:47 0 comments

    There are many different microcontroller boards that you can use with Wee Bug, from the Seeedstudio Xaio, through Adafruit QtPy, to Waveshare Zero boards. They all have the power pins in the same places (sometimes mirrored), and the GPIO pins are flexible enough to be used in the roles they need in the robot. But the Zero is particularly interesting, because they have four additional pins at the bottom of the board, that could be used by an additional board connected on top. Like, for instance, a display. It so happens I was working on getting one display to work, and I needed to make a breakout board for it, so I thought why not, and made it a shield, or maybe a "face shield", for the Wee Bug.

    And since the other display I was recently playing with has the exact same footprint, I made the breakout in a shape that fits both of them. At a whim, I also added a footprint for the 1.8" ST7735 display on the other side, just because I could.

    Of course the next step is to make it display something interesting. I already experimented with eyes, and the closeup of a single monstrous eye that Adafruit demos do is a bit too monstrous to my tastes, so for now I went with the GIF animation I made for the #Astro-chan Badge. I plant to eventually re-draw the same character I used on the silkscreen on earlier prototypes, and animate it to make it look like it's controlling the robot from the inside, but of course that is much more work than it seems, so it will take a while.

    The practical advantage of having a display on a CircuitPython-programmed robot is the fact that you no longer need to explain how to connect to the USB console, so you can see error messages. People can just read the errors from the screen.

  • Version 6.0

    deʃhipu09/30/2023 at 21:10 0 comments

    That last prototype I mentioned in the last log finally arrived on Friday:

    And I got it all assembled and programmed today:

    I also have the camera and the accelerometer working, though I don't really do anything interesting with them yet. You can see that I re-used the servos that already had the cables shortened to the right lengths, so as to not be an unholy mess of wires, but if I didn't, I could tuck all the extra cables under the microcontroller board, plenty of space there. There is also a WiFi antenna hidden under the battery – the Xiao ESP32-S3 Sense board I used here comes with an external antenna.

    The bigger battery and longer legs work fine – the servos are easily strong enough to take it, and the hind legs don't need to move so high that they would collide with the battery.

    I'm really happy with it, and now I should be focusing on the software side of things, making the movements smoother, making use of that camera and accelerometer, and generally teaching it more tricks.

    I also want to try it with boards that are more or less compatible with Xiao, like the Adafruit QtPy, or Waveshare Zero. The latter will stick out a bit, and will need to be inserted up-side-down, but the extra pins could be useful for a display shield.

  • A String of Prototypes

    deʃhipu09/20/2023 at 17:23 0 comments

    The first Weebug was just a quick hack to see if it will work. It turned out to work even better than Fluffbug, so I made a second one, this time trying to make it look cool, and cleaning up the design. But if I want to do workshops with this eventually, I need to make it easily manufacturable and as easy to assemble as possible. So I made another prototype, with the same PCB art, but with an RP2040 chip instead of the unobtainium SAMD21.

    That was also a test for the JLCPCB assembly services, a test of the new leg design, and a test of the 1mm servo plugs, that are physically much smaller than the 1.2mm ones, at least in the SMD version. The results are... mixed. The assembly service works as advertised and is very nice, but now I have five assembled boards I paid for that I have no use for – I will explain why shortly. I also had to pay the customs duty on the package, because with shipping it went over the threshold, so it got more expensive than I anticipated. I think that in the future I will prefer assembling the prototypes by hand myself, even if that means I have to make a separate order at LCSC for the parts.

    What didn't work so great are the servo sockets, and that's mostly because of my own mistakes. First of all, I placed them too close to the servo mounting holes. There is enough clearance for the servos themselves, but not for the head of the screw that holds them in place. I had to break out my hot air gun and move the sockets slightly in on their footprints to make everything fit. Of course I can't expect anyone else building the robot to do that, so I can't give out or sell those boards. The second mistake is even more stupid. I swapped the signal and ground pins on the sockets. I was able to test the robot by carefully swapping those wires on the servos (the contacts in the plug are easy to remove and swap), but again, I can't expect anyone else to do that.

    And of course there is still the continuing problem of cable management, for which the only solution I found so far is to open each servo, desolder the wires, cut them to the right size from that side, and solder them back and reassemble each servo. The result is very clean and aesthetically pleasing, but it's a bit too much fiddly work for a workshop, and I can't do it for every servo in every kit.

    So that's a partial success. I definitely learned a lot, but there is some unnecessary waste in there...

    I also decided that putting a bare chip on my boards doesn't always make sense. It's great when I need a lot of GPIOs, for example for a display or camera, but otherwise using a development board is both less work, and, in at least in case of the rp2040 and esp32 boards, cheaper – when I'm not assembling them myself, anyways.

    In the mean time, I got my hands on the Seeedstudio Xiao ESP32-S3 Sense devboard, and I was greatly impressed. Not only is it blazing fast and has loads of memory and flash, but it even comes with a tiny little camera and microphone module, perfect for a robot like this. And it's still in the Xiao form factor. So I made another prototype, this time specifically for this Xiao board:

    It even includes battery recharging chip, though to use it you have to solder to some pads on the back of the board. That is what pushed me towards soldering the Xiao board directly to the PCB instead of using a socket. In hindsight, I think it was a mistake. For convenience, I made through-hole contacts on the back where those pads are, so they are easy to solder this way, but it would be much nicer to have the devboard removable. Oh, and I got the servo sockets right this time: the signals are correct, and I moved them out of the way of the screws. I had to move some electronic components under the battery holder, which made it later very annoying to debug my battery problems, but oh well.

    But I didn't avoid mistakes completely this time either. The DW07D chip I use for protecting the battery didn't work correctly this time, even though it worked in all the previous...

    Read more »

  • New Body in Action

    deʃhipu08/26/2023 at 22:53 0 comments

    As always, the PCBs arrived from JLCPCB, so I went ahead and assembled one. I had some fun soldering the accelerometer chip – it's QFN, but it was lying in my drawer for a few years, and apparently some of the pads got oxidized. Only after I went over them with a hot iron and flux, the soldered correctly. Good thing I decided to test the chip before I soldered the battery holder, because the chip is underneath it, and it would be a pain to have to desolder the holder first. Also, I was afraid that the THT servo sockets will be hard to solder on both sides of the PCB, but turns out they are far away from each other enough to not interfere with soldering. Phew. I still don't think I could make a fab do this, so if I ever decide to do a workshop with this robot, I will have to switch to SMD sockets.

    After it was all soldered, the UF2 bootloader flashed, and CircuitPython firmware uploaded, it was time to assemble the legs. And here's the first mistake: I made those long slots in the PCB hoping that I will be able to stuff at least some of the servo cables in there, to make it look a little cleaner. But I didn't anticipate how small this PCB is, and the cables simply don't fit in there. Oh well. If I ever make another version, I will remove the slots, leaving only the parts necessary for servo mounting. That will also make routing of the traces easier.

    With the legs connected, the servos zeroed and the initial leg positions calibrated, I copied some of the old code for walking (the SAMD21 build of CircuitPython doesn't include async functionality that my newer code uses), and it walks. I just had to change the order in which the legs are initialized, so the right timers get assigned to their PWMs. However, I found further mistakes.

    First of all, the switch that switches between walking and battery charging is reversed, so the labels are wrong. Not such a big deal, I suppose, and I could easily enough fix it by swapping the labels.

    I also thought that I made a second mistake, connecting the USB power so that it powered the servos, but that was just a mistake in soldering the shottky diode in reverse. After flipping it, the servos are now correctly only powered from the battery, so I can program the robot when it's switched to charging mode, without worrying about it making random movements.

    The next steps now may involve using the accelerometer for interesting things, doing something about the cables (I need to open one servo and see if I can easily shorten the cable from that side), and seeing if I can enable async on this build, possibly at the cost of disabling some of the built-in modules that I'm not using.

  • New Body

    deʃhipu08/18/2023 at 23:34 0 comments

    I couldn't sleep last night, and when I can't sleep I design PCBs. This time I decided to get back to this little cute robot and make a new PCB for its body. The original one was kinda slapped together without much deliberation, just to make it look like its bigger brother #Fluffbug but fit the small servo sockets. This time I decided to do it properly.

    First of all, I want some solution for the cable management. I can't use IDC plugs like with Fluffbug, because the wires those little servos use are so thin! But I also don't want to have to re-crimp the plugs after cutting the wires to the right size. So I decided to compromise by adding slots to the PCB under the servos, where you can hide excess wires. Hopefully they are large enough to fit all of them.

    Second thing is to give up on the Xiao board, and use a discrete microcontroller chip right on the board. That lets me use all the pins, makes the whole thing smaller, and, if you assemble it yourself, also cheaper. It has the downside that you can't easily replace the code by changing the modules. Oh well.

    And finally, the most visible change is to add some visual bling. This robot looks a little bit like a crab, and I could have leaned into it, but while I personally think crabs are incredibly cute, many people don't agree with me, especially the ones with some arachnophobia. So I decided to make it look like a mech from an anime movie or game instead, by adding a picture of a pilot on the front of the PCB.

    Last, but not least, I added an accelerometer chip in there, so that we can have some sensors to react to. The board should arrive in a week or so, and I will probably take some time assembling it. I will keep you updated.

  • New Servos

    deʃhipu06/14/2023 at 09:00 0 comments

    I like the tiny robot very much, but I didn't publish the design files for it, because the Hobby King servos I used for it are discontinued and you can't buy them anymore. But then I went to Aliexpress and searched for 2g sub-micro servos, and lo and behold, there is a whole bunch of them out there. They don't have a model number – all they tell you is that they have POM gears and 260° range of motion. And one of three kinds of plugs to choose from. They are slightly more expensive than your regular 9g servos, at about $2, but still very cheap. So I decided to go ahead and try to make another WeeBug with them.

    Oh, right, and they are black instead of white. So I got purple leg pieces this time around. I also used a slightly different battery holder, but it didn't require any modifications.

    Now how do the new servos work?

    Wow, they are fast! Much faster than the white ones. During calibration I had the robot literally jumping on the table when the legs adjusted their positions. I think I will be able to make this one scuttle around much faster than the white one.

    Other than the speed, I don't really see much difference. They have enough torque, and I'm only using the standard 180° range of motion anyways. There is no noticeable jitter or other problems.

    One difference is that those servos don't come with mounting screws, so you will need some screws of your own to attach the servos to the leg pieces. I also made the holes in the leg pieces too small, so some rimming/dremelling was necessary to make the servo horns and the screws fit correctly.

    I will be fixing those mistakes, and then I will publish the design files.

  • Just Programmed

    deʃhipu03/01/2023 at 22:00 0 comments

    I have finally "just" programmed it. It took me some time, because I had the pins on the left side of the robot completely mixed up, and I wasted time trying to guess which one is which (and which one needs reversing the servo) purely by watching them move while walking, which is, in hindsight, pretty stupid. Moving the servos one at a time worked much better. It's now walking, and has the code needed for receiving commands.

    Now I "just" need to add the code for reading the tv remote codes, and/or the gesture sensor, and I should be good.

View all 13 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates