Just a hobby project, because it's cool
Body and construction is based on this cool hexapod project. Electronics are conceptually almost the same as the original project uses.
Code written by me, this was the main goal for this robot.
Before proceeding, the following needs to be ready. Some of them are not mandatory, such as pymakr-vsc, but it sure makes development hassle free.
- VSCode
- Better to keep Thonny around too. I found it being very consistant and reliable when in doubt about connectivity.
- Micropython
- For the microcontroller
- My board is a LilyGo TTGO ESP32 S2 which needs a micropython version that supports esp32-s2
- pymakr 2 for VSCode
- For live coding, syncing, reboot, soft reboot etc. with the microcontroller
- Optional. Thonny can do all of it but I like VSCode's appearance and it's features more.
- A suitable microcontroller with WiFi and bluetooth
- I went with LilyGo TTGO ESP32 S2
- Physical parts. All are available in the reference repository mentioned above. The author was generous enough to make the 3d files available in thingiverse as well.
- 18 Servos, at-least, to begin with since it's a 18-DOF robot.
- I went with tower pro mg92b
- Different servos would require the 3d files to be modified to support their dimensions
- Multi channel servo driver
- I went with the obvious PCA9685
- I needed two, since each of them supports 16 channels.
- One of their I2C address must be changed. See
config.py. How-to. - I used 9 from each. Maybe I will drive some leds with the free ones later.
- Optional if the microcontroller has enough pins and a power supply to be designed in such case
- I went with the obvious PCA9685
- Power supply.
- Mainly a battery that is capable of supplying required power for the whole system. I used a 3S 2200mAh 30C LiPo that I had lying around from my rc hobby.
- I went with a mini360 buck converter for the microcontroller
- I chose this 10A buck converter to power the servos
Few mandatory things and some convenient tools are needed to be setup to make life easier.
- pymakr 2 should be setup with VSCode
- While it's optional, it's good to setup thonny as well incase pymakr gives trouble, which is probable when a new update drops for VSCode
- Also optional but nice to setup webrepl since it serves as a wireless connection point where we can upload code.
- by this point, REPL can be easily accessed using thonny or pymakr-vsc
boot.pyseems to be a good place for it right after WiFi setup
- Nodejs should be installed for pymakr to work
- Micropython, on the microcontroller, should be installed using esptools
- Rename
secretConfigs.sample.pytosecretConfigs.pyand populate the values - Map joints and update values in
config.py
- pymakr was a nightmere to work with for me and resorted to thonny and webrepl (yes one is enough). pymakr 2 seemed to be much better. Although I ran into this problem, the solution there did the trick for me. The thread has some explanation as well.