# Variable Frequency - Help required

Discussion in 'Electronic Basics' started by Dom Joly, May 14, 2004.

1. ### Dom JolyGuest

Hi,

I'm designing a machine which gives an output signal after a given time.
This time needs to decrease after every tenth output.

For the timer, I'm using a basic modulo 10 counter (or a series of counters
cascaded) and I'm thinking of using a 555 timer for my clock pulse. My only
problem is how can I vary the capacitance, thus alter the frequency, with no
user input. ie once the system has started, every tenth output pulse will
increase the clock frequency.

There are other interrupts, inputs, outputs and controls to consider, but
for now I'm just concentrating on the timing circuit and frequency control.

Any help, suggestions, schematics would be greatly appreciated.

Many thanks,

James

2. ### Terry PinnellGuest

You need to specify more information.

Will the frequency increase indefinitely? IOW, if it goes from F(1)
for the first 10 pulses, and F(2) for pulses 11-20, will it be at
F(1000) for pulses 9,991-10,000, F(100000) for pulses
999,991-1,000,000 etc?

What is the starting frequency F(1), over what range will the
frequency vary, and by what increments?

As a broad approach, you could switch resistors (and/or capacitors) in
the standard 555 astable circuit. A very simple example with manual
switching of two frequencies is shown here:
http://www.terrypin.dial.pipex.com/Images/ServoUpDown.gif

But the answers to the above gaps in your spec will significantly
affect the method to achieve the switching. In principle you could use
electronic switches like the 4066, controlled from a series of 4017
decade counters.

3. ### Tim AutonGuest

If there are other interrupts, inputs and outputs to consider why not
use a microcontroller (PIC, AVR...) to do the whole lot? Depending on
the complexity (you don't give many details) it might not save you
money, but it would most likely save you board space.

Tim

4. ### Dom JolyGuest

OK, more info may help you to help me.

I'm trying to design a timer which will repeatedly output a signal after 20
seconds. After 10 outputs the period will reduce to 19 seconds for 10
outputs, then 18, 17 etc... each time period reducing after 10 output
pulses.

The interrupts in place are optical "break the beam" sensors, (or possibly
pressure sensors) which must be activated before or coincident with the
timer's output pulse. ( A separate counter will be used to count the number
of times this condition is met/not met). Other controls are manual swithches
(start/reset etc).

This is for a "bleep test" machine at my local gym. A person has to sprint
between two sensors in given time.(10 times for level one, 10 times for
level 2 etc) Each level gets quicker than the previous. If he fails to make
it 3 times in succession (by not breaking the beam), the test is over and
score recorded.

The circuit doesn't seem to be presenting us too much of a problem, but a
manageable and automated means of precise frequency division eludes.

Not too sure of finer details yet, but clock source will be something like a
10kHz crystal.

Many thanks

5. ### SoerenGuest

Hi James,

Consider a different approach.
Another divide-by-ten counter could count the output pulses and the
output from that counter could control a programmable divider in between
the 555 and the rest of the circuit.

Sounds to me like a job for a microcontroller

6. ### Dom JolyGuest

The idea of a programmable divider between the 555 and the first counter
appeals, if only I knew how to build one!!

It would seem that a microcontroller is indeed the way forward. Maybe I
should change my approach.

thanks

Thank

7. ### John PopelishGuest

(snip)

With a decoded counter like the 4017:
http://rocky.digikey.com/WebLib/Texas Instruments/Web data/CD4017B,4022B.pdf
it is very easy to make a timer sequencer as long as the accuracy
requirements are not very high. You put a diode and timing resistor
in series with each output and tie them all to the 555 timing
capacitor. As the counter counts, the timing cycle is adjusted
differently for each state of the counter.

8. ### Dom JolyGuest

Brilliant!

It's amazing what one can learn on here.

Anyone got any tips on silencing my mother in law (non fatal preferably!)

9. ### SoerenGuest

Hi James,

Not too hard, but it will be a rather large circuit if you need
precision.

Yes, if you have just a little experience with µ-controllers, it will be
a lot cheaper, more precise and a substantially smaller circuit.

Judging from the other post you made, you would need 3 lines of input;
beam break, start and reset - start and reset could be the same physical
switch, with resets when the switch is engaged for a couple of seconds,
saving a line if needed.

Outputs would be the beeper signal, possibly another beeper/lamp to
signal that the runner missed for the third time and the rest of the I/O
pins can be used for writing out things like score, total time and
number of laps completed.

Further readout possibilities could be lap times and which other 2 ports
were missed, which might help the runner to establich where he need to
improve (beginning, middle, end), making it more useful.

All timing, logic and calculations would be contained in the processor,
with only the input/output circuits to add.

If you include transmitting the data to a PC, you could even make
records and/or hard copies and a nice display.

And if you get ambitious (at a later time ?), a pulse transmitter on the
runner and perhaps a breath analyzer could provide further useful data

10. ### Dom JolyGuest

The physical size isn't really an issue as it will be housed in a fairly
bulky standalone unit. (The unit will be a base for an LED matrix display to
indicate each lap/level.

Precision isn't really an issue either... 10ms being about as accurate as I
need.

Another application will be to time a race over 100m, with accuracy to 10
ms.

Thanks for all the posts.. a great help!!

J

11. ### SoerenGuest

Hi James,

Tell her she is pretty, that will shut her up (even if she is

12. ### SoerenGuest

Hi James,

10ms in what ? (each second, each lap or total).

Anyway, a controller is still the cheap and easy way to go IMO.

That would be tough with an RC oscillator if it has to be used in
various temperatures.

13. ### Rob PaisleyGuest

-------------------

Some examples of the above circuitry

http://home.cogeco.ca/~rpaisley4/LM555.html#21

Rob.

14. ### Dom JolyGuest

apologies... resolution for display need only be 10ms, so 10ms per lap would
more than suffice.
(At the moment, the Mark1 eyeball is our accurate measuring device)

Point taken... controller is looking favourable.

various temperatures.

I was looking at indoor/ambient temperatures

Regards

15. ### SoerenGuest

Hi James,

You know best what timing accuracy you need, of course, but consider the
effect of accumulated error. In 10 laps, can you accept an error of
100ms or half a second in 50 laps ? (I have no idea how many laps the
runners are capable of doing

I do not know this device, but I assume it is something more accurate
you will use together with the one you will build - if so, forget about
small timing discrepencies

OK, as long as they don't change much, I guess you will be in the green.

16. ### Tim AutonGuest

I think you do, most humans are born with two on the front of their
heads!

Tim

17. ### SoerenGuest

Hi Tim,

Ahaaa

Talk about not seeing the forest for all the trees ;-/

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Continue to site