Notifications
Clear all

Set the 555 timer to 40 seconds idle, 2 seconds trigger - possible?

63 Posts
8 Users
40 Likes
4,743 Views
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

Hi everyone. I am new to this forum, hopefully this topic ended up in the correct subsection. I have no education in electronics, just an interest, a soldering iron and I like to tinker.

I am trying to trigger a 3.3 volt logic every 40 seconds with a two second trigger time. So far the Trinket M0 does the job very smooth, but for various reasons I am looking to replace it. The 555 seemed like a good option. However, when the Trinket goes low, it triggers, for the 555 it seems to be opposite.

No matter how I calculate, I can never get these times right.

If I use a 47uF, R1=1M ohm, R2=75k ohm I end up with a period of 37.457 seconds, with 35.014 seconds high and 2.443 seconds low, and a duty cycle of 93.478%

I want the exact opposite times, but various online calculators for the 555 tells me the duty cycle cannot be below 50%.

How can I get it to idle for 40 seconds, then close the circuit for 2 seconds, and repeat? Is it even possible?

 

Kind regards, have a nice day 🙂

 


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6663
 

Posted by: @kabl

Hi everyone. I am new to this forum, hopefully this topic ended up in the correct subsection. I have no education in electronics, just an interest, a soldering iron and I like to tinker.

I am trying to trigger a 3.3 volt logic every 40 seconds with a two second trigger time. So far the Trinket M0 does the job very smooth, but for various reasons I am looking to replace it. The 555 seemed like a good option. However, when the Trinket goes low, it triggers, for the 555 it seems to be opposite.

No matter how I calculate, I can never get these times right.

If I use a 47uF, R1=1M ohm, R2=75k ohm I end up with a period of 37.457 seconds, with 35.014 seconds high and 2.443 seconds low, and a duty cycle of 93.478%

I want the exact opposite times, but various online calculators for the 555 tells me the duty cycle cannot be below 50%.

How can I get it to idle for 40 seconds, then close the circuit for 2 seconds, and repeat? Is it even possible?

 

Kind regards, have a nice day 🙂

 

Just add an inverter on the output.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

@Ron; thank you for the nudge in the right direction. I have no clue how to do that either, so I am learning a lot today 🙂

