I’m assembling a kite photography rig of sorts with a raspberry pi zero w and was wondering if I could use my pimoroni Pan-Tilt Hat minus the Hat with some other (lighter and smaller) pHat (1) or in a direct GPIO connection scheme (2).
The Explorer pHat comes to mind in which case the doubt would be if I could use the pantilthat python library even if some reconfiguration would be in order.
Any recommendation (considering my very low electrical knowledge, specially) regarding direct GPIO connection of these 2 servos would be very much appreciated.
The various ways of driving servos directly from the Pi are kind-of terrible, and tend to result in jittery servo performance. It can be done, though. Explorer pHAT or HAT is unecessary since it inverts the protected outputs and makes generating the right signal for a servo slightly trickier.
Or, as @alphanumeric suggests, grab another, more compact servo driver since you really can’t beat dedicated chips! (Of course it depends what you want to do with your servos, sometimes a bit of inaccuracy and jitter is fine)
I have read about this a while back but forgot about motors not being servos! I’m sorry for that.
Thank you again for your help, not only for having a precise servo for my current project as well as having a better way to setup the jittering servo (which is, in itself, a very interesting thing to explore next)
Hello! Returning to this topic since I’ve finally bought the Adafruit 16 servo bonnet as suggested.
I’ve followed the adafruit instructions using the servos from the Pimoroni Pan-Tilt Hat I got before, connected external 5v power (powerbank+cut up cable) but ended up with a quite non-tuned servo pair, moving all over the place and quickly disconnected for fear of self-destruction.
Could I use Pimoroni’s wonderful pantilthat library with Adafruit’s servo bonnet? Or do you know of any resource for tuning servo setup with Adafruit’s library?
I believe @caperjack bought one of those. I would use the adafruit library with it.
Maybe they were just hunting for their limits? Jack will likely know if that was normal or not.
I have played around with servo’s once or twice. I don’t remeber them moving on their own though?
It was a while ago, on my BBC Micro-Bit I think?
Hey Jack, I was referring to the Adafruit Servo Bonnet. pnbv switched to the servo bonnet after figuring out the Explorer pHat wasn’t going to do what he wanted. I do believe you also bought one of those? I think you mentioned it in the Raspberry Pi thread on Ten Forums.
Good idea but re-checked the wiring and it was ok. Maybe my power source isn’t right.
I’m getting some electrical noises with servos stationary some of the times but I think I figured it out regarding erratic movement.
It seems it is only a question of setting the right range since the servos are assembled to the Pan Tilt mechanical frame (don’t know what to call it:) which prevents some degrees of motion.
This is, I believe, what happens with Pimoroni’s pantilthat library, it has settings appropriate to the specific Pan Tilt Hat kit. Pimoroni’s Pan Tilt Hat works very well in general and from zero’s gpio power, which is convenient. Considering moving KAP rig to a RPi 3 A+ with Pimoronis’s hat.
If anyone has experience of using Pimoroni’s pantilthat python library with Adafruit servo bonnet
Ah, OK, I figured it couldn’t hurt to make sure you didn’t get the plugs on backwards by accident.
I “think” most servo’s have a 180 degree range of motion. The standard inexpensive ones anyway. The range of motion on the pan tilt thingy may be less than that, and accounted for with its matching hat. Mixing and matching can get you unexpected results. Been there done that, lol. Its all part of the game. ;)
I don’t have the Pimoroni Pan Tilt, or the Adafruit servo bonnet.
I’m no expert, by any means. But my understanding is the library is written for the hardware, the chip thats controlling the servo’s. Not the servo’s per say. That being said, you need to look at what chip is used on either board, how its addressed, i2c etc, and what address it uses etc. Then make the necessary edits /changes.
I have no idea how easy or hard that might be.
Something that just occurred to me is, it looks like its important to get the horns / arms on the servos in the correct position. The white bits that screw on the servo shaft. If it uses them that is. I haven’t found the assembly instructions yet.
If your orientate those wrong your range of motion will be wrong and it will hit up against the stops. probably some thumping, bumping and buzzing as it tries to keep moving but can’t.
And saw this on the product page," The module pans and tilts through 180 degrees in each axis."
I would ay you’ll get the full range of motion if assembled correctly. ;)
EDIT: 2 Better assembly instructions, https://learn.adafruit.com/mini-pan-tilt-kit-assembly
Shows you how to get the white arms on in the correct position. If you bought the pre assembled version, just ignore this info. ;)
I got the assembled variety of the Pan Tilt Hat, so it was aligned already. But since the Adafruit Servo Bonnet is not intended to be run with particular servo or servo assembling I guess it needs figuring out which start / end positions are appropriate.
I got this aspect on the back-burner as I’m in need of some other parts to take the pan-tilt to the sky and I’m now concentrating on the projects’s power supply.
Watching the video on the pan tilt, the servos have the full 180 degree movement. The pan can swing 180 left to right. And the tilt goes from looking straight up, to straight down. If yours was pre assembled the servo’s shouldn’t be bump stopping on anything other than their internal limits. Near as I can tell from the video anyway.