NABOT - [Not A] BOT Domotic

NABOT, is not a bot.

But could be considered as one (remember that movie with the 'red eye' in the house?)

Purpose:

At the origin, only have some cool touch switches

now... a complete domotic and security system

Platform:

interconnected PICAXE devices, various sensors

Network (BUS):

Inter-picaxe communication works fine https://www.robotshop.com/letsmakerobots/node/3548 (mintvelt's excellent tutorial)

But the 5V TTL signals are not tailored for long distance domotic network

The evidence for me is RS485 https://www.robotshop.com/letsmakerobots/node/4642 (my own rs485 component page)

The cable will be CAT5 STP (shielded) LAN cable, which over-meets the RS485 requirements

Components:

Power supply : 2x9V transformers, bridge rectifiers, LM2940 voltage regulators + capacitors

PICAXE mcu's : (08 for simple switches...... 18, 28 or 40 where needed)

Touch sensors : QPROX QT110 family http://www.qprox.com/products/Page-16035/qt110.html

RS485 transcievers

LSI LS7534 dimmer control chips PICAXE08 (phase lock loop), to control the TRIAC

16A 800V triacs, + opto thingeys

Piezo-buzzer (in each switch)

LCD screen(s) https://www.robotshop.com/letsmakerobots/node/4644

cheap Remote control http://www.amazool.com/images/products_images/unfurl/amazool_b442_shop.jpg

touchpads ?

fingerprint reader ?

Ideas:

-Switches

-Dimmers

-Control of the double flow ventilation unit

-Monitoring of the rainwater tank level and auto refill with tap water when empty, using a dishwasher valve

-PIR detection (automatic light in the entrance, security system)

-Implement a restrospective token bus over RS485 http://wrldcomp.com/the_token_bus_protocol/index.html

-Implement an 'ACTIVE ALARM' system (security sensors emit packets when everything is ok... and stop when something is going wrong)

-Have a web/wap interface

-Control/Monitor the heat-pump

-Control the garage door opener

-Have the switches 'ring' (beep) when someone is ringing at the door

-or when we want to tell the kids that it's dinner time. (to be done) (the kids I mean)

-Have a self-test function, for example, after 10sec of contact, the switches enter in a self-test mode with some beeps,

and action on the BUS

-Show time, temperature... or news... on the switches when idle

-... any suggestion is welcome !

Current status:

QT110 : ok touch sensors are working

RS485 : ok packets are sent and recieved

LCD : ok some fun tests are working fine

IR control : ok, working with SONY RC

Power Supply : ok

Dimmer : ok - now using a picaxe08M to sync with the phase (see the comments)

TRIAC power output : ok - I have recieved my optothingeys

Design the touche plates. (choose a size, a shape, a material)

or use some IR detection instead of touch sensors

1st february : tonight I've exploded a 16A 800V triac, fused 2 resistors, welded my oscillo-probe...

26th of february : It's Alive !!!

I've recieve my order from Thailand, with all my optothingeys and other fun stuffs (like 555"s and a realtime clock)

See the new video "First live test"

complete domotic and security system

  • CPU: Picaxe
  • Power source: 220V mains
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/nabot-not-a-bot-domotic

X10

Have you looked at X10 or some of the other home automation standards?

Mike

I did’nt

no, I did’nt look for any standard, and prefered to start from scratch

I did’nt know X10 (even not the name)

iF we can believe the french wikipedia, X10 was invented by a belgian guy :D,

uses 120Khz signals over mains, sending a bit at each zero crossing

A command takes 3/4 sec to be sent

now this is cool !!!

now this is cool !!!

Nice. I’ve got a bit of home

Nice. I’ve got a bit of home automation installed, using Insteon interfaces from SmartHome.com. I’ve got a laptop functioning as a server running MisterHouse (open-source perl package), and several Insteon light switches, power outlets, etc. Right now all it does is turn on some lights like the front porch light 30 mins before sunset and turn them off at 3am and things like that, but I’ve been meaning to integrate it with some of my other projects like my Arduino-controlled moodlight, to do more interesting things. If you install microphones throughout the house, the software can use voice recognition to respond to verbal commands, and if you install speakers, it can talk to you like to announce that someone’s at the door or tell you the current weather when you ask or whatever. But I’m renting this house, so I can’t go running wires through the house for speakers and mics :slight_smile:

Dan

Red Alert! Red Alert!

Your house has now taken over and all occupants will be destroyed on site! lol

Nice work so far… :stuck_out_tongue:

see i though X10 was
see i though X10 was invented by radio shack but thats probably wrong

here is a fun video of early

here is a fun video of early domotic

I did never think about having the bath controlled by a comptuer :slight_smile:

http://www.youtube.com/watch?v=Y7Z7pV4hw3Y

here a picture of the SONY IR protocol signal :