Found some instructions over at electroschematics for an inverted 555 timer circuit. I`ll play around with that and see if I can get it to work.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 

Posted by: @kabl

No matter how I calculate, I can never get these times right.

If I use a 47uF, R1=1M ohm, R2=75k ohm I end up with a period of 37.457 seconds, with 35.014 seconds high and 2.443 seconds low, and a duty cycle of 93.478%

Hi Kabl, welcome to the forum.

Consider this to be your introduction to the reason that capacitors and resistors have value ranges 🙂 They just are not as accurate as the formule that you're using to calculate their values. Resistors usually have a range of 5%, which means that a resistor labelled 1000 ohm resistor has an actual value somewhere between 1000-5% (950 ohms) and 1000+5% (1050 ohms). Capacitors have an even wider range, many are rated at a 10% range. Even the best (highest price) components can still have an error of up to 1%.

So, what you need to do is to do your calculations and make a prototype but leave the resistance a bit low and insert a potentiometer into the circuit. You can then do some adjustment and fine tune the timing using the pot to get as close as possible to your desired times.

 

Anything seems possible when you don't know what you're talking about.


   
Bl00dAxe reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1609
 

Hi @kabl,

  Hope you managed to get the 555 to play nicely.

   For your information ... Ron @zander was referring to a (simple) type of logic device which forms the basis of digital electronics, that you will soon become familar with if you continue to play with electronics!!

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

As usual, our generous Forum host, Bill @dronebot-workshop has written an excellent introduction, which is well worth checking out.

https://dronebotworkshop.com/basic-logic/

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

If your 555 is powered at 5V, then you could use something like one (inverter) gate of an 74hc04, to invert the 555 output signal, so that when the 555 output is "low" or "0", the 74hc04 output will be "high" or "1"

https://assets.nexperia.com/documents/data-sheet/74HC_HCT04.pdf

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

Once, you become familiar with these chips you will realise it also possible to obtain the same functionality from several different devices. For example, the 74hc00 has 4 NAND gates. If you connect the two input pins together, it also becomes an inverter. This interchangeability can be very helpful when the parts that are conveniently available do not match your immediate requirement.

Furthermore, the logic gates form the basis of systems ranging from single gates through to supercomputers ... the main difference being a 74hc04 has 6 gates in a packge, whilst a supercomputer will have trillions of them!

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

Good luck on the grand adventure you are now embarking ... I hope you enjoy it for many years!

Best wishes, Dave


   
Inst-Tech reacted
ReplyQuote
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

Thank you all for your patience and the nice welcome to the forums! I am sure I will get the 555 to work like I want it to - eventually 🙂

 

The value ranges had completely slipped my mind. It is not very important to get the timing on the dot, just in the ballpark, so a few seconds give or take on the idle time is OK. The trigger has to be more than 1 second, and preferably below 2.5 seconds.

 

I am working on making a "fox" for radio direction finding practice. They can be bought, but it is more exciting to build one.

 

Best wishes, Knut


   
Inst-Tech reacted
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
 

If you wanted to use something else besides the 555, you could use a NANO Arduino driven simple program to do what you want to the EXACT times you want...

You would have to learn how to program the Arduino a little bit...  Not too bad...  Very good tutorials present for you to use.

 

Good Luck...  Sounds like a Fun project you're into!

 

 

 

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
 mday
(@mday)
Member
Joined: 5 years ago
Posts: 9
 

Posted by: @kabl

Hi everyone. I am new to this forum, hopefully this topic ended up in the correct subsection. I have no education in electronics, just an interest, a soldering iron and I like to tinker.

I am trying to trigger a 3.3 volt logic every 40 seconds with a two second trigger time. So far the Trinket M0 does the job very smooth, but for various reasons I am looking to replace it. The 555 seemed like a good option. However, when the Trinket goes low, it triggers, for the 555 it seems to be opposite.

No matter how I calculate, I can never get these times right.

If I use a 47uF, R1=1M ohm, R2=75k ohm I end up with a period of 37.457 seconds, with 35.014 seconds high and 2.443 seconds low, and a duty cycle of 93.478%

I want the exact opposite times, but various online calculators for the 555 tells me the duty cycle cannot be below 50%.

How can I get it to idle for 40 seconds, then close the circuit for 2 seconds, and repeat? Is it even possible?

It's possible to do it with a 555.  The key is to use a diode in series with one of the resistors so that charging and discharging of the capacitor go through different resistors.  See the attached picture.

This uses standard component values to achieve about 36.5 seconds low and 1.9 seconds high.  The 560k resistor controls the discharge time (when the output is low), and the 22k controls the charge time (when the output is high).  Make the resistors bigger to lengthen the times.

Bonus tip: Check out the CircuitJS circuit simulator.  It lets you simulate simple circuits, and comes with a bunch of examples, including this one (see the menu item Circuits > 555 Timer Chip > Low-duty-cycle Oscillator).  That's what I used.  I tweaked the component values until I got the timing close.  I actually started with a 100nF capacitor so the times would be in milliseconds instead of seconds, which is a little more convenient to simulate.  Then I increased the capacitor by a factor of 1000 to get to seconds.

Hope that helps,

-Mark

image

 


   
Inst-Tech and Ron reacted
ReplyQuote
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

@joelyddon Thank you for your answer. At the moment I am using the Adafruit Trinket M0, easy enough to program, and accurate down to the second. My aim is to reduce the cost, and learn how to use the 555 🙂


   
ReplyQuote
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

@mday Thank you! Very helpful picture and link! Waiting for DHL to drop off some more components today, hopefully I will get around to this later this evening.


   
ReplyQuote
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

@mday ; The diode between the out terminal and the 22kOhm resistor, is that a Zener diode? I went shopping for these, and discovered they had different nominal zener voltage. I bought some with 3.3 volts nominal voltage.

Or am I reading your picture wrong?

Cheers, kabl


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6663
 

@kabl I don't think that is the symbol for zener diode so a normal diode should be ok.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
 kabl
(@kabl)
Member
Joined: 1 year ago
Posts: 30
Topic starter  

@zander Thanks 🙂


   
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

Posted by: @zander

@kabl I don't think that is the symbol for zener diode so a normal diode should be ok.

@kabl, Indeed, @zander is correct.. that is not a zener diode..you can use a standard 1N4007, or a schottly 1N4148 switching diode for your purpose here..

Regards,

LouisR

 

LouisR


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6663
 

@inst-tech OR even a schottky diode too!!! 🤣

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Page 1 / 5