I have experience with using the pi build hat, though i wouldn't necessarily recommend it.
combining pi with Lego can be powerful and the build hat was cheap at £25. however there are problems with it when using the official library, which makes it not suitable for robotics.
the problems are documented here
[viewtopic.php?t=337816&hilit=build+hat+speed+control](https://forums.raspberrypi.com/viewtopic.php?t=337816&hilit=build+hat+speed+control)
[viewtopic.php?p=2128750#p2128750](https://forums.raspberrypi.com/viewtopic.php?p=2128750#p2128750)
[https://github.com/RaspberryPiFoundatio ... issues/152](https://github.com/RaspberryPiFoundation/python-build-hat/issues/152)
i have been working on an alternative library to overcome the problems and have made a project with it. It is driving autonomously. it uses odometer to track location and corrects it with computer vision. it just drives till it encounters an obstacle then engages the obstacle avoidance using distance sensors, it doesn't use a map of any kind to avoid crashing. also works in more messy environments.
it can now also detect Lego wheels using computer vision and use pose estimation to know where the wheel is in the world. next it will collect the wheels and return them to a specified location.
the library has pretty good speed control but i have not implemented position control. i have messed about with stall detection and that is pretty easy to get working though i haven't added it yet.
However it was a lot of work and pybricks just works. in future i will probably use technic hub or ev3 and find way of communicating with the raspberry pi. they are low cost. ev3 motors can be got for as low as £7.
you only need one battery for the pi and the build hat. the build hat will power the pi.
I think one of the advantages of lego over non lego is reusability. i previously made robots with non lego parts and i ended up with buckets of unused stuff. with lego you can buy stuff 2nd hand and everything gets used and then resused.
regarding backlash these videos are interesting
Akiyuki mentions the technique he uses to reduce backlash in video bellow:
I would like to know more about the method he is using and how it works but cant find much. Any insight anyone can give would be appreciated.
here is another interesting video showing a technique to reduce backlash with worm gears:
I have made a variation of this one using a larger spur gear, that i am going to integrate into a robotic arm i have built