1. Visiting from the US? Why not try DIYnot.US instead? Click here to continue to DIYnot.US.
    Dismiss Notice

My home automation

Discussion in 'Home Automation' started by roasty, 29 Jul 2015.

  1. bernardgreen

    bernardgreen

    Joined:
    3 Nov 2006
    Messages:
    25,830
    Thanks Received:
    2,572
    Location:
    Bedfordshire
    Country:
    United Kingdom
    To avoid the need for lots of code you could use the sensor to contol the coil of a two pole relay. Then use one set of contacts to operate the alarm input and the other set to operate the other systems inputs.
     
  2. Sponsored Links
  3. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Good point Bernard, but for me, that would be 96 relays. Code isn't all bad! :)
     
  4. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Hi Bob,

    Similar to me, I use 20 or so ds1820 sensors on the i2c bus of a pi. I had initial problems with how far you could communicate reliably, but other than that, plain sailing. I use Perl by choice and rather than use a module to read the senaors, I just read the files in /dev which works well for me. Good luck.
     
  5. bernardgreen

    bernardgreen

    Joined:
    3 Nov 2006
    Messages:
    25,830
    Thanks Received:
    2,572
    Location:
    Bedfordshire
    Country:
    United Kingdom
    OK at 96 relays code would be a better option.
    How big is the house ( mansion ) ?
     
  6. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Bob,
    Interfacing the galaxy is easy. Honeywell don't provide the spec, but it's easy to decide if you can do hex. Each zone is just a resistance meter, and the value in ohms is broadcast from each Rio for each zone every second. The rios have an ID, and that's it. Extra points if you can decide the keypad comms, it's not too tricky. Setting outputs etc... Can be done I'm sure, but I'm not there yet.
     
  7. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Not a mansion! But a pir and smoke sensor in each room, plus a couple of outbuildings and various doors soon gets near the 96 limit of this panel!! I think I actually have maybe 10 zones free
     
  8. unclebob1

    unclebob1

    Joined:
    16 Aug 2012
    Messages:
    618
    Thanks Received:
    19
    Location:
    London
    Country:
    United Kingdom

    What do you use to read them?

    My code setup is:

    write_reading.py - reads the sensor file, writes the value off to the mysql.

    heating.py - reads the last known temperature, compares against the target and switches on/off accordingly all within database

    display.py - runs an LCD with 5 buttons - so displays the current/target temp for each sensor/room, and buttons allow to cycle through the rooms + increase/decrease temperature all from within database

    scheduler.py - reads a table from mysql which has preset times/sensors/temperature for target, and updates the current target for that sensor at the specified time for the new value all from within database.

    All are working individually and together, just need to adjust to allow for sensors to be on different pi's rather then all connected to one. In terms of distance i've got readings of approx 10m lengths of cat5 reliably, and if multiple pi's work then no sensor should be more then 10m from a pi.

    Now just need time to work on it along with renovating the house and working 2 jobs!
     
  9. bernardgreen

    bernardgreen

    Joined:
    3 Nov 2006
    Messages:
    25,830
    Thanks Received:
    2,572
    Location:
    Bedfordshire
    Country:
    United Kingdom
    My sensors are AD22100 and the analogue to digital conversion is performed at the sensor location on bespoke PIC based convertors. These are networked on RS485 allowing up to 100 metres between sensor and controller. This after some trials with "long" leads between sensor and controller with analogue inputs at the controller.

    Two types of board. One has 4 analogue inputs and the other a single input. network test_4.jpg

    The green LEDs are diagnostic for the board being addressed and the RED ( only on the 4 channel ) can be used as an indicator.

    As ever this heating controller is a low priority project.
     
  10. Sponsored Links
  11. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    That's some nice work Bernard!
     
  12. eveares

    eveares

    Joined:
    28 Jul 2012
    Messages:
    1,309
    Thanks Received:
    46
    Location:
    Surrey
    Country:
    United Kingdom
    Oh my oh my :notworthy: this put's my system to shame; Can I ask, how much have you spent on all the automation and security systems roasty!?
     
  13. ultomoat

    ultomoat

    Joined:
    2 Jun 2012
    Messages:
    65
    Thanks Received:
    8
    Country:
    United Kingdom
    Bernard. Are those off the shelf PCBs or self made?
     
  14. bernardgreen

    bernardgreen

    Joined:
    3 Nov 2006
    Messages:
    25,830
    Thanks Received:
    2,572
    Location:
    Bedfordshire
    Country:
    United Kingdom
    Self designed, etched by a PCB company.
    Processor is a PIC12F1822 for the single channel, and 16F1823 for the 4 channel board. SN75176 for the RS485
     
  15. ultomoat

    ultomoat

    Joined:
    2 Jun 2012
    Messages:
    65
    Thanks Received:
    8
    Country:
    United Kingdom
    Very professional looking. Did you find a company who would make small quantities without charging the earth?
     
  16. bernardgreen

    bernardgreen

    Joined:
    3 Nov 2006
    Messages:
    25,830
    Thanks Received:
    2,572
    Location:
    Bedfordshire
    Country:
    United Kingdom
    I used the same company that I used for my business. UK based and their main production facility is in the UK. They are not the cheapest ( and not the dearest ) but they are reliable and the quality of their work is very high. It is also a one stop shop. I just e-mail the Gerber files for the layout to them, they then photo plot and check for any errors ( hole large than the pad etc ) and then 3 or 4 days later the boards are ready. They work on a fixed price per plate irrespective of how many holes and routing there is in the design. That makes costing of a project very easy and allows for several different items from different projects to be put onto one plate.
     
    • Thanks Thanks x 1
  17. realtek

    realtek

    Joined:
    21 Jun 2012
    Messages:
    87
    Thanks Received:
    0
    Location:
    Hampshire
    Country:
    United Kingdom
    Awesome job, love the fact you got a massive box of fun snaps next to a couple of potentially explosive boilers and gas supply lol
     
Loading...

Share This Page