Announcement

Collapse
No announcement yet.

Variable Resistors / Rotary Encoders

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

  • Variable Resistors / Rotary Encoders

    How do I determine whether my HVAC controls use variable resistors or rotary encoders to control the temperature knob?


    Brett
    www.QRXX.com

  • #2
    this may help, I'm investigating a similar thing at the moment

    http://www.digital-car.co.uk/forum/s...ead.php?t=7596
    Current:
    [BMW E46 ///M3 Convertible]

    Previous:
    [BMW E31 850CSi]|[BMW E39 535i]|[BMW HVAC Research]|[IBUS Scrolling Text]|[BMPuter]|[Velocity]|[TomTom]|[Vision]|[Space Navigator Driver]|[Super Fast Boot]

    Comment


    • #3
      I have a Scion tC, and like you described in that post, the knob is very easy to turn, so maybe its the same type of knob as you have? Any ideas on how to confirm this or get the wiring diagram for the HVAC unit?

      Thanks,
      Brett
      www.QRXX.com

      Comment


      • #4
        My '04 Chevrolet truck uses variable resistors; however this could vary widely between mfg. and year. If you can get a service manual for your vehicle you should be able to find the info.

        Comment


        • #5
          you could take it apart, and use a multimeter to mess around with it and record what you see - reverse engineer it. that's my plan (this evening perhaps!)
          Current:
          [BMW E46 ///M3 Convertible]

          Previous:
          [BMW E31 850CSi]|[BMW E39 535i]|[BMW HVAC Research]|[IBUS Scrolling Text]|[BMPuter]|[Velocity]|[TomTom]|[Vision]|[Space Navigator Driver]|[Super Fast Boot]

          Comment


          • #6
            I am currently workiing on a rotary encoder to analogue voltage interface readable by the Brain, so soon it will work with both easily! Right now it is a bit difficult to get the encoder working correctly.
            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

            Comment


            • #7
              Why not allow two inputs to have alternative function as encoder ins. In a fast timer interrupt track encoder state changes (do a debounce for mechanical chatter) and inc / dec a counter. The PC can then either read, at low refresh rate, input pin as normal or read counter and use that to work out how encoder has changed.

              If pins are not used for encoder input ignore counter.

              Comment


              • #8
                Originally posted by Madmac View Post
                Why not allow two inputs to have alternative function as encoder ins. In a fast timer interrupt track encoder state changes (do a debounce for mechanical chatter) and inc / dec a counter. The PC can then either read, at low refresh rate, input pin as normal or read counter and use that to work out how encoder has changed.

                If pins are not used for encoder input ignore counter.
                Because our firmware program already taxes the PIC to the limit. We have no room in either processing speed or storage space to accomodate such code PIC side. Yes that would be the easy way, but it is never that easy is it!
                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

                Comment


                • #9
                  Processing speed cannot be an issue. Encoders are only used occasionally and a test to see if the inputs have changed state is 20-30 uSecs including saving context. Latency introduced by other activity on the USB bus is much greater. The code to support the software decode is very simple 3 bytes of ram (2 at a push) and about 80 bytes of program space including a small look up table.

                  It may seem difficult to include in your current build but in 20 years of designing embedded hardware and writing code in 100+ designs, as a free lance contractor, I can only think of 1 case were a last minute addition in functionality, required by a client, could not be added. If you have written in C then you can easily gain space by using assembler for a few routines, lack of ram ... use configuration registers of unused peripherals.
                  There are a lot of tricks in writing code for minimal hardware embedded systems.

                  "If it was that easy everybody would do it"

                  Comment


                  • #10
                    The main issue is a sampling issue. Right now the PIC only samples when the PC says so which is like 30Hz normally. Everything is sent to the PC for understanding. We can't have the processing on the PIC as yes it is written in C, and there is very little room. To add support for the encoder, we would need many other things to happen in the firmware that differ from what we have now. The PIC is not to sample inputs at its own will. There are already timers in there to monitor the outputs and turn off time afterwards. The entire firmware would need to be re-written, and we are not ready to do that yet if there is a simpler way of doing it, that will work with everybody's chip. If we change now, then everyone who has already bought one, will be out of luck, and that is not good business practice.

                    Of course we will do what we have to, so if we cannot get it working this way, then we will have to re-write it in assembly, to gain the extra speed and add all the extra code.
                    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

                    Comment


                    • #11
                      I guess the one thing you guys have found is that when designing something always plan on including ways of expanding functionality. It may not be needed but when it is a lot of time can be saved. When doing it for a full time living you get used to thinking in this way. Customers have a habit of changing specs and dreaming up new requirements half way thru a project.
                      Best of luck with your board.

                      Comment


                      • #12
                        A member on another scion forum informed me that the knob is a potentiometer, so I guess that corresponds with the knob using variable resistors. After knowing this information, what is my next step? I'm simply trying to wire together a thermostat to keep the car at a constant temperature like recommended in the uses for the fusion brain.

                        Brett
                        www.QRXX.com

                        Comment


                        • #13
                          has any one looked into controlling a digipot to accomplish this, I've never heard of them until a few months back, and they seem like they would do the trick. I'm most cases, cars with a pot- style rotary dial for temperature control sends a varied voltage signal to a servo amplifier which controls the blend door (the door that directs the entire air stream over either the heating element or the evaporator, or a combination of the two). Now I'm unfamilliar with the protocols used to drive it, like I2C, but it just seems like the way to go, and with an external digipot driver for the servo amplifier, maybe only a digital output on the brain would have to be used...
                          It's been a while...

                          Comment


                          • #14
                            Originally posted by h3rk View Post
                            has any one looked into controlling a digipot to accomplish this, I've never heard of them until a few months back, and they seem like they would do the trick. I'm most cases, cars with a pot- style rotary dial for temperature control sends a varied voltage signal to a servo amplifier which controls the blend door (the door that directs the entire air stream over either the heating element or the evaporator, or a combination of the two). Now I'm unfamilliar with the protocols used to drive it, like I2C, but it just seems like the way to go, and with an external digipot driver for the servo amplifier, maybe only a digital output on the brain would have to be used...
                            Yes we have thought of that. We may still do it. The problem is as with all serial communication, you have to do it in steps. So if it is at 0v, and you want it at 3v, it doesnt go 0v-->3v. It goes 0v-->0.125-->0.25-->0.375-->0.5-->...-->2.875-->3v. It works but the bigger the change the longer it takes. And some applications, you may want to send 4v to trigger command A, but if it sees 3v, then that means command B, and the digitpot is a t 0. Well it would need to cross all the way to 4 through 3 so it would trigger both.

                            I have a work around. It requires a few more outputs though. Hence the extender board too.
                            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

                            Comment


                            • #15
                              Originally posted by 2k1Toaster View Post
                              Yes we have thought of that. We may still do it. The problem is as with all serial communication, you have to do it in steps. So if it is at 0v, and you want it at 3v, it doesnt go 0v-->3v. It goes 0v-->0.125-->0.25-->0.375-->0.5-->...-->2.875-->3v. It works but the bigger the change the longer it takes. And some applications, you may want to send 4v to trigger command A, but if it sees 3v, then that means command B, and the digitpot is a t 0. Well it would need to cross all the way to 4 through 3 so it would trigger both.

                              I have a work around. It requires a few more outputs though. Hence the extender board too.
                              so an additional output to gate the pot's output, or something like that?

                              I can't say enough how much you guy's have done/ and are doing, I've pretty much conceded that I'm not good enough to take on my standalone HVAC project, I've wasted a lot of dough in the effort. And with your stuff, and these future advancements, HVAC and much more are going to be possible.
                              It's been a while...

                              Comment

                              Working...
                              X