Friday, May 3, 2019

Updates in 1.7.6.4

This update is rather small and concentrates only on users having problems with false alarm of AC disruption on PSC-35A switching power supply.


If your PSC-35A or PSC-60A is repeatedly reporting AC On and Off alarms in OHS Log, then you should definitely go for the update. It adds kind of oversampling of AC_OFF pin, and also introduces 60 seconds delay when On/Off alert is issued.

As it is only minor version update configuration of you GW will remain as is.

Purpose of it, is to overcome the short, but frequent pulses of logical 1 to AC_OFF signal even when it supposed to be 0. This is caused by some logic inside the PSU.

If you still experience any issues with this PSU, let me know, best to use forum.

Firmware is pre-compiled in firmware section. 

Sunday, February 3, 2019

Preparation for new OHS gateway.

There is almost all functionality in OHS gateway that I have wanted when I started, however I have internal need to carry on :). One thing, I would like to improve, is the crypto capabilities that can never be achieved on otherwise very nice ATmega1284P 8 bit MCU. It somehow led me to look further into another step that would be 16 or 32 bit MCU. There are many choices in therms of available MCUs and platforms. Maybe to stay on Arduino platform and choose some of the ARM Cortex available. But I have decided to stay with older brother of now used NilRTOS called ChibiOS/RT, since the "operating system" RTOS is maybe the most important for me.

ChibiOS can support variety of MCU including RaspberryPi and ATmega, but vast majority of supported MCU are STM32 families of many kinds. Looking at those mighty 32-bit ARM MCU, I have picked one called SMT32F407. These are high-performance Cortex-M4 32-bit RISC operating at a frequency of up to 168 MHz. They features a floating point unit (FPU), Ethernet, USB, RTC and so on. They have up to 1MB of flash storage and 128k of user usable RAM, and they are available in in various packages with varying pin count.

My goal is to create new gateway with similar functions as the current ATmega one, and then build up on this.The gateway may have different number of hardware zones, but I want to use wire and wireless nodes and zones. That is, I intend to still use Arduino based nodes s much as possible, just because of their easy to use nature. I plan to add GSM module on gateway, maybe as add-on board, so it can be swapped to 4G module in future. And also wireless radio, maybe as add-on board too. SMT32F407 has software defined TCP/IP stack, and it can be used with IPv6, Web Socket, SSL/TLS and so on. And what I like most, as ChibiOS supports many more even higher performance MCU, the future grow will be then much easier.

Saying all that I will continue to support, and develop new functionality on current ATmega gateway, as I use it at home :). The new one will not come anytime soon (this year), as it bring great deal of challenges in terms of HW and SW. Also I will keep the project open, as I do not like equipment that dies when its producer decides to cut it off, or just disable the required host server.

Monday, January 21, 2019

New PCB

It is always nice when someone appreciate your work, especially if you give the product to public as free to use. It happened to me as well, I was asked to review a PCB fabrication house called pcbway.com. Without too much hesitation I have sent them Gerber files of OHS gateway, and two of weeks later postman brought me the package, nice :).

I must say I have tried around 4 different China fabrication houses, and this one is fifth. I tend to do my board easy to hand solder, and I do not use fine traces or gaps bellow 10mils. This give me better trust to choose rather inexpensive manufacturing processes. There is not too much difference between ordering in pcbway and other houses, you do all as usual on their web pages. One difference though, is they probably inspect the gerbers by person. It came to me as I have used 6mil trace/gap option as the basic available, and within 1 day after submitting gerbers they proposed me to change it to 5mil. First time I've seen that actually someone had a glimpse of my layout before manufacturing. Of course it was a little more expensive, but still within the free coupon I was given for review.

The boards themselves are nicely made. I can compare to 2 other PCB houses I have boards from. I will skip the traces evaluation since I have no visual or other tool to do any reasonable comparison. But first think you notice with bare eye is silk screen, it is noticeably vivid and precise. It's placement is usually the weakest point in China PCB houses. But this board is done accurately, not faint and not smeared. I think using this fab one can afford to put logo on silk screen and not be afraid that it will come out ugly.
Second difference is via placement. When you use IC with many legs you usually route signals to other IC close to each other, this leads to having vias sit to each other in some pattern too. On such patterned vias you can easily spot the sharpness and bit placement. I must say there the vias on the PCB are great I would not be afraid to go with lower then my 0.3 millimeter.  Along with via quality goes actual hole placement. And it is similar to vias, nicely placed in exact center of pad.
Third difference I've noticed is solder mask, using loupe the mask is somehow more corresponding to what is draw in gerbers. Put it simply, exposed copper pads are smaller and more precise. This will help especially during soldering, the small components will not wander around, and IC will not have as many solder bridges.

Here is picture hopefully supporting my point, with pcbway PCB closer on top overlapping seeedstudio PCB. You can see here of-centered holes and wider solder mask along with nice silk text.


