Author Topic: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?  (Read 2981 times)

0 Members and 1 Guest are viewing this topic.

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
I would like to make a strobe which varies automatically in frequency between 8-20 Hz. Is that something I could do with a 555 chip or would it need to be something more complicated? I need it to ramp up and down in frequency automatically so I can't adjust it with a potentiometer or something.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #1 on: February 02, 2019, 11:55:17 pm »
Yes, this can easily be done with a couple 555 timers. Basically it is the same as the "police siren" where one timer generates a ramp which controls the frequency of the second timer.
« Last Edit: February 03, 2019, 12:00:35 am by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 
The following users thanked this post: seanspotatobusiness

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #2 on: February 04, 2019, 12:59:22 am »
Thanks very much! After copying the most common versions I found lying around the 'net, I've got the following. I'm having trouble trying to determine what values to use to achieve the desired outcome. I guess most people don't care what specific frequencies their sirens sound but I'm quite particular in needing 8-20 Hz. There are calculators for single-chip circuits but I'm not sure whether they apply; also I'm trying to work backwards from a particular frequency range and duty cycle (50%) whereas they ask me to specify the resistor and capacitor values. I'd like to go from 8 Hz to 20 Hz over the course of 15 seconds and then go back to 8 Hz ad infinitum.

« Last Edit: February 04, 2019, 01:19:44 am by seanspotatobusiness »
 

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #3 on: February 04, 2019, 02:25:20 pm »
Am I right in thinking it isn't actually possible to make a device this way which moves between 8 and 20 Hz over a period of about 15 seconds? It seems like the modulation of the second 555 chip by the first chip is inextricably correlated to the frequency of the first chip so 8-20 Hz output and 15 seconds period are just not compatible?
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #4 on: February 04, 2019, 03:21:02 pm »
Your schematic, the right 555 would generate a frequency of ~ 2kHz, with the left @30Hz.  So the right 555 would switch between two frequencies at 30Hz, because the output is either high or low - it won't slowly move between the two frequencies.  Also you don't need C4, it should be a low value resistor, say 100R.  The reason is, often circuits with two 555's are generating a "siren" which drives a speaker - this requires a large value cap on the output to drive the speaker, but you're driving a MOSFET which is driving an LED.   

And.. you're using a P channel MOSFET, on the high side, wired backwards.  I would use a N channel MOSFET, on the low side (source to GND, drain to LED cathode) or an NPN bipolar transistor.  I can provide a schematic if you don't know what I'm talking about.

Two things:
1) although you have explained your requirements quite succinctly, am I correct in saying you wish for the 8Hz strobe to slowly increase in frequency to 20Hz over the course of 15 seconds, then ramp down again over another 15 seconds?  Or do you want to immediately go back to 8Hz again?  The difference is, the first requires a triangle wave, that reaches its peak in 15 seconds, then back to its low in 15 seconds, and the latter requires a sawtooth wave.  A sawtooth can be generated with a 555 and an extra transistor, but I am unsure if one can create a triangle wave with it.   THere are opamp and comparator circuits that can do this.

2) Do you have access to simulation software?  I believe  LTspice is free, and includes an NE555 timer model.  Its fairly accurate and you can play around with it, trying different ideas and values to see what kind of output you get.

You are correct in saying that its quite difficult to obtain a specific frequency when you're changing the voltage on the "CV" pin of the 555, as this changes the thresholds of the internal comparators, and so, changes the conditions - this means that the equations we use for the 555 are no longer valid.  This is why I suggested using LTspice.

You don't have to use 555's.  There are comparator and opamp circuits that can produce triangle or sawtooth waves, as well as square-wave oscillators.  You may even requires a combination of the two, but its certainly "doable".
« Last Edit: February 04, 2019, 03:40:05 pm by Buriedcode »
 
The following users thanked this post: seanspotatobusiness

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #5 on: February 04, 2019, 04:51:29 pm »
Thanks very much for your detailed response!

I actually wouldn't mind whether the solution ends up as a triangle wave or sawtooth; either of those would be acceptable to me so long as it's moving between those frequencies.

I'm downloading LTspice now and have updated my schematic with slightly better component choices and diodes across pins 7 and 6 which I think give me a 50% duty cycle. I will try to model it in LTspice. Do you think the opamp/comparitor approach would be easier? Thanks again for your help.

 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #6 on: February 04, 2019, 09:36:17 pm »
Thanks very much for your detailed response!

I actually wouldn't mind whether the solution ends up as a triangle wave or sawtooth; either of those would be acceptable to me so long as it's moving between those frequencies.

After googling some "police siren 555" circuits, it looks like they use a pseudo-triangle wave:  If you knock up a simple astable 555 circuit in LTspice, and look at the voltage on the capacitor (connected to "trigger" and "threshold", pins 2 and 6) you'll see the cap charging and discharging between 1/3 and 2/3 VCC.  For 12V thats between 4V and 8V.  It's nto a perfect triangle wave, but it does ramp up and down fairly smoothly.

I'm downloading LTspice now and have updated my schematic with slightly better component choices and diodes across pins 7 and 6 which I think give me a 50% duty cycle. I will try to model it in LTspice. Do you think the opamp/comparitor approach would be easier? Thanks again for your help.



I think for now, two 555's *should* be enough, its just a question of playing around with part values, to get the parameters you're after.  NE555's (or the many other versions of the device) are old, cheap, widely available and surprisingly versatile. They're not great at certain things, but for this application I think it'll be hard to find something that requires less parts, or is easier to work with.  On the other hand, comparators are also cheap, and available in packages with 2 or 4 of them, which allows one to make "building block" circuits quite cheaply.  If you/we struggle getting 555's to do what you want, I'll try and knock up some comparator circuits.

LTspice, like many other simulators does have limitations, and occasionally produces bizarre results - like 5kA (thats kiloamps) peaks because most components are "ideal".  But it can be invaluable for situations like this where you just want to try out idea's and fiddle with values to see what happens.

I'm not sure if that imgur link is your latest schematic.  If it is you still have that MOSFET the wrong way around :)  and on the high side.  See this link for the difference between using N channel and P channel:
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #7 on: February 04, 2019, 09:59:07 pm »
After googling some "police siren 555" circuits, it looks like they use a pseudo-triangle wave:  If you knock up a simple astable 555 circuit in LTspice, and look at the voltage on the capacitor (connected to "trigger" and "threshold", pins 2 and 6) you'll see the cap charging and discharging between 1/3 and 2/3 VCC.  For 12V thats between 4V and 8V.  It's nto a perfect triangle wave, but it does ramp up and down fairly smoothly.

Yes, it is not straight but curved exponential. Still, it is easy to make it exactly a straight ramp by charging the capacitor through a constant current supply instead of a plain resistor.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #8 on: February 06, 2019, 10:50:22 pm »
LTSpice wouldn't launch on my own PC but it's running okay on my mum's laptop. Here's a link to the circuit on my OneDrive: https://1drv.ms/u/s!Avvwzet1PgNTgqV9UEgr8HoTQ46H6g

The frequency is too high at the moment. Also it seems that the circuit switches between two frequencies without a smooth transition between either. I was hoping to get the frequencies between 8 and 20 Hz as well as 8 and 20 Hz themselves. I'll play around with the component specifications and post again if I manage to get anywhere near my goal.

 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #9 on: February 06, 2019, 10:58:18 pm »
The second 555 timer is jumping between two frequencies because you are inputting the square output of the first timer. If you want a continuous variation you should input a sawtooth which you can get from the timing capacitor.

Can you post the asc file? Maybe we can play with it.
« Last Edit: February 06, 2019, 11:00:53 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 
The following users thanked this post: seanspotatobusiness

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #10 on: February 06, 2019, 11:05:31 pm »
I tried to link to it via my OneDrive but now I've attached it to this post as well/instead. Changing C3 to 100 nF reduced the frequency to something I was expecting although it still switches instantly between frequencies in this simulation.

Edit: when I used C2 for the sawtooth, I had to use a diode to stop it from getting stuck at a full charge. Although the sawtooth is happening, the frequency from U2 appears to be fixed (right windows):

« Last Edit: February 06, 2019, 11:33:04 pm by seanspotatobusiness »
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #11 on: February 06, 2019, 11:34:21 pm »
It's late for me and I need to go but I made some changes which should get you closer. The signal going from the first to the second timer is a sawtooth now. See if you can advance some more.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #12 on: February 06, 2019, 11:46:45 pm »
LTSpice wouldn't launch on my own PC but it's running okay on my mum's laptop. Here's a link to the circuit on my OneDrive: https://1drv.ms/u/s!Avvwzet1PgNTgqV9UEgr8HoTQ46H6g

The frequency is too high at the moment. Also it seems that the circuit switches between two frequencies without a smooth transition between either. I was hoping to get the frequencies between 8 and 20 Hz as well as 8 and 20 Hz themselves. I'll play around with the component specifications and post again if I manage to get anywhere near my goal.

