Page 1 of 7 1234567 LastLast
Results 1 to 10 of 63

Thread: Multiple Button w/ Resistors

  1. #1
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422

    Multiple Button w/ Resistors

    So I have a bunch (about 16) factory buttons I'm wiring to the FB to map to keystrokes. I've got it sussed out except for the fact that I have so many buttons and not enough analog inputs.

    I'm using the +5V off the analogue input. The buttons are simple "push to make circuit, release to break".

    What I'm wondering, can I put a resistor on each button to change the voltage so I can have multiple buttons coming to the same input? As it stands right now every button produces the same current and needs it's own input.

    Was short on time but I made this ms paint drawing. I'm thinking of putting a different value resistor on each of the red lines running to the buttons.

    Thoughts?


  2. #2
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,118
    You could, though you'd probably be better multiplexing then instead. (Consider the resistor selection to minimise aliasing if multiple keys pressed, and the decoding or error handling.)


    I remember using a MM74C923 20-key encoder (else MM74C922 for 16 keys) rather than bogging down the CPU.
    Mind you, I was only running a dual 6502 (Apple CPU) - aka 6511 (4MHz?), though I'd probably do the same for an 68HC11 or 68HC12 (primitive digital CPUs; less than 17 bit data).

  3. #3
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by OldSpark View Post
    You could, though you'd probably be better multiplexing then instead. (Consider the resistor selection to minimise aliasing if multiple keys pressed, and the decoding or error handling.)


    I remember using a MM74C923 20-key encoder (else MM74C922 for 16 keys) rather than bogging down the CPU.
    Mind you, I was only running a dual 6502 (Apple CPU) - aka 6511 (4MHz?), though I'd probably do the same for an 68HC11 or 68HC12 (primitive digital CPUs; less than 17 bit data).
    Sorry but I don't have a clue what you just said. As you can tell from my drawing, I'm not exactly an electrical genius.

  4. #4
    Raw Wave
    Join Date
    Nov 2009
    Posts
    2,118
    MM74C922N-Fairchild-datasheet-7284700.pdf.


    You'll figure the rest out...

  5. #5
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    832
    Basically you’re looking at the same setup used for steering wheels controls in a lot of car.
    Regulate the voltage to the divider well and you can run quite a few switches. However there are limitations for the number of switches that can be reliably used.

    Each button puts a different value of resistor to ground and changes the voltage going to an ADC input. You need to know how to code a micro if you want to implement this.

    On most Microprocessors simple on/off switch inputs are connected into digital IO inputs not the ADC inputs.
    GA-Z77N-WIFI, i5-2400S, 8GB, Intel 520 128GB SSD, M4-ATX Modified, 2 Rev Cams, 2 Web Cams
    8" 16:9 TRANSFLECTIVE, Win8-64, Dual GPS RX and Garmin PC + Odyssey Nav, FM-DAB+, BB-Rec
    T-Screen HVAC control, custom microcontrollers, code and FE. CarPC Project

  6. #6
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by Mickz View Post
    Basically you’re looking at the same setup used for steering wheels controls in a lot of car.
    Regulate the voltage to the divider well and you can run quite a few switches. However there are limitations for the number of switches that can be reliably used.

    Each button puts a different value of resistor to ground and changes the voltage going to an ADC input. You need to know how to code a micro if you want to implement this.

    On most Microprocessors simple on/off switch inputs are connected into digital IO inputs not the ADC inputs.
    Could you comment on what these limitations are? You completely lost me with the "ADC" and coding a micro. I'm using a FusionBrain in case no one caught that. Feel like we might be over complicating what I thought should be relatively simple.

  7. #7
    FLAC -zip-'s Avatar
    Join Date
    Sep 2004
    Location
    Ontario/Canada
    Posts
    1,293
    I replied to your other thread as well, look at a product called RCJOYCON, exactly what Mickz was stating. We both have the same setup. Its exactly what you are describing. I ordered mine today. If you want to know how the install goes, PM me I will be doing bench tests as soon as I get it. Approx 2 weeks.

    What kind of car do you have?
    Attached Images Attached Images  
    2008 350z GT Installed since April 22nd 2011 - Worklog
    2000 Protege Installed Since April 2, 2005 - Intel D201GLY|Fusion Brain|ODBPros ODBII|Engenius|GPS Rikaline|Powermate|Motorized Lilli
    Sound Stage
    Eclipse|MTX|Infinity

  8. #8
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by -zip- View Post
    I replied to your other thread as well, look at a product called RCJOYCON, exactly what Mickz was stating. We both have the same setup. Its exactly what you are describing. I ordered mine today. If you want to know how the install goes, PM me I will be doing bench tests as soon as I get it. Approx 2 weeks.

    What kind of car do you have?
    Perfect thanks mate.. I just saw your other reply also.. Looks like we are doing the exact same thing. I have a 2006 350z. When I installed my screen I used the factory NAV bezel, so I have the factory buttons. They've always just been dead buttons which bugged me so I'm getting around to making them function.

    ---------- Post added at 12:07 PM ---------- Previous post was at 12:01 PM ----------

    I might be doing it wrong, but wouldn't SW2, SW3, SW4 all give you the same voltage with your resistor values?

  9. #9
    FLAC -zip-'s Avatar
    Join Date
    Sep 2004
    Location
    Ontario/Canada
    Posts
    1,293
    I got this diagram from the creator of RCJOYCON, he will be sending me the same but with resistor values for 12 buttons. He is also considering making a 12 button version down the road.
    2008 350z GT Installed since April 22nd 2011 - Worklog
    2000 Protege Installed Since April 2, 2005 - Intel D201GLY|Fusion Brain|ODBPros ODBII|Engenius|GPS Rikaline|Powermate|Motorized Lilli
    Sound Stage
    Eclipse|MTX|Infinity

  10. #10
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by -zip- View Post
    I got this diagram from the creator of RCJOYCON, he will be sending me the same but with resistor values for 12 buttons. He is also considering making a 12 button version down the road.
    Are you wiring the same board as me?

    I discovered my buttons weren't as simple as "open/shut". When the button isn't pressed voltage still passes. .

    ---------- Post added at 07:35 PM ---------- Previous post was at 07:03 PM ----------

    Here is what I'm doing to test.

    Analogue #1 +5V to Button
    Button to Analogue #1 Input

    I have FB MDX running to show me the voltag visually. I see 4.5698 without the button pressed. When I press it I see 4.9902

    Now if I introduce a resistor in the +5V line, no matter what size, all I ever see in MDX is 4.9902. Pushing the button makes no change.

    I'm seriously confused. Thought I had this worked out.

    ---------- Post added at 09:09 PM ---------- Previous post was at 07:35 PM ----------

    Also forgot to mention, if I test the button with a probe on either side I get no continuity unless the button is pushed. So how is it my multimeter gets no continuity yet voltage is flowing?

Page 1 of 7 1234567 LastLast

Similar Threads

  1. multiple command button syntax help
    By yonu in forum RR Skins
    Replies: 3
    Last Post: 01-13-2010, 10:32 PM
  2. setting multiple keyboard strokes in one button
    By igo4bmx in forum Road Runner
    Replies: 10
    Last Post: 09-02-2009, 05:28 PM
  3. MDX -- Linking multiple Outputs/Votes to a single Display Button
    By 2k1Toaster in forum FB Documentation and Tutorials
    Replies: 0
    Last Post: 04-06-2008, 04:54 PM
  4. FS: 75 Ohm Resistors (4 Available)
    By AEFL92 in forum Classified Archive
    Replies: 16
    Last Post: 02-08-2005, 08:12 PM
  5. Using resistors
    By babas151 in forum General Hardware Discussion
    Replies: 7
    Last Post: 03-27-2002, 01:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •