1
\$\begingroup\$

I'm trying to control 3 20Kg servo motors powered by 6V (Link to servo motor datasheet here), using an STM32L5 microcontroller. Currently, the design uses an Arduino Pro Mini powered by 5V, and using the Arduino servo.h library to control the servo motors. The design does work, but the servo motor movements are jittery and shaky.

At the moment, I'm considering using something like this: PWM translating circuit. Not final

That said, I wanted to get a second opinion and/or alternate recommendations for translating the PWM signal. I have been considering optocouplers, but I haven't been able to find one that works within the voltages I'm using (3V3 in and 6V out, though the servos can go up to 6V8). It's a similar story for PWM drivers so far. I also don't want to go overkill with a solution if something like this is best for safety, stability and simplicity.

edits: I forgot to mention that the current version of what I'm working on uses an Arduino Pro Mini, and that I'm moving it over to STM. Included are details on its current behaviour

\$\endgroup\$
9
  • \$\begingroup\$ 6V is the power supply. The servos accept a 3.3V to 5V control signal, so why would you want to make it outside of the allowable range when you can just connect it directly? \$\endgroup\$ Commented Nov 28, 2022 at 16:25
  • \$\begingroup\$ Just to clarify, you're saying that even if the servo is powered by 6V, it's still meant to take a 5V PWM signal? \$\endgroup\$
    – E.HP.S
    Commented Nov 28, 2022 at 17:09
  • \$\begingroup\$ @E.HP.S - I agree with Sphero - the timing diagrams at the end of the datasheet specify the voltage as 3-3 to 5V. \$\endgroup\$ Commented Nov 28, 2022 at 17:15
  • \$\begingroup\$ Oh yeah, you're right. I think I remember seeing that before, but I thought it was odd. I'll test it out and see if anything comes up \$\endgroup\$
    – E.HP.S
    Commented Nov 28, 2022 at 17:26
  • \$\begingroup\$ @E.HP.S Yes, that's correct. \$\endgroup\$ Commented Nov 28, 2022 at 17:40

2 Answers 2

1
\$\begingroup\$

This solution is possibly the simplest you can get.

One-transistor level translators are quite popular for 3.3V-5V translation for UART which can go as high as 100+ kHz. So there's nothing wrong with using it. And, personally, I don't see a major concern. Just to prevent false triggers in case the STM32's PWM output is floating, put a resistor from that pin to 3.3V (something like 10k should do).

One thing to consider is the input impedance of the motor's PWM input as it'll interact with, possibly high, output impedance (R2) of the translator i.e. they form a voltage divider. Although the datasheet doesn't state anything regarding that value, I'm assuming it to be not less than a few tens of kiloohms. So, as long as you keep R2 within a few kiloohms you should be fine.

\$\endgroup\$
0
\$\begingroup\$

You'd better use a (MOS)FET (to get the full 0-6V signal swing) and connect your microcontroller output to the gate, and ground the source. Then invert your signal in hardware or software (your choice).

E.g. see here.

\$\endgroup\$

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.