
OHS is open source based burglar alarm and automation platform. It can work as new alarm gateway, or it can replace your old alarm panel. OHS can use any wired 12V sensor, PIR, smoke or reed switch. It has Web interface that is used to set it up. OHS has GSM modem that is able to send SMS or page you. It has radio interface for environmental sensors. OHS is self-contained, it does not need any cloud service, only optional SMTP server for emails, or MQTT server to publish collected sensor data.
Thursday, June 30, 2016
W5500 test PCB

Wednesday, June 15, 2016
Gateway progress
I have all components at home and I started already some tests. There are good results and bad results as well.
I'm happy to say, that my UART mux is working as I wanted it to work. There are 2 UARTs on ATmega1284P, one is used for GSM modem and second for RS485. Both need to be connected to hardware serial in order to have queue, interrupts and other capabilities. But I keep compatibility with FTDI Arduino programmer, so I miss 3th serial. First I wanted to put jumpers to redirect serial 0 to GSM or FTDI, but later I have found nice little IC 74LVC1G3157 that is able to mux and demux one digital or analogue line to 2 outputs in both direction. With using the 3.3V present in FTDI it switches automatically from GSM to FTDI any time you connect the FTDI to header. Nice little trick.
New GSM module is working well, I have switched from external SIEMENS to more common SIM900. It did not send SMS, and I was not able to read extended status, but it was all matter of slightly different responses of the 2 modems to same AT commands. Some "/r" or adding empty line in library and all started to work. One thing that needs to be corrected on PCB for SIM900, is the placement of capacitor near GSM antenna connector. If one will put it in position toward the capacitor bank it can, with some bad luck, accidentally short 4V and ground. Hot glue will do will do for now, but I will move the capacitor 2-3 mm away. There is also SIM900 RESET connected to ATmega, which is most most probably unnecessary. I think rather to use it as input of SIM900 STATUS to quickly see if module is ON or OFF.
Now the bad news, the Ethernet part is not working well, I keep on losing ACK or packets. Sadly I was expecting some problems there, as it requires differential traces tuned to some impedance and EMI reduction, I have sent the finished gerbers to friend to evaluate. Well, it turned out I have cross talk after the PHY. I'm absolutely not expert on such design, and I have no such equipment to debug 100Mbits Ethernet. But I have very slowly eliminated all to this hardware problem. Also lowering the speed to 10Mbits fairly lowered the error rate of my packets. All that is left is to try another brand MAGJACK.
All bad is for some good, I have tuned up Webduino code and W5500 library to use maximum bandwidth, and the embedded web server is now pretty fast, rising to over double the speed.
Rest is fine, I will just test the ADC protection circuit. For W5500 I will most probably design small 2,5 x 5 cm breadboard friendly PCB, not to waste another $50 for whole gateway board.
I'm happy to say, that my UART mux is working as I wanted it to work. There are 2 UARTs on ATmega1284P, one is used for GSM modem and second for RS485. Both need to be connected to hardware serial in order to have queue, interrupts and other capabilities. But I keep compatibility with FTDI Arduino programmer, so I miss 3th serial. First I wanted to put jumpers to redirect serial 0 to GSM or FTDI, but later I have found nice little IC 74LVC1G3157 that is able to mux and demux one digital or analogue line to 2 outputs in both direction. With using the 3.3V present in FTDI it switches automatically from GSM to FTDI any time you connect the FTDI to header. Nice little trick.
New GSM module is working well, I have switched from external SIEMENS to more common SIM900. It did not send SMS, and I was not able to read extended status, but it was all matter of slightly different responses of the 2 modems to same AT commands. Some "/r" or adding empty line in library and all started to work. One thing that needs to be corrected on PCB for SIM900, is the placement of capacitor near GSM antenna connector. If one will put it in position toward the capacitor bank it can, with some bad luck, accidentally short 4V and ground. Hot glue will do will do for now, but I will move the capacitor 2-3 mm away. There is also SIM900 RESET connected to ATmega, which is most most probably unnecessary. I think rather to use it as input of SIM900 STATUS to quickly see if module is ON or OFF.
Now the bad news, the Ethernet part is not working well, I keep on losing ACK or packets. Sadly I was expecting some problems there, as it requires differential traces tuned to some impedance and EMI reduction, I have sent the finished gerbers to friend to evaluate. Well, it turned out I have cross talk after the PHY. I'm absolutely not expert on such design, and I have no such equipment to debug 100Mbits Ethernet. But I have very slowly eliminated all to this hardware problem. Also lowering the speed to 10Mbits fairly lowered the error rate of my packets. All that is left is to try another brand MAGJACK.
All bad is for some good, I have tuned up Webduino code and W5500 library to use maximum bandwidth, and the embedded web server is now pretty fast, rising to over double the speed.
Rest is fine, I will just test the ADC protection circuit. For W5500 I will most probably design small 2,5 x 5 cm breadboard friendly PCB, not to waste another $50 for whole gateway board.
Thursday, June 9, 2016
My setup
Remote (door entry) units are connected also by wire cables (RS485 protocol) and there is already short video, how they work.
Sunday, May 15, 2016
PCB is here
Thursday, April 21, 2016
PCB for new GW board.
Little later that I wanted here is 3D picture of new GW PCB version 1.6. I have already send it for fabrication. Wish me luck. :)
There is still 1284P, new WIZ5500, SIM900, new dual power supply, new analogue protection circuit and RFM69HW. It comes in 10*13cm size and will have nice big connectors.
There is still 1284P, new WIZ5500, SIM900, new dual power supply, new analogue protection circuit and RFM69HW. It comes in 10*13cm size and will have nice big connectors.
Friday, February 12, 2016
Battery node
New node boards have arrived. I've ordered first time from seeed, and they look quite good. Nice sharp traces, I use usually bigger ones, as I tend to hand solder sometimes. Nicely aligned solder mask, and silkscreen without smudges. I will use them in future for sure.
This board was also for me first board to be made in KiCad, instead of Eagle, as I needed bigger PCB area for new gateway(main board). I can just say all as expected, if you check your Gerbers, there should not be any surprise. I feel a bit more confident to spend $50 for the big boards.
So, speaking of hardware, I soldered the battery option node. There is place on PCB for either battery or DC or even both if you want dual power (3.3V and 5V). And it works! Happy man :). To put it in numbers:
Battery voltage is more then 3.4V:
ATMega328P, and HW69W both sleeping: 0.09mA
ATMega328P working , and HW69W sleeping: 7.2mA
ATMega328P working , and HW69W receiving: 8.5mA
ATMega328P working , and HW69W sending: 61mA
Battery voltage is less then 3.4V:
ATMega328P, and HW69W both sleeping: 0.12mA
ATMega328P working , and HW69W sleeping: 14mA
ATMega328P working , and HW69W receiving: 17mA
ATMega328P working , and HW69W sending: 123mA
I tend to use it with li-po batteries, in theory they have self discharge ranges about 5% in month, then 1–2% per month (plus 3% for safety circuit). By raff numbers, and using the scenario of a remote sensor sleeping for 5-10 minutes, reading the sensor and doing the math for 500ms. Finally transmitting for at full power for 10ms, it gives me battery life for about 2 years with 2000mAh battery.
Now the question here is where it is a practical and economical solution to buy a li-po and let it basically drain by self discharge. Eneloops NiMH have seems to be more suitable, but li-po's are getting cheaper on eBay or such. Another solution is to go for a small li-po, around 200mAh and tiny solar panel. This or another, I'm happy with its wide input voltage and consumption. With this setup I can go from AA, to li-po or NiMH.
Going back to design, it uses MCP1252, which is inductorless, buck/boost, DC/DC converter with low quiescent power: 80 μA (Typical), and giving 120 mA (150mA max, high power RFM69HW can be used) output current. Add couple of ceramic capacitors, and you are set. On picture capacitors a a bit bigger then pads, since I have put what I found in drawer, and not the proper 1206.
Tuesday, January 5, 2016
New main unit.
As new node PCB is in transit, I have some time to move forward in design
of new PCB for main board. It will be bigger with all necessary components on it. As I have moved from Eagle to KiCad, I will wait for the new node PCB to see what mistakes it will bring. Lately I was in search of new fabrication house, but boards bigger then 10x10cm are rather expensive. My new board will be most probably 10x13cm and it is about 50USD without shipping for 5 pcs at least. It becoming a bit expensive fun, hope to not make serious mistake.
But new board is getting into final shape. It has WizNet W5500
Ethernet chip, SIM900 for GSM, and also some other improvements like
better analogue protection, and RFM69HW. It will be drop in
replacement for any old wired burglar alarm. It will also have new nice big and 45° angled screw terminals.
I have also in mind extension board the will plug on top of the analogue part that is on right side and allow 8 ports to be added. They will be stackable up to maximum of 4 boards, together 40 wired analogue inputs connected directly to main board.
Also I'm thinking now, it as it looks like final product, I will sell the finished boards and nodes. I guess it can be a good jump start to any one who wish to do some security alarm at home and use as sensor gateway for home automation as well. And still use the Arduino code and various libraries to tweak it, add new functionality or features. Believe me the old 8bit atmega has still power to do all these things fast and reliable.

I have also in mind extension board the will plug on top of the analogue part that is on right side and allow 8 ports to be added. They will be stackable up to maximum of 4 boards, together 40 wired analogue inputs connected directly to main board.
Also I'm thinking now, it as it looks like final product, I will sell the finished boards and nodes. I guess it can be a good jump start to any one who wish to do some security alarm at home and use as sensor gateway for home automation as well. And still use the Arduino code and various libraries to tweak it, add new functionality or features. Believe me the old 8bit atmega has still power to do all these things fast and reliable.
Subscribe to:
Posts (Atom)