1

We have a hat https://www.adafruit.com/product/4280 to turn i2c signals into pwm signals, into raw power for a DC motor. Let's start with this sample code:

import time
from adafruit_motorkit import MotorKit

kit = MotorKit()

kit.motor4.throttle = 0.7
time.sleep(500.0)
kit.motor4.throttle = 0

The first bug is the motor doesn't spin for 500 seconds; it lurches and then sits still for 499 seconds. (Our robot with our full stack of software work correctly, so that's not important)

The next bug is my input power is 12v, and when I set throttle = 1.0 my voltmeter says the hat's output lugs are giving 11v.

We want 2 more volts because the specifications say it can go up to 13. Should I supply more input power? or is there something to configure?

3
  • 1
    please ask two separate questions ... this is not a forum ... it is a Q&A site ... your two questions cannot be answered by one snswer
    – jsotola
    Jan 28, 2022 at 21:27
  • (1) Yes. just give higher voltage. (2) Use drivers of higher current, or add external power mosfet. Eight way you can drive much higher current.
    – tlfong01
    Jan 30, 2022 at 7:43
  • I think the first question here cannot be answered until the second one is, so there is really only one question; as tlfong and the existing answer imply, the whole issue might be just not enough power, and correcting that might well solve the behaviour issue.
    – goldilocks
    Jan 30, 2022 at 16:19

1 Answer 1

1

Start over, it appears you have a solution looking for a problem. Determine how much power you need to do what you want to. Determine what voltage you need, something standard such as 5,6,12 etc are the best choices. Next determine how you are going to drive it and be sure the driver can supply the needed energy to the motor. MOSFET drivers are the best, some such as the L293 have a voltage drop of about 2.5 Volts at a few hundred mills. I do not believe your meter is giving you an honest answer. PWM is not the same as DC, it is a complex AC waveform, by definition the voltage stays the same. A scope is the best instrument to measure it with, it will show the duty cycle, and voltage. You can purchase an 8 channel 24Mhz logic analyzer for less then $10.00. Without a schematic and links to technical information for each of the hardware devices this is my best SWAG..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.