Announcement

Collapse
No announcement yet.

Pressure Sensor Circuit

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

  • Pressure Sensor Circuit

    Hey, first post here. Ive read a ton of the hardware ideas and this is one of the greatest places Ive found. Now, I have a question

    Im making a dance pad, basically 4 pressure sensors (up, down, left, right). I already made the USB controller as a dance pad and whatnot, now I need to know how to hook up the actual sensors. I want the input to be pulled down to ground, so I figured that I would put a rheostat there as a variable resistor for the pulldown. This way, I could adjust how strong the pull-down is, theoretically adjusting the amount of pressure required from the sensors. If the resistance is less in the sensor, then it should register a button press, whereas if the resistance is less through the pulldown, it should register a 0. That part all works just great, however, I want all of the sensors to use one pulldown adjustor, so I dont need to put 1 rheostat per sensor. Attached is a schematic I thought would work, but in fact when I press a sensor, all of the inputs go high. What am I doing wrong?





    EDIT: The schematic is drawn wrong. For all of those variable resistors, the outputs actually come off of the wiper, not the other side. I couldn't find out how to do this in the schematic program, so I drew it like such to show the general idea. All the resistors in the image are variable and set-up to be such.
    Attached Files
    2001 Mustang Convertible Worklog
    Indigo Custom Frontend (Flash/Delphi)
    Blog

    Qube v1.3 Now Available at the mp3Car Store!!!!!!
    The simplest IO controller you'll ever use!

  • #2
    Ummmm, you're putting a dance pad in your car?

    Comment


    • #3
      No, but Im using the same concept for the car. I figure that since Im doing the dance pad first, it makes more sense to put that as the subject, however I want pressure sensors in the seats of the car so that when people sit down it will detect them and stuff... same concept.
      2001 Mustang Convertible Worklog
      Indigo Custom Frontend (Flash/Delphi)
      Blog

      Qube v1.3 Now Available at the mp3Car Store!!!!!!
      The simplest IO controller you'll ever use!

      Comment


      • #4
        http://www.ultimarc.com has a keyboard encoder that'll be way easier than trying to design a non-legacy computer interface. Andy's a great guy and the thing's a great price.

        As far as seat pressure sensors, have you looked at phidgets?

        I just looked at your schematic. There's no way in your system to electrically tell which sensor is pressed unless you're relying on those LEDs.

        Comment


        • #5
          No, sorry, not what I need. Ive already bought a minipac from Ultimarc, as well as 2 of the T-Stick Pluses and some player buttons for my arcade. Ive already designed the USB interface, what I need is the switches to give off a single bit: a "1" if the pressure applied is greater than a threshold, a "0" if the pressure is lower. I know that a comparator would do the trick, but Im trying to make it simpler on my own.
          2001 Mustang Convertible Worklog
          Indigo Custom Frontend (Flash/Delphi)
          Blog

          Qube v1.3 Now Available at the mp3Car Store!!!!!!
          The simplest IO controller you'll ever use!

          Comment


          • #6
            As shadow said, there is no way to get an output from your circuit the way it is drawn. You need the circuit output to come from the wiper arm of the rheostat. This would give you a voltage relative to the position of the rheostat (voltage divider circuit). You will need a USB contoller that has a 0-5v analogue input so your computer can convert this voltage into an appropriate signal that you can use in you software.
            Never let the truth get in the way of a good story

            Comment


            • #7
              Nope. I know its possible. I have the microchip programmed and stuff, it looks for a logic high or a logic low on a pin. The theory Im using is that a pulldown resistor brings a pin to ground, and if you apply a positive voltage with less resistance, it goes high. Now from this, I figure that if my sensor is a resistor, then as long as (when it is depressed,) it has a lower resistance than the pulldown, a logic high will be put on the pin. The concept works with one sensor. I adjust the pulldown to be 15k for example, then the sensors need about 10lbs of pressure so that their resistance is less than 15k, making the voltage flow through the sensors to the pin, giving a logic high.
              2001 Mustang Convertible Worklog
              Indigo Custom Frontend (Flash/Delphi)
              Blog

              Qube v1.3 Now Available at the mp3Car Store!!!!!!
              The simplest IO controller you'll ever use!

              Comment


              • #8
                So your circuit is multiplexed?

                Comment


                • #9
                  If you have 5 ADCs on your USB device, you could connect the sensors to 4 of them and the pot to the 5th and use it as a reference value. But to fix the original design, try putting the adjuster pot on the 5V sources as 5V-output-GND so it's adjusting the input voltage to the sensors.

                  Comment


                  • #10
                    Not multiplexed, and I wrote the code already so I really dont want to have to re-write it to use analog sensors.

                    Actually, I cant use the AD converter beacuse there will be two pads at least and each should have its own pressure sensor. The way I did it, the outputs from the sensors can either go into USB, or can go out to another pad, which sends it to USB, so I need just simple 1 or 0's

                    I think I tried putting the adjustor pot on the 5volt source, adjusting the voltage. Didnt really like how it worked, but maybe Ill mess around with that again, thanks.
                    2001 Mustang Convertible Worklog
                    Indigo Custom Frontend (Flash/Delphi)
                    Blog

                    Qube v1.3 Now Available at the mp3Car Store!!!!!!
                    The simplest IO controller you'll ever use!

                    Comment


                    • #11
                      Hi Colin,

                      Are you trying to feed a variable (0v-5v) voltage into a digital input? Normally that does not work. What you feed a low range (say, 0v-.5v) it will register as a 0, and when you feed a high range (say, 4v-5v) it will register as a 1... but in between there is a grey area in which the logic level is completely unpredictable. Some microcontrollers have a different kind of input called a Schmitt trigger (see http://en.wikipedia.org/wiki/Schmitt_trigger), which has some thresholding built-in, called hysterisis (see http://en.wikipedia.org/wiki/Hysteresis#Electronics). It basically works much like a thermostat does. That way you won't get a million on/off flickers when somebody shifts their weight slightly. Anyways, if you don't have any of these inputs, you should be able to stick something inline that has a schmitt trigger input and a digital output. The first link lists a bunch of components, you could probably use a 74310 octal buffer, I think that should handle 8 presure sensors. Hope that helps.

                      Comment


                      • #12
                        Well, I was hoping I wouldnt have to feed a variable voltage in, but even if I did, it would be a pretty steady one, as with the design it's quite hard to get those gray areas unless you weigh about 10lbs. However, I understand your concept, and although most times that would be a problem, it is not in this case, as the microchip checks every 10ms (removing most bouncing) and then the game has some built-in debouncing of it's own. So in the rare situation that there's a bit of a flicker, it only lasts a couple mS on the transition from high - low, and the two together eliminate it.

                        What im looking for is the schematic to hook this all up. Anybody?
                        2001 Mustang Convertible Worklog
                        Indigo Custom Frontend (Flash/Delphi)
                        Blog

                        Qube v1.3 Now Available at the mp3Car Store!!!!!!
                        The simplest IO controller you'll ever use!

                        Comment


                        • #13
                          Originally posted by Shadow View Post
                          I just looked at your schematic. There's no way in your system to electrically tell which sensor is pressed unless you're relying on those LEDs.
                          Just read that part of the post. My question is: why not? The LEDs and the actual output are connected at the exact same point, I could even solder the end of one LED and the input of the chip together, since they're electrically connected. How come the LEDs would work and the input detectors would not?

                          BTW: Original schematic is wrong, the resistors are all variable and connected properly, theyre just drawn wrong. First post edited.
                          2001 Mustang Convertible Worklog
                          Indigo Custom Frontend (Flash/Delphi)
                          Blog

                          Qube v1.3 Now Available at the mp3Car Store!!!!!!
                          The simplest IO controller you'll ever use!

                          Comment


                          • #14
                            If it's CMOS TTL like microchip PICs, the grey area is 0.8v to 2.0v but still it's kind of strange putting an analog signal into a digital input. So with the pressure sensors, what is the resistance at 0 lbs and at 10 lbs? With and without the LEDs. I don't think pressure sensors are made for much current either so they may burn out after a while.

                            Comment


                            • #15
                              Well theyre custom sensors. I use those antistatic pads that come with the actual microchips, put metal on both sides and use them as step sensors. It generally works, Im telling you guys, however, once I add a few circuits it doesnt work effectively.
                              2001 Mustang Convertible Worklog
                              Indigo Custom Frontend (Flash/Delphi)
                              Blog

                              Qube v1.3 Now Available at the mp3Car Store!!!!!!
                              The simplest IO controller you'll ever use!

                              Comment

                              Working...
                              X