Issue with LM393 based humidity switch / humidistat.

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
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):



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.
 

Dodgydave

Joined Jun 22, 2012
8,465
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,.
 

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
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.
 

wayneh

Joined Sep 9, 2010
16,114
Now there are some issues with it, like the 2.2k resistors on the LEDs (f**k knows how that works, but it does) ...
LEDs work fine as indicators with as little as 1mA. I'd set it up just the way it is.

...I get 5v at - pin at normal humidity and this drops to around 4.9v at high humidity.
That's a swing of 100mV, and that's more than enough to work the LM393.

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.
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?
 

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
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.
 

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
Ok what happens when you short pin 2 to the supply pin8?
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)?
 

ian field

Joined Oct 27, 2012
6,540
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):



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.
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.
 

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
Can you redraw it with pin numbers and the transistor polarity. ie. is it npn, or pnp,
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

 

crutschow

Joined Mar 14, 2008
23,486
Where are the LM393 power and ground connections?
Also show the transistor connections (which is emitter and which is collector?)
 

ian field

Joined Oct 27, 2012
6,540
Where are the LM393 power and ground connections?
Also show the transistor connections (which is emitter and which is collector?)
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.
 

ian field

Joined Oct 27, 2012
6,540
Its a pnp transistor, try using a different op amp like lm358, or tlc272
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.
 

AnalogKid

Joined Aug 1, 2013
8,137
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
 

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
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.
 

Dodgydave

Joined Jun 22, 2012
8,465
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....
 

Thread Starter

Lyonspride

Joined Jan 6, 2014
137
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.

 
Last edited:
Top