logo elektroda
logo elektroda
X
logo elektroda

How to design a universal microprocessor system for home control?

3474 5
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 11983369
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #2 11983646
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #3 11984152
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • Helpful post
    #4 11986247
    Chris_W
    Level 39  
    Posts: 8436
    Help: 381
    Rate: 1039
    I'll give a hint of what it's like in the 'industry':
    Inputs are usually built on optocouplers capable of operating with alternating current (e.g. two LEDs inside) - so you can adjust the input voltage range for yourself with a resistor (12V, 24V, 230V both DC and AC). Logic inputs (e.g. 5V) are also safer done via a tansoptor.
    Outputs are implemented in several ways.
    You can use relays - then the IO outputs of the microcontroller via a current driver, e.g. ULN2003, control the relay coils. Practically everywhere it is solved this way (at least from what I observe in the HVAC industry).
    Another version of outputs for alternating voltages (24V AC, or 230V is to use optotriaks and control them with triaks proper, in this version linear control is possible (phase, group), although I have most commonly seen this solution as on/off (at least in HVAC).
    The power supply for the controller should be 12AC or 24AC - a so-called safe voltage, and two that you can supply with AC (common in all kinds of automation) or DC if it suits you. So internally there must be a bridge rectifier (power supply ground and cpu ground may be different - so better to use optocouplers on all inputs/outputs). Inside, it is better to use an inverter powering the cpu and the other circuits, because a lot of heat will be generated on the linear stabilisers (e.g. 24V-5V=19V drop on the stabiliser).
    Most sensors (e.g. thermistors) have their own independent two terminals (via voltage divider brought to the cpu). Or an additional supply is brought out for them (e.g. 12V or 15V constant) to supply so-called 'active' sensors that generate 0-10V signals. Avoid using sensors with non-standard design/control (e.g. ds1820, in my opinion it is better to use a thermocouple or thermistor and work with calibration). It's worth using jumpers to switch the type of analogue inputs 0-10V or NTC - it's simple to implement and adds functionality - at least that's how it's sometimes done (the difference is whether or not to apply voltage to the sensor and linearity correction if it's NTC).
    Outputs with adjustable output voltage (e.g. filtered PWM) are used to generate analogue control signals (e.g. 0-10V) - some actuators are controlled in this way (e.g. in HVAC these are actuators for valves, dampers etc.) in "domestic ovens" such things are unlikely to happen, except when controlling a central heating boiler (4D valve).
    For a start avoid 4-20mA current solutions, the signal is more immune to interference but requires an extension of the 'analogue infrastructure' at the cpu.
  • ADVERTISEMENT
  • #5 11987294
    Anonymous
    Level 1  
  • Helpful post
    #6 11987397
    Chris_W
    Level 39  
    Posts: 8436
    Help: 381
    Rate: 1039
    danzel wrote:

    and how about measuring the input voltage? this is done via a linear optocoupler?

    No, here it usually goes straight through a divider to the cpu (A/D input), sometimes through an operational amplifier. Analogue and sensor inputs are the most sensitive - it is common to use transils and/or zener diodes or even varistors on them - all to protect the cpu.

    Quote:

    is the PWM output also via an optocoupler?

    And it varies from choice to choice, most often it goes from the cpu through some sort of filter to the operational amplifier and to the output terminal.

    Quote:

    can I assume that I can always find a replacement for the active detector, i.e. a passive detector that I won't need to feed from my system?

    It varies - it's more the other way around - you can find active sensors for every parameter you measure, with power and voltage output (e.g. temperature, pressure, CO2, humidity, etc.), but of the passive ones you can only have some - temperature, some humidity, maybe CO2, and it still carries a lot of calibration problems.
ADVERTISEMENT