Tuesday, September 10, 2019

Gateway 2

I did not post too much updates recently, but I was quite busy with new version of gateway. I manage to draw and let fabricate new PCB with 32bit ARM chip as main controller. For the purpose of first design I have shrunk the PCB to 100x100mm, but I have managed to squeeze all component I wanted there. Good news is that I was able to stay on 2 layers, and avoid much more expensive 4 layer PCB. I made the board at pcbway with the cheapest 6/6 method and the quality stays similar to my free boards. I will stay with them for sure.

After realizing that 100x100mm PCB includes all I need, I will most probably stay with this new format. To sum up there is:
  • STM32F407 with 1MB of flash and 128KB of usable free RAM, running at 168MHz.
  • LAN8720A Ethernet PHY with 10/100Mbit.
  • Two step power supply with 12V to 4V switching and 4V to 3V3 LDO.
  • Battery for RTC CR2032. STM32F407 has on-board RTC.
  • 10 analog (balanced) inputs for PIR, smoke, ...
  • 2G SIM800C module
  • Radio for RFM69 or RFM95.
  • 64KB SPI FRAM, bit expensive, but no wait times and blazing speed compared to I2C EEPROM.
  • RS485 for wired connections.
  • 2 relays for sirens.
  • 1 tamper zone for enclosure. 
  • Micro USB port for firmware update and direct console access.
  • ST-LINK V2 port.
  • 3 LEDs.

I guess it will pretty decent update to existing ATMega1284P.

I've made some mistakes during design of the PCB, also I forgot to wire some signals, or got them wired wrong. But, at least, I've managed to get the whole thing running with few cuts of traces here, or jumper wires there. Only hardware part, that I did yet tried, is wireless. After I manage at least initiate, send and receive some test packet I will go for new PCB revision with all corrections and the hardware part may be then ready.

I have already new sketch with addition to mount other then on-board 2G SIM800C. Basically there will be option to have SIM800C mounted, or there will be 2x5P connector to connect other modems like SIM7600 4G modems.

12 comments:

  1. Hello, first of all congratulations for such an excellent project, I was looking for a project of this type, I am an installer of security systems in my country (Colombia), if I can contribute with your project it would be very good, not being more goodbye ...
    sorry for my english

    ReplyDelete
    Replies
    1. Hello to Colombia, and thanks. I wellcome any contribution. Be it good idea, software or hardware contribution. What do you have on mind?
      Adam

      Delete
  2. hello, I have several doubts I would appreciate if you answer me
    1. are relay 1 and 2 PGM outputs?
    2. What are the possibilities of adding an alphanumeric keypad to manage the alarm system by means of passwords, view zone status, system failures and programming.
    3. In your programming, do you allow night arming to activate only certain areas?
    4. allows to have partitions of the alarm system
    5. Is it possible for the alarm to make a voice call?

    ReplyDelete
    Replies
    1. Hello Diego,
      To answer your questions.
      1. Relays 1 and 2 are programmable for each groups(partition).
      2. I use iButton keys, but gateway(main board) does not care how the remote entrance board get the password. iButtons are unique and carry 8 byte password.
      3. Night arming is not yet possible, but I plan to add it. There will be 2 different arm modes, ARM AWAY and ARM HOME. Then you will mark which zone is will trigger alarm in which mode.
      4. Partitions are existing, I call them groups.
      5. Now the gateway can send you email, and/or send SMS, and/or to ring your number(s). But the gateway is not able to speak :).

      Just so say, the software is Open Source, so it can be modified to fit your need.

      It has some nice features, like you can arm/disarm group via SMS from authorized number.

      Adam

      Delete
    2. Hi Adam, another function that would be good for the alarm panel to have is the atz function, this function would duplicate the zones from 8 to 16 using 1k and 2.2k resistors so we could save wiring, attached a connection diagram so that you understand me

      https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQb5hkpLj7W4Oj45CjAP_MpbwZFphi9j2NoopOXrO31uaYtAbDfNg&s

      Delete
    3. https://darauble.files.wordpress.com/2015/11/eol-tamper-ulc-atz.png

      Delete
  3. Hello Diego,
    interesting, and if I understand it right, the purpose of ATZ is to double the zones. Or basically attach 2 zones to one input. I think it is very doable. Now gateway uses 2 resistors in one PIR to differentiate OK from PIR state, and any other value is Tamper. It creates very secure way to connect PIR to gateway, avoiding any manipulation with wiring.
    Supporting ATZI would need a bigger changes, especially to support both ATZ and standard functionality together, but in principal gateway is already doing it.
    Adam

    ReplyDelete
  4. Hello Adam, the changes that are required to add the atz function would be at the software or hardware?

    ReplyDelete
    Replies
    1. Hello Diego, only in software. More precisely, Zone thread needs to bw modidied.

      Delete
  5. Hi Adam, Any further news on this, and is it available to purchase yet ?
    Mick.

    ReplyDelete
    Replies
    1. Hello Mick,
      just about last week I have created driver for RFM69 that is compatible with the LowPowerLab one I use on my Arduino boards. So I can say my current version of HW is fully functional. There are few changes, major one is use of LTE module.
      So yes, I can say it is ready as of HW. SW part need some work. But I have most of the functionalities included.

      Delete
  6. Sounds good Adam, I will keep my eyes open for updates then when you have everything ready.

    ReplyDelete