logo elektroda
logo elektroda
X
logo elektroda

Choosing a smart home system: PLCs vs microcontrollers – pros and cons

sevotharte 13396 15
Best answers LABEL_AI_GENERATED

What are the pros and cons of using a PLC versus a microcontroller as the intelligent control unit for a smart home system in terms of safety, cost, and implementation difficulty?

A PLC is usually the better choice for a smart-home controller if you want easier expansion, higher integration, and a more industrial-style solution, while a microcontroller is the cheapest option but takes more electronics and programming work. PLCs are described as relatively safe, easy to expand with extra I/O modules, and suitable for HMI, remote control, and integration with alarms or other systems [#7128967][#7132635][#7142194] Microcontrollers are very flexible and can be made very cheap, but they have limited I/O and computing power, often require custom boards, converters, and communication logic, and become time-consuming as the system grows [#7132635][#7142194][#16127960] For a small project, a microcontroller can be enough; for a larger or more future-proof installation, a PLC is more practical [#7142194][#7132635] One reply also notes that, if budget allows, dedicated smart-home devices may be the most optimal solution overall [#7128967]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 7128641
    sevotharte
    Level 10  
    Posts: 50
    Rate: 2
    Hello:)

    I have a question for you, strictly regarding the design :) . Which system do you think is the most suitable? This concerns safety, costs, and the difficulty of implementation and programming. What are the pros and cons of using a PLC or a microcontroller as the intelligent control unit?

    I’d appreciate your thoughts.

    Best regards :)
  • ADVERTISEMENT
  • #2 7128967
    Luklukowaty
    Level 19  
    Posts: 394
    Help: 29
    Rate: 42
    PLC = +difficulty of implementation; +safety
    uPC = +costs; +difficulty of programming

    As for safety – generally speaking, PLCs are safe to use; however, if someone puts in the effort and knows what they’re doing, they can create an equally safe system using a uPC.

    As for programming difficulty – in my opinion, it’s harder to build a professional smart home system using a PLC. It’s a completely different matter when it comes to dedicated systems.

    Costs – a DIY project will work out cheapest, but will it be worth it when you factor in your time and stress?

    To sum up – neither one nor the other. The most optimal solution is to use dedicated smart home devices.

    That’s my opinion, of course.
  • ADVERTISEMENT
  • #3 7129310
    wolhub
    Level 11  
    Posts: 7
    Rate: 1
    Hello, I spent some time working on smart building systems, also known as BMS.
    In my view, unfortunately, the highest costs are associated with dedicated systems such as EIB/KNX – the modules are expensive, and you need to use a lot of them for the house to be functional.
    As for microcontrollers (uC), I’ve also given this some thought in the past, and the idea isn’t a bad one – it’s just very time-consuming, though it’s also very flexible and functional, just like dedicated solutions.
    In this comparison, PLCs come out clearly on top, as they are relatively cheap, ‘easy’ to programme, flexible, and can be integrated with other systems such as alarm systems, EIB, LON, etc.
    In addition, you can install any switches you like, including EIB ones (they look nice), as well as a touchscreen to act as an interface with the whole system.

    If anyone would like a quote for such a system, please do get in touch.
    Best regards.
  • #4 7129879
    sevotharte
    Level 10  
    Posts: 50
    Rate: 2
    wolhub wrote:
    Hello, I spent some time working on smart building systems, also known as BMS.
    In my view, dedicated systems such as EIB/KNX unfortunately involve the highest costs – the modules are expensive, and you need to use a lot of them for the house to be functional.
    As for microcontrollers (uC), I’ve also considered this option in the past, and the idea isn’t a bad one – it’s just very time-consuming, though also very flexible and functional, much like dedicated solutions.
    In this comparison, PLCs come out by far the best, as they are relatively cheap, ‘easy’ to programme, flexible, and can be integrated with other systems such as alarm systems, EIB, LON, etc.
    Additionally, you can install any switches you like, including EIB ones (they look nice), as well as a touchscreen to act as an interface with the whole system.

    If anyone would like a quote for such a system, please get in touch.
    Best regards.


    Hi:) .

    Your post has caught my interest.

    Let me explain – for my dissertation, I’ve been tasked with analysing and designing a smart home system. To start with, I’m focusing on the analysis, which involves comparing all the companies, what they have to offer, and which solutions they favour. Most of them favour the KNX/EIB system – but it’s quite expensive, and I’m looking for the best possible value for money. I’m weighing up whether to go for a system based on a PLC or a microcontroller.

    This raises the question: when designing such a system, what should I pay particular attention to? The idea is for it to be a standard system (lighting, blinds, heating, alarm, etc.). I’ve read a lot about microcontrollers, but I’m not yet sure what should act as the ‘brain’ of this system in terms of the microcontroller. How should I design such a system, or find a ready-made solution and implement it? And what about future expansion – is it easier to expand a PLC system or a microcontroller-based system?
  • #5 7130673
    Wawrzo.
    Automation specialist
    Posts: 264
    Help: 16
    Rate: 24
    I once designed a system like this, but for a fairly large office. I based the design on a computer running CODESYS software, but BECKHOFF’s TWINCAT could just as easily be used. It’s an integrated software solution comprising an HMI and SOFTPLC. In any case, this master system, together with a fairly powerful PC, controlled WAGO or BECKHOFF terminals via Ethernet. In fact, the possibilities with a system like this are endless, and we can expand the configuration with further access points at any time. Simple and effective.
    Wawrzo.
  • ADVERTISEMENT
  • #6 7132635
    wolhub
    Level 11  
    Posts: 7
    Rate: 1
    sevotharte,

    I’ll just answer your question, because which solution is better depends on what we want to achieve and how much money we’re willing to spend.

    You should therefore take into account the size of the system and your expectations of it. Next – additional systems – an alarm, heating, perhaps something wireless, remote access and a control panel.

    A PLC controller will give you all of this – remote communication, a control panel, and it will integrate the alarm system with the smart home system. Contrary to appearances, an alarm control panel can provide a great deal of information without the need to install an additional system. Monitoring window openings and simulating occupancy are just some of the BMS’s capabilities.

    To sum up: the number of inputs and outputs, including analogue and digital ones, is important.

    A PLC-based system is the easiest to expand, though you’ll need to plan for the routing of additional cables.

    You cannot expand a microcontroller (uC) so easily. This involves a great deal of programming and the construction (or purchase) of modules. A microcontroller has a limited number of inputs/outputs and computing power, whereas a PLC has virtually no such limitations.

    A PLC enables HMI and remote control. To put it simply, the biggest selling point is the panel :)

    If you’d like more details, I’d be happy to help.
  • #7 7132828
    sevotharte
    Level 10  
    Posts: 50
    Rate: 2
    Hi.

    After giving it some more thought, I’d prefer to use a PLC for my project. I’m more familiar with PLC programming than with microcontrollers. Right then. So, if I’m going with a PLC, what should I look out for?

    I need:
    - lighting control in 5 rooms
    - roller shutter control in 2
    - heating control in 5
    - automatic switch-off control for sockets and the devices connected to them
    - an alarm sensor
    - temperature and humidity sensors (for opening and closing windows, and monitoring humidity changes)
    - internet access to the PLC

    And I’m now wondering what sort of controller I need, how many inputs and outputs it must have, and what sort of inputs these should be, so as not to overpay – and what the price range would be. If it’s too expensive, I’ll consider renting a PLC for the duration of my engineering studies.

    It seems to me that when it comes to PLC control, a SCADA system would be the best option.

    Thanks for any information :)

    Best regards
  • #8 7138880
    wolhub
    Level 11  
    Posts: 7
    Rate: 1
    Lighting: 5 outputs, 5 binary inputs
    Roller blinds: 2 outputs, 2 binary inputs.
    How many controlled sockets?
    For the alarm system, you will need an alarm control panel, e.g. Satel, and the appropriate modules. You will need to specify the number of detectors and reed switches (window or door opening detectors) plus an RS232 communication module.
    How many temperature and humidity zones are to be measured? Controlling window closure involves the use of actuators. So how many windows are to be controlled?
    Internet access: I recommend a Beckhoff PLC with Windows CE and a HMI.
    Beckhoff has the TwinCAT SCADA/HMI system, which can be used for visualisation, or you could use another HMI product that is compatible with Beckhoff.
    Once you know the exact requirements, I’ll be happy to provide further advice.
    Best regards.
  • #9 7139075
    sevotharte
    Level 10  
    Posts: 50
    Rate: 2
    wolhub wrote:
    Lighting: 5 outputs, 5 binary inputs
    Roller shutters: 2 outputs, 2 binary inputs.
    How many controlled sockets?
    For the alarm system, you’ll need an alarm control panel, e.g. Satel, and the appropriate modules. You’ll need to specify the number of detectors and reed switches (window or door opening detectors) plus an RS232 communication module.
    How many temperature and humidity zones are to be measured? Window closure control is achieved using actuators. So how many windows are to be controlled?
    Internet access: I recommend a Beckhoff PLC with Windows CE and a visualisation interface.
    Beckhoff has the TwinCAT SCADA/HMI system, which can be used for visualisation, or you could use another HMI product that is compatible with Beckhoff.
    Once you know the exact requirements, I’ll be happy to provide further advice.
    Best regards.


    I’m planning for 10 power sockets
    - bedroom (2 sockets) x3
    - kitchen (2 sockets)
    - hall (1 socket)
    - bathroom (1 socket

    As for temperature zones, I’m thinking:
    - one temperature and humidity zone in the bedrooms (3)
    - one temperature and humidity zone in the kitchen (1)
    - one temperature zone in the bathroom.

    Heating units aren’t usually installed in the hall – or at least I haven’t seen any :P .

    I’m currently reading up on this Beckhoff PLC. And I’ve been wondering about the price of these PLCs. On special offer at 600 EUR, that’s a bit steep for an engineering project (though I’ll actually end up using it at home later on ;P). Is there perhaps a cheaper option?:)

    Best regards
  • ADVERTISEMENT
  • #10 7141707
    wolhub
    Level 11  
    Posts: 7
    Rate: 1
    It’s true that the modules for the controller and the PLC itself are quite expensive, but they’re still cheaper than EIB/KNX.

    I think that in this situation, you could create versions for the more ambitious, or using a microcontroller. The limited number of digital and analogue inputs/outputs means you could build it yourself. It could even make for a good Master’s thesis. Of course, one option is to find a cheaper alternative when it comes to the PLC.

    However, a microcontroller is quite a challenge and you can learn a lot from it.
    If I may ask, how much can you allocate to this project?
    PS: You’ll also need to factor in the construction of a control cabinet for this installation.

    As part of the simulation, you could write a programme in TwinCat and see how it will work; as for the practical implementation, this can be done on a microcontroller. I’d be happy to help you with the next stages of the work.
    Best regards.
  • #11 7142194
    Anonymous
    Anonymous  
  • #12 7143033
    sevotharte
    Level 10  
    Posts: 50
    Rate: 2
    So, yes – as far as the physical implementation of a smart system is concerned, I was thinking of setting up the control system using just one room as an example – it’ll be a bit limited, but even the simplest PLC should be able to handle the task. As for the costs – I reckon I could spend between 700 and 900 zł on it. Possibly a bit more.

    For my engineering dissertation, I need to design this system, choose between a PLC and a microcontroller, and build a physical prototype. For my Master’s thesis, I’ll need to develop the system further. So I reckon I can do this on a PLC fairly cheaply for now, and then buy an I/O module later on to connect more devices for my Master’s thesis.

    As for my educational background in this area – I feel more comfortable with PLCs, having spent quite a bit of time working with them – when it comes to programming (actually, in all languages – the programmes I’ve worked on, from what I can recall, include Concept, Unity Pro, so I’ve already had some practice with programming). My knowledge of microcontrollers is limited (I’ve done a bit of work in Assembly, but not much ;) ). As for electronics, my skills are at an intermediate level – I know the basics, but it would be difficult for me to build my own circuit.

    So I’m better at PLCs, but that still depends on the costs :) . I can always put in more work and learn how to design microcontroller circuits ;)

    Best regards
  • #13 7143217
    wolhub
    Level 11  
    Posts: 7
    Rate: 1
    OK, I know what’s what now. In that case, you’ve got a wide range of PLCs to choose from. Siemens is out of the question, as even their cheapest PLC costs 2,000 PLN. The best option would be a Beckhoff or a cheap Fanuc – get in touch with ASTOR; they might give you a discount for educational purposes, to promote the company.
    I suggest a small system
    http://www.astor.com.pl/page/index.php/produkty-i-technologie/wedlug-kategorii/systemy-sterowania/sterowniki-plc/182-durus.html


    or

    http://www.astor.com.pl/page/index.php/produkty-i-technologie/wedlug-kategorii/systemy-sterowania/sterowniki-plc/181-sterowniki-versamax-nano.html 
    .

    There are also Fanuc models that can be expanded with additional modules – unfortunately, I don’t know the prices.

    And finally, Beckhoffs – I don’t remember the prices; I’ll check them tomorrow at the office to see what they’re like. The simplest PLCs can be expanded with additional modules, increasing their functionality in the future. Furthermore, the software for operating these PLCs is free. The cost of DO/DI modules is around 200 PLN. Analogue modules are more expensive.

    I recommend Beckhoffs.

    I can put together a sample system tomorrow and give you a quote, so you can see how it works out.
    Then you can decide: microcontroller or PLC.

    Best regards.
  • #14 7268907
    sevotharte
    Level 10  
    Posts: 50
    Rate: 2
    Hello.

    As I’ve made some progress with this dissertation, I’m now at the stage of putting the equipment together. I’m working on a PLC – I didn’t have much choice, as I got it for free. It’s a TWIDO controller. A link to the controller’s description can be found here:
    http://www.plcs.net.pl/index.php/katalog-auto...lowe/twdlmda20dtk-twido-12-wejsc-8-wyjsc.html

    And now I have a few questions regarding the power supply and actuators. The PLC requires a 24V power supply – here, a power supply such as this one will suffice:
    http://www.tme.eu/html/PL/zasilacze-stabilizo...montazu-na-szyne-din/ramka_1780_PL_pelny.html

    As for the actuators, on the mock-up (which shows the control system for a single room), I need to control the lighting, heating, roller blinds, sockets and the audio system.

    Lighting – standard torch bulbs – two in total, i.e. 2 digital outputs

    Heating - I’ve been thinking about how to implement the heating control. I came up with the idea of using so-called heating mats for mirrors. And here I’d like to ask for advice on whether such a heating system would still work (a mat covering the entire surface of the room shown) – 1 digital output

    Roller blinds - control of the motors that raise and lower a small blind depending on light intensity, or manual control. – 1 digital output.

    Audio system - Turning music on and off (automatically). Indicated via a small speaker – 1 digital output.

    Socket control - switching devices connected to a mains socket on and off.

    And now I have a question – all these devices require a specific power supply – how should I select this power supply to ensure it is suitable?

    To be honest, I’ve never actually implemented anything in a live environment before, which is why I’m asking these questions. It’s always just been simulations and programmes in offline PLC simulators. So I’d appreciate some guidance so I can get on with the rest of the work :)

    Best regards.
  • #15 16126902
    PawełPytka
    Level 2  
    Posts: 4
    Rate: 2
    @sevotharte @wolhub
  • #16 16127960
    ditomek
    Level 22  
    Posts: 590
    Help: 24
    Rate: 230
    Microcontrollers are undoubtedly the cheapest option. Even if you were to make your own circuit boards, nothing could beat them.
    @wolhub How on earth do you intend to control two roller blinds using just 2DI/2DO?
    I can’t be bothered to read the whole thing, but a red flag goes up after a post like that.
    Building an automation system in this way – failing to define the system’s potential for expansion at the configuration stage and proposing additional functionality that could be implemented at virtually no cost – doesn’t really convince me.

    @sevotharte With 8 digital outputs, you’ll be able to control those two roller blinds (4 outputs) and switch 4 light bulbs on and off. 12 inputs don’t allow for much more. I suggest setting up group inputs straight away for lowering/raising the roller blinds (another 2 DI) and switching the lights on/off (2 DI). That way, you’ll have one I/O per function on the controller. Another issue is the power it consumes. In my opinion, it’s higher than, for example, my recent projects based on the Arduino Mega.
    And by the way, for 2–3 stówki, you can get an Arduino controller with 26 DI/24 DO. It features galvanic isolation of the I/O, just like in proper PLC controllers. For the same price, you can even buy a rail-mounted enclosure to give it a professional look.
ADVERTISEMENT