1
\$\begingroup\$

I'm trying this circuit, and variations of it, to control a mini servo motor.

The circuit uses two 555 timers to generate a constant-frequency PWM signal with adjustable duty cycle to control the servo:

enter image description here

This is the voltage regulator circuit ("REG."): enter image description here

The input voltage Vin is provided by a 9V AC-DC adapter that can provide up to 1200 mA (I tried 7.5, 9, and 12V, same results; now I know that 7.5V is insufficient for the LM317 to provide 5V output).

With the circuit above, the results are very unstable, meaning the movements of the servo are very "jerky", jumping around all the time. Every once in a while, it even "goes crazy" and goes all the way in one direction and never unlocks from there. I looked at the PWM waveform on a cheap oscilloscope and it seems to be pretty noisy.

Now I've tried instead with two separate LM317 regulators, both powered by the same 7.5V AC-DC adapter. One regulator powers the servo, and the other powers the signal generator pictured above.

This is the version with two regulators that works well: enter image description here

This works perfectly.

I guess the servo adds noise to the circuit which ends up affecting the PWM signal and, somehow, splitting the circuit into two parts with separate voltage regulators keeps the noise isolated from the signal generator part of the circuit.

But why? And more importantly, is there a simpler way to achieve the same with only one regulator? Like adding a capacitor somewhere?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ how are you powering the motor? A single voltage regulator simply might not be able to supply the needed current and keep its output voltage., \$\endgroup\$ Commented Aug 25, 2024 at 17:54
  • 1
    \$\begingroup\$ What exactly is your objection to the dual regulator configuration? It is known to work and is probably smaller and cheaper than any passive filter that would be as effective. \$\endgroup\$ Commented Aug 25, 2024 at 18:18
  • 1
    \$\begingroup\$ You have not shown the circuit you have actually tried it looks like. Everything not shown matters: the power supply, the connections to that, any other capacitors you may have, star points for 5V and ground, etc. Edit the schematic to show exactly your parts and your connections, and show a picture of how you assembled it (top and bottom if on a PCB). Basically, this approach using a double 555 works just fine as long as it has a stable power supply. That will not be the case when you power the servo from the same regulator as the 555. As you have found out. So you already have a solution :) \$\endgroup\$ Commented Aug 25, 2024 at 20:00
  • \$\begingroup\$ @DaveTweed I just thought using two regulators might be overkill \$\endgroup\$ Commented Aug 26, 2024 at 19:52

2 Answers 2

6
\$\begingroup\$

But why?

Because your regulator circuit (including wiring/connections) isn’t stiff enough to remain stable with the load of a servo motor.

And it isn’t stiff enough because a LM317 needs at least 3V of headroom. In practice this means you need a 9V supply to get 8V minimum at the input regulator.

And more importantly, is there a simpler way to achieve the same with only one regulator?

Use a 78L05 for the 555 supply, and a 7805 for the servos. They are single chip solutions, and will work with 2V of headroom, so a 7.5V supply is adequate. They only need two capacitors each (one on the input, one on the output). There is nothing complicated about two regulators. The PC or phone you typed the question on probably has a couple dozen voltage regulators :)

Like adding a capacitor somewhere?

You have not shown your actual circuit (clear photos!). Schematics are necessary but insufficient. You see, what’s not said is that a competent engineer (or hobbyist!) implementing the schematic will know how to physically lay the circuit out to perform well, and what parts to add - whether on a solderless breadboard, a protoboard, or a PCB.

A properly assembled double 555, with adequate bypassing and proper layout technique (even if connected with wires not traces on a PCB), will drive the servos just fine without problems. I imagine that you have inadequate physical construction of the circuit, regulators included.

And you don’t show the complete schematic. Yes, those regulators you added need to be on the schematic. You shouldn’t need to talk about them in words. Schematics are there to communicate those ideas.

\$\endgroup\$
3
  • \$\begingroup\$ "a LM317 needs at least 3V of headroom" - Interesting, I missed that, I thought 2.5 was enough. However, I've tried with 9V and 12V input, makes no difference. \$\endgroup\$ Commented Aug 26, 2024 at 18:55
  • \$\begingroup\$ "There is nothing complicated about two regulators" - Cool, I'll probably keep them then, but I'm surprised, there isn't a single regulator capable of providing a stable/clean enough output given a high enough input voltage? (note that as per my previous comment, I tried 9V and 12V input with the LM317) \$\endgroup\$ Commented Aug 26, 2024 at 19:04
  • \$\begingroup\$ "I imagine that you have inadequate physical construction" - yeah that's likely, it's a protoboard. I'll edit my question and add photos and complete schematics \$\endgroup\$ Commented Aug 26, 2024 at 19:04
2
\$\begingroup\$

But why?

Hard to guess, we don't know how you power your motor, but that's probably critical here. My guess is that the motor draws enough current to make your regulators drop in voltage, and because the NE555 is an ancient circuit that should have long gone the way of the dinosaurs, it barely works at 5V supply and starts misbehaving when that "sags".

And more importantly, is there a simpler way

Regarding simplicity: using two 555s to generate a PWM signal seems pretty complicated to me, and the circuit you chose seems to be complicated even for that (e.g. why R4 and R6? Very strange!). I'd say a simple microcontroller with two ADC channels (for the two necessary potis) would totally do; that would reduce your bill of materials to 4 compotents (1 Micrcontroller, 1 decoupling capacitor, 2 potentiometers).

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Why R4 and R6? One is a trimmer that, along with R7, calibrates the range of the main control knob. \$\endgroup\$ Commented Aug 25, 2024 at 18:25

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.