Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

What do I need to make my LED flash?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What do I need to make my LED flash?

    Join Date
    Jul 2015
    Posts
    1
    Sorry for using this, but Think you Can answer
    I need an relay or something that Can do the following:
    I am building an race simulator and am building an button box With momentary -normally/open switches as they replaced the keyboard buttons. I wired the button from an old joypad. BUT i really needs an flashing LED to flash when the button is pressed, but as it is a momentary the LED Will just stop flashing when its released again. It need to stop flash when pushing the switch 2. Time. (I need it for speed limiter). What do I need?the joypad is connnected to usb so it must be 5v.

    Thanks in advance

  • #2
    A 555 timer circuit is what I would use.

    Google it.

    Comment


    • #3
      An Arduino board (or one of the many clones) will do that and MUCH more....or if you want something smaller and less expensive a DigiSpark board might be a good option.
      Both can be programmed using the free Arduino IDE software from a PC, Mac, or Linux machine

      Click image for larger version

Name:	ArduinoUnoFront450px.jpg
Views:	1
Size:	206.8 KB
ID:	838272

      Click image for larger version

Name:	a6b92b44d04cf533b35253cec7f68a5flarge.jpg
Views:	1
Size:	44.4 KB
ID:	838273

      Comment


      • #4
        Thanks for answers

        Regarding the digispark, Would this could do it? Is the only thing i need for it the LED, the pushbutton and Then program it in the Arduino software and assign the key or something in the program?
        Digispark Kickstarter ATTINY85 USB Development Board for Arduino New | eBay

        As im on holiday I dont have much "Google-time"

        Thanks for your help

        Comment


        • #5
          Astable multivibrator. Like the switch used in the Ibanez pedals. Astable Multivibrator (Oscillator)
          Now Trending: China has found a way to turn stupidity into money!

          Comment


          • #6
            chk this LED flashing circuit

            Comment


            • #7
              Originally posted by guitician View Post
              Astable multivibrator. Like the switch used in the Ibanez pedals. Astable Multivibrator (Oscillator)
              That's the old-school way I'd do it, if I had to.
              But why bother, when off-the-shelf flashing LEDs are readily available?
              Here's one of many sources:
              Flashing | All Electronics Corp.
              DON'T FEED THE TROLLS!

              Comment


              • #8
                Originally posted by Bjarneec View Post
                I need an relay or something that Can do the following:
                I am building an race simulator and am building an button box With momentary -normally/open switches as they replaced the keyboard buttons. I wired the button from an old joypad. BUT i really needs an flashing LED to flash when the button is pressed, but as it is a momentary the LED Will just stop flashing when its released again. It need to stop flash when pushing the switch 2. Time. (I need it for speed limiter). What do I need?the joypad is connnected to usb so it must be 5v.

                Thanks in advance
                Sorry but having a LED flash is only half the problem.

                Bjarneec needs to start that Led flashing with one button, then to stop it with another.

                Not my cup of tea *at all* but I guess it can all be solved in software.

                Now, what's that keyboard connected to, what software is run, that should be known first.

                Or if only 2 buttons and a flashing Led are used, and nothing else, then a simple "old style" solution can be imagined, but I *guess* that keyboard is running a much more complex task.
                Juan Manuel Fahey

                Comment


                • #9
                  Originally posted by J M Fahey View Post
                  Sorry but having a LED flash is only half the problem.

                  Bjarneec needs to start that Led flashing with one button, then to stop it with another.

                  Not my cup of tea *at all* but I guess it can all be solved in software.

                  Now, what's that keyboard connected to, what software is run, that should be known first.

                  Or if only 2 buttons and a flashing Led are used, and nothing else, then a simple "old style" solution can be imagined, but I *guess* that keyboard is running a much more complex task.
                  FWIW that is why I recommended a Arduino or better yet engineering wise a DigiSpark board....I recently used an Arduino to build an overdrive controller for an old British car and also need a toggle function using a single button/momentary contact switch and that was very simple to do, also wired a LED indicator and a current sensor. Total overkill using an Arduino (less so using a DigiSpark, was unaware of it at the time) for this but a fun and educational project and the DigiSpark is cheap. I'd imagine the OP would eventually add more functions, that is my plan with my car too.

                  Comment


                  • #10
                    My approach may or may not be compatible here.

                    I figure the one button starts something, and the other stops it, and the LED is just an indicator. That means whatever it is connected to has some process that either starts and continues or it stops. I would look for something in that system to control my LED. First, I eliminate parallel circuits in the switch box, and second, the LED then becomes a true indicator of status. If the LED is directly controlled by the switch, it only tells us the switch status, not whether or not the system is in any particular state.

                    Used to be PIC chips, and now we have Arduinos, all of which I am sure are versatile things. But one needs to know how to and be able to program them. Imagine if I made a machine that translated French into English, so I could understand it. I tell my sister, "just say three sentences in French to show it is working." She knows no French. I have been in electronics for 60+ years, and other than the introductory FORTRAN classes I took in 1965, I don't program a lick. When I hear "all you have to do is write a program..." I cringe.

                    One CMOS or TTL logic IC can be wired as a flip flop that does the exact task the OP requires.
                    Education is what you're left with after you have forgotten what you have learned.

                    Comment


                    • #11
                      Originally posted by Bjarneec View Post
                      Join Date
                      Jul 2015
                      Posts
                      1
                      Sorry for using this, but Think you Can answer
                      I need an relay or something that Can do the following:
                      I am building an race simulator and am building an button box With momentary -normally/open switches as they replaced the keyboard buttons. I wired the button from an old joypad. BUT i really needs an flashing LED to flash when the button is pressed, but as it is a momentary the LED Will just stop flashing when its released again. It need to stop flash when pushing the switch 2. Time. (I need it for speed limiter). What do I need?the joypad is connnected to usb so it must be 5v.

                      Thanks in advance
                      Originally posted by rjb View Post
                      That's the old-school way I'd do it, if I had to.
                      But why bother, when off-the-shelf flashing LEDs are readily available?
                      Here's one of many sources:
                      Flashing | All Electronics Corp.
                      Originally posted by J M Fahey View Post
                      Or if only 2 buttons and a flashing Led are used, and nothing else, then a simple "old style" solution can be imagined, but I *guess* that keyboard is running a much more complex task.
                      I think the keyboard reference is a red herring. The keyboard is being replaced by the box with a button and a LED lamp. A CMOS or TTL flip-flop (in a DIP 6- or 8-pin package?) and one of those flashing LEDs would be easy to put together. First on my list would be to find out if the switches are sinking or sourcing the system inputs.

                      Flashing | All Electronics Corp. Now that's cool!
                      If it still won't get loud enough, it's probably broken. - Steve Conner
                      If the thing works, stop fixing it. - Enzo
                      We need more chaos in music, in art... I'm here to make it. - Justin Thomas
                      MANY things in human experience can be easily differentiated, yet *impossible* to express as a measurement. - Juan Fahey

                      Comment


                      • #12
                        The power to the LED needs to latch/un-latch with each press of the button. The OP didn't say what circuit the button closes/opens, or how the LED even gets it's power. The flashing part he already has, as stated. The flip-flop/astable multivibrator type of a circuit will do the job, he just needs to say he's got it working.
                        Now Trending: China has found a way to turn stupidity into money!

                        Comment


                        • #13
                          To be honest, I don't fully understand the OP's question.
                          On re-reading, I think he might be doing something like this, with a joypad connected to a PC.
                          How To Make Your USB Joystick Mimic A Keyboard
                          And he wants to add a flashing LED, powered by the 5V from the USB connector(?)
                          And he wants the LED to turn ON when a N.O. switch is pushed, and OFF when it is pushed again?
                          If so, that sounds like he wants the switch to act like a "Caps Lock" or "Num Lock" key- but with the normal LED replaced by a flashing LED.
                          So, maybe he can pull the LED display board from an old USB keyboard, like this The Pi & I: Dirty Little Secret About Wireless Keyboards
                          Then it does become a programming problem- the PC must recognize the switch closure and turn the LED on and off.
                          Or something like that.
                          DON'T FEED THE TROLLS!

                          Comment


                          • #14
                            Originally posted by guitician View Post
                            The flashing part he already has, as stated.
                            I'm not sure about that.
                            The thread title is "What do I need to make my LED flash?", not "How do I keep my LED flashing?"
                            DON'T FEED THE TROLLS!

                            Comment


                            • #15
                              Originally posted by Enzo View Post
                              My approach may or may not be compatible here.

                              I figure the one button starts something, and the other stops it, and the LED is just an indicator. That means whatever it is connected to has some process that either starts and continues or it stops. I would look for something in that system to control my LED. First, I eliminate parallel circuits in the switch box, and second, the LED then becomes a true indicator of status. If the LED is directly controlled by the switch, it only tells us the switch status, not whether or not the system is in any particular state.

                              Used to be PIC chips, and now we have Arduinos, all of which I am sure are versatile things. But one needs to know how to and be able to program them. Imagine if I made a machine that translated French into English, so I could understand it. I tell my sister, "just say three sentences in French to show it is working." She knows no French. I have been in electronics for 60+ years, and other than the introductory FORTRAN classes I took in 1965, I don't program a lick. When I hear "all you have to do is write a program..." I cringe.

                              One CMOS or TTL logic IC can be wired as a flip flop that does the exact task the OP requires.
                              I have not been in electronics nearly that long (but long enough to have studied Fortran long ago ;-) ) and had not done any programming in years..but the Arduino platform was developed for education and programming is simple. The IDE has a bunch of examples built in and there are waaay more out the on the web so in many cases (like for my OD controller project) you can find something similar and modify the code to suit. Anyway here is one of the IDE examples for controlling a LED...

                              /*
                              Button

                              Turns on and off a light emitting diode(LED) connected to digital
                              pin 13, when pressing a pushbutton attached to pin 2.


                              The circuit:
                              * LED attached from pin 13 to ground
                              * pushbutton attached to pin 2 from +5V
                              * 10K resistor attached to pin 2 from ground

                              * Note: on most Arduinos there is already an LED on the board
                              attached to pin 13.


                              created 2005
                              by DojoDave <http://www.0j0.org>
                              modified 30 Aug 2011
                              by Tom Igoe

                              This example code is in the public domain.

                              http://www.arduino.cc/en/Tutorial/Button
                              */

                              // constants won't change. They're used here to
                              // set pin numbers:
                              const int buttonPin = 2; // the number of the pushbutton pin
                              const int ledPin = 13; // the number of the LED pin

                              // variables will change:
                              int buttonState = 0; // variable for reading the pushbutton status

                              void setup() {
                              // initialize the LED pin as an output:
                              pinMode(ledPin, OUTPUT);
                              // initialize the pushbutton pin as an input:
                              pinMode(buttonPin, INPUT);
                              }

                              void loop() {
                              // read the state of the pushbutton value:
                              buttonState = digitalRead(buttonPin);

                              // check if the pushbutton is pressed.
                              // if it is, the buttonState is HIGH:
                              if (buttonState == HIGH) {
                              // turn LED on:
                              digitalWrite(ledPin, HIGH);
                              }
                              else {
                              // turn LED off:
                              digitalWrite(ledPin, LOW);
                              }
                              }

                              Comment

                              Working...
                              X