Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Variable Resistors / Rotary Encoders

  1. #1
    Low Bitrate
    Join Date
    Jun 2006
    Location
    Richmond VA
    Posts
    73

    Variable Resistors / Rotary Encoders

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


    Brett

  2. #2
    FLAC sama's Avatar
    Join Date
    Feb 2006
    Location
    London, UK
    Posts
    1,375
    this may help, I'm investigating a similar thing at the moment

    http://www.digital-car.co.uk/forum/s...ead.php?t=7596

  3. #3
    Low Bitrate
    Join Date
    Jun 2006
    Location
    Richmond VA
    Posts
    73
    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

  4. #4
    Newbie
    Join Date
    Jun 2005
    Posts
    23
    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.

  5. #5
    FLAC sama's Avatar
    Join Date
    Feb 2006
    Location
    London, UK
    Posts
    1,375
    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!)

  6. #6
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    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

  7. #7
    Newbie
    Join Date
    Jun 2005
    Posts
    15
    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.

  8. #8
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote 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

  9. #9
    Newbie
    Join Date
    Jun 2005
    Posts
    15
    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"

  10. #10
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    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

Page 1 of 3 123 LastLast

Similar Threads

  1. Good front-end for use with rotary encoders?
    By sethk in forum Input Devices
    Replies: 6
    Last Post: 09-17-2007, 03:21 PM
  2. found in fperrorlog
    By 510SX in forum FP Bug Reports
    Replies: 3
    Last Post: 09-21-2006, 09:01 AM
  3. Rotary encoders
    By Wilkyboy in forum Input Devices
    Replies: 10
    Last Post: 12-24-2005, 12:21 AM
  4. Easy way to run rotary encoders
    By TheLlama in forum Input Devices
    Replies: 12
    Last Post: 02-15-2005, 05:01 PM
  5. advice needed on variable resistors for LCD
    By asteroid in forum LCD/Display
    Replies: 2
    Last Post: 10-16-2001, 01:46 AM

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
  •