-1

I’m having problems with coral board edge tpu interacting with a servo micro SG90. I don’t think that the problem is in the code because I tried it on the reaspberry pi and it worked, maybe the problem is the power voltage of the coral dev board. Should I buy a separate battery pack to power the servo or is there another way?

this is the circuit I'm using

and this is the code:

import time

import board

import pulseio

from adafruit_motor import servo

pwm = pulseio.PWMOut(board.PWM3, duty_cycle=2 ** 15, frequency=50)

my_servo = servo.Servo(pwm)

while True:

for angle in range(0, 180, 5):  
    my_servo.angle = angle
    time.sleep(0.05)

for angle in range(180, 0, -5): 
    my_servo.angle = angle
    time.sleep(0.05)
mike
  • 1
  • 1

1 Answers1

0

The Coral-Dev-Board PWMs are per default configured as Open-Drain outputs, which means they toggle between "GND" and "Not Connected". Pi PWMs toggle between "GND" and "+3.3V". Search for "Open-Drain" or "Open-Collector" and you will find examples on how to add some resistors/ transistors to you bread-board to be able to communicate with the servo.