All thermostats are always close to start heating open to stop. The simple reason for that is that you can take one from any brand and replace it by another brand, it’s a kind of “de facto” standard. Note that for AC it works in the opposite way than for heating. The thermostat includes a temperature sensor and when the measured temperature is above the set-point (i.e. the temperature you want) it opens the contact, when the measure is below the set-point the contact close. There is an hysteresis (also called dead band) to avoid the contact flipping when the measure is equal to the set-point. For instance if the hysteresis is 1% and the set point 20 degree C. and room temperature is 18, the thermostat will give a close contact, the heater heats, temperature rises and when it reaches 20.2 (=20+1%) it will open the contact, then the heater stops, room temperature starts to decrease and the thermostat will close again at 19.8 (=20-1%). On good quality thermostat hysteresis is adjustable, this is usually on industrial thermostat, not home ones.do I need to close its contacts and keep them closed as long as I want it to heat, or just close and release quickly to start and close and release quickly again to stop
No. You won’t have remote access, but access from your home local network will still work.That's not a desirable thing because if the internet connection fails, then I won't be able to control it.
You can add one on the Pi and add functions that are not available in the existing thermostat. Look at mine.Also, I won't have a nice LCD
I'm sure that the current in your case is much lower. You can measure it with ampere-meter... just bridge the button contacts with it and you'll measure the current. It is in range of micro A, for sure.Un4Seen wrote:I noticed in its specs that the output current is 32 mA. Won't that be a problem? I mean, how can I know how much current is meant to flow when the thermostat's button closes. Maybe it should be less than 32 mA, maybe more, maybe 32 mA is quite right... What do you think?
These two switches have high on-resistance. In your case, it would be much higher than 400/80 ohms. Exact number applicable to your circuit is not presented in datasheets. The resistance increases by decreasing voltage (eg. 400 ohm listed in datasheet is for 15V supply, where you'd have just 3.3V)... Ok, temperature is also key factor here, but lets stick to 20 deg C.Un4Seen wrote:I wonder if this one could work:
The only thing that worries me about this one is the 400 Ohm "On" resistance. Maybe it's too much. But I could test that with a 400 Ohm resistor, see if it connects the thermostat button's ends. OTherwise deos this one seem suitable?
There's also this similar one:
If I understand correctly, this one only has an "On" resistance of 80 Ohms.
U, quite high value... this makes me thinking about possible noise sensitivity risk.Un4Seen wrote:I tried connecting the wires with different resistors and it even works with 50 KOhm.
More expected than resistance...Un4Seen wrote:Also, I tried to measure the current which goes across the circuit when I touch the wires, but the multimeter shows 0 even when set to a range of 2 mA.
Value is not critical, can be something between 4.7k and 10k.Un4Seen wrote:What value should the pull-down resistors on the control pins of the analog switches be?
Most of the time you will actively drive the control pin(s) low, so there will be no current flow through this resistor. This resistor plays its role after power-on and before you run the software to init GPIO pin(s).Un4Seen wrote:I guess the higher the better because it will reduce power consumption if the value is big.
Use Pi's power pins. You can connect to 3.3V (because GPIO pins are also 3.3V).Un4Seen wrote:Also, the Vss and Vdd pins of the analog switch IC should be connected to the 3V3 (or 5V?) and GND pins of the Pi or to the +/- of the thermostat's batteries?
Note that it says that "E is connected to VDD", which smells like trouble if E is connected to RPI programmable GPIO pin (3.3V) and VDD is connected to RPI pin 5V...The HEF4016B has four independent analogue switches
(transmission gates). Each switch has two input/output
terminals (Y/Z) and an active HIGH enable input (E). When
E is connected to VDD a low impedance bidirectional path
between Y and Z is established (ON condition). When E is
connected to VSS the switch is disabled and a high
impedance between Y and Z is established (OFF
You're welcomed.Un4Seen wrote:Ivan, I cannot thank you enough for your priceless answers! Really, this means a lot to me!
Don't be so sure... surprises are everywhere...Un4Seen wrote:I think everything is clear now
Correct. Minimal voltage for the chip's high level is 3.5V, so you need additional circuit.Un4Seen wrote:I have to use transistors or something to translate the signal from the programmable GPIO pins to 5V before feeding it to the HEF4016BP
Ok... what you need to add is also to connect unused inputs either to Vdd or Vss. It is a good practice not to leave unused inputs floating unconnected.Un4Seen wrote:I've created a mock-up with Fritzing to demonstrate how I imagine the circuit
You're controlling just two buttons. So, currently, 5 out of 7 darlingtons are still free... take two more to invert signals one more time, to become un-inverted.Un4Seen wrote:it's impossible to do it because the ULN2003 is "inverting"
This is a great idea. I've spent almost 2 hours trying to understand how I can do that and I'm still not sure that my solution is correct. This is how I imagine it:FLYFISH TECHNOLOGIES wrote:You're controlling just two buttons. So, currently, 5 out of 7 darlingtons are still free... take two more to invert signals one more time, to become un-inverted.
Almost... Remove pull-downs from HEF chip to ULN inputs.Un4Seen wrote:I hope I got it right...
Un4Seen wrote:it seems so complicated... it exhausted me
Remove two mentioned pull-downs and you're ready to go.Un4Seen wrote:Have I used the right values? (47K everywhere around ULN2003 and 6.8K around HEF4016BP).