Many thanks for providing the useful PanTiltHAT
I need to wire the pantilthat directly to my RPI4 pin-header using wires. What are the required connections to get the servos to work ?
I only need the 2 servo motors to work. I do not need any LEDs to be connected ( I am not using any LEDs).
I tried connecting the following using the plated-through holes provided on the pantilthat PCB;-
Are the above connections OK ? Is there some other connection also required ?
If yes, where are those connections , on the pantilthat board and which RPI4 pin ?
Many thanks for pointing out the site that shows the RPI pins I have used that information … but could you please clarify for me;-
Is there something incorrect in the 5 connection I have made ? ( because I assumed that those 5 would enable the 2 servos to be moved.)
If an EEPROM connection is also required …
To where on the pantilthat PCB does the RPI pin number 36 (EEPROM WP) get connected to ( there is no plated-through hole with that ID on the HAT PCB )
Are some other additional connections also required ? to were on the HAT PCB ?
I assume that just controlling the 2 servos on the PanTiltHAT does not require a lot of connections, but perhaps I am incorrect.
Many thanks for your help.
The following RPI4 pins are ground pins , and are shown with black U shaped symbols in the above diagram ;-
Pins 6 and 9, 14, 20, 25 , 30, 34 and 39. That’s eight RPI 4 ground pins.
It seems strange that all eight ground pins would have to be individually connected to the ScanTiltHAT PCB just to get the two servo motors alone to work !
Why would that be so ?
Any ideas why ?
Again … Many Thanks for your good help.
All of the grounds are connected together on the Pi. However, not all HATs use all of the ground connections, so you can never be sure which ground pin(s) the HAT needs connected, so it is better to just connect them all. Once you get it working you could experiment with removing some of them.
Did you get it working? What was the Python error you were getting?
Hi
Many thanks for your prompt help.
I have not managed to get the two servos to work via minimum wire connections.
I do not recall the exact details of the python error - sorry.
I think … going forward … I’ll try to figure out how to answer the question ;- which wire connections are required to just get the two servos to work . If I figure that out , I’ll post the results. Right now I suspect it’s something to do with the functionality of the PanTiltHAT EEPROM and it’s interaction with I2C comms ? Perhaps the grounds are actually several pull-downs on EEPROM pins ?? and … something to do with … Setting addresses ? That is unclear speculation by me - sorry.
As Shoe mentioned, on the Pi, all the grounds are connected together. On a Hat, that’s not always the case. It’s extra tracks that can be complicated to do. They count on the fact that once plugged into the Pi’si GPIO Header, they are then all linked together.
If you do an i2c scan does it show any addresses? sudo i2cdetect -y 1
Are you connecting your jumpers to the dual row of 40 pins or to the other set of convivence solder pads. I don’t think the eeprom pin is needed but if yes its pin 36 on the hat to pin 36 on the Pi’s GPIO header.
The PIC16F1503 is preconfigured for an i2c address of 0x15, and that’s what the i2c scan should show. i2c is enabled right?
JFYI, I have three Pan Tilt Hat setups here, Pi 3B+'s. All three are connected to the Pi’s GPIO header. I have added booster headers so I can use a heatsink on the 3B+. I run Motion Eye OS on mine. It’s a bit outdated, but it does what I want done. Pi V2 cameras. I bought the full kits.
Thank you for your good help.
I have found the problem;-
The plated-through hole in the PanTiltHAT marked as “3V” is faulty. It does not connect to anywhere. It is not connected to the respective female position (17) on the connector block. The other 4 plated-through holes do connect to their respective connector positions.
I suspect the cause is a PCB schematic design error or a manufacturing defect. I would not be surprised if all PanTiltHAT’s have the same defect - Users beware !
When I use the 4 plated-through holes plus a connection to the 3v3 position in the connector block the two servos can be driven and controlled. Also the RPI4 correctly detects the I2C address (15 ).
So … To use the two servos … There is no need to connect up each and every ground pin. It is possible to control the two servos using only the 5 connections listed above.
Caveat ;- This information relates to only the servo-motors, I have no information about using LEDs. Also, it might be good practice to connect more grounds, to avoid electrical noise or slight voltage drops.
To answer your question … why am I using wires ? ;- I will need to connect up several other items to the RPI4 40 pin pin-header, so I cannot just block off that header.
Why am I using individual wires ? . Well , basically I have limited physical space , plus a need to get connections from the RPI4 to different other sub-system items ( relays, sensors , 3v3 to 5v level-shifters, etc ) so at the moment I want the various sub-systems in my prototype to be connected using wires.
Later , when the complete system is working I might be able to replace wires and use ribbon cables or connector block adapters.