Electronics > Projects, Designs, and Technical Stuff

How do I connect a D-Type Flip Flop to this tacticel switch?

(1/1)

PNWsushikid:
Hi all,

New to the forums and new to the world of circuity, so bear with me if I ask any stupid questions here.

I'm designing a product, a  very small piece of jewelry that will have some very small, micro components inside of it to light up a small LED.

The LED is this product here: ---> https://cdn-learn.adafruit.com/downloads/pdf/adafruit-led-sequins.pdf

The batteries I chose to power it would be 2x of this battery here: ---> https://www.digikey.com/en/products/detail/seiko-instruments/SR512SW/7428809

The tact switch that I chose to act as the on/off button for this setup is here: --> https://www.digikey.com/en/products/detail/c-k/PTS526-SM15-SMTR2-LFS/10056625

When I originally designed this, I didn't realize that the switch was a momentary switch and I needed a type of button/switch that was self-locking and a non-momentary type. That way I could press the button only once to turn the device on and off again without having to hold it in. But due to the size constraints of the device I am putting this LED light setup in, there doesn't seem to exist a type of low-profile tact switch that does this within the necessary size constraints of my project.

But I did see there is a way to turn a momentary tact switch into a non-momentary/toggle switch by using a D-Type Flip Flop.

Seeing as I know next to nothing about electronics or circuity, I was wondering is this possible to do and what would the configuration, wiring setup look like? Could I use something like this?: https://www.mouser.com/datasheet/2/308/MC10EP51_D-1811236.pdf

I would probably need a ELI5 (Explain it like I'm Five) or broken down in easy to understand terms, but if anyone could tell me if this is achievable, if I'm even using the right components and if they possibly have any advice or lead me in the right direction I would really appreciate it.

Here's what I'm going for: https://imgur.com/a/qtgwzsq

Thanks!

-T

Ian.M:
You don't.  A D type flipflop requires a clean clock input.  If you attempted to use a simple switch, switch bounce on each press (and possibly also on release) would cause a D flipflop wired to toggle, to toggle very fast a random number of times, making the state after each press very unpredictable.  Also that specific flipflop has a differential input, making using it for a switch toggle much more complex.

In your previous topic I linked you to a simple switch operated two inverter toggle latch circuit, which is highly resistant to problems due to contact bounce . . .

mag_therm:
For low parts count on my home brew circuits, I use a single contact spring pushbutton into a single  D FF package like SN74AUP1G80
The pushbutton is connected between Vcc and into C, with a resistor between C and gnd. No filtering.
An RC is connected between Q_bar and D with series R for example 330 k and C approx 1 uF.

It works in 2 modes:
If user presses and releases within a time of less than about 1/2 second, the output will toggle between states at each press.

If user holds the switch down for more than 1 second, the output will follow the state of the button,

It works by a transition on the very first bounce, and will ignore all others until 1/2 second when RC allows D to change state.
The reason for not using it in a product for sale , is the ambiguity, depending how long user holds button down.

mag_therm:
I answered PNW's PM  with suggestion to put up a full spec if possible so that member on here with uC expertise can assist.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod