I’m having problems powering a servo on my auto phat from external power.
I can operate the servo when I power auto phat directly with the on board usbc but not from the srv pin.
I have soldered header pins to auto phat and have continuity between the srv pin and all positive servo connection pins. I have continuity between phats ext power ground and the grounds on the servo connections.
I’ve tried supplying 5v to srv from the pi’s 5v rail via jumper wire. This does not work.
I also tried powering srv via 4 aa NiMH batteries (which report 5.05v on my multimeter) and still it does not work.
I am reading 5.05v on the srv and gnd pins on the phat.
The servo I’m using is one of the common blue tower pro sg90.
From the on board usbc everything is fine but not external power.
Any help appreciated.
Can you please share the code you are using and a few photos of your wiring/setup?
I’ve tried separating the auto phat from my main project which is a robot car and mounting the phat on a separate pi. The servo still works when I use the usbc connector on the phat, but not when I use external power. However this time when I use external power pins I get an error about the i2c device.
Any suggestions appreciated
#!/usr/bin/env python
import pi_servo_hat
import time
Initialize Constructor
test = pi_servo_hat.PiServoHat()
Restart Servo Hat (in case Hat is frozen/locked)
test.restart()
lr_servo_channel = 0
Test Run left and right
#########################################
Moves servo position to 0 degrees (1ms), Channel 0
test.move_servo_position(lr_servo_channel, 50) #ahead
time.sleep(0.5)
Moves servo position to 90 degrees (2ms), Channel 0
test.move_servo_position(lr_servo_channel, 150) #left but not full
time.sleep(1)
test.move_servo_position(lr_servo_channel, -35) #right full
time.sleep(0.5)
test.move_servo_position(lr_servo_channel, 50) #ahead
time.sleep(0.5)
test.restart()
For external power, you need to get rid of the jumpers you have and connect a 5 volt USB power supply to the USB connector on the phat.
https://cdn.sparkfun.com/r/400-400/asse … owered.jpg
That configuration works but isn’t using external power. The external power pins are marked on the board in the ext pwr inputs group.
It also states on this page that you can use the usbc connector or external power; they are not the same thing.
https://www.sparkfun.com/products/16328
I have already used the mtr external power pin to control motors. The srv pin should also do the same thing for servos.
I just discovered this too…
When the auto phat is powered by usbc, running ‘i2c detect -y 1’ will list 5 i2c addresses.
When the auto phat is powered from the pi via the header, running ‘i2c detect -y 1’ will only list 3 i2c addresses.
I just cracked the problem. It seems if you want to use the servo ext power you also have to provide power to external 5v pin in the ext power inputs group. When you do this the extra addresses can be detected including the one for the servo controller