cheap adjustable square wave generator? (0.1-10hz)

Go To Last Post
30 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi - I need to generate a square wave. A slow one. It does not need to be accurate at all. But I would like the wave to be as crisp as possible, as it'll be a clock for a shift register. 5V output. Adjustable via pot. Cost sensitive. Not programmed. I'd like the circuit to cost a dollar or less in single quantities.

Is this possible? LM555 is the best idea I've had so far. But add in pot and other components and my budget is being pushed. Cheaper is better.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A SMD pot can be as cheap $0.05.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jayjay1974 wrote:
A SMD pot can be as cheap $0.05.

I should have mentioned it needs to be hand adjustable. That tends to add a lot of cost...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And what about using a small tiny avr RC clocked internally with two push buttons for increment decrement the frequency and a few code lines for toggling a pin?The joy of simplicity.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well if it needs to be hand adjustable, seems like your question is for a cheap pot, since you will always need one.

Maybe a $1 ATTiny10 with two tactile switches is cheaper ?

edit: geoelec beat me to it.

Tactile switches are listed at 20 cents (25+) and an ATTiny10 is $1
Total cost ~ $1.4

Though a LM555 in single quantities goes as low as 30 cents on farnell.

Does a pot like this one qualify as hand adjustable ?
http://be.farnell.com/productima...

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it"

Last Edited: Sun. Oct 3, 2010 - 12:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm hoping to avoid the AVR route... I want the people that are using this thing to be able to look at the schematic and understand everything that is going on.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thygate wrote:
Well if it needs to be hand adjustable, seems like your question is for a cheap pot, since you will always need one.

Maybe a $1 ATTiny10 with two tactile switches is cheaper ?

edit: geoelec beat me to it.

Tactile switches are listed at 20 cents (25+) and an ATTiny10 is $1
Total cost ~ $1.4

Though a LM555 in single quantities goes as low as 30 cents on farnell.

Does a pot like this one qualify as hand adjustable ?
http://be.farnell.com/productima...


I'm not sure if it qualifies. Can you hold on to that knob with your hand? It looks fairly smooth so it might have to be done with a screwdriver...

The AVR route does have simplicity going for it. But then I have to program it which makes me sad.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is possible to turn the knob by hand without a screwdriver. I've had them on a few Cypress dev kits.

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

These are pretty cheap - 54c singles for me:
http://www3.alps.com/WebObjects/...
Found at Mouser.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh crud - I just realized that with the 555 if I want a constant duty cycle, I have to use a variable capacitor, not a variable resistor.

Are there any chips with similar functionality? Surely there are...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tlucas wrote:
These are pretty cheap - 54c singles for me:
http://www3.alps.com/WebObjects/...
Found at Mouser.

Great find - thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At 1 Hz does the shift register really care if it is 50% duty cycle?

Although the range of frequencies you need is pretty small, by far the easiest way to get a 50% duty cycle from a 555, esp. a variable freq 555, is to double the freq and feed it through a flip-flop for a divide by two.

Personally, I'd go the Tiny and two PB Switches route...

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your specification seems to be slowly evolving again. It's like hitting a moving target.

Quote:
But I would like the wave to be as crisp as possible

Please define "crispness" in a electronic sense as you understand it.

Quote:
Are there any chips with similar functionality? Surely there are...

Yes as surely as the tooth fairy exists.

Quote:
I want the people that are using this thing to be able to look at the schematic and understand everything that is going on.

If you don't know, how do you expect "the people" to understand everything.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
At 1 Hz does the shift register really care if it is 50% duty cycle?

Although the range of frequencies you need is pretty small, by far the easiest way to get a 50% duty cycle from a 555, esp. a variable freq 555, is to double the freq and feed it through a flip-flop for a divide by two.

Personally, I'd go the Tiny and two PB Switches route...

JC

JC - that's a great point about the shift register not caring about the duty cycle. I will check to see if everything can handle the small duty cycle - but you're probably right that there won't be any issues.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LDEVRIES wrote:
Your specification seems to be slowly evolving again. It's like hitting a moving target.
Quote:
But I would like the wave to be as crisp as possible

Please define "crispness" in a electronic sense as you understand it.

Quote:
Are there any chips with similar functionality? Surely there are...

Yes as surely as the tooth fairy exists.

Quote:
I want the people that are using this thing to be able to look at the schematic and understand everything that is going on.

If you don't know, how do you expect "the people" to understand everything.

Lee - you continue to be rude and useless. Please don't post in my threads anymore.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lighten up lad!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've never been a fan of the 555. I do like 74hc14 Schmitt trigger inverters (and similar devices like the hc132). One cap + one pot = variable frequency square wave generator.

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I do like 74hc14 Schmitt trigger inverters
I agree! But will the output be "crisp" enough? :lol:

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lee..

stop frying the fellow to a crisp.

You want 50% duty cycle, adjustable frequency etc.. try using binary rate multiplier chip chain operating at twice the maximum frequency.

Get some binary thumb wheel switches ( not that cheap).. from a fixed frequency divide down to what you need ..pass thrpough a flip flop and You have a nice synthesised signal at CMOS levels. Depending on the number of stages You could get quite good resolution. And depending on Your clock source You would get quite good stability.

I bet You forgot about the existence and functionality of binary rate multipliers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LDEVRIES wrote:
Lighten up lad!

I would lighten up if anything you said ever came off as a joke. But I don't think you ever are joking. So, seriously - please avoid threads I start and I will show you the same courtesy. You go out of your way to insult me at every possible opportunity and I don't think you've ever actually added anything constructive to any thread I've started. I asked you nicely in a PM and now I'm asking you again more publicly. I'm sick of it.

Crisp means sharp edges. I don't want a square wave that is more a sinusoid. Similarly, I don't want a square wave with excessive overshoot. These are not exact requirements - but any EE worth a grain of salt would know exactly what I mean. I'm sure you do as well - you just feel like being obnoxious.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tpappano wrote:
I've never been a fan of the 555. I do like 74hc14 Schmitt trigger inverters (and similar devices like the hc132). One cap + one pot = variable frequency square wave generator.

I knew there was a better way... I just had forgotten it. I think that'll work significantly better than the 555 solution (cheaper too). Duty cycle should be relatively constant (though, if I'm thinking about it right, the duty cycle will be dependent on the high and low going thresholds, with 50% achieved if they're both centered around half of your supply voltage).

Thanks Tom!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I don't want a square wave with excessive overshoot.

I don't think that a shift register shifting at frequencies
<10Hz. will be unduly worried about overshoot or duty cycle.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LDEVRIES wrote:
Quote:
I don't want a square wave with excessive overshoot.

I don't think that a shift register shifting at frequencies
<10Hz. will be unduly worried about overshoot or duty cycle.
But will it be crisp?

Seriously, nleahcim, your requirements are a joke. The typical "it needs to be the 'best' but costs nothing, and I want it now" rubbish.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It will be a long time before this design matures. Cheap, good, fast...pick any two (sometimes only one!)

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is this for your soldering course ?

You could use a HC4060 and select one of the outputs
via jumper.

This axis (don't know the proper name)

http://www.conrad.de/ce/de/produ...

http://www.piher-nacesa.com/pdf/...

(see models at end of datasheet)

can be attached to a cheap trimpot to make it
hand-adjustable.

Last Edited: Sun. Oct 3, 2010 - 08:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A 4060 also does not suffer from a longer first pulse as a '14 and IIRC a 555 do.

You could still use a pot with 4060 and get perfect squarewaves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ArnoldB wrote:
LDEVRIES wrote:
Quote:
I don't want a square wave with excessive overshoot.

I don't think that a shift register shifting at frequencies
<10Hz. will be unduly worried about overshoot or duty cycle.
But will it be crisp?

Seriously, nleahcim, your requirements are a joke. The typical "it needs to be the 'best' but costs nothing, and I want it now" rubbish.


Tom's suggestion meets all my requirements.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LDEVRIES wrote:
Quote:
I don't want a square wave with excessive overshoot.

I don't think that a shift register shifting at frequencies
<10Hz. will be unduly worried about overshoot or duty cycle.

Unless it rings badly enough to cause multiple shifts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ossi wrote:
Is this for your soldering course ?

You could use a HC4060 and select one of the outputs
via jumper.

This axis (don't know the proper name)

http://www.conrad.de/ce/de/produ...

http://www.piher-nacesa.com/pdf/...

(see models at end of datasheet)

can be attached to a cheap trimpot to make it
hand-adjustable.


Those Piher parts look pretty solid. Thanks!

edit: yes it's for my soldering course.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure what the total scope of your class is, but you can make use of the extra hc14 stages by adding in 'logic probe' functionality. Schmitt triggers also make nice one-shots for blinking leds.

Tom Pappano
Tulsa, Oklahoma