Notifications
Clear all

[Solved] Arduino Timers – no pain and all gain!

56 Posts
8 Users
36 Likes
4,192 Views
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

Someone here suggested an RC + a Schmitt Trigger - https://www.eevblog.com/forum/projects/are-there-ics-debouncing-switches/msg3296492/

 

Or find the cheapest, smallest microcontroller you can, and program it as a debouncer. I like that idea. 😀 

This post was modified 2 years ago by YurkshireLad

   
ron bentley reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 

@yurkshirelad 

They're (MC14490s) still available, even Amazon has them ...

"https://www.amazon.ca/gp/product/B07RC9P88B/ref=ox_sc_act_title_1?smid=A3MD210BLM3EZ4&psc=1"

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


   
ron bentley reacted
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 
Posted by: @will

@yurkshirelad 

They're (MC14490s) still available, even Amazon has them ...

"https://www.amazon.ca/gp/product/B07RC9P88B/ref=ox_sc_act_title_1?smid=A3MD210BLM3EZ4&psc=1"

"Ships from Russia"! 😱 

I'm sure they're probably available on Aliexpress or Banggood.

I like the idea of programming something like an ATTiny as a debouncer.

This post was modified 2 years ago 2 times by YurkshireLad

   
ReplyQuote
ron bentley
(@ronbentley1)
Member
Joined: 2 years ago
Posts: 385
Topic starter  

@yurkshirelad 

an interesting find, I have never heard or read of such an IC anywhere.

But, let's not buy from Russia!

 

Ron Bentley
Creativity is an input to innovation and change is the output from innovation. Braden Kelley
A computer is a machine for constructing mappings from input to output. Michael Kirby
Through great input you get great output. RZA
Gauss is great but Euler rocks!!


   
Ron and YurkshireLad reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 

@ronbentley1 

Chinese supplier from eBay is ...

https://www.ebay.ca/itm/391322684461?hash=item5b1ca64c2d:g:LQgAAOSwT4lWSz--

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


   
ron bentley and Ron reacted
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

What about the MAX6816/MAX6817/MAX6818 ICs? I believe they do the same thing but not in a through hole package. They're also pretty expensive:

https://www.digikey.ca/en/products/detail/analog-devices-inc-maxim-integrated/MAX6816EUS-T/774084


   
ron bentley reacted
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

Ah, now I understand why the RC network is useful for button debouncing!

https://www.digikey.com/en/articles/how-to-implement-hardware-debounce-for-switches-and-relays


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

@yurkshirelad I think the circuit they show in the middle with 2 R's, a C and a D will do the job but getting values for all that is not something I know how to do. For now I am just going to put a little loop or delay in my code so I can get on with the meat of the project.

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.


   
YurkshireLad reacted
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

Good point, go down the rabbit hole of options or get stuff done! 😀 

There are calculators that will help - https://www.circuitbread.com/tools/rc-calculator


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

@yurkshirelad If you showed me a brain surgeons tools I would be just as able to use those as this. More research is needed. Actually I did see a partial solution somewhere, time to start looking throujgh as few hundred or more pages but what day?

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
ron bentley
(@ronbentley1)
Member
Joined: 2 years ago
Posts: 385
Topic starter  

Hi all,

it would appear that my original post (Arduino timer interrupts) seems to have morphed into switches and debounce!

I will, sometime today, post a new topic re software debounce of switches and publish a self contained sketch for Arduino (tested) and ESP (not tested) boards that will deal with:

  • button switches
  • toggle switches
  • different wiring schemes
  • variable debounce period
  • detecting switches in transition (if this is feature that would be useful)
  • multiple concurrent switch configs and processing of either switch type and of either wiring scheme
  • switch, wiring scheme and linking configuration via a simple data structure
  • the ability to link any switch to another output, even a none connected interrupt pin
  • code for a skeleton ISR, triggered on a linked switch to an interrupt pin
  • any number of switches linked to a common ISR
  • ... and more!

The sketch is principally the ez_switch_liblibrary articulated as a sketch.  You can follow up on the library's capabilities and functionality (and therefore the sketch) by reference to this Arduino Project Hub link. The article provides a full pdf User Guide and Crib Sheet.

The sketch is offered for your 'enjoyment' and exploration, butcher it as you need or use it out the box.

Cheers

Ron B

 

Ron Bentley
Creativity is an input to innovation and change is the output from innovation. Braden Kelley
A computer is a machine for constructing mappings from input to output. Michael Kirby
Through great input you get great output. RZA
Gauss is great but Euler rocks!!


   
ReplyQuote
Page 4 / 4