here is the result of a big 220V mess ;)

(triac was 800V 16A)

Feb 6th and 7th:

As LS7534 seems painful to use (non standard voltages...), I've been working on a Picaxe08 Phase locking

The idea is simple :

- Have the Picaxe detect the zero crossing

- Wait a defined time (depending the dimming value)

- Send a Pulse to the optocoupler, which drives the Triac

- The Triac is triggered by the pulse, and stays 'On' until next zero crossing

Here is the circuit I made to detect the zero crossing

in RED, the 220V 50Hz mains

in GREEN, the zero-crossing detection sent to the Picaxe

What has been done so far:

“reverse” zero crossing detection (signal is always high, with a short low at zero crossing) , picaxe is sync’ed to that, and the pulse is generated after a defined delay

the hereabove delay is recieved by an “inter-picaxe” serial data transfer

How I’ve proceeded:

1) Verify if the secondary of a transformer is sync’ed to the mains --> Yes, a really short in advance (<1ms)

2) Build the zero crossing detection circuit, based on the output of the rectifier bridge (a NPN transistor and 2 resistors)

3) Sync Picaxe08 using PULSIN (the Picaxe processing time makes the signal really sync’ed to the mains)

4) Implement the serial input of the dimming value

5) Simulate a ‘positive’ zero crossing signal in Electronic Workbench (see picture)

Next steps:

- If dimming value is ‘OFF’, or ‘FULL ON’, set output to LOW or HIGH, then enter a second loop, which is not sync’ed and is just waiting for a SERIN to occur

- Buy some optocoupler thingys

- Make some 220V mess again

now using ‘positive’ zero crossing detection

I’ve successfully modified the zero crossing detection as per my previous “electronic labs” simulation

This week, I’m replacing the serial inter-picaxe communication to the syncing picaxe by a pulsout/pulsin way of giving the dimmer value

basic code for phase-locking

sync_loop: (*)

pulsin 3,1,w0 'sync on high waits the trigger input to be high (zero crossing)

pulsout 1,w1 pulsout is used to precisely ‘pause’ (pulsout is 100 more accurate than ‘pause’) (**)

pulsout 2,50 output to the optocoulpler thingy (to come), that triggers the main triac

if pin4=1 then goto get_value input pin used to get the dimming level (0=OFF 255=ON)

goto sync_loop

When the dimmer setting is ON or OFF, the trigger is set HIGH (on) or LOW (off), then an idle loop is only checking for a new dimming level

the sine of the MAINS (220V 50Hz) and the output of the transformer and rectifier bridge (9V)

note that the output of the transformer is about 1ms in advance

the "zero crossing detection" transistor output

(which keeps the 1ms advance)

this is the output of the Picaxe08 : which is no more in advance

The pulsout used as a 'pause' instruction takes some time to execute.

Even a '0' pulse takes the 1ms advance time we had on the zero-crossing signal, we are now Sync'ed to the mains

and a dimming signal test

256 : full power : no pause

128 : half power, wait an half cycle (5ms)

0 : triggers just at zero crossing (and of cycle)

here : 180 ---> (256-180)/256 * 10 ms = 2,96 ms ---> pause is PULSOUT 1,296

woahw!
This is advanced serial shizzle! Better not cross breed this system with Fritsl’s stuph!

thanks:)

yeah, I did’nt even think about interconnecting it with any fun robot

I will definitely think about an RF access point somewhere

unexpected sync problem

I’ve been wrestling with the sync for 2 days, before I understood what was going on

The problem appears on “low dim” (long pause before triggering the triac)

The symptom was the oscilloscope showing the pulse every two zero-crossing of the mains.

Depending the time-base, I sometimes had a full coverage of the signal.

I had to go with some “Fritsl-ear-o-scope” tools

|x

…so… use a piezo-beeper to hear the difference between a 100Hz full-signal

…or the half 50Hz sound of the bad sync’ed trigger

Now that I was sure that my signal had a problem with long delays, I checked more in detail with the scope.

Oh surprise… My code was waiting for a zero-crossing detection that had ALREADY happened a few ms in the past !

The only solution (at this point...), is to have a second loop for "low-dim" value, which is synced, and triggers without any pause.

The Sync-Picaxe has now 3 loops, depending the dimmer value :

- 0 or 255 : Off, or On (pin Low or High)

- 1 to 80 : LowDim : always trigger at 9ms (1/10 of the phase)

- 81 to 254 : continuous dimming with the sliding trigger pulse

!whaow

I must take that back: some fritsl serial stuph cross breeding apparently DID help you out here.

All the rest flew right over my head!

just a suggestion: in order
just a suggestion: in order to understand whether the owner of the house is actually stopping the transmission between the receivers and senders of the alarm posts, you could maybe used an RFID tag. If the RFID tag is detected then the alarm won’t be set off, else it will.