# 555 PWM motor driver controlled by external analog signal

I used the below 555 timer PWM circuit to control the speed of a dc motor, and it works like a charm :)

now i have a requirement to change the PWM speed externally from another module, that module consists from a simple potentiometer, as shown below

both VCC and GND is common between the 2 modules. so basically what i need is to find a way to make the output signal from the POT, change the speed of the PWM output, alternative to change the R100k value in the first picture, i could not make it works at all :(

i also tried the VCO mode, but the result of motor speed was not reliable,

• We don't expect every post to be perfect, but posts with correct spelling, punctuation, capitaisation and grammar are easier to read. They also tend to get read and upvoted more frequently. Remember, you can always go back at any time and edit your post to improve it. See Write to the best of your ability on the site's help pages. – Transistor Oct 15 '19 at 21:04
• Are you required to use a 555? – Caleb Reister Oct 15 '19 at 23:24
• Not at all, am open for any other suggestions, just need it to be as linear as possible with the pot. – Tam Oct 16 '19 at 5:13

The easiest way to convert a variable voltage to PWM is to feed it and a triangle/sawtooth wave into a voltage comparator.

Obviously, this means it's time to abandon the 555 implementation in favor of a new design altogether. You can get "function generator" chips that will produce the needed triangle wave more easily than you can get anything based on the 555 to do it.

Of course, the modern way to do this is to get a small MCU that has an ADC to read the signal voltage and a timer capable of generating PWM, and program it to do the job.

• Voltage-to-PWM converters (like the LTC6992) are also an option, though in this case I would also probably recommend a microcontroller. – Caleb Reister Oct 16 '19 at 2:20
• yes sir, i totally agree, MCU will be the magic to resolve this issue, i only selected the 555 cuz it is easy to setup and cheap. and the module am using is very tight in space, i can only use 8 pins chip with minimum components as possible – Tam Oct 16 '19 at 5:17
• Yes, I understand that the 555 met your original requirements. But you're not married to it, so now that the requirements have changed, it's time to select a different solution. You can get MCUs that fit the requirements in 8-pin or even 6-pin (SOT23-6) packages. The only external component required would be a decoupling capacitor. – Dave Tweed Oct 16 '19 at 10:58

Check out pin 5 on the 555. It's the control pin, and it is not documented well. But if you look a the datasheet, you'll see that pin 5 sets the reference voltage for the comparator and by changing that you can change the PWM duty cycle.

wikipedia description of pin 5:

Control (or Control Voltage): this pin provides access to the internal voltage divider (​2⁄3 VCC by default). By applying a voltage to the CONT input one can alter the timing characteristics of the device. In most applications this pin is not used, thus a 10 nF decoupling capacitor (film or C0G) should be connected between this pin and GND to ensure electrical noise doesn't affect the internal voltage divider.2 This control pin input can be used to build an astable multivibrator with a frequency-modulated output.

Here is an image of the internals of the 555. You can see that pin 5 goes to an internal voltage divider $$\\frac{2}{3}*Vcc\$$. You can connect the pot there and cause the duty cycle to change.

• Just be aware that there is a nonlinear relationship between the voltage on the CV pin and the output duty cycle. – Caleb Reister Oct 16 '19 at 2:13
• @CalebReister, True, and there's also a non-linear response from most pots... – Aaron Oct 16 '19 at 4:35
• @Tam I would recommend taking a look at the ATtiny10. It has 6 pins, an 8-bit ADC, and a 16-bit timer. – Caleb Reister Oct 16 '19 at 7:00