The reason is, you're using the output of the first 555 to control the thresholds of the second 555, and the 555's output is essentially a square wave - either VCC, or 0V.  So the second 555 is being controlled by the first, and is just switching between two frequencies, one where CV is high, and one where CV is low.   

In order to generate a "smooth" transition you would need to create a sawtooth wave - that slowly ramps up and down between two voltages rather than very quickly switch between VCC and GND.  This is why I mentioned using comparators or opamps, but you can generate a sawtooth wave with the 555 - check the voltage on the "trig" or"thres" pin - you'll see a sawtooth wave between 1/3VCC and 2/3VCC (in your case, powering it with 15V it'll be between 5V and 10V).

The trouble with connecting this to the CV pin is it isn't a low impedance source - that is to say, the OUT pin of a 555 can source and sink quite a bit of current - it just connects to VCC or GND via transistors, and can supply >100mA.  But the voltage node on the trig/thres pins is the capacitor voltage charging and discharging through R1 and R2.  So if that was to be used, it would need a buffer - an amplifier with a gain of 1, so the output is the same as the input, but.. it can provide some current, and prevents the input voltage being pulled off.

The problem is, putting a signal on the CV can only change the frequency so much.  8 to 20Hz is a 2.5x range.  A bit of experimentation shows the following attach LTspice circuit:

With the values shown, CV = 2V gives ~ 20Hz, and a CV = 10V gives ~8.2Hz.  So we need to generate a sawtooth wave that varies between those two voltages.  I don't think the 555 can't do this.  So you can either try and generate the wave some other way - comparators, opamps etc.., or use something other than the 555 to generate the pulse train, some kind of voltage controlled oscillator, so that the required sawtooth wave voltage is different.  There are a number of ways to do this.
 
The following users thanked this post: seanspotatobusiness

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #13 on: February 07, 2019, 12:18:26 am »
Best I can do.   First 555 creates a (nonlinear) ramp over about 9 seconds.  If you wish to increase this you could increase R2 and R8 or C1.   Because this voltage is needed to drive the CV pin of the next 555, it needs to be buffered, so a cheap LM358 as a voltage follower will do.  As the voltage is between ~1.6 and ~10V, you could use almost any opamp as most have a common mode input within that range.

The other 555 just generates between ~9Hz and ~20Hz and sweeps between the two.  That isn't 8Hz but its close.   As you can buy two 555's in the same package - the NE556, its a two chip solution.

Notice the clever trick on the first 555 - the output is fed into the CV pin to change its internal thresholds, this gives a much wider range for upper and lower thresholds.  Please don't assume this will work on a breadboard - the model of the NE555 in LTspice is "ideal", in reality the "trig" and "thres" pins are connected to comparators internally, and these may not be able to read voltages too close to VCC or GND.  So if you can - prototype it!

 
The following users thanked this post: seanspotatobusiness

Offline seanspotatobusinessTopic starter

  • Regular Contributor
  • *
  • Posts: 84
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #14 on: February 07, 2019, 01:28:49 am »
Thanks a lot. I look forward to doing this in a breadboard soon. I think I will need to buy a cheap oscilloscope since my local maker space is an hour away. I don't need to do any high frequency stuff so hopefully there are some threads on EEVblog discussing crappy oscilloscopes for hobbyists. Then again, maybe even a serial oscilloscope made using an Arduino would be fast enough for this.
 

Offline not1xor1

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #15 on: February 07, 2019, 06:21:26 am »
Notice the clever trick on the first 555 - the output is fed into the CV pin to change its internal thresholds, this gives a much wider range for upper and lower thresholds.  Please don't assume this will work on a breadboard - the model of the NE555 in LTspice is "ideal", in reality the "trig" and "thres" pins are connected to comparators internally, and these may not be able to read voltages too close to VCC or GND.  So if you can - prototype it!

it would probably work better with one of those CMOS spiced 555... even without the opamp buffer
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Make a strobe which automatically varies between 8-20 Hz with a 555 chip?
« Reply #16 on: February 07, 2019, 02:09:16 pm »
it would probably work better with one of those CMOS spiced 555... even without the opamp buffer

Possibly, but even if the resistors in the CMOS version are 100k, it would still pull the first 555 off timing.  Not by much though!  And if the value of the first 555's resistors are kept low (meaning the cap has to be rather large) it shouldn't make that much of a difference.  Good call.

I'm tempted to test this myself now.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf