Pulse stretcher - 555 timer alternative?

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

Hi folks,

 

I am looking for a simple way to generate a pulse of 5 seconds from a momentary pushbutton.  I thought about the 555 timer, but I only have 3 volts.  I understand there are low voltage versions of the 555 timer but between availability and other factors, I am thinking about other options.

 

Does anyone have advice on a simple low cost method to do this?  Basically take an edge and create a several second pulse?  

 

Thanks in advance. 

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

How about an AVR?

 

An ATtiny4 is CAD$1.38 in qty 1 from Digikey.  CAD$0.96 qty 100.

 

Compare to an NE555S for CAD$0.54 in qty 1.

 

Is this a one-off?  For the extra 84 cents, I'd go for the AVR.  More flexible.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

An AVR Tiny?

 

Or maybe something here: http://www.linear.com/products/T...

 

http://www.linear.com/parametric...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Oct 20, 2015 - 06:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:
An ATtiny4 is CAD$1.38 in qty 1 from Digikey. CAD$0.96 qty 100.

Now you are going to make me look...

 

1)  CAD$ to US$ ...  [I don't keep track of the exchange rate] Yep, CAD$1.30 is US$1.00  So about a buck.

2)  For some reason, DigiKey's AVR8 prices aren't very attractive in the past year or so.  They used to be competitive with any other distributor.  Let's peek ...

Qty. 1 isn't that important, but in US$ I see $0.95, for Tiny4; $0.66 in 100.  Compare to Mouser $0.76/$0.48.

3)  Back when I was your age, we couldn't find a micro for under a buck.  Now, the new Mega328PB has preliminary pricing at about US$1.40/100.

4)  For a one-off or low volume, I don't think I'd send a newbie off with a Tiny4.  I'd suggest something easier to program with cheap tools.  Tiny13A is only a buck qty. 1 at Mouser and comes in DIP. 

5)  Heck, as OP is apparently a newbie, just spend two bucks for an Arduino clone....

http://www.ebay.com/itm/1-Enhanc... with '328

http://www.ebay.com/itm/1-Enhanc... with Tiny85, "Digispark"

 

"Blinking an LED" is the first AVR project, right?  Then the next one is in fact some sort of timekeeping.  Have a timer generate a tick at an arbitrary period such as 10ms.  Then just count the ticks for all your timekeeping needs.

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

A monostable made from two gates and some RC components - how accurate does the timing need to be?

 

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

The authors of "The Art of Electronics" (third ed.) recommend not doing that other than for certain restrictive conditions.

The recommendation is a logic family monostable multivibrator; a table shows four kinds in three 74-series and one CMOS 4000 in the '4538.

Popular is a '123.

From the '123 table, the lowest supply voltage versions are :

  • NXP 74LV123, 1.2V .. 5.5V
  • TI SN74LVC1G123, 1.65V .. 5.5V

NXP 74LV123 datasheet shows 1.0V .. 5.5V and its in a tiny package.

At 20microA max up to 85C could power it off a NiMH coin cell (if the inputs are at a rail).

Edit : added more NXP data.


Cambridge University Press logo

The Art of Electronics

3rd Edition

Authors:

http://www.cambridge.org/us/academic/subjects/physics/electronics-physicists/art-electronics-3rd-edition

The Art of Electronics

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. Oct 21, 2015 - 01:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

cnewbie wrote:
I understand there are low voltage versions of the 555 timer but between availability and other factors, I am thinking about other options.
ICM7555 by Intersil and second sourced by Maxim Integrated; 0.76USD/1, 0.385USD/1 for 100.

http://www.intersil.com/en/parametricsearch.html?g=timing-and-digital&sg=counters-time-base-ics#g=timing-and-digital&sg=counters-time-base-ics

http://www.mouser.com/Search/Refine.aspx?Keyword=ICM7555

 

"Dare to be naïve." - Buckminster Fuller

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

With 142 posts you probably have an AVR or two sitting on the bench.

 

+1 on using an AVR to generate the 5 second pulse.

 

Have you ever set up a Timer/Counter is CTC mode?

 

JC

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

cnewbie wrote:

I am looking for a simple way to generate a pulse of 5 seconds from a momentary pushbutton.  I thought about the 555 timer, but I only have 3 volts.  I understand there are low voltage versions of the 555 timer but between availability and other factors, I am thinking about other options.

 

Does anyone have advice on a simple low cost method to do this?  Basically take an edge and create a several second pulse?  

 

What precision ? What current consumption ?

You can use Monostables, or 3v 555, but those are RC elements, and Several seconds is getting into large-C territory.

 

Look at devices like HEF4541, HC5555, and CSS555 which have digital dividers from higher clocks.

 

Or, there are Microcontrollers from ~ 41c 1 off, but they may need more Icc and they tend to have best precision on the higher speed oscillators and of course, you need to write the code for pulse generation & program the devices.

 

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

I hesitate to say this because of some of my past posts on the Arduino, but damn, those things are so cheap and easy to use I ordered a bunch of the sub $3.00 devices from China and use them all over the place. Yes, I would use one of these: http://www.ebay.com/itm/1-Enhanc... before I got out my soldering iron and looked for the right resistor/capacitor combination.

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

Ross McKenzie ValuSoft Melbourne Australia

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

how precise does the 5 sec need to be?

 

Perhaps a transistor and a RC for timing would do the job.(if it's a FET the cap can be rather small) .

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

All specs can be implemented with all hw, all sw, or a mix. Cost is usually in the equation somewhere. And size of production run.

//you should always have a title and revision history at the top
//5sec delay
//Oct 23 15 Bob G initial edit

#include <io for your favorite compiler>

#define BUTPUSHED() (PINB &   0x01)==0
#define LEDON()     PORTD &= ~0x01
#define LEDOFF()    PORTD |=  0x01

unsigned char but,butl,delayiscounting;
unsigned char mscount,ms10count,ms100count,seccount;
//--------------------------------
void delay1ms(void){
//delay 1 ms
//you might need to declare n volatile
unsigned int n;

  n=2400; //assuming 16MHz clk
  while(n--){}; //spin down to 0 in 1ms
  n=0; //I bet this makes the gcc optimizer happy by using n. What do you think morin?
}

//-----------------------------------
void main(void){
//5 sec delay main program

  initports(); //DDRs and pullups etc
  while(1){
    if(ms10count==0){       //read switch every 10ms
      but = BUTPUSHED();    //is button pushed?
      if(but && !butl){     //its pushed this pass and not last pass
        delayiscounting =1; //remember we are counting
      }
      butl = but;            //save button state for next pass
    }
    if(delayiscounting) LEDON(); else LEDOFF(); //tell the carbon based units we are counting

    delay1ms();
    mscount++;
    if(mscount==10){
      mscount=0;
      ms10count++;
      if(ms10count==10){
        ms10count=0;
        ms100count++;
        if(ms100count==10){
          ms100count=0;
          seccount++;
          if(seccount==5){
            delayiscounting=0;
          }//seccount
        }//ms100count
      }//ms10count
    }//mscount
  }//while
}
//------this is the end my friend--------------------

 

Imagecraft compiler user

Last Edited: Fri. Oct 23, 2015 - 07:50 PM