0
\$\begingroup\$

I am trying to vary the duty cycle of a pwm signal based on an input voltage (higher voltage = higher duty cycle). I currently have a functional astable set at my desired freq (50Hz) and it is fed into a monostable. This was just my natural starting point. I am trying to use timer circuits to do this but am open to other non-microcontrolled options.

edit: I was not very clear. This is meant to drive a servo, similar to the needle of a speedometer in a way. The higher the input voltage goes the higher the servos duty cycle should go to advance the servo. As rough boundaries, 0 volts in should be min servo duty cycle of 5% pwm, and 2 volts in should result in a pwm out with 10% duty cycle for max servo deflection. I am at a loss when it comes to implementing a "voltage to duty cycle" controller and am in need of some guidance on an approach. Sorry about the clarity

Non-linearity is okay, probably up to 10% but less is better.

This is a one off so I can "make it work" by fiddling with r and c values to make it fit my needs.

\$\endgroup\$
4
  • \$\begingroup\$ Define all design specs, with tolerances and available parts. V+, f, PWM range, load , etc 2 to 18V is trivial with 4000 series Schmitt inverter oscillators ...define all inputs and outputs. \$\endgroup\$ Apr 16, 2021 at 18:46
  • \$\begingroup\$ What is the question you want answered? Is that a servo tester? \$\endgroup\$
    – Justme
    Apr 16, 2021 at 18:48
  • \$\begingroup\$ You need to ask a question in your "question" ... \$\endgroup\$
    – brhans
    Apr 16, 2021 at 18:59
  • \$\begingroup\$ What's the input voltage range and how do you want it to correspond to a specific duty cycle? How much non-linearity can be tolerated? (The 555 will definitely be somewhat non-linear if left to an RC timing method.) How repeatable does the circuit need to be if you build two of them? Can you calibrate them, or do you want to? Etc. \$\endgroup\$
    – jonk
    Apr 16, 2021 at 19:06

2 Answers 2

2
\$\begingroup\$

enter image description here

Figure 1. The LTC6992-1 does the job.

This device takes a 0 to 1 V duty control signal and outputs a PWM signal with frequency determined by RSET.

No messing!

\$\endgroup\$
2
  • \$\begingroup\$ oh, nice little thang! \$\endgroup\$ Apr 16, 2021 at 19:26
  • \$\begingroup\$ This is very cool, will cut down my mess of wires! Fortunately I am not pressed for time on this (yet) so I will order some of these, thank you. \$\endgroup\$ Apr 16, 2021 at 19:35
0
\$\begingroup\$

The classical way to do this is have "something" (in your case, the 555) generate a sawtooth (or triangle) wave and then compare (using a comparator) that to a reference voltage – the higher the voltage, the lower the amount of time that the sawtooth is above the reference voltage.

In fact, you can build that directly with a 555, using it's thresh or ctrl pins, and don't need an external comparator (the 555 is essentially a pair of comparators and a flipflop itself). But you say you already have the desired oscillator built – so just feed the (what I presume is a) square wave into a capacitor through a resistor to generate the sawtooth; use the discharge pin of your generating 555 to discharge at the end of each sawtooth period.

Personally, the 5 – 10 % duty cycle scale might not be trivial to directly "hit", so you might need an adjustable-gain non-inverting opamp adder to add an adjustable offset and control the range.

You say you don't want a microcontroller solution, and that's fine, but still be aware that a < 1€ attiny with an ADC will perform better with only a single external component (decoupling capacitor), using far less power than a NE555 (or other BJT 555 model).

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for your answer, this was something I have tried, but with so many cheap components the noise was just out of control by this stage and the pwm output was so bad the servo wouldn't play ball. And i hear you about the digital answer, but this is a showcase of analog parts, so it isn't an option sadly \$\endgroup\$ Apr 16, 2021 at 19:37

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.