logo elektroda
logo elektroda
X
logo elektroda

Kikimo Smart - the modular Smart Home DIY system

kikimosmart 873 20
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20921149
    kikimosmart
    Level 3  
    Hi,

    The moment is approaching to equip my new house with electrics, lighting and an alarm system and I have started to prepare for a Smart Home. Ready-made solutions don't satisfy me, and on top of that they are horrendously expensive, so I'm developing something of my own.

    At first I thought about using ready-made modules from aliexpress and making a spider web on the backplane, I see a lot of people doing this and it's quite effective, but I've seen a few people replacing it with something more integrated made to their own design.

    My objectives are as follows:
    - professional appearance - DIN TH35 enclosures,
    - full modularity - one control board for many applications, based on ESP32,
    - additional boards for specific functions,
    - communication over CAN - proven multi-master protocol supported by many devices and systems, - power supply of 5V logic,
    - free power supply of circuits (not connected to control circuits),
    - possibility to use any software such as ESP Home, ESP Easy or any SDK such as Arduino, etc.

    Physical design:
    - use of some inexpensive and universal DIN housing
    - base size is two modules
    - placement of the boards as follows:

    3D model of Kikimo FRNT1 board in a DIN enclosure.

    - possibility to combine function boards in length
    - possibility to place two and more sets of boards in one enclosure in order to increase the number of IO
    - connection of modules by means of sockets in the side walls of the enclosure and goldpins, the only disadvantage is that the module will have to be moved before removal, if this is a misfire I will work out some other way of connecting, if I found some nice connectors with spring pins at 1mm it would be ideal

    The available number of IO will depend on the ESP32 model:
    - ESP32-WROOM-32 - 20 GPIOs will realistically be available (including 4 input-only),
    - ESP32-S3-WROOM-2 - 27 GPIOs to be used,
    - ESP32-S2-SOLO-2 - 31 GPIOs to be used.

    Why 3 different ESP32 modules? The classic ESP32 is recognised as proven in virtually every project, the WLED allows hardware control of 10 WS281x channels. ESP32-S2/S3 have more GPIOs but most projects have not found them completely proven.
    Why not port expanders e.g. MCP23017? One ESP32 costs as much as two expanders, but has incomparable capabilities and more ports.

    In addition to the specified quantities, each control board will have the following outputs:
    - CAN TX/RX,
    - serial TX/RX,
    - 1WIRE for temperature sensors,
    - RESET button, to which line as output will be connected WS2812b LED showing the status,
    - BOOT button, to be used arbitrarily when not programming the circuit,
    - power supply status LEDs 3.3V and 5V (1mA) status LEDs,
    - if OLED I2C display will be used then the number of GPIOs will be reduced by 2.


    Planned board types (width 2 DIN modules), possibility to place up to 4 boards in one housing:
    - 4x SSR 2A board,
    - 4x relay 5A board (common input),
    - 2x relay 10/16A board (NO/NC), to be used e.g. at roller shutters,
    - pixel/PWM/MOSFET board: 4x MOSFET + 4 isolated outputs to control WS281x,
    - IO board: 2 RJ45 connectors on board, optically isolated, can be mounted in pairs. on the top and bottom of the board, i.e. a total of 8 RJ45s with the possibility of relatively free configuration of all 20-31 GPIOs via a matrix of solderable jumpers on the PCB.
    -an alternative IO board with plug connectors (screwed alb springs), 12 pins per board,
    - CAN-CAN-ETH board, connecting the internal CAN of the system to the ethernet and separated CAN e.g. for the needs of can2mqtt.

    The boards will be able to be mounted in any configuration, i.e. executive boards at the bottom, input boards at the top (or vice versa if you wish).
    The boards will have twisted or spring-loaded plug connectors, adapted to the current load.

    I plan to use the IO boards also for DIY alarm, instead of optocouplers by mounting waktrols to obtain parametric lines.

    I have done a review of the two series of DIN enclosures here:
    https://www.elektroda.pl/rtvforum/topic4029847.html

    Added after 1 [hour] 7 [minutes]:


    Control board

    ESP32-.WROOM-32E
    Electrical schematic of a control board with ESP32-WROOM-32E and GPIO connectors.

    Power section, protected against reverse polarity by a MOSFET
    Block diagram of power supply section with MOSFET protection

    CAN and serial
    Connection diagram for ESP32 controller with CAN bus and serial interface.


    Programmable status LED (WS2812b or regular LED depending on preference), connected to GPIO0, which is generally difficult to use, but for this.
    Circuit diagram with LED modules, BOOT and RESET buttons, and GPIO connections.

    Optional OLED display (for those interested - single colour draws about 20mA), and in my opinion the very important 1Wire for temperature measurement, especially of relays/SSRs/MOSFETs.

    Wiring diagram for OLED displays and DS18B20 temperature sensors.

    Added after 2 [minutes]:

    I've also designed the board, but in the meantime I've changed the concept, originally I was thinking of a control board on the front of the chassis and connecting by tapes with connectors JST1.25, now I have to design it on the side with solder joints.
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 20921478
    Sam Sung
    Level 33  
    I see you have presented a solution, just not sure what problem.
    Is this the result of an analysis of some specific functional and non-functional requirements?
    Do you have an estimate of the power consumption of this whole system?
    Do you intend to connect it to the cloud?
  • #3 20921649
    kikimosmart
    Level 3  

    Sam Sung wrote:
    I see that you have presented a solution, just not sure what the problem is.
    I have outlined my assumptions above ;) I have not been able to find hardware meeting them.

    Sam Sung wrote:
    Do you have an estimate of the current consumption of this whole system?

    It will depend on the specific configuration, ESP32 with WiFi can consume 100mA and without WiFi 20mA, the same and the components on the executive boards, e.g. relay coils can draw their own. But when selecting the components of the executive boards I will think about it.

    Sam Sung wrote:
    Do you intend to connect it to the cloud?


    Only for local solutions such as Home Assistant, but if someone insists he can even upload Tuya SDK :) .
  • #4 20921710
    Sam Sung
    Level 33  
    kikimosmart wrote:
    Sam Sung wrote:
    Sam Sung wrote:
    I see that you have presented a solution, just not sure what problem.
    After all, I presented my assumptions above ;) I have not been able to find hardware that meets them.
    These are technical decisions already made, and I was concerned with what functions all this hardware is supposed to perform. From the applications I can see there controlling roller blinds, probably lighting and some DIY alarm. Well, and 1-wire for temperature sensors, but for internal system needs. And what about measuring room or water temperatures - will this also control devices in the boiler room?
    I'm asking, because without knowing what all this is supposed to be used for specifically, it looks a bit like shooting a cannon at a sparrow :) Because I imagine that in a single-family home, such a DIY system could be more centralised and tailored to real needs, rather than going for mass production of identical modular boards.
    I guess that at each window and at each lamp there is supposed to be one module composed of a number of tiles (?) So these tiles could come out with ~50 pieces.... this at rest can draw several tens of watts...
    What will be displayed on OLED displays? - not enough website + smartphone/tablet?
    Will only 5V be distributed everywhere and to this local 3.3V stabilisers? Or also 12/24V to the relay coils?
    Are you planning some kind of emergency power supply so that, for example, it is possible to raise the roller shutters when there is no power?
  • #5 20921899
    kikimosmart
    Level 3  

    Sam Sung wrote:
    it would be possible to centralize such a DIY system more
    But this is supposed to be a classic centralized smart home system. Everything in the switchboard.
    I thought the drawing showing mounting in DIN enclosures clearly shows this ;)
    Sam Sung wrote:
    From the applications I see there control of roller shutters, probably lighting and some DIY alarm. Well, and 1-wire for temperature sensors, but for internal system needs. And what about measuring room or water temperatures - will this also control devices in the boiler room?


    Using the IO board it will be possible to realize practically every additional/unforeseen application at the moment, control of external high-power contactors/relays, any number of 1Wire as much as the ESP32 can handle, PWM e.g. for circulation pumps etc. etc.

    Sam Sung wrote:
    What will be displayed on the OLED displays? - not enough website + smartphone/tablet?

    Only for special cases, on the other hand it takes only 2 GPIO, and realizes much more than classic LEDs showing status of e.g. relays in other systems.
    If you would like to program the module as a thermostat then you can display temperatures etc.
  • ADVERTISEMENT
  • #6 20922017
    Sam Sung
    Level 33  
    kikimosmart wrote:
    But this is supposed to be a classic centralised smart home system. Everything in the switchboard.
    I thought the drawing showing mounting in DIN enclosures clearly shows this ;)
    Hmm.... So all the computing power of these ESP32s and all the I/O and relays will be concentrated in one place - in the switchgear?
    And for the motor of each roller shutter and each pump, boiler, head at each radiator there will be a separate cable from the switchgear specific to the voltage and current of the actuator?
  • #7 20922062
    freebsd
    Level 42  
    kikimosmart wrote:
    The off-the-shelf solutions do not satisfy me, and on top of that they are horrendously expensive, so I develop something of my own.
    Have you compared the purchase prices of ready-made components e.g. Tuya and components, and wiring, to your solution?
    Additionally, the time spent on implementation, the specific man-hours of expertise.... Of course, once you have done this, you will gain the greatest freedom to modify and realise your needs. Only is it worth it?
  • #8 20922279
    kikimosmart
    Level 3  

    Sam Sung wrote:
    Hmm... so all the computing power of these ESP32s and all the I/O and relays will be concentrated in one place - in the switchgear?
    And for the motor of each roller shutter and each pump, boiler, head at each radiator there will be a separate cable from the switchboard specific to the voltage and current of the actuator?

    Yes, a typical star arrangement. Alternatively, it will be possible to install some modules closer to the intended use, e.g. boiler room, garage etc. and communicate over CAN or even WiFi.

    Added after 59 [seconds]:

    freebsd wrote:
    Have you compared the purchase prices of off-the-shelf components e.g. Tuya and components, and wiring, to your solution?
    Additionally, the time spent on implementation, the specific man-hours of expertise.... Of course, once you have done this, you will get the greatest freedom to modify and realise your needs. Just is it worth it?

    Beginning with my salary even Grenton will be cheaper, but where's the fun and challenge? ;)
  • #9 20922709
    Sam Sung
    Level 33  
    kikimosmart wrote:
    Sam Sung wrote:
    Hmm... so all the computing power of these ESP32s and all the I/O and relays will be concentrated in one place - in the switchgear?
    And to the motor of each roller shutter and each pump, boiler, head at each radiator will be fed from the switchboard a separate cable specific to the voltage and current of the actuator?

    Yes, a typical star arrangement. Alternatively, it will be possible to install some modules closer to the intended use, e.g. boiler room, garage etc. and communicate via CAN or even WiFi.
    Well, if there is no wired bus distributed throughout the house with boxes for further modules, how will you connect alarm components or other things in the future? I guess not via WiFi with separate power supplies?
  • #10 20922741
    kikimosmart
    Level 3  

    Sam Sung wrote:
    Well, if there isn't a wired trunk line distributed throughout the house with boxes for the next modules, how are you going to connect alarm components or other things in the future?


    The star system assumes that all the wiring will converge in the switchgear and that's where the control modules will be. Wiring for 230V and/or 5/12/24V lighting, reed switches from windows, doors, motion sensors, flood, temperature, humidity, twisted pair for wall switches and touch controls etc. etc. all goes into the switchboard.
  • ADVERTISEMENT
  • #11 20922836
    Sam Sung
    Level 33  
    If I understand correctly, it carries a good amount of copper.
    And if you decide in the future to add lighting where there was none, will you be laying new cable from the switchboard itself?
  • #12 20922979
    kikimosmart
    Level 3  

    Sam Sung wrote:
    If I understand it correctly, it's going to take a good amount of copper.
    This is the current trend ;)
    Sam Sung wrote:
    And if you decide in the future to add lighting where there was none, will you be laying new cable from the switchgear itself?
    It depends on where it would be added, there will be a non-utility attic, cardboard-gypsum on the grid, so it won't be too difficult.
  • #13 20932757
    JanuszM
    Level 17  
    >>20921149
    You will cover several topics with the SSWiN system control panel. Satel is very flexible.
    Control from a tablet with an app attached to the wall, physical buttons, remote control, smartphone app, there is also a PC app:

    - light in front of the house on/off
    - entrance gate on/off
    - garage door on/off
    - illumination of the house after dark
    - roller shutters
    - live camera view
    - smoke detectors (and turning off the electricity in the house)
    - flood detectors (and shutting off the water valve)
    - 230V sockets on/off

    Additionally, if you have a certified SSWiN you get a discount when insuring your house.
  • #14 20933387
    kikimosmart
    Level 3  
    JanuszM wrote:
    You will cover several topics with an SSWiN system control panel
    I have thought about this, even on cheaper systems, but the flexibility is incomparable when using open source software.

    JanuszM wrote:
    Additionally having a certified SSWiN will get you a discount on your home insurance.


    It seems so, but not really: Icons showing various property security measures, including an intercom, alarms, surveillance, and physical guard.
    Comparison of insurance offers on rankomat.pl

    It turns out that an intercom is enough :D And I still have cameras.


    The image displays various property security options, such as an intercom, local alarm, alarm with intervention, physical security guard, anti-burglary doors, camera monitoring, and window security.
    Comparison of insurance offers from Generali and Benefia



    Just the same, full grazing doesn't help much:


    Graphic showing various types of security measures in a property.
    View of insurance offers from three companies with prices and terms listed.

    Added after 1 [hour] 22 [minutes]:

    Back to topic. After rework, corrections - previous schematics have errors ;)

    Board CNTRL1 that is the side board with ESP32 to which other boards are connected:

    Diagram of a main board with ESP32-WROOM-32E module and various GPIO connections.

    From ESP-32-WROOM-32E we managed to get 20 useful pins, as well as the following additional functional pins:
    - Serial TX/RX - serial port for programming the chip.
    - STATUS_LED - interchangeable with serial RX for use on the LED or WS281x on the front panel, interchangeable because outside of programming mode the serial port is only useful for sending logs, the TX pin alone is sufficient. There is an LED on the board with a resistor to ground, connected to this pin, when using the WS281x it will not interfere with its operation.
    - BUTTON/BOOT_PD - a secondary button (or several with a resistor ladder, as this is one of the ADC pins), interchangeable with the BOOT_PD pin which must be in a not high state to program the ESP32.
    - EN - "enable", for reset, also during programming.
    - 1WIRE/BOOT - pin for temperature reading via 1Wire, when programming BOOT pulled down to ground. There is a possibility to mount DS18B20 on the board in THT and SMD versions.
    - CAN TX/RX - for CAN transceiver on the front panel.

    Also two I2C pins, which reduce the number of usable GPIOs by 2, possible to be used by the display on the front panel.

    GPIOs are brought out on 4 connectors of 8 GPIOs + GND, 3.3V, 5V, 1WIRE:
    Connection schematic for ESP32 module boards

    Thanks to jumpers on the PCB, very flexible use of GPIO ports is possible:
    1. Connector B_R (bottom rear) enables use of IO9-16.
    2. Connector B_F (bottom front) enables use of IO9-16 and interchangeably with IO17-20 (in place of IO9-12).
    3. Connector T_R (top rear) enables use of IO1-8 (5-8 are inputs only) and interchangeably with IO17-20 (in place of IO1-4).
    4. T_F connector (top front) allows the use of IO1-8 (5-8 are inputs only) and interchangeably with IO17-20 (in place of IO1-4) and IO13-16 (in place of I5-I8).

    . CNTRL1 PCB
    Minimum components are 0805, where possible there is an alternative with through-hole assembly.

    View of CNTRL1 PCB with ESP32 and various connectors with labeled pins.


    PCB design with ESP32 and soldering pads.




    Visualization of the CNTRL1 PCB with ESP32 and connectors for module connection.




    Angled connectors will be used instead of the straight ones shown in the visualisation (IO - facing left, others facing right). As it was not possible to fit 12 pins in a 2mm raster, 1WIRE and 5V have been moved to double row pins.

    Visualisations are shown without ground filling, this is how the boards look (dots are 1mm grid):


    ESP32 CNTRL1 PCB design with visible connections.
    Printed circuit board CNTRL1 with ESP32 and visible connections.

    Added after 1 [hour] 32 [minutes]:

    Additional protection if we pressed the BOOT button shorting to ground and the 1WIRE state was high (before programming): Fragment of a PCB schematic with ESP32 showing pin descriptions and resistor R4. Additional protection if we pressed the BOOT button shorting to ground and the 1WIRE state was high (before programming): Fragment of a PCB schematic with ESP32 showing pin descriptions and resistor R4.
  • ADVERTISEMENT
  • #15 20943212
    kikimosmart
    Level 3  
    Kikimo INLV1 board (inputs low voltage)

    Board 4/8 inputs protected by optocouplers, input voltage up to 48V, can be configured in several ways by jumpers on the PCB, can be mounted "upside down", leads on plug-in screw connectors with 2.54mm spacing.

    Configuration possibilities:
    1. pull-up resistors up to +3.3V if the used GPIO would not have built-in (optional).
    2. capacitors for debouncing (optional).
    3. For the light switch control I assume the following configuration: LED+ on the board to 3.3V, all P+ connected together and then to GND. Then the light switch will have GND on one pole, from the + leads, and will short the - leads to this GND, then the optocoupler diode will be on.
    4. For other purposes you can lead the LED+ to + and the LED- to - through a resistor (with the possibility of a short circuit).
    5. You can also connect all the + or - leads together on the board.

    Diagram of Kikimo INLV1 board with optocouplers and resistors.



    Kikimo INLV1 board with optocouplers and configuration options

    Diagram of the Kikimo INLV1 board with two sections and connection descriptions.


    Two Kikimo INLV1 boards with visible electronic components and connectors.


    Sockets can be mounted on both sides, so can the INLV1 boards to the CTRL1 main board, top and bottom, on two levels at the back and front. One piece of PCB contains two INLV1 boards, internally connected for mounting in 4 MOD enclosures (DIN modules), with the possibility of breaking out/cutting off and mounting in 2 MOD enclosures.

    The CTRL1 board in combination with 5 pcs. INLV1 will enable the use of 20 inputs in a 4 MOD enclosure or 16 inputs in a 2 MOD enclosure. Or any combination of INLV1 boards with other control boards (e.g. MOSFET or SSR).


    Kikimo INLV1 board with electronic components and connectors.


    Kikimo INLV1 board with visible plug connectors and PCB markings.


    Added after 1 [hour] 2 [minutes]:

    SSR1 (solid state relay)


    The board is used to control 230V circuits up to 3A (see last image or SSR datasheet for details), in particular lighting.
    The following SSRs can be used:
    - Chinese clones of Omron G3MB, with currents up to 2A, costing 5PLN each (the original has been withdrawn since 2011, the successor is priced above 100PLN).
    - Panasonic AQG22212 (2A) dimensionally identical to the above Omron, widely available in Europe at around 20PLN.
    - Ixys/Littlefuse CPC1976Y (2A) or CPC1966Y (3A) available in Europe at 20/30PLN.

    Panasonic and Omron clones are controlled from 5A with MOSFET AO3401. The Ixys/Littelfuse can be controlled directly from the ESP32 pins (3.3V high state), only a 330ohm resistor is needed, limiting the SSRs diode current to 7mA, there are G (GND) and 3.3V and 5V mode changing jumpers on the board. When using 3.3V, do not connect 5V and solder the 3.3V and G/GND jumpers and leave only the 330ohm resistors, the rest of the components are redundant.

    Schematic of the SSR relay board circuit


    Kikimo SSR1 board with marked slots for four solid-state relays.



    Printed circuit board with high voltage warning signs and lightning symbols.




    Printed circuit board with high voltage warning signs and lightning symbols.


    3D view of a circuit board with four black relays on top, four pink components, and a green connector at the front.



    Render of a printed circuit board with high voltage markings.



    SSR1 board with solid state relays and plug-in connectors.

    SSRs Ixys/Littlefuse are much smaller than Omron/Panasonic:

    Kikimo SSR1 board with solid state relays.




    For the 230V board I had to modify the CTRL1 board, moving the lower rear connector upwards:

    PCB with ESP32 named CNTRL1.



    If other boards need to be fitted in the B_R connector, an extension board will be made.

    The board for 8 SSRs will have a separate design, otherwise IO5-8 would be too close to 230V.

    Current limits:
    https://datasheet.lcsc.com/lcsc/2011191008_PANASONIC-AQG22212_C719647.pdf
    Table with cautions for using solid state relays (SSR).

    https://datasheet.lcsc.com/lcsc/1810270918_Omron-Electronics-G3MB-202PL_C48654.pdf

    Specification table showing Omron G3MB relays with SSR types and technical data.
  • #16 20943476
    Sam Sung
    Level 33  
    Why, when you have such modules, do you not deploy them close to the controlled devices and connect them via a digital bus (which they have anyway), but concentrate them all in one point and feed the large actuator currents with kilometres of separate cables?
  • #17 20943580
    khoam
    Level 42  
    kikimosmart wrote:
    The number of IOs available will depend on the ESP32 model:
    Is it still ESP32-C6? Link
    kikimosmart wrote:
    ESP32-S2/S3 have more GPIOs but most projects have not found them completely proven.
    I love such theses from the "finger" :) In a few months, maybe a year, the ESP32 will most likely be withdrawn from sale. Espressif is generally going RISC-V.
  • #18 20943650
    kikimosmart
    Level 3  

    khoam wrote:
    This could still be an ESP32-C6? Link
    If the module with C6 has a pinout compatible with other new modules then why not.
    khoam wrote:
    I love such theses from the "finger"
    https://github.com/Aircoookie/WLED/issues/2735
    https://esphome.io/components/esp32.html

    Quote:
    Note
    Support for ESP32 variants such as the S2, S3 and C3 is still in development and there could be issues.

    :)

    Added after 4 [minutes]:


    Sam Sung wrote:
    Why, having such modules, not deploy them near the controlled devices and connect them via a digital bus (which they have anyway), but cluster them all in one point and feed large actuator currents with kilometers of separate cables?

    Different topologies have different advantages and disadvantages, this one suits me best and is the most popular on the market. Although, as I wrote, I do not exclude additional "islands" like the boiler room or garage.
  • #19 20943658
    khoam
    Level 42  
    @kikimosmart if you plan to use esphome, then indeed support for S2 and S3 is "under development". But this is a problem for this particular project
  • #20 20944300
    kikimosmart
    Level 3  

    Kikimo FRNT1 board

    The board is mounted on the front of a DIN case and has the following functions:
    - supply circuit 3.3V based on LDO linear stabilizer AMS1117-3.3, power supply transferred to CTRL board from ESP32
    - reverse power supply protection circuit on MOSFET
    - CAN transceiver - MCP2562 powered by dual 3.3V + 5V (SMD or THT)
    - LEDs showing the status of the 3.3V and 5V power supply
    - status LED controlled by the ESP32 - this can be either a regular LED or a WS2812b LED (SMD or THT)
    - two buttons - one function button for use with the ESP32, the other is reset
    - possibility of mounting OLED I2C displays, both 0.91" and 1.3" in three different locations
    - board can be mounted in 2MOD (DIN modules) and 4MOD enclosures, has the possibility to cut at the perforation point
    - two possibilities of connecting the modules - with side gold pins or from the top (the correct socket lead-out to be worked out)
    - bottom SERIAL connector for programming - eventually lead-out on the angled connector from the bottom


    Electrical schematic of Kikimo FRNT1 board with component and connector labels

    PCB made so that both SMD and through-hole components can be used, all resistors and capacitors are of size 0805, generally friendlier to assemble ;)

    Kikimo FRNT1 PCB layout with labeled connections and components.




    Kikimo FRNT1 PCB with surface-mount and through-hole components.

  • #21 21287159
    serwus123
    Level 10  
    Hi,

    I wonder if the project has moved beyond the conceptual phase?

Topic summary

The discussion revolves around the development of a modular Smart Home DIY system using Kikimo Smart components, focusing on a centralized control approach with ESP32-based boards. The user aims for a professional appearance with DIN TH35 enclosures, modularity, and various communication protocols including CAN and WiFi. Concerns are raised about power consumption, the practicality of wiring, and the potential for future expansions. The conversation also touches on the comparison of DIY solutions versus ready-made systems like Tuya, emphasizing the flexibility of open-source software. Specific boards such as Kikimo INLV1 and FRNT1 are mentioned, detailing their functionalities and configurations.
Summary generated by the language model.
ADVERTISEMENT