Issue with LM393 based humidity switch / humidistat.

Discussion in 'The Projects Forum' started by Lyonspride, Nov 12, 2015.

  1. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    To save some time (and money) in my quest to rid my workshop/garage of unwanted humidity this winter, I bought a humidity switch via eBay (Google "FC-13 humidity").

    It's a simple LM393 based circuit, basically this (95% sure):

    [​IMG]

    Now there are some issues with it, like the 2.2k resistors on the LEDs (f**k knows how that works, but it does) and I don't know the value of the capacitor, etc.

    The problem I have is that turning the 10k preset will switch in the LED and relay, with around 4v on + pin, but the humidity sensor simply doesn't do anything at all, it's resistance drops with higher humidity, but the only way to get the LM393 to flip is to short the sensor completely, I get 5v at - pin at normal humidity and this drops to around 4.9v at high humidity.

    If I check the voltage between + and - whilst I turn the preset, the LM393 flips the relay when this value is <1v, but if I change the humidity, it won't switch at all, even if this value drops below 1v, It's like the only thing controlling the output is that preset. If I set the preset so that it's just on the edge of turning on the relay and then expose the sensor to humidity, nothing at all happens.

    I want to get this thing working, but it makes no sense whatsoever and because i'm not used to working with single supply op-amps, this is causing me some headaches.

    It's like someone pulled a circuit from a website, designed the PCB and never actually tested it.

    FYI I bought two of these and both are the same.
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Most humidity sensors are Capacitive, remove the humidity sensor and connect an ohm meter or multimeter on ohms, measure its resistance dry,ie put an hair dryer to it on warm, and then breath on it and see the resistance change,then you can see what resistors to set the dc hysteresis on pin 3,.
     
  3. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    It's definitely a resistive humidity sensor and it does change in value, i've got in a plastic container with a little water at the moment, when it gets to 90% humidity i'll check the resistance.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    LEDs work fine as indicators with as little as 1mA. I'd set it up just the way it is.

    That's a swing of 100mV, and that's more than enough to work the LM393.

    Huh? You just said the voltage drops 100mV. The LM393 can easily be set to switch on a change of under 5mA. Something doesn't add up. Maybe the pot is too coarse to allow fine adjustment?
     
  5. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    The 393 is almost completely ignoring any voltage change on - pin. Your telling me it doesn't add up, that's exactly what i'm thinking.


    Like why does it switch when the voltage changes on + pin, but not on -

    I've even run a simulation and this worked fine.
     
  6. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Ok what happens when you short pin 2 to the supply pin8?
     
    Last edited: Nov 12, 2015
  7. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    Nothing, but short to GND and it switches.

    Looking at the circuit, the voltage at - (actually pin 6) should be around 3-4v, but it's held at supply voltage and I think that's why the sensor doesn't have enough effect.... But why is that pin at supply (5v)?
     
  8. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Can you redraw it with pin numbers and the transistor polarity. ie. is it npn, or pnp,
     
  9. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    You could try adding some positive feedback (hysteresis) by putting a resistor from comparator output back to the + input. Probably something from about 100k to 2M2, you'll have to experiment and find what works.
     
  10. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    Done (may have to refresh)

    The forum does something funky with hosted images, this is the new one but the forum is showing the previous :(

    + is pin 5
    - is pin 6
    Out is pin 7

    [​IMG]
     
  11. crutschow

    Expert

    Mar 14, 2008
    12,986
    3,224
    Where are the LM393 power and ground connections?
    Also show the transistor connections (which is emitter and which is collector?)
     
  12. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    The 2TY is an SMD I encountered recently - one search came back as 8550.

    Its an obscure part, try JE or SI prefix. Can't remember the polarity, but that would make it clear which way round when you find the datasheet.
     
  13. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    A search on the SMD code came back as 8550.
     
  14. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Its a pnp transistor, try using a different op amp like lm358, or tlc272
     
  15. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    The 393 isn't an op amp - its a comparator.

    IMO: a comparator is best suited for this application.

    A small amount of positive feedback might help - it might not. But its something the TS could try.
     
  16. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    It certainly would help with noise and stability around thee transition point, but it also would make the transition region even wider. With hysteresis, it will take a larger change in sensor impedance to affect the output.

    ak
     
  17. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    I've worked out the sensor is a HR202L, with a 19k-50k range and 31k centre point @ 60% RH. Impossible to measure in circuit, I should even have bothered.

    Changing the 10k side of that divider for a 20k would give me a greater voltage change, 2.4v to 3.6v instead of 3.3v to 4.2, so I might try that tomorrow.
     
  18. marcf

    Member

    Dec 29, 2014
    136
    19
  19. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Ok then you need to treat it as a capacitor, and use it in an oscillator, like with a 555 timer, or cmos logic gate type, then the frequency will change with humidity.
    Or use a microcontroller....
     
  20. Lyonspride

    Thread Starter New Member

    Jan 6, 2014
    23
    1
    I think it's just a badly designed bit of kit, the circuit is just generic "off the web", with no compensation for the fact it measures humidity and that the sensor has such a high resistance, it actually looks as though the PCB was designed for something else OR it was designed with a different sensor and some management type found a cheaper one elsewhere (yes i've seen this many times in my career).

    i'm going to abandon this to concentrate on other projects. It's certainly not worth wasting one of my Arduino boards on.

    I really just wanted this because my dehumidifier uses so much power in standby (around 20w) and didn't want to spend too much time messing about with it.

    Here's the second one with the 10k preset removed.

    [​IMG]
     
    Last edited: Nov 13, 2015
Loading...