As I said on beginning, I do not develop over-complicated PCBs with many layers, buried vias or impedance control, so my evaluation is as erudite as hobbyist can offer. But I would say I will use the pcbway services in future for sure.


Monday, December 31, 2018

Updates in 1.7.6.3

New minor release is ready with following changes:
  • Full support for remote radio Authentication node including rather big change in RFM69 thread.
  • Update of WebUI, added JavaScript to Trigger menu to better show meaning of Pass option.
  • Update of WebUI, on Triggers and Timers overview. Many of the columns that are blocked via option, that is, they are now shown as blank instead of default for clarity.
  • Updated DigitalIO library most recent one and relevant OHS code.
  • Updated Ethernet library to most recent version (Now even newer Ethernet library available, need to do it again). 
  • Updated GSM library, there are some enhancements in parser.
  • Fixes in counting radio packets and other counters (++i vs. i++).
  • Few minor bugs fixed in WebUI. 

Saturday, December 8, 2018

Authentication unit over radio

Recently new user of OHS gateway has explored a slightly new way how use authentication units. That is normally until now, the authentication units are desired to be online when main unit is online. This was easily achieved when they were wired nodes with RS485 wired connection. The power and data were going to node over 4 wires, like in any industrial RS485 application. Same 4, or more, wires are usually installed in your house for old authentication units. And it is easy to use them switching old unit to new one.

But what to do in case you have no wires in walls and you want try it without too much construction work. Well, then use the radio as for sensors, right!.

For this reason there is new code example on GitHub. The code is build on RFM69 example, but adds parts of wired node where iButton, LEDs and speaker is used to complete a basic authentication node. I have tested it and it woks quite well without any issue. There were some changes needed in the gateway code, and I will soon post them to GitHub as version 1.7.6.3, along with other tweaks.

Of course there are some drawback over wired connection. It is recommended to have some battery backup for the node as well. That is use the USB node with charging and place a decent 1000mAh, or better bigger, battery. Still it can happen that the gateway is powered from it main 12V supply, and the authentication node battery is depleted and dies. In this case, when you arrive at home at this exact moment, you will not be able to disarm standard way, and you will face system alarm. It is probably not a security concern, but you'll annoy your neighbors a bit until you run to your gateway and turn it off. Thankfully there are two possible solutions. There is possibility to disarm over web interface, but unless you have battery backuped home network, you probably will not be able to do so. But, you can always disarm group over SMS command, this should work as GSM module is in the gateway.

Second problem can be radio connection. As for any sensor, the radio authentication can be out of reach of the gateway. While it is unlikely in normal house, you have to think about having at least RSSI of -75, so you are guaranteed to have room to some unexpected radio noise. It can be easily checked in web interface debug tab, incoming RSSI is reported on any received node packet.

Also, one have to keep the unit powered all the time from at least 500mA USB charger, some older cellular charger perhaps. As the node is not entering any sleep state, nor suspending the radio module, and consuming 20-40mA of power. It cannot be asleep, as it needs listen to receive all radio updates. Rest of power to 500mA is to charge the battery after power failure.

Still I think these small disadvantages can be accepted as trade off for fast deployment.



Tuesday, July 3, 2018

Radio node mini

There is now new basic sketch on GitHub that can be used as basis for integration of mini node to OHS. It registers 3 sensors, that is: battery voltage, TX power level and charging state. Sketch can be uploaded using Arduino IDE and selecting Arduino Pro Mini board, be careful to select proper crystal speed(16 or 8MHz) when uploading the sketch. Voltage selection in menu of Arduino IDE can be ignored as board works always with 3V3.

Just now I realized the board size is pretty close to standard SD card.

Also I will be mostly using simple wire antenna with this small boards. Here are length of wire that can be soldered directly to RFM69 pad:

433 1/4 wave = 164.7mm
433 1/2 wave = 329.4mm
433 full wave = 692.7mm

868 1/4 wave = 82.2mm
868 1/2 wave = 164.3mm
868 full wave = 345.5mm

915 1/4 wave = 77.9mm
915 1/2 wave = 155.9mm
915 full wave = 327.8mm

I personally use 868 modules and 1/4 wave length antennas.

Monday, April 23, 2018

Updates in 1.7.6.2

Here is list of updates in current release:
  • Fixed bug of log queue being full, when alert queue become full. When alert queue is filled with slow alerts, it issues a log entry. But the log processing did not free log queue if there was alert requested for queue overflow. Now gateway ignore alerts about alert queue full, and log queue correctly free its FIFO.
  • Added disarm button to group tab. This has various purposes, especially for groups that are taking care about smoke and flood detectors. 
  • Changed main_board.cpp into main_board.ino to better suite the Arduino IDE.
  • Moved and compiled from Arduino 1.6.9 to latest 1.8.5.