logo elektroda
logo elektroda
X
logo elektroda

Smart home – how can you control sockets and lighting remotely?

mischa 141732 244
Best answers LABEL_AI_GENERATED

How should I wire a new house for remote control of lights and power sockets so it is cheap, scalable, and still works manually if the automation fails?

Use a distributed scheme: run an extra low-voltage control bus or a separate low-voltage pair to each socket/switch, and put the relay/triac plus a small microcontroller in the flush-mounted box rather than building one huge relay cabinet [#4660589][#4661044][#4681182] Make every point bypassable or manually switchable so the basic lighting and sockets still work if the automation fails [#4661280] If you want an off-the-shelf platform, Satel INTEGRA 128 was recommended because it expands to 128 inputs and 128 outputs, supports GSM/Ethernet, and can host output modules in DIN rails or junction boxes [#4681182] For a DIY bus, one thread recommends an RS-485-style setup with a separate low-voltage supply over extra cable pairs, and explicitly warns not to use PE or neutral as the automation return [#5502218][#5507705]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #181 9057851
    millexxx
    Level 2  
    Posts: 3
    Hello,

    Could you please explain how to integrate the heating control system with the central control unit? For example, so that the temperature in the bathroom is higher than in the rest of the house, and so that it drops throughout the house at night and when we’re out, but rises before we’re due to return or in the morning. I know there are supposed to be some wireless temperature sensors, but is it possible to do this with a wired system, and what’s the simplest way to do it with gas and/or solid fuel heating, whilst combining traditional radiators and underfloor heating?

    Millexxx
  • ADVERTISEMENT
  • #182 9117747
    jurap
    Level 11  
    Posts: 20
    Rate: 6
    Has anyone taken an interest in the HAPCAN project? At first glance, it’s an inexpensive system that’s described and documented quite clearly. And it’s Polish, too. Perhaps someone has one of these at home?

    http://siwilo.com/hapcan/index_pl.htm
  • ADVERTISEMENT
  • Algorithms for autonomous appliance scheduling and tariff optimization

    #183 9677105
    koczus106
    Level 2  
    Posts: 2
    I am writing my Master’s thesis on the topic: Electricity management in the home (monitoring and smart control). The thesis takes the form of an application/apartment simulator, featuring appliances that can be switched on and off, and programmed to switch on at a specific time and for a specific duration. I’ve got that sorted!
    The next stage is to introduce smart control/planning of energy consumption, so that devices switch on or off automatically depending on current or predicted electricity consumption, and so that tasks that can wait run during the G11 night-time tariff. And here, my supervisor told me to use some ready-made, existing algorithms (I wanted to do it using a few if statements, etc., but he insisted on some task scheduling algorithms) Are there any such algorithms that I can use? Please could you provide some links. The keywords my supervisor gave me were: ‘time scheduling, linear programming, planning methods, task and process scheduling’
    The idea is for the devices to ‘run autonomously’ without human intervention. They should switch on when needed and in such a way as to reduce electricity consumption.
  • #184 9685552
    Quno
    Level 2  
    Posts: 2
    You can set the light to turn off and on when you clap your hands ;D
  • #185 10266001
    przemek_d20
    Level 17  
    Posts: 272
    Help: 9
    Rate: 25
    A mate of mine had one of those, and whenever his wife shouted at him, the light would flash.
  • Remote appliance switching offers little practical benefit

    #186 10267470
    SAWEK101
    Level 32  
    Posts: 2280
    Help: 13
    Rate: 318
    You can’t switch off the fridge, and everyone tends to switch off their own lights – unless there are motion-sensor lights in the corridors, but that’s a bit annoying; there’s not much you can do when it comes to saving energy.
    I’m also planning to install a PLC and a TFT panel, but I’m short of time. In my case, though, it’s more about having control over everything and being able to monitor things like temperatures, alarms, the gate and so on. I specifically want a touchscreen so I don’t have to fit 50 switches and keypads.
    When it comes to switching on any household appliances apart from a kettle :D and water heaters, you’ll run into problems, because all household appliances these days are electronic and don’t like having their power switched on and off at will; and you can forget about tampering with the electronics too, so your project is purely theoretical.
    The new generation of household appliances will probably already have options for operating on the second tariff, but for me, for example, it isn’t worth it because there’s no benefit (the second tariff is only 23% cheaper, but you end up paying 2gr more for the first one).
  • ADVERTISEMENT
  • Low-cost centralized wiring for a semi-smart home

    #187 10409658
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    I’d like to share with you my experiences with what’s known as a ‘smart building’ (SB).
    Six years ago, when I was building my house, people were only just starting to talk about smart homes. At a trade fair, I saw a German company with a system that was shockingly expensive (prices started at 20tys zł for installation). I wanted a house like that, but not at that price...!
    That’s why I decided to come up with my own solution. The most important factors were cost and functionality. I call it a ‘semi-smart home’ ;)
    As I worked it out, the cost came to about 3,000 zł on top of the costs of the ‘standard’ electrical, alarm, aerial, telephone and Ethernet installation, which I would have had to fit anyway.

    I started by laying the cables before the floors were screeded and the walls were plastered. The system is centralised (2-star topology), meaning that on the ground floor, in addition to the alarm control panel and the alarm distribution box, there is a 56-pole electrical distribution box. As usual, all the wires from the IR detectors and reed switch detectors on all the doors and windows throughout the house, plus the siren, converge at the alarm control panel. From the electrical box, all the 230V AC power supply cables branch out (to each load separately! as the relays are in the boxes) along with all the 24V DC control cables. The control cables consist of an Ethernet cable. On the upper floor, there is the second element of the star topology: a second 56-pin electrical box (which has reduced the need to run a large number of cables between floors). Several control and power cables are laid between the boxes to provide power between floors and transmit signals between floors, etc. In every room, in addition to standard lighting and sockets, there are ‘controlled sockets’. This allows, for example, a floor lamp to be connected and switched on using a switch by the door, or switched off when the occupants leave the room (e.g. by activating the alarm). Of course, the cables for the alarm sensors and the telephone also include an Ethernet cable for the antenna – as standard. To minimise the amount of wall chiselling, the cables are routed through a layer of polystyrene beneath the screed or above the suspended ceiling.

    Alarm.
    The Satel CA64 control panel (the Integra wasn’t available at the time). It naturally performs basic alarm functions and sends voice messages to household members’ mobile phones in the event of an incident. It also allows you to call the house from outside and control the system using your mobile phone keypad (e.g. I can remotely switch on the garden sprinkler system when we’re away from home for a few days, etc.). In addition, it provides:
    - mobile phone notifications: regarding a power cut lasting over 1 hour, critical battery status, other faults, tampering, alarms from the CA64 and flooding in the boiler room (the ‘F&F PZ828’ flood sensor connected to one of the CA64’s inputs), and doorbell rings (e.g. the postman).
    - Switching off all interior lighting and controlled sockets when the alarm is armed (the CA64 controls the ‘switch everything off’ circuit in the fuse box) – e.g. to prevent a fire caused by a forgotten iron.
    - Switching on the light in the hall and outside the front door (outside the front door for 2 minutes only) when entering the house after dark whilst the CA64 is armed (front door reed switch + signal from the ‘F&F AZ112’ twilight sensor)
    - Switching on the light only outside the front door for 2 minutes when the door is opened after dark and the CA64 is not armed (i.e. a household member is walking around the property after dark)
    - Shut off the water supply throughout the house when the CA64 is armed and turn it back on when it is disarmed (electric valve controlled by the CA64).
    - Switch on the hot water circulation for 3 minutes after the CA64 is disarmed so that there is hot water at the taps immediately upon entering the house.
    - The doorbell button at the gate and front door activates the buzzer and, whilst the system is armed, logs the event to the CA64’s memory and sends a notification to your mobile phone that someone is ringing the doorbell (via a voice message), it powers on a 12V camera (a car security camera bought on Allegro for 150 zł, which records what is happening outside the house onto an SD card; it can also activate automatically – it detects movement and has IR LEDs). Recording works on a ‘first-in, first-out’ basis. A 2GB SD card is sufficient for 0.5 hours of recording. An 8GB card lasts for 4 hours. You can access the footage remotely via the internet – you can connect it, for example, to a NetiaSpot modem or a PC – it is recognised as a USB drive)
    - the doorbell button only activates the buzzer when the alarm is disarmed, i.e. when someone is at home.

    Buttons for switching on lights, etc.:
    The buttons are double monostable switches, used for roller blinds. The cable to the button box is an Ethernet cable (the cheapest option, as the voltage here is a safe 24V DC). Up to 3 double buttons can therefore be connected to a single cable (leaving one wire spare). A single circuit (e.g. a lamp) can be controlled by several buttons located in different parts of the room or even on a different floor – you simply need to connect them in parallel. Each button works in a similar way to a traditional ‘two-way switch’ – it switches the load on and off.
    The buttons have the following functions:
    - pressing once switches on a single circuit (e.g. ceiling lights or controlled sockets in the room) (F&F BIS411)
    - pressing a second time switches off that circuit (this is how the BIS411 works)
    - holding down a button for 2 seconds switches off the entire room (I call this a ‘section’), including controlled sockets and lighting. When leaving the room, simply hold down any of the buttons to switch off all the lights in the room you are leaving. There is no need to press different buttons several times.
    - Some models have more extensive functions (BIS414). The first press switches on, for example, the ceiling light; the second switches off the ceiling light but switches on the sockets; the third: both the ceiling light and the sockets are on; the fourth switches off both the ceiling light and the sockets. This is the standard operation of the BIS414.
    - Holding down for 2 seconds, as above, switches off the room
    The above functions are implemented by the BIS411 and BIS414. Two additional components, the PCR512 and PCR513, detect a 2-second press-and-hold in each circuit and, using one PK-2K per section, switch off the relevant section. Sections may overlap. The scope of each section is set by connecting standard 1N diodes as appropriate. For example, pressing one of the buttons (by the front door) for 2 seconds switches off all sections in the house and garage, except for the outdoor lighting. This is useful when you want to go out without arming the alarm and switch off all circuits (arming the alarm automatically switches everything off after the exit delay).
    Whilst carrying out this installation, I rang F&F (in Pabianice, I think) and asked if they made components with separate inputs for setting and resetting the status. It would have been easier to achieve the desired effect and add even more features. They replied at the time that they had no such plans. Two years later, they launched the BIS412. I suppose they liked my idea.

    Lighting control is handled by both 56-pole distribution boxes. They contain standard fuses, a main switch and a residual current device. In addition, the F&F components (24-volt) handle all the lighting control on the floor:
    - switching on outdoor lighting after dark and switching it off when it gets light (house number, LED garden lighting, etc.). Switching off the outdoor lighting at dawn also works if the lighting has been switched on manually by a resident and the automatic switch-on function was not activated – this is handled by the CA64.
    - Switching the LED lighting on the internal staircase on/off. They stay on all night. The staircase LEDs are wired to provide as much light as possible whilst using the least amount of power. Each light has three brightness settings (4, 12, 16 LEDs). The controller only operates the first setting – the most energy-efficient one. It would also be possible to switch them off completely when no one is at home at night (CA64). However, I’ve calculated that the first brightness level of my 10 staircase LED lights consumes less than 1 zł per month (they’re on every night from dusk till dawn) (0.2W each, totalling 2W, which is 0.5kWh per month). Just to emphasise once more: the lights are my own series-parallel design with selected resistors, without a stabiliser. Factory-made LED lights with a built-in stabiliser each consume around 2W! and do not allow individual LEDs to be switched on or off.

    Ethernet network
    – connects home computers and also allows the use of a NAS (LaCie 1TB) with DLNA support – we watch films from the drive directly on the TV. The drive is visible on the network to both computers and the TV. At the moment, I have a second DLNA server on the network because I’ve connected a Netia Spot modem to the network, which also has this function.

    Telephone and aerial network
    It is essentially not used, as the cordless telephone I’ve installed, with two handsets, has coverage throughout the house. The base unit is located near the incoming telephone cable. The second base unit requires no cable, only a power supply, and is situated upstairs. Cable TV – cable is only routed to two rooms – where the TVs are located. This allowed us to save on cabling.

    Heating
    Underfloor heating on the ground floor and in the bathrooms. Radiators in the bedrooms. Controlled by a weekly thermostat. The thermostat can be moved to any room (connected to an unused telephone line) – this allows the heating to be adjusted for a specific room or to switch off heating in rooms that are not in use. Switching off the underfloor heating in the living room does not switch off the underfloor heating in the bathrooms. The radiators upstairs operate at high efficiency, which means they are smaller. It took me two months to fine-tune the balance between the underfloor heating on the ground floor and the rest of the house, which is heated by radiators. The aim was to ensure a similar temperature throughout the house with just a single control thermostat. I could also add a feature to lower the temperature when nobody is at home (CA64). I’ll leave that for later.

    Additionally:
    - DHW circulation – to minimise heat loss, I used a separate weekly thermostat to programme the DHW draw-off times for the appropriate hours in the morning and evening. To prevent the pump from running constantly – the thermostat’s temperature sensor is attached to the hot water return pipe, and when it detects heat in the return flow (set to 30°C) (i.e. there is already hot water in the pipes), it switches off the DHW circulation pump. When the water cools down at the sensor, it switches the pump back on. This happens at the programmed times in the morning and evening, with different schedules for weekdays and weekends. It would also be possible to add a feature to start the circulation for, say, 2 minutes, when the CA64 (the existing IR sensor in the bathroom) detects a household member’s presence in the bathroom at a time other than the programmed hours.

    UPS circuit
    There is one UPS and dedicated wiring. The UPS sockets are colour-coded so that a vacuum cleaner isn’t accidentally plugged into them. In total, the wiring has been run to three rooms. Initially, it also protected the power supply to the CA64 and the 24VDC system. However, this proved unnecessary. It now powers only the PCs.

    Phase loss
    I also had a circuit breaker that switches phases in the event of a phase loss affecting the power supply to the UPS, as well as one lighting circuit in each room.. However, this F&F design was a complete failure. Switching too quickly burnt out the contacts; they would stick together and go ‘boom’. I gave up on it ages ago.

    Estimated costs (in addition to the standard electrical installation, which would have had to be done anyway):
    - Ethernet cable: 2 reels of 100 m each. 200 zł (computer network, telephone network, control network)
    - 230V cable – 100m. 300 zł (a separate cable from the junction box to each load)
    - Aerial cable 50 zł, speaker cable – 100 zł
    - F&F electronic components (24VDC): depending on the scope of the installation, 50 units, costing around 1,800 zł, plus a 24VDC switching power supply for a busbar or a cheaper alternative.
    - Plastic conduits, etc.: around 300 zł
    - Labour/concept – DIY: 0 zł

    What’s next
    In the future, I plan to change the control system in the electrical cupboard. Something with a cheap touchscreen (e.g. GPS with WinCE) instead of buttons. We’ll see.
    Cheaper heating would also be useful (I have gas), but it’s unlikely to work – the dense development, close neighbours and small plot rule out wind and a heat pump. The climate isn’t conducive to solar power. Perhaps an ‘ice pick’ system or inverter air conditioning. I’ve got almost everything wired up for heat recovery.

    In the pictures:
    There are two sockets because the left one is ‘controlled’ and the right one is ‘permanently powered’. This means I can switch on the floor lamp using the switch on the wall by the entrance.
    The entrance to the house. The top switches control the outdoor lighting. Pressing and holding them turns off the outdoor lighting. The bottom ones control the hall and the room next to it. Pressing and holding the left one turns off the whole house; the right one turns off only the hall.
    View of the alarm box and the ground-floor distribution board. Below is the alarm sub-box with relays controlled by the alarm system.
    Stairs, LEDs. In the most energy-efficient mode, they consume 0.2W of power (costing around 1 zł per month).
    Smart home – how can you control sockets and lighting remotely? Smart home – how can you control sockets and lighting remotely? Smart home – how can you control sockets and lighting remotely? Smart home – how can you control sockets and lighting remotely?
  • 500-zloty modular microcontroller controller for smart buildings

    #188 10426368
    ditomek
    Level 22  
    Posts: 590
    Help: 24
    Rate: 230
    Hello.
    In my view, the biggest problem with smart buildings is the cost of the control system.
    It’s been well known for some time that this can be done using traditional PLC components, but it costs a fair bit. On top of that, you need knowledge of PLC programming – unless, of course, we can afford an automation engineer who’ll change the programme for us every time we ‘come up with’ something new.
    Nevertheless, smart buildings are really for smart people.

    What if the cost of a system offering, as standard, 24 relay outputs, 24 opto-isolated inputs, 1-wire buses for temperature sensors, an RS485 port, an IR sensor and an RTC as standard, were to come in at no more than 500 zlotys?
    There’s just one condition: the ability to programme microcontrollers
    The components slot together like Lego bricks (literally), because the boards with the modules are waiting on the shelf for you to reach for them...
  • Modular USB-programmable smart home system concept

    #189 10427423
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    Hello, where is that shelf? I’d love to have a look…
    But on a more serious note: I’m currently developing a system, though with a slightly different concept to the one my colleague mentioned. Modularity, versatility, ease of reconfiguration and affordability – these are my priorities when it comes to the technical aspects.
    Firstly: It’s important that the ‘average Joe’, with minimal electrical knowledge, can install it at home. And if he doesn’t have that knowledge, then at least, once it’s been installed by an electrician, he should be able to change how it works himself without having to fiddle with the cables.
    The second point is the software. A computer with a USB port and a simple programme for designing and simulating the behaviour of such a system MUST be sufficient. It usually turns out that users of smart home systems never make use of most of the system’s advanced features. Simple circuits and straightforward logical rules are sufficient to achieve the desired behaviour. We set the system’s operating principles on the computer and then upload them via USB to our home system. It’s just a concept for now, but I’m already starting to assemble a prototype system (on the table for the time being).
    The third issue is production costs. If various functions can be achieved using a single circuit simply by changing the internal programme, this reduces production costs.
    The fourth issue is power supply and energy consumption. To be able to use such a system, for example, in a caravan, minimal power consumption is required, along with the ability to run on a battery for several months.

    My assessment is that it is not possible to produce the sort of ‘control unit’ circuit board my colleague mentioned for 500 zł, if only because of the cost of the components themselves. Besides, it would have to be quite large (if it were to be a single printed circuit board).
    Take a look, for example, at Allegro: the “Satel Integra 32 Control Panel” costs around 400 zł. On top of that, you’d need to add actuator relays, a power supply, a housing, and so on. And that’s just for 8 inputs and 8 outputs for now. However, given that you’ll need to install an alarm system in the house anyway, it seems worth considering purchasing a larger version of the control panel than is strictly necessary for your alarm requirements. Then, for example, a system like the Integra 128 can handle both alarm functions and smart home tasks (much like my CA64+F&F setup). This provides the following features: an alarm system, automated lighting and twilight controls, telephone notifications, home control via telephone, savings on heating, etc. However, the fiddly and tedious process of programming the ‘smart home functions’ in such a control panel tends to put off ordinary users. I suspect that even professional installers will find it quite a challenge. I struggled with it for several days, and I’m an electronics engineer and programmer; the task wasn’t particularly complex because some of the functions were handled by the BIS units from F&F.

    By way of comparison, in my actual installation at home, I counted:
    35+26 – lighting inputs/outputs (35 light points + 26 control inputs)
    10 – IR detectors
    16 – reed switch inputs (windows, external doors)
    10 – other sensors and control outputs (light sensor, flood sensor, water valve, circulation pump, circulation thermostat, etc.)
    A total of approximately 97 I/Os. It cost me around 3,000 zł + an alarm system costing 2–3 thousand zł (including detectors).
    Returning to the Integra, the control panel performs logical functions using (logical) inputs and outputs. This reduces the number of I/Os available for signalling and actuator purposes. Conclusion: For an installation of this kind, the Integra 128 might be sufficient, or it might not.

    It seems to make more sense to build ‘distributed’ intelligence. That is, there should be as many decision-making elements as there are I/O ports required, but they MUST be inexpensive.. For example, a single standard narrow DIN enclosure (for a rail, one unit) can accommodate 2 outputs (2 relays) and 2–3 inputs, and must be capable of communicating with one another as well as being programmable from the outside. It is not possible to fit any more due to the limitations of the enclosure. Such a unit MUST cost at least 100 zł (production costs 50–60 zł). The advantage, however, is that if you have a small installation, the system costs will not be high (e.g. for 8 light points, 4 such modules are sufficient = 400 zł). In my case, this would amount to around 20 units (which would handle all the lighting and signal transmission to and from the alarm control panel, e.g. standby mode, trigger events, etc.) [i.e. 2,000 zł], plus a smaller alarm control panel (e.g. Integra 32 + input expansion) [700 zł], and a few more components for data collection and control [500 zł]. In total, around 3–4 thousand zł (not including IR detectors and reed switches, lighting buttons, cabling, installation costs, etc.).

    Realistically speaking, sophisticated smart home systems require a great deal of specialist knowledge. No wonder they’re expensive. In reality, overly complicated functions in the home aren’t met with much enthusiasm by the household (this is sometimes the case in my house when my wife forgets how one of the less frequently used wall switches works). The vast majority of functions to be carried out by a smart home system are based on simple logic. Only a handful of functions are sophisticated; for example, controlling the heating whilst the thermostat learns the heat capacity of individual rooms in relation to the outdoor temperature gradient, and so on, requires complex systems and software. But what’s the point? A weekly thermostat is sufficient for this purpose, possibly with a weather-compensated function, but it must be properly calibrated. A friend of mine has a weather-compensated thermostat and complains that when it gets warmer outside, the system switches the heating off and the house gets cold.

    Best regards
  • #190 10429731
    ditomek
    Level 22  
    Posts: 590
    Help: 24
    Rate: 230
    I’ve already got the relay boards (8 pieces, 10A) ready.
    At the moment, the control boards with microcontrollers and the opto-isolated input modules (8 inputs, 12V) are being printed. In my opinion, 24V is unnecessary in the home.
    By the end of next week, I’ll have the first prototype – no longer just a spider-like contraption on my desk, but a working control system for the flat’s lighting via RS485.
    The price I mentioned is definitely achievable.
    In fact, it’s easier to build the right hardware than to write the rest of the software that makes this system user-friendly for the average person. I’m just not sure how simple the software would need to be for someone with no electrical background to manage it.
    It seems to me that it’s pointless to force the issue by looking for simple solutions. They simply don’t exist. The installation should be carried out by someone who understands it, not just anyone, because otherwise there’ll just be more work involved in fixing it.
    There are plenty of simple solutions on the market, yet only professionals actually use them.
    The issue of cheap multi-input modules has also puzzled me.
    In the end, you still have to use at least a few of them anyway...
  • ADVERTISEMENT
  • #191 10430017
    SAWEK101
    Level 32  
    Posts: 2280
    Help: 13
    Rate: 318
    This business of the lights switching off randomly is a bit too much for me; whenever things get too fiddly, it just ends up looking like a Christmas tree.
    I’m all for simplifying life, not for gimmicks that serve no obvious purpose.
    Alarms, roller blinds, the gate, emergency power supply, proper heating controls, outdoor temperature monitoring – these are all useful features, no doubt about it, but I don’t see the point in turning the lighting into a Christmas tree; it’s not going to be ‘smart’ anyway.
    It’s just like those ‘fridges of the future’ that’re supposed to order groceries online all by themselves – how on earth are they supposed to know what I’ll fancy tomorrow when I don’t even know myself yet? :D .
    I can’t quite get round to setting up my own automation system myself; I’m also a bit put off by the energy consumption of all those relays and controllers. I want to use DIN relays, rather than surface-mount ones, because if I ever need to replace one, I probably wouldn’t fancy taking the whole thing apart and desoldering it, so I’d rather do without that function :D
  • #192 10430455
    ditomek
    Level 22  
    Posts: 590
    Help: 24
    Rate: 230
    You’re absolutely right.
    It’s easy to go overboard with all the bells and whistles.
    That’s why I personally believe the system should offer the following functionality:
    - switching off the lights from a single central location
    - switching off the lights in a room after a specified time has elapsed (integration with the alarm system is required)
    - switching off the lights in selected rooms when the alarm is armed,
    - controlling selected sockets as above
    - switching off appliances when the household is out and/or at night
    - switching on outdoor lighting.
    - controlling roller shutters

    You don’t need a million inputs and outputs for this; the system is cheap and simple.

    For 50 zloty, you can buy a board with 8 x 12V 10A relays.
    How much does ONE relay in a DIN-rail housing cost?
  • #193 10431213
    SAWEK101
    Level 32  
    Posts: 2280
    Help: 13
    Rate: 318
    I was referring to DIN-rail relays; I pay about 8 zł each, plus 8 zł for the mounting bracket, making 16 zł for a 16A unit
    For LEDs, just about anything will do, but with sockets and lighting, a significant arc can form, which causes the contacts to sulphurise (I know from experience).
  • #194 10435209
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    I agree that 24V isn’t necessary at home. However, when I was carrying out this installation, there were no other components with similar functionality that were also inexpensive. I used 24V because the BIS units were rated for either 24V or 220V. There was no choice if I wanted to ensure the safety of the signalling system.
    When using microcontrollers, you need to power them with a low voltage somehow. It would probably be a good idea to use the power supply from the alarm system. The power supply’s efficiency is quite high in Integra systems. However, the output there is 12V, so it would need to be stepped down to 3–5V or a voltage regulator used to achieve a higher voltage - I work with PICs, and they have the added advantage of not drawing much power – they can be powered by ordinary batteries in premises where there is no permanent mains supply for several months.
    Please take a look at the Satel “CA-64 O-R” (184 zł). It’s an 8-relay module, an extension for the Integra. If you already have an alarm control panel at home (and perhaps with some unused inputs and outputs), it’ll be easy to set up a semi-intelligent system at low cost. However, you’ll still need to run both 230VAC and control cables to where the board is to be installed.
  • #195 10436960
    ditomek
    Level 22  
    Posts: 590
    Help: 24
    Rate: 230
    SAWEK101
    What relays are you using?

    I’m currently working on the idea of building a universal output module.
    Small modules with relays and/or triacs will be slotted into the 8-output main board.
    I want 3 triacs and the rest to be relays – no problem. If I blow a triac or a relay coil burns out, I just replace the faulty module. Given the cost, a faulty module usually ends up in the bin.
    The biggest challenge in all of this is designing the mounting system...
  • #196 10495421
    PPK
    Level 30  
    Posts: 1963
    Help: 94
    Rate: 431
    There are ready-made modules for alarm systems – with 4/8/16 relays, open-collector transistors or triacs. There are versions with galvanic isolation (optocouplers). Recently, versions with optotriacs have become available. They are controlled via an RS485 bus and are easy to adapt as they operate using dedicated (alarm system) protocols.
  • #197 10496882
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    Does anyone know about these alarm protocols (RS485 or other communication protocols)? Or could anyone point me in the direction of where they’re documented? I’d love to have a look at a description, for example from Satel.
  • #198 10498596
    PPK
    Level 30  
    Posts: 1963
    Help: 94
    Rate: 431
    That’s the problem. I don’t think they even cover this in specialist technical training courses. The manufacturer. I was actually thinking of ‘replacing’ the RS485 unit with a standard one.
  • #199 11189867
    Silkboy
    Level 12  
    Posts: 36
    Help: 2
    A warm hello – I happened to come across a topic that I’m also grappling with.
    Whilst setting up my smart home, I decided to create a distributed system.
    This is because I don’t need a smart hub in my home.
    I won’t be showing it off – I just want the most reliable system possible.
    A distributed system will never fail completely; only one of its components might break, but it will automatically be self-repaired or replaced by another.
    I’m currently in the testing phase; I’m building devices and discarding them. :) )
    I haven’t quite decided yet whether to use UART or RF communication.
    The arguments in favour of wired communication are low power consumption and security.
    The argument in favour of a radio network is convenience.

    For the actuator modules, I have decided to use PIC family microcontrollers in QFN/MLF packages, due to their size.
    The low power consumption of PIC microcontrollers allows, with wired communication, for direct power supply from the 230V mains using a rectifier diode, a Zener diode, two resistors and a capacitor.
    Ultimately, the power supply circuit will be expanded slightly, but not by much. :) )
    With skilful programming, it is possible to ensure that the entire system draws as little current as a few LEDs.
    Communication protocol? Well, why complicate things? UART gives us everything we need; we also interface with the RF via UART or SPI, and the rest is simply the data we need to transmit.
    Manufacturing a single control unit costs around 25–30 zł, not including labour and electricity consumption; of course, this excludes the RF transceiver, for which you’ll need to add at least another 20 zł.
    The cost may vary depending on where you source the parts.
    I managed to buy some PIC16F76I/ML microcontrollers for just under 10 zł each.
    And I’ve seen shops selling them for 30 zł each.
    If I ever produce a proper set of documentation, I might share it.
    The whole system will also require a unit with greater computing power for data processing, sending commands and updates to individual modules, and monitoring that everything is working correctly.
    I’ve got myself a MiniSTM32 evaluation kit with an STM32F103VET microcontroller, featuring 512KB of flash memory.
    And that will be the only visible sign of a smart home, as the rest will be housed in electrical junction boxes.
    The MiniSTM32 has a rather tiny touchscreen, but it will rarely be used; I’ll control the system from a PC (at home) or a mobile phone (when away from home).
    Of course, we’re talking here about controlling the electrical system.
    Multimedia will be managed using existing off-the-shelf solutions.
    Only the sound system will change slightly, as I like music and want the sound to ‘follow’ me.
    But I’m leaving that issue alone for now, as it’s not very important and is easy to implement.
    The next modules I’ll be working on soon are the data-collection modules.
    These include temperature, gas concentration, colour, motion, sound level, speech recognition and perhaps image analysis (for which a PIC24 or PIC32 will be required).
    A distinctive feature of a distributed system using wireless communication is the ability to implement it without the need to modify the electrical installation.
    This is an unbeatable argument; however, as I have already mentioned, wireless communication requires a more powerful power supply, which means higher energy consumption and turns the house into a ‘microwave oven’. :) )
    Essentially, from the point of view of From a programmer’s point of view, there isn’t much difference between wired and wireless communication; it’s just a few extra steps when operating the device.

    Well, what else is there to say? You’ll probably have questions of your own, so I’ll answer them.

    As for alarm control panels, I wouldn’t use them for a smart home.
    Even if you buy a cheap control panel, the cost of rewiring the electrical installation (a lot of wiring) is likely to put you off at the very thought of the renovation.
    The power consumption of the simplest control panel with peripherals is 20–30W, which amounts to a maximum of 20kWh per month – ugh, that’s a lot for a system whose purpose is also to save energy.

    The RS485 standard is a method of data transmission, not a protocol.
    Companies manufacturing control units and peripheral devices strictly protect their communication protocols. It’s easy to implement the RS485 standard from the RS232 standard using RX/TX lines and a small chip.

    If you’re building from scratch, I’d recommend two standards: RS232 (using just RX/TX) and RS422; however, I wouldn’t recommend communication via the mains supply, as it’s very unreliable.
    And, of course, RF – preferably 868 MHz – where the higher the frequency, the greater the power consumption, but also the higher the bandwidth.
    At 2.4 GHz, the current draw during transmission is around 200 mA, which is an obscene amount; all my control modules combined wouldn’t draw that much current.
    The problem with wireless communication is that when putting a device into SLEEP mode, it often needs to be woken up to maintain communication capability, which is not the case with wired connections.
    The microcontroller wakes up immediately after receiving the start bit, so it is always responsive.
  • #200 11190131
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    Hello. I’m impressed by your in-depth thoughts. I’ve been through the same thing. I’m currently in the process of replacing a semi-intelligent system (which has been working fine for several years) with a new, partially distributed system based on PICs. But the lack of time…

    A few comments, which might be useful...:
    1. If you’re planning wired communication, you’ll have to RUN CABLES anyway – twisted-pair cable (the exception is the mains supply, but as you say, that’s a fallback option). You can use 1-Wire and that sorts out the power supply, communication and data collection (e.g. a temperature sensor connected to a PIC or to 1-Wire), as well as security, and you only need two wires to wire up the whole system – run point-to-point. The only potential drawback might be cable damage. If that happens, the whole system grinds to a halt. But you can’t have everything. As usual.

    1a. My experiments with wireless communication show that there can be problems with range, even over short distances (walls), as well as with interference from sensors, for example, at a neighbour’s. There are no problems with the power supply, however. The RF transmitter (temperature sensor) sends temperature data continuously, approximately every minute. It runs for over a year on two AAA batteries.

    2. PIC microcontrollers with nanoWatt technology (e.g. 16F627) draw only about 120 µA – a negligible amount. The only significant power consumer in the control circuit is the relay (when activated). But there is another way to solve this. You can use bistable relays (which only draw power at the moment of switching).
    I use such a device to control the circulation system in my home; it has a large LCD display, a contact rating of 10A/230V, and runs on two AA batteries for three years without needing a battery change, showing no signs of battery depletion. It switches the pump on and off several times a day according to seven programmes that I define myself. It is based on a PIC16F946 and a bistable relay, plus, of course, a temperature sensor.

    3. To monitor my system, I’ll use a GPS satnav (it has a colour touchscreen, USB, a memory card slot, you can write programmes using PC-MS Visual Studio, and it costs up to 200 PLN). Once unlocked (some come unlocked as standard), you have Windows CE and everything you need to control such a system (the USB port allows you to connect, for example, your own PIC and control any interface and protocol). I’ve carried out tests with this solution. It works fine. It collected data from the fuel flow sensor, engine revs, propeller trim, temperature, pressure, etc. (all processed on the PIC), and, in conjunction with GPS, enabled various calculations (using speed data from the GPS navigation system). The only drawback is the power supply. With the screen backlit, it draws around 1A at 12V. But then, it is a proper computer and is bound to use power. Besides, one could consider switching off the controller once the autonomous actuators have been ‘programmed’.

    4. Using the existing electrical installation is a good idea. However, as I’ve noticed, if the current switched on by a wall switch (rated for 230V) is too low, after a few years the switch contacts become corroded, and you sometimes have to ‘fiddle’ with it several times before it clicks into place. Therefore, the control signals must not be too low-current – it is worth taking this into account in the design.

    As an aside, the alarm control panel can be connected to sub-panels (requiring only 3–4 wires for communication) – a distributed installation. There’s no need to run all the cables to the main control panel. It is simply a matter of positioning the sub-control units appropriately. Unfortunately, this will increase costs, but it is not impossible. All the more so as a smart home usually already has an alarm system in place anyway.. So why not make use of it? Furthermore, for the smart home system, it’s important to know whether the alarm is activated or not, and whether the user is in the bathroom, etc., so there should be some form of communication between the smart home system and the alarm.

    Best regards, mb
  • #201 11193240
    Silkboy
    Level 12  
    Posts: 36
    Help: 2
    I’m glad we share similar views. I certainly value other people’s feedback, especially the most critical comments.
    I’ve also been thinking about using a ready-made device as a control panel.
    Unfortunately, I’ve come across some shortcomings with the off-the-shelf options.
    Among other things, I considered using a Samsung Omnia.
    It has everything I could possibly want, i.e. Wi-Fi, USB, Bluetooth, a GSM modem, and, as you mentioned, Windows Mobile, for which I’ve already written a few games.:)
    Unfortunately, I couldn’t find any documentation, so I don’t know if it even has the required WDT.
    Another downside is the long boot-up time; in the event of a hang, this is standard even in Windows Mobile or CE.
    In my setup, the actuators only control their own environment, i.e. IGBT temperature, current draw, and control of one optocoupler via another :) (I’m not sure whether to scrap this and use a dedicated IGBT driver instead).
    For now, it’s set up this way because the second identical module controls a standard MOSFET – it’s just for testing.
    What the final solution will actually be remains to be seen; there are a few options to choose from and I need to explore all the possibilities.
    For now, I’m favouring semiconductors because of their response speed.
    Getting back to the central unit, in my setup it issues commands such as ‘switch on’, ‘switch off’, PWM percentage or ‘report’, and it receives fault reports and requests for software updates in the event of an allbootfail.

    (I’ve miraculously managed to fit everything into an 8K 14-bit PIC, plus the latest software and an event log file on a separate flash memory chip.
    To be clear, I’m carrying out the tests on a PIC16F876; unfortunately, my latest PIC16F76 purchases don’t support writing to internal flash memory from program code and will likely be used for data-collection modules instead.
    Ideally, I’d prefer to get a PIC24F16 or F32 in a QFN28 package, but we’ll see how it goes – the lads at the shop have promised to sort it out.)

    So, the central processing unit collects information and issues commands to the actuators; hence the need for a WDT – freezes are out of the question – and I also programme the STM32 in 80% assembler. At the moment, I’m using UARTs for short-term connections. Sometimes I make use of a custom-built UART based on the FT232RL.
    For now, I’ve got quite a bit of fun ahead of me, and at this stage, the insights from others’ experiences are very helpful. As is the case with wireless communication.
    The girls are always telling me, “There’s nothing like a wire” :)
    So I’ve saved a lot of time on testing and money. :)
  • #202 11193504
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    I’d also previously considered having a single central unit that controls everything and is aware of all events. However, it must operate continuously and without failure. In such a case, if, for example, you want to install a new programme or reconfigure other settings – such as updating the software in the PICs, etc. – your home stops responding to events because the central unit is busy doing something else. Disaster is just around the corner, especially when no one is at home and the central unit starts playing up or freezes, for example, just as the heating is switched on. You come home to find it’s 40 degrees and the fire brigade are outside your house.
    I’ve come to the conclusion that this isn’t what distributed intelligence is all about! Functions such as ‘switch a light on/off when the user presses the switch in the hall’ can be handled by a standalone circuit. All that’s needed is for the central unit to programme the switch number and the type of action. The switch’s status is, of course, another PIC connected to a shared data bus (it sends its status when the button is pressed or at regular intervals, like temperature readings, or even better – it responds to queries). In this way, devices can perform quite complex functions. There are many possibilities. It seems to me that this is the strength of distributed intelligence: that ‘everyone knows what to do’. Such a system does not require an online supervisor. The simpler the functions to be performed, the easier they are to implement and the more resilient they are to failure. Besides, PICs have a WatchDog, which automatically resets the system in the event of a programme freeze or a power cut. With Windows, it’s a different story; sometimes it won’t boot up again after a crash.

    Regards, MB
  • #203 11193849
    Silkboy
    Level 12  
    Posts: 36
    Help: 2
    You’re absolutely right; every peripheral is responsible for its own environment.
    In my setup, the central unit has quite a few tasks, as it’s responsible for the human interface.
    And here, I’m the control centre, because I want things to run smoothly.
    Certain things are supposed to happen based on my location in the house.
    And if I feel like it, I’ll have a look at the history of the collected data on my laptop.
    This is very important because it allows me to monitor how electrical appliances are working; as we know, when something starts to go wrong, power consumption increases.
    And I don’t fancy sitting by the wall staring at some tiny little screen.
    I’d rather lounge on the sofa, like the proverbial lazybones, and have a look at everything on a big screen.
    I also can’t be bothered to connect to each module individually just to update the software.
    The central unit is supposed to do that on my command.
    Every peripheral module must be able to reprogram itself.
    And the system’s flexibility is achieved precisely thanks to the central unit.
    It’s a bit like a fly: you snap off its leg and it still keeps on walking.
    The intelligence lies in its ability to gather information from the implemented sensors and respond appropriately.
    The system won’t fail if the central processing unit fails; it will simply operate somewhat blindly, relying on its own algorithms.
    And it depends on these algorithms – in other words, practically on us – whether anything goes wrong.
    And the central processing unit can always be replaced by another device, for example, an ordinary PC.
    Each module is equipped with a power supply capacitor; in the event of a mains power failure, it switches to a power-saving mode controlled by an internal clock.
    Personally, I have no intention of wandering about in the dark during a power cut either.
    So the emergency battery power supply will be used solely for the LED lighting.
    The power supply capacitors are sufficient for the system to survive a mains power cut and do not require an additional power source.
    Not all modules are active all the time; only those performing a specific task are active, whilst the rest are in standby mode.

    Added after 5 [hours] 55 [minutes]:

    And I’ve got another question.
    What bus are you using, and what topology?
    Because I get the impression that, with you, everything can communicate with everything else.
    I’m using 1 master and the rest as slaves, on UART.
  • #204 11195772
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    I intend to use 1Wire (http://pl.wikipedia.org/wiki/1-Wire): there are just two power lines: 0V and +5V. The data signal also ‘travels’ along these lines. Everything is connected in parallel to this bus. In principle, logically speaking, it’s exactly the same as in your solution: one master and the rest are slaves. Everyone can hear everyone else (because all components are listening out) – only the one queried by the master responds. But I want to tinker a bit so that each one can also act as the master for at least a moment (i.e. send a query about the status of the others when it needs information; this is also useful in the event of a master failure – in which case one of them will take over its role) or to have master privileges passed round the entire installation in a loop. I’m not sure yet. It’s a matter of the software, which I need to write and then test. For now, I’m struggling with the hardware to cram the components into the smallest possible DIN-rail enclosure.

    I’m imposing this solution on myself a bit unnecessarily, as my entire signalling installation is already in place and it’s a 2x star-type installation using 8-core twisted-pair cable, i.e. there are two central units, one on the ground floor and the other on the first floor. So this allows me to use any interface. However, the idea is for the cabling to be as simple as possible, so that any amateur electrician could carry it out. So 1-Wire is the obvious choice, with everything connected in parallel. I2C is also an option, but it requires more wires; however, there is an advantage in that I2C is already implemented in hardware in PICs (at least in some of them). But in reality, it doesn’t really matter which standard is used. RS232 or a derivative could also be used (although there are more wires and the issue of + and – voltages according to the standard – though nowadays all circuits work well with 0V and +5V signals). However, the maximum number of wires is, by design, 4. This is because standard telephone connectors and cables can be used (there are 4-pin and 6-pin versions). This therefore provides 2 power wires and 2 (or 4) signal wires.

    As for connecting to a PC, it can also be plugged in (via a USB adapter) to such a bus to change settings or control operation online, just as my WinCE-based GPS will do.
    In reality, monitoring its current operation is only necessary during the commissioning and testing phase. Once everything’s set up, you don’t need to check it again. I know this from experience.

    When I started this installation of mine seven years ago, I also thought about emergency lighting (UPS, LED lights, etc.), but it turned out that it was cheaper to buy three torches than a powerful UPS (where you have to replace the batteries every three years – the costs) and run even more extra cables (I already have 1.5 km of cables in the walls). What remained of that idea, however, were the LED lights on the stairs, and their special energy-saving connection (9 lights x 4 LEDs = 36 LEDs consuming a total of about 3W) allows them to stay on all night at a cost of around 10 zł a year. My LED lights have three operating modes: super-economy (night mode, 4 LEDs), normal (4 LEDs) and full (16 LEDs). ‘Off-the-shelf’ LED bulbs consume significantly more power (several times as much) because they have a built-in voltage stabiliser and do not offer multiple operating modes. I’d also planned to connect an automatic emergency generator (e.g. to power the gas heating boiler and the fridge in the event of a prolonged power cut), but here again the costs brought me to my knees.
    What I did manage to implement in the ‘old system’ was: automatic switching off of lights throughout the house when leaving, automatic water shut-off when leaving, twilight sensors outside (LED garden lighting) and inside (LED staircase lighting), automatic lighting at the entrance when entering and leaving the house, smart hot water circulation, and control of the central heating boiler..o. from several locations in the home, mobile alerts about faults, flooding and incidents (e.g. someone ringing the doorbell), commands from your mobile, e.g. remotely switching on the garden sprinkler system and other functions; a long press of a wall switch turns off the lights throughout the room, house or garden; garden and stair lighting switches off in the morning. Cost: 5–7 thousand.

    But I hope this won’t put you off continuing to work on your smart home system. There will be some costs involved, but satisfaction is guaranteed.

    Unfortunately, I don’t have time at the moment as I’m doing some minor home renovations and have other commitments, so the smart home project has been put on hold for about 3–4 months. That’s why I can’t say anything more specific for now. Everything still needs to be thought through.

    Regards, mbi33
  • #205 11197869
    Silkboy
    Level 12  
    Posts: 36
    Help: 2
    Nothing will put me off.
    I was thinking about smart homes before the term even came into use.
    Thanks to advanced electronics, I can now go about implementing my ideas at my own pace.
    I’m not rushing into it, as I’ve got more important things to do.

    Getting back to communication, your system uses something like the RS485 standard.
    In my case, a third GND wire is required, but as every device will be earthed, I only need two wires.
    Ultimately, it’ll be four-wire RS422, unless I’m tempted to go for RS485.
    Transmission is full-duplex, which means that only the master can hear the slave devices.
    I’ve implemented the communication itself as follows:

    - The master initiates the connection by sending a ‘device code’ byte, followed by a ‘transmission authorisation’ byte.

    - The slave device with the specified code activates the TX line and sends a ‘ready’ byte.

    - The master sends a ‘silence – transmission in progress’ byte.

    - Data is now exchanged between the slave device with the correct code and the master device.
    (The transmission itself follows its own protocol)

    - The master device ends the transmission by sending the ‘end of transmission’ byte.

    - The slave device releases the TX line.

    - The master device sends the ‘line free’ byte.

    Now, when the slave device wishes to connect to the master:

    - The slave device, unless it has just recovered from a failure, should know that a transmission is in progress or that the line is free; however, to be on the safe side, it checks the state of the TX line: if it is not GND, the line is busy; if it is GND, the line is free.

    - The slave device activates the TX line (if it is free) and sends a ‘transmission request’ byte and a ‘own number’ byte.

    - The rest of the process is the same as for initiation by the master.

    I’ve also implemented a ‘broadcast’ mode for updating the software of several devices at once.
    I’m tempted to reprogram the whole thing for packet-based communication.
    But that’s for when I get the PIC24.

    I’d been thinking about RS485 but I’ve left that until last.
    I can’t quite think of a quick way to check whether a transmission is in progress once the system is back up and running.
    Well, apart from, of course, a timer set to a time interval that would be required to initiate the next transmission – blah blah, that takes ages.
    If an RX interrupt occurs during that time, we’re receiving; if not, we’re transmitting. :)

    You could set a different minimum time until the next transmission for each device to avoid collisions.
    This would solve the arbitration problem: more important devices would have a shorter time, less important ones a longer one.
    There wouldn’t need to be master and slave devices.

    In this case, every device would need to be aware of every other device.
    For the PIC16, this would necessitate the use of additional flash memory, as in my case; not much would fit into those few bytes of EEPROM.
    There isn’t much internal register space either.

    This has its pros and cons; apart from ‘sender–receiver’ type transmission, it would be possible to create ‘push’ type transmission.
    Data-collecting devices could use this to notify others of a status change.
    Actuators would then know whether such information is relevant to them.
    The downside here is a certain amount of information clutter.
    There’s no guarantee that the information will be received.

    We could come up with something interesting here on the forum; someone might always point out a weak spot.

    I2C isn’t really suitable for long-distance transmission and isn’t as fast as any type of UART. On a circuit board between chips, though, it might work.

    RS485 and RS422 can be routed through a transformer, like the ones used in LANs, for isolation.
    High bandwidth means plenty of possibilities, putting RS485 at the top of the list of useful standards.

    I want to build an emergency light using 1W 2.5V LEDs.
    I’m currently testing one to check its brightness.
    It’s connected directly to a 3V 200mA transformer-based power supply.
    The LED has a current draw of 250mA, so the voltage should drop to the correct level by itself.
    I haven’t measured it – why bother? It’s been shining non-stop for five months now. It’s as bright as a 40W bulb.
    It’s well known that it can shine for up to 10 hours on two 2400mAh rechargeable batteries. :)
    When powered via PWM and at the rated current, it shines much brighter.
    For 4 zł, you can buy an SMD microcontroller with 8 or 6 outputs and a single PWM channel, dig out a small switching transistor from an old PC motherboard, and you’re sorted – it can be powered from 12V.
    Perhaps this microcontroller has an ADC, in which case you could connect a thermistor and monitor the LED’s temperature.
    You can easily fit all this onto a 10x8mm board, or even smaller.
    My modules fit onto a 20x10mm board :)
    The rest of the space is reserved for a 35A Gretz bridge and a 45A IGBT with a heat sink, as well as terminals for 230V wires; the module is about 10mm thick, with a diameter small enough to fit into a junction box.
    The transistor junction voltage in the on-state is 1.5V; at high currents, there’ll probably be plenty to cool.
    I’ll find out whether it can be enclosed in a junction box once I’ve carried out the load tests.
    This transistor can withstand 150°C, but I don’t want it to reach that temperature inside the junction box.
    Over time, the junction box might pop out of the wall on its own. :)
    I hope it won’t get that hot; I don’t anticipate a load greater than 15A, which works out at about 22.5W of heat generated by the transistor – quite a lot, but not too bad.
    Mind you, for it to draw 15A, the load would need to be 3450W.
    Fortunately, I don’t have one like that. :)
    It’s hard to find a small relay that can be switched on and off whilst hot at such currents.
    Standard devices don’t exceed 1000W.
    The rest – such as an iron, a washing machine heater, etc. – operate for short periods.

    You can fit all sorts of things into DIN-rail enclosures like these. :)
    And that’s where I intend to cram the control system for the main lines.
  • #206 11199013
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    So where’s the energy saving here if each switching element generates between a few and a dozen or so watts of heat?
    I’d suggest you take a look at bistable relays, though. They don’t draw any power in either the ON or OFF state. Only a short current pulse is needed to change the state. I’ve got a Schrack RT314A03 on my desk right now. It switches 250V/16A (pure resistance). To switch it, it requires 429mW at 3V – that’s about 150mA – for 10mS. These times can vary, but you can experiment with them. And it doesn’t get hot. It measures 29x20x13 mm, so it’s certainly smaller than the heat sink you’d need for a transistor and a bridge rectifier. They’re available for various voltages from 3V to 24V. The higher the voltage, the lower the switching currents are, accordingly.

    Emergency lighting. The more voltage conversion involved, the greater the power losses. The conclusion is that emergency lighting should be rated at 12 or 24V – the same as the batteries. The drawback is the need to run a separate power supply to the emergency lighting. Connect several LEDs in series and select a resistor to ensure satisfactory brightness at minimum power. Full brightness is not required for emergency lighting. If they are also to be lit during normal operation, select a second resistor that allows them to operate at full brightness.

    As for data transmission, speed isn’t the most important factor for me; rather, I prioritise reliability (resistance to power interference from switching-on equipment, resistance to the failure of individual components, etc.) as well as simplicity of implementation and the availability of various types of plugs, splitters and connectors. However, if speed is a priority, perhaps Ethernet is worth considering? Apart from speed, it offers all sorts of ready-made solutions and allows you to connect various devices, such as IP cameras or alarm sensors – you can even build these yourself using a PIC – and in one go you’ve got a computer network, an alarm system and smart home functionality. PICs with Ethernet are available: the PIC18 and PIC32. But then the cabling gets a bit more complicated, as it has to be a star topology or several star topologies/switches. And then there’s the Ethernet cable – which is more expensive.

    “…how to quickly check if a transmission is in progress…”: check the TX pin, or check the data line to see if the state changes to ‘L’ for a duration slightly longer than one byte. You can connect it to any free port on the PIC.

    “… each one would have to know every other one…” – not necessarily. To function, it only needs information about the devices relevant to its logic. It ignores the rest.
    And according to your assumptions, you hardly need any EEPROM at all. If self-programming is possible, you can hard-code the device address table directly into the programme memory. In the EEPROM, you only store which ones are active or of interest – this way, you use just 1 bit of EEPROM per device, meaning you can ‘fit’ 8 devices into 1 byte of EEPROM.
  • #207 11199107
    Urgon
    Level 38  
    Posts: 7297
    Help: 197
    Rate: 2637
    AVE...

    A CAN network to start with. In each room, there is one main microcontroller (PIC18Fxx from the XLP family) with sensors and drivers connected to it, for example via a local CAN network. A PIC32 to control the whole system, with the ability to connect via Ethernet to a computer or the internet for remote management...
  • #208 11199805
    mbi33
    Level 11  
    Posts: 14
    Rate: 3
    Exactly. Four wires (power + data) and that’s it. Good speed and resistance to interference. Easy to route the wires. Nothing but advantages.
    I’d also considered this network, but the PIC16F648A – of which I’ve got a few from Allegro at 3 zł each – doesn’t support CAN at the hardware level.
    By the way, to choose the right PIC for your needs, it’s worth using www.microchip.com/maps/microcontroller.aspx, but I’m sure you all know that already.
  • #209 11199851
    Urgon
    Level 38  
    Posts: 7297
    Help: 197
    Rate: 2637
    AVE...

    You can always use some sort of CAN<>USART interface circuit. However, RS-485 would probably be better, as it has a greater range...
    An alternative would be to design the physical layer of the interface yourself. For example, you could use telephone transformers and twisted-pair cable to implement serial communication. At speeds below 10 kbps, this should provide a really long range, good communication quality and allow multiple devices to be connected to a single line. And after all, that’s all you need for home automation and an alarm system...
  • Considering a 600-zloty controller versus DIY construction

    #210 11200752
    Robtos
    Level 12  
    Posts: 54
    Rate: 8
    Hello
    That’s an interesting topic – I’ve always been fascinated by inventions, and I’d love to build a system like that myself. I found a controller online; here’s a video:

    http://www.youtube.com/watch?v=hi7LPNixzI4&feature=youtu.be

    Smart home – how can you control sockets and lighting remotely?

    The cost of such a device starts at 600 zeta and goes up from there. What do you think about this? Is it better to build something yourself? I should add that I’m rubbish at programming; I’m more of a handyman who can do almost anything:)

    Best regards
ADVERTISEMENT