Maker Pro
Maker Pro

How change the Frequency of a 555 timer with another circuit ?

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
Hello,

If I wanted change the frequency of a 555 using a processor or some other logic circuit, how would I configure that circuit ? Can I just use some switching transistors to short or change resistance value on the 555 ?

Any help is appreciated.
Thanks
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Apart from @Bluejets ' proposal: If you have a processor, why bother generating a variable frequency by a 555? Use the processor to generate the timing you need. This will be much more precise than a 555.
 

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
I would like my processor to spend time checking the inputs and not miss a valuable event than having a loop running constantly and get sluggish responses to the inputs.
 
Last edited:

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Is the 555 running as an astable oscillator?

Do you care if the duty-cycle of the 555 output changes with frequency?

How accurately does the frequency need to follow the control voltage?
Or do you just want step changes in frequency?
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
not miss a valuable event than having a loop running constantly and get sluggish responses to the inputs.
That's what timers are for: to offload this task from the processor. After setting up the timer the only action th eprocessor has to take is when the frequency needs to be changed.
Many tutorials to be found online, e.g. this one.

Oh, and I just found this interesting blog on achieving nearly arbitrary accuracy with Arduino's timers.
 
Last edited:

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
The datasheet of the LM358 shows a VCO.
 

Attachments

  • LM358 VCO.png
    LM358 VCO.png
    28.6 KB · Views: 9

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
The 358 example looks interesting, but that changes the frequency.
To control motors and other systems there needs to be a way to control the duty cycle of the signal.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
This thread is about changing the frequency. The LM358 VCO does that.
Now you want to change the pulse width to do PWM. Here is how a 555 can have an adjustable PWM:
 

Attachments

  • 555 Motor PWM speed control.PNG
    555 Motor PWM speed control.PNG
    14.6 KB · Views: 7

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
So you are changing the requirement from controlling the frequency to changing the duty-cycle of a fixed frequency.
That's a big difference.

Do you want to control the duty-cycle in steps by changing the values digitally, or do you want an analog continuous voltage control.
If you want steps, how many?

Or are you just asking questions in general?
 

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
Digital would probably be the pimpliest by swapping out the resisters with different values with a relay ?
Analog seems like it would be a lot more involved, but for the sake of learning and maybe a future project I would love to see how to do it.
Thanks
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
If you want to control the duty cycle, not the frequency as initially stated, that is called pwm. Many microcontrollers have built-in pwm units. This makes it very easy to control the duty cycle while at the same time requires no processing power at al.
 

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
Thank you for that. Can you provide some example chips that I could research ?
Thank you.
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Analog seems like it would be a lot more involved, but for the sake of learning and maybe a future project I would love to see how to do it.
Not too involved.
LTspice simulation below of an analog-control PWM circuit using one chip comparator (LM339/393), that goes from 0% (fully off) to 100% (fully on) duty cycle.

upload_2022-2-6_7-53-6.png
 

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
Is the frequency controlled by R1 and C1 ? Is there a equation for the frequency ?
Thanks
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
I deleted my reply about the datasheet for a 555.
The last circuit has a frequency determined by R1, C1 and the speed of the comparator.
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Is the frequency controlled by R1 and C1 ? Is there a equation for the frequency ?
Yes and yes.
At frequencies low enough so the comparator transition time is not a significant factor, the approximate frequency is F ≈ 0.345 / (R1*C1).
 

Sid03

Jan 31, 2022
7
Joined
Jan 31, 2022
Messages
7
230 Hz ? Did I get that right ?
I read somewhere that you should try to get the freq up above 20kHz, so that if it does create a hum it will be well above the hearing range ? Is that true ? Will this chip run at that freq ?
Thanks
 
Top