Page 4 of 7 FirstFirst 1234567 LastLast
Results 31 to 40 of 63

Thread: Multiple Button w/ Resistors

  1. #31
    FLAC -zip-'s Avatar
    Join Date
    Sep 2004
    Location
    Ontario/Canada
    Posts
    1,293
    Skitlz what size resistor did you use in the end? Sorry to hear about your board, but you are getting there!
    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

  2. #32
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Ok, your button is on Analogue Input #10.

    The cascading effect is normal and a GOOD sign. There is really one 1 analogue input on the FB, and then it switches really really fast between all the inputs and reads them. This is common practice. THe problem is when the pin is floating again, you have nowhere for that excess charge on the sample/hold cap to go. So it just sits there and slowly degrades. Until it samples Analogue #10 again and it recharges it all the back up. If you put a jumper to ground on Analogue Input #1, that should make it easier for you to visualize.

    I'm now back to reading 0 when the button is pushed... Bahhh..
    Perfect! Then it is working. The way I described was it is high when not pressed, low when pressed. This seems to be what you are getting.

    Huzzah, a single button works.

    Now you can read up on voltage dividers (wikipedia has a good article).

    Now make:



    Size R1 and R2a-R2d so that they make different voltages when connected.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #33
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Alright here is where I'm at. Haven't had a chance till today.

    I'm using the "active high" solution. Based on your math that I stole, on button 1 pus I would be seeing 4.9950 and button2 push 4.7755

    Both button's I'm seeing 4.9902. Which is very close to button 1, but for some reason I don't seen to be getting a different value for button2. Soo close.

    That 4.6 is supposed to read 4.7. Typo.
    Last edited by SKiTLz; 03-05-2011 at 04:20 PM.

  4. #34
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    811
    Quote Originally Posted by SKiTLz View Post
    Alright here is where I'm at. Haven't had a chance till today.

    I'm using the "active high" solution. Based on your math that I stole, on button 1 pus I would be seeing 4.9950 and button2 push 4.7755

    Both button's I'm seeing 4.9902. Which is very close to button 1, but for some reason I don't seen to be getting a different value for button2. Soo close.

    That result is correct for the values you are using.

    There will be roughly 200mv (0.2) volts difference with those values in that circuit


    It may be that you are loading the input to the ADC and causing an error.

    Try a 10k instead of 100k and see what the reading is.
    Last edited by Mickz; 03-05-2011 at 04:42 PM.
    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

  5. #35
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by Mickz View Post
    That result is correct for the values you are using.

    There will be roughly 200mv (0.2) volts difference with those values in that circuit
    Hmm.. Is my math wrong?

    I was doing 5v * (100000/(resistor size + 100000)) = End Voltage

    I stole that from one of 2k1Toasters posts.

    I'm not sure if you misread my post. The values are what I THOUGHT I would see, but I'm seeing the exact same value for both buttons, 4.9902V

  6. #36
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    811
    Quote Originally Posted by SKiTLz View Post
    Hmm.. Is my math wrong?

    I was doing 5v * (100000/(resistor size + 100000)) = End Voltage

    I stole that from one of 2k1Toasters posts.

    I'm not sure if you misread my post. The values are what I THOUGHT I would see, but I'm seeing the exact same value for both buttons, 4.9902V

    I didnít word that post correctly. The expected voltages are correct IE 200mv difference.

    Your result may skewed by connections, layout or loading.

    See what you get with a 10k instead of 100k. This should give you a better idea of whatís going on.
    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

  7. #37
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by Mickz View Post
    I didn’t word that post correctly. The expected voltages are correct IE 200mv difference.

    Your result may skewed by connections, layout or loading.

    See what you get with a 10k instead of 100k. This should give you a better idea of what’s going on.
    Ok so I dropped the 100k down to a 10k. It lowered the voltage on both buttons when pushed from 4.9902 to 4.7898. The problem is both buttons are still acting the exact same, despite having different size resistors on each button's INPUT connection.

  8. #38
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    811
    Do you have a multimeter to read the voltages at the ADC input pin of the Microprocessor.

    You need to find where the error is. By your description it sounds like it’s NOT the micro.

    You should read roughly 4.94 and 3.39 volts with a 10k.
    Last edited by Mickz; 03-05-2011 at 05:28 PM.
    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

  9. #39
    Variable Bitrate
    Join Date
    Aug 2005
    Posts
    422
    Quote Originally Posted by Mickz View Post
    Do you have a multimeter to read the voltages at the ADC input pin of the Microprocessor.

    You need to find where the error is. By your description it sounds like it’s NOT the micro.
    I do.. So you just want me to check the voltage on the input pin manually instead of trusting the FB reading?

    If thart is what you meant, I get the same reading on my multimeter. Well very close, it's not the best meter so probably a little inaccurate.

    Button not pressed. 3.18
    Button pressed. 4.79

    I just can't work out why both buttons are identical despite having different size resistors.

    ---------- Post added at 05:44 PM ---------- Previous post was at 05:25 PM ----------

    I checked the voltage at the button.

    1.67V not pushed.
    0V pushed.

    That makes no sense too me.
    Last edited by SKiTLz; 03-05-2011 at 05:35 PM.

  10. #40
    Maximum Bitrate Mickz's Avatar
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    811
    You are measuring across the 10k resistor?

    The Micro reads between ground and the input pin.

    Disconnect it from the FB and read across the 10k resistor.

    ---------- Post added at 10:22 AM ---------- Previous post was at 10:09 AM ----------

    This is a simple circuit.

    Without a connection to the FB AND with a regulated 5v supply:

    Both switched open. 0 volts across the 10k.

    Switch 1 pressed (100 ohm) roughly 4.79v across the 10k.

    Switch 2 pressed (4k7) roughly 3.18v across the 10k.

    When you connect to the FB and measure across the 10k – If you read a voltage with both switches off then the FB has a pull-up resistor on that ADC input or you are using the wrong input or there is some other wiring issue with that input.
    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

Page 4 of 7 FirstFirst 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